|
| 1 | +// |
| 2 | +// CLSReport.h |
| 3 | +// Crashlytics |
| 4 | +// |
| 5 | +// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. |
| 6 | +// |
| 7 | + |
| 8 | +#import <Foundation/Foundation.h> |
| 9 | +#import <Fabric/FABAttributes.h> |
| 10 | + |
| 11 | +FAB_START_NONNULL |
| 12 | + |
| 13 | +/** |
| 14 | + * The CLSCrashReport protocol is deprecated. See the CLSReport class and the CrashyticsDelegate changes for details. |
| 15 | + **/ |
| 16 | +@protocol CLSCrashReport <NSObject> |
| 17 | + |
| 18 | +@property (nonatomic, copy, readonly) NSString *identifier; |
| 19 | +@property (nonatomic, copy, readonly) NSDictionary *customKeys; |
| 20 | +@property (nonatomic, copy, readonly) NSString *bundleVersion; |
| 21 | +@property (nonatomic, copy, readonly) NSString *bundleShortVersionString; |
| 22 | +@property (nonatomic, copy, readonly) NSDate *crashedOnDate; |
| 23 | +@property (nonatomic, copy, readonly) NSString *OSVersion; |
| 24 | +@property (nonatomic, copy, readonly) NSString *OSBuildVersion; |
| 25 | + |
| 26 | +@end |
| 27 | + |
| 28 | +/** |
| 29 | + * The CLSReport exposes an interface to the phsyical report that Crashlytics has created. You can |
| 30 | + * use this class to get information about the event, and can also set some values after the |
| 31 | + * event has occured. |
| 32 | + **/ |
| 33 | +@interface CLSReport : NSObject <CLSCrashReport> |
| 34 | + |
| 35 | +- (instancetype)init NS_UNAVAILABLE; |
| 36 | + |
| 37 | +/** |
| 38 | + * Returns the session identifier for the report. |
| 39 | + **/ |
| 40 | +@property (nonatomic, copy, readonly) NSString *identifier; |
| 41 | + |
| 42 | +/** |
| 43 | + * Returns the custom key value data for the report. |
| 44 | + **/ |
| 45 | +@property (nonatomic, copy, readonly) NSDictionary *customKeys; |
| 46 | + |
| 47 | +/** |
| 48 | + * Returns the CFBundleVersion of the application that generated the report. |
| 49 | + **/ |
| 50 | +@property (nonatomic, copy, readonly) NSString *bundleVersion; |
| 51 | + |
| 52 | +/** |
| 53 | + * Returns the CFBundleShortVersionString of the application that generated the report. |
| 54 | + **/ |
| 55 | +@property (nonatomic, copy, readonly) NSString *bundleShortVersionString; |
| 56 | + |
| 57 | +/** |
| 58 | + * Returns the date that the report was created. |
| 59 | + **/ |
| 60 | +@property (nonatomic, copy, readonly) NSDate *dateCreated; |
| 61 | + |
| 62 | +/** |
| 63 | + * Returns the os version that the application crashed on. |
| 64 | + **/ |
| 65 | +@property (nonatomic, copy, readonly) NSString *OSVersion; |
| 66 | + |
| 67 | +/** |
| 68 | + * Returns the os build version that the application crashed on. |
| 69 | + **/ |
| 70 | +@property (nonatomic, copy, readonly) NSString *OSBuildVersion; |
| 71 | + |
| 72 | +/** |
| 73 | + * Returns YES if the report contains any crash information. If the report |
| 74 | + * contains only NSErrors, this will return NO. |
| 75 | + **/ |
| 76 | +@property (nonatomic, assign, readonly) BOOL isCrash; |
| 77 | + |
| 78 | +/** |
| 79 | + * You can use this method to set, after the event, additional custom keys. The rules |
| 80 | + * and semantics for this method are the same as those documented in Crashlytics.h. Be aware |
| 81 | + * that the maximum size and count of custom keys is still enforced, and you can overwrite keys |
| 82 | + * and/or cause excess keys to be deleted by using this method. |
| 83 | + **/ |
| 84 | +- (void)setObjectValue:(id FAB_NULLABLE)value forKey:(NSString *)key; |
| 85 | + |
| 86 | +/** |
| 87 | + * Record an application-specific user identifier. See Crashlytics.h for details. |
| 88 | + **/ |
| 89 | +@property (nonatomic, copy) NSString * FAB_NULLABLE userIdentifier; |
| 90 | + |
| 91 | +/** |
| 92 | + * Record a user name. See Crashlytics.h for details. |
| 93 | + **/ |
| 94 | +@property (nonatomic, copy) NSString * FAB_NULLABLE userName; |
| 95 | + |
| 96 | +/** |
| 97 | + * Record a user email. See Crashlytics.h for details. |
| 98 | + **/ |
| 99 | +@property (nonatomic, copy) NSString * FAB_NULLABLE userEmail; |
| 100 | + |
| 101 | +@end |
| 102 | + |
| 103 | +FAB_END_NONNULL |
0 commit comments