You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
3.0 KiB

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