123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288 |
- #import <Foundation/Foundation.h>
- #import "CLSAttributes.h"
- #import "CLSLogging.h"
- #import "CLSReport.h"
- #import "CLSStackFrame.h"
- #import "Answers.h"
- NS_ASSUME_NONNULL_BEGIN
- @protocol CrashlyticsDelegate;
- @interface Crashlytics : NSObject
- @property (nonatomic, readonly, copy) NSString *APIKey;
- @property (nonatomic, readonly, copy) NSString *version;
- @property (nonatomic, assign) BOOL debugMode;
- @property (nonatomic, assign, nullable) id <CrashlyticsDelegate> delegate;
- + (Crashlytics *)startWithAPIKey:(NSString *)apiKey;
- + (Crashlytics *)startWithAPIKey:(NSString *)apiKey afterDelay:(NSTimeInterval)delay CLS_DEPRECATED("Crashlytics no longer needs or uses the delay parameter. Please use +startWithAPIKey: instead.");
- + (Crashlytics *)startWithAPIKey:(NSString *)apiKey delegate:(nullable id<CrashlyticsDelegate>)delegate;
- + (Crashlytics *)startWithAPIKey:(NSString *)apiKey delegate:(nullable id<CrashlyticsDelegate>)delegate afterDelay:(NSTimeInterval)delay CLS_DEPRECATED("Crashlytics no longer needs or uses the delay parameter. Please use +startWithAPIKey:delegate: instead.");
- + (Crashlytics *)sharedInstance;
- - (void)crash;
- - (void)throwException;
- - (void)setUserIdentifier:(nullable NSString *)identifier;
- - (void)setUserName:(nullable NSString *)name;
- - (void)setUserEmail:(nullable NSString *)email;
- + (void)setUserIdentifier:(nullable NSString *)identifier CLS_DEPRECATED("Please access this method via +sharedInstance");
- + (void)setUserName:(nullable NSString *)name CLS_DEPRECATED("Please access this method via +sharedInstance");
- + (void)setUserEmail:(nullable NSString *)email CLS_DEPRECATED("Please access this method via +sharedInstance");
- - (void)setObjectValue:(nullable id)value forKey:(NSString *)key;
- - (void)setIntValue:(int)value forKey:(NSString *)key;
- - (void)setBoolValue:(BOOL)value forKey:(NSString *)key;
- - (void)setFloatValue:(float)value forKey:(NSString *)key;
- + (void)setObjectValue:(nullable id)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance");
- + (void)setIntValue:(int)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance");
- + (void)setBoolValue:(BOOL)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance");
- + (void)setFloatValue:(float)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance");
- - (void)recordCustomExceptionName:(NSString *)name reason:(nullable NSString *)reason frameArray:(CLS_GENERIC_NSARRAY(CLSStackFrame *) *)frameArray;
- - (void)recordError:(NSError *)error;
- - (void)recordError:(NSError *)error withAdditionalUserInfo:(nullable CLS_GENERIC_NSDICTIONARY(NSString *, id) *)userInfo;
- - (void)logEvent:(NSString *)eventName CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:");
- - (void)logEvent:(NSString *)eventName attributes:(nullable NSDictionary *) attributes CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:");
- + (void)logEvent:(NSString *)eventName CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:");
- + (void)logEvent:(NSString *)eventName attributes:(nullable NSDictionary *) attributes CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:");
- @end
- @protocol CrashlyticsDelegate <NSObject>
- @optional
- - (void)crashlyticsDidDetectCrashDuringPreviousExecution:(Crashlytics *)crashlytics CLS_DEPRECATED("Please refer to -crashlyticsDidDetectReportForLastExecution:");
- - (void)crashlytics:(Crashlytics *)crashlytics didDetectCrashDuringPreviousExecution:(id <CLSCrashReport>)crash CLS_DEPRECATED("Please refer to -crashlyticsDidDetectReportForLastExecution:");
- - (void)crashlyticsDidDetectReportForLastExecution:(CLSReport *)report completionHandler:(void (^)(BOOL submit))completionHandler;
- - (void)crashlyticsDidDetectReportForLastExecution:(CLSReport *)report;
- - (BOOL)crashlyticsCanUseBackgroundSessions:(Crashlytics *)crashlytics;
- @end
- #define CrashlyticsKit [Crashlytics sharedInstance]
- NS_ASSUME_NONNULL_END
|