5 // Copyright (c) 2015 Crashlytics, Inc. All rights reserved.
8 #import <Foundation/Foundation.h>
9 #import "CLSAttributes.h"
11 NS_ASSUME_NONNULL_BEGIN
14 * The CLSCrashReport protocol is deprecated. See the CLSReport class and the CrashyticsDelegate changes for details.
16 @protocol CLSCrashReport <NSObject>
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, readonly, nullable) NSDate *crashedOnDate;
23 @property (nonatomic, copy, readonly) NSString *OSVersion;
24 @property (nonatomic, copy, readonly) NSString *OSBuildVersion;
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
33 @interface CLSReport : NSObject <CLSCrashReport>
35 - (instancetype)init NS_UNAVAILABLE;
36 + (instancetype)new NS_UNAVAILABLE;
39 * Returns the session identifier for the report.
41 @property (nonatomic, copy, readonly) NSString *identifier;
44 * Returns the custom key value data for the report.
46 @property (nonatomic, copy, readonly) NSDictionary *customKeys;
49 * Returns the CFBundleVersion of the application that generated the report.
51 @property (nonatomic, copy, readonly) NSString *bundleVersion;
54 * Returns the CFBundleShortVersionString of the application that generated the report.
56 @property (nonatomic, copy, readonly) NSString *bundleShortVersionString;
59 * Returns the date that the report was created.
61 @property (nonatomic, copy, readonly) NSDate *dateCreated;
64 * Returns the os version that the application crashed on.
66 @property (nonatomic, copy, readonly) NSString *OSVersion;
69 * Returns the os build version that the application crashed on.
71 @property (nonatomic, copy, readonly) NSString *OSBuildVersion;
74 * Returns YES if the report contains any crash information, otherwise returns NO.
76 @property (nonatomic, assign, readonly) BOOL isCrash;
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.
84 - (void)setObjectValue:(nullable id)value forKey:(NSString *)key;
87 * Record an application-specific user identifier. See Crashlytics.h for details.
89 @property (nonatomic, copy, nullable) NSString * userIdentifier;
92 * Record a user name. See Crashlytics.h for details.
94 @property (nonatomic, copy, nullable) NSString * userName;
97 * Record a user email. See Crashlytics.h for details.
99 @property (nonatomic, copy, nullable) NSString * userEmail;
103 NS_ASSUME_NONNULL_END