Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit dd06b69

Browse files
Basic integration of Crashlytics for iOS... #549
1 parent b6c66e4 commit dd06b69

File tree

2 files changed

+249
-0
lines changed

2 files changed

+249
-0
lines changed
Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
2+
declare class Answers extends NSObject {
3+
4+
static alloc(): Answers; // inherited from NSObject
5+
6+
static logAddToCartWithPriceCurrencyItemNameItemTypeItemIdCustomAttributes(itemPriceOrNil: NSDecimalNumber, currencyOrNil: string, itemNameOrNil: string, itemTypeOrNil: string, itemIdOrNil: string, customAttributesOrNil: NSDictionary<string, any>): void;
7+
8+
static logContentViewWithNameContentTypeContentIdCustomAttributes(contentNameOrNil: string, contentTypeOrNil: string, contentIdOrNil: string, customAttributesOrNil: NSDictionary<string, any>): void;
9+
10+
static logCustomEventWithNameCustomAttributes(eventName: string, customAttributesOrNil: NSDictionary<string, any>): void;
11+
12+
static logInviteWithMethodCustomAttributes(inviteMethodOrNil: string, customAttributesOrNil: NSDictionary<string, any>): void;
13+
14+
static logLevelEndScoreSuccessCustomAttributes(levelNameOrNil: string, scoreOrNil: number, levelCompletedSuccesfullyOrNil: number, customAttributesOrNil: NSDictionary<string, any>): void;
15+
16+
static logLevelStartCustomAttributes(levelNameOrNil: string, customAttributesOrNil: NSDictionary<string, any>): void;
17+
18+
static logLoginWithMethodSuccessCustomAttributes(loginMethodOrNil: string, loginSucceededOrNil: number, customAttributesOrNil: NSDictionary<string, any>): void;
19+
20+
static logPurchaseWithPriceCurrencySuccessItemNameItemTypeItemIdCustomAttributes(itemPriceOrNil: NSDecimalNumber, currencyOrNil: string, purchaseSucceededOrNil: number, itemNameOrNil: string, itemTypeOrNil: string, itemIdOrNil: string, customAttributesOrNil: NSDictionary<string, any>): void;
21+
22+
static logRatingContentNameContentTypeContentIdCustomAttributes(ratingOrNil: number, contentNameOrNil: string, contentTypeOrNil: string, contentIdOrNil: string, customAttributesOrNil: NSDictionary<string, any>): void;
23+
24+
static logSearchWithQueryCustomAttributes(queryOrNil: string, customAttributesOrNil: NSDictionary<string, any>): void;
25+
26+
static logShareWithMethodContentNameContentTypeContentIdCustomAttributes(shareMethodOrNil: string, contentNameOrNil: string, contentTypeOrNil: string, contentIdOrNil: string, customAttributesOrNil: NSDictionary<string, any>): void;
27+
28+
static logSignUpWithMethodSuccessCustomAttributes(signUpMethodOrNil: string, signUpSucceededOrNil: number, customAttributesOrNil: NSDictionary<string, any>): void;
29+
30+
static logStartCheckoutWithPriceCurrencyItemCountCustomAttributes(totalPriceOrNil: NSDecimalNumber, currencyOrNil: string, itemCountOrNil: number, customAttributesOrNil: NSDictionary<string, any>): void;
31+
32+
static new(): Answers; // inherited from NSObject
33+
}
34+
35+
interface CLSCrashReport extends NSObjectProtocol {
36+
37+
OSBuildVersion: string;
38+
39+
OSVersion: string;
40+
41+
bundleShortVersionString: string;
42+
43+
bundleVersion: string;
44+
45+
crashedOnDate: Date;
46+
47+
customKeys: NSDictionary<any, any>;
48+
49+
identifier: string;
50+
}
51+
declare var CLSCrashReport: {
52+
53+
prototype: CLSCrashReport;
54+
};
55+
56+
declare class CLSReport extends NSObject implements CLSCrashReport {
57+
58+
static alloc(): CLSReport; // inherited from NSObject
59+
60+
static new(): CLSReport; // inherited from NSObject
61+
62+
readonly dateCreated: Date;
63+
64+
readonly isCrash: boolean;
65+
66+
userEmail: string;
67+
68+
userIdentifier: string;
69+
70+
userName: string;
71+
72+
readonly OSBuildVersion: string; // inherited from CLSCrashReport
73+
74+
readonly OSVersion: string; // inherited from CLSCrashReport
75+
76+
readonly bundleShortVersionString: string; // inherited from CLSCrashReport
77+
78+
readonly bundleVersion: string; // inherited from CLSCrashReport
79+
80+
readonly crashedOnDate: Date; // inherited from CLSCrashReport
81+
82+
readonly customKeys: NSDictionary<any, any>; // inherited from CLSCrashReport
83+
84+
readonly debugDescription: string; // inherited from NSObjectProtocol
85+
86+
readonly description: string; // inherited from NSObjectProtocol
87+
88+
readonly hash: number; // inherited from NSObjectProtocol
89+
90+
readonly identifier: string; // inherited from CLSCrashReport
91+
92+
readonly isProxy: boolean; // inherited from NSObjectProtocol
93+
94+
readonly superclass: typeof NSObject; // inherited from NSObjectProtocol
95+
96+
readonly // inherited from NSObjectProtocol
97+
98+
class(): typeof NSObject;
99+
100+
conformsToProtocol(aProtocol: any /* Protocol */): boolean;
101+
102+
isEqual(object: any): boolean;
103+
104+
isKindOfClass(aClass: typeof NSObject): boolean;
105+
106+
isMemberOfClass(aClass: typeof NSObject): boolean;
107+
108+
performSelector(aSelector: string): any;
109+
110+
performSelectorWithObject(aSelector: string, object: any): any;
111+
112+
performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any;
113+
114+
respondsToSelector(aSelector: string): boolean;
115+
116+
retainCount(): number;
117+
118+
self(): this;
119+
120+
setObjectValueForKey(value: any, key: string): void;
121+
}
122+
123+
declare class CLSStackFrame extends NSObject {
124+
125+
static alloc(): CLSStackFrame; // inherited from NSObject
126+
127+
static new(): CLSStackFrame; // inherited from NSObject
128+
129+
static stackFrame(): CLSStackFrame;
130+
131+
static stackFrameWithAddress(address: number): CLSStackFrame;
132+
133+
static stackFrameWithSymbol(symbol: string): CLSStackFrame;
134+
135+
address: number;
136+
137+
fileName: string;
138+
139+
library: string;
140+
141+
lineNumber: number;
142+
143+
offset: number;
144+
145+
rawSymbol: string;
146+
147+
symbol: string;
148+
}
149+
150+
declare class Crashlytics extends NSObject {
151+
152+
static alloc(): Crashlytics; // inherited from NSObject
153+
154+
static logEvent(eventName: string): void;
155+
156+
static logEventAttributes(eventName: string, attributes: NSDictionary<any, any>): void;
157+
158+
static new(): Crashlytics; // inherited from NSObject
159+
160+
static setBoolValueForKey(value: boolean, key: string): void;
161+
162+
static setFloatValueForKey(value: number, key: string): void;
163+
164+
static setIntValueForKey(value: number, key: string): void;
165+
166+
static setObjectValueForKey(value: any, key: string): void;
167+
168+
static setUserEmail(email: string): void;
169+
170+
static setUserIdentifier(identifier: string): void;
171+
172+
static setUserName(name: string): void;
173+
174+
static sharedInstance(): Crashlytics;
175+
176+
static startWithAPIKey(apiKey: string): Crashlytics;
177+
178+
static startWithAPIKeyAfterDelay(apiKey: string, delay: number): Crashlytics;
179+
180+
static startWithAPIKeyDelegate(apiKey: string, delegate: CrashlyticsDelegate): Crashlytics;
181+
182+
static startWithAPIKeyDelegateAfterDelay(apiKey: string, delegate: CrashlyticsDelegate, delay: number): Crashlytics;
183+
184+
readonly APIKey: string;
185+
186+
debugMode: boolean;
187+
188+
delegate: CrashlyticsDelegate;
189+
190+
readonly version: string;
191+
192+
crash(): void;
193+
194+
logEvent(eventName: string): void;
195+
196+
logEventAttributes(eventName: string, attributes: NSDictionary<any, any>): void;
197+
198+
recordCustomExceptionNameReasonFrameArray(name: string, reason: string, frameArray: NSArray<CLSStackFrame>): void;
199+
200+
recordError(error: NSError): void;
201+
202+
recordErrorWithAdditionalUserInfo(error: NSError, userInfo: NSDictionary<string, any>): void;
203+
204+
setBoolValueForKey(value: boolean, key: string): void;
205+
206+
setFloatValueForKey(value: number, key: string): void;
207+
208+
setIntValueForKey(value: number, key: string): void;
209+
210+
setObjectValueForKey(value: any, key: string): void;
211+
212+
setUserEmail(email: string): void;
213+
214+
setUserIdentifier(identifier: string): void;
215+
216+
setUserName(name: string): void;
217+
218+
throwException(): void;
219+
}
220+
221+
interface CrashlyticsDelegate extends NSObjectProtocol {
222+
223+
crashlyticsCanUseBackgroundSessions?(crashlytics: Crashlytics): boolean;
224+
225+
crashlyticsDidDetectCrashDuringPreviousExecution?(crashlytics: Crashlytics): void;
226+
227+
crashlyticsDidDetectCrashDuringPreviousExecution?(crashlytics: Crashlytics, crash: CLSCrashReport): void;
228+
229+
crashlyticsDidDetectReportForLastExecution?(report: CLSReport): void;
230+
231+
crashlyticsDidDetectReportForLastExecutionCompletionHandler?(report: CLSReport, completionHandler: (p1: boolean) => void): void;
232+
}
233+
declare var CrashlyticsDelegate: {
234+
235+
prototype: CrashlyticsDelegate;
236+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
declare class Fabric extends NSObject {
3+
4+
static alloc(): Fabric; // inherited from NSObject
5+
6+
static new(): Fabric; // inherited from NSObject
7+
8+
static sharedSDK(): Fabric;
9+
10+
static with(kitClasses: NSArray<any>): Fabric;
11+
12+
debug: boolean;
13+
}

0 commit comments

Comments
 (0)