FirebaseCrashlytics Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
FIRCrashlyticsReport
@interface FIRCrashlyticsReport : NSObject
The Firebase Crashlytics Report provides a way to read and write information
to a past Crashlytics reports. A common use case is gathering end-user feedback
on the next run of the app.
The CrashlyticsReport should be modified before calling send/deleteUnsentReports.
-
Returns the unique ID for the Crashlytics report.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull reportID;
-
Returns the date that the report was created.
Declaration
Objective-C
@property (nonatomic, readonly) NSDate *_Nonnull dateCreated;
-
Returns true when one of the events in the Crashlytics report is a crash.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL hasCrash;
-
Adds logging that is sent with your crash data. The logging does not appear in the
system.log and is only visible in the Crashlytics dashboard.
Declaration
Objective-C
- (void)log:(nonnull NSString *)msg;
-
Adds logging that is sent with your crash data. The logging does not appear in the
system.log and is only visible in the Crashlytics dashboard.
Declaration
Objective-C
- (void)logWithFormat:(nonnull NSString *)format, ...;
Parameters
format
|
The format of the string, followed by a comma-separated list
of arguments to substitute into the format.
|
-
Adds logging that is sent with your crash data. The logging does not appear in the
system.log and is only visible in the Crashlytics dashboard.
Declaration
Objective-C
- (void)logWithFormat:(nonnull NSString *)format arguments:(va_list)args;
Parameters
format
|
|
args
|
Arguments to substitute into format
|
-
Sets a custom key and value to be associated with subsequent fatal and non-fatal reports.
When setting an object value, the object is converted to a string. This is
typically done by using the object’s description.
Declaration
Objective-C
- (void)setCustomValue:(nullable id)value forKey:(nonnull NSString *)key;
Parameters
value
|
The value to be associated with the key
|
key
|
|
-
Sets custom keys and values to be associated with subsequent fatal and non-fatal reports.
The objects in the dictionary are converted to strings. This is
typically done by using the object’s description.
Declaration
Objective-C
- (void)setCustomKeysAndValues:(nonnull NSDictionary *)keysAndValues;
Parameters
keysAndValues
|
The values to be associated with the corresponding keys
|
-
Records a user ID (identifier) that’s associated with subsequent fatal and non-fatal reports.
If you want to associate a crash with a specific user, we recommend specifying an arbitrary
string (e.g., a database, ID, hash, or other value that you can index and query, but is
meaningless to a third-party observer). This allows you to facilitate responses for support
requests and reach out to users for more information.
Declaration
Objective-C
- (void)setUserID:(nullable NSString *)userID;
Parameters
userID
|
An arbitrary user identifier string that associates a user to a record in your
system.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-11 UTC.
[null,null,["Last updated 2025-03-11 UTC."],[],[],null,["FIRCrashlyticsReport \n\n\n @interface FIRCrashlyticsReport : NSObject\n\nThe Firebase Crashlytics Report provides a way to read and write information\nto a past Crashlytics reports. A common use case is gathering end-user feedback\non the next run of the app.\n\nThe CrashlyticsReport should be modified before calling send/deleteUnsentReports.\n- `\n ``\n ``\n `\n\n [reportID](#/c:objc(cs)FIRCrashlyticsReport(py)reportID)`\n ` \n Returns the unique ID for the Crashlytics report. \n\n Declaration \n Objective-C \n\n @property (nonatomic, readonly) NSString *_Nonnull reportID;\n\n- `\n ``\n ``\n `\n\n [dateCreated](#/c:objc(cs)FIRCrashlyticsReport(py)dateCreated)`\n ` \n Returns the date that the report was created. \n\n Declaration \n Objective-C \n\n @property (nonatomic, readonly) NSDate *_Nonnull dateCreated;\n\n- `\n ``\n ``\n `\n\n [hasCrash](#/c:objc(cs)FIRCrashlyticsReport(py)hasCrash)`\n ` \n Returns true when one of the events in the Crashlytics report is a crash. \n\n Declaration \n Objective-C \n\n @property (nonatomic, readonly) BOOL hasCrash;\n\n- `\n ``\n ``\n `\n\n [-log:](#/c:objc(cs)FIRCrashlyticsReport(im)log:)`\n ` \n Adds logging that is sent with your crash data. The logging does not appear in the\n system.log and is only visible in the Crashlytics dashboard. \n\n Declaration \n Objective-C \n\n - (void)log:(nonnull NSString *)msg;\n\n Parameters\n\n- `\n ``\n ``\n `\n\n [-logWithFormat:](#/c:objc(cs)FIRCrashlyticsReport(im)logWithFormat:)`\n ` \n Adds logging that is sent with your crash data. The logging does not appear in the\n system.log and is only visible in the Crashlytics dashboard. \n\n Declaration \n Objective-C \n\n - (void)logWithFormat:(nonnull NSString *)format, ...;\n\n Parameters\n\n- `\n ``\n ``\n `\n\n [-logWithFormat:arguments:](#/c:objc(cs)FIRCrashlyticsReport(im)logWithFormat:arguments:)`\n ` \n Adds logging that is sent with your crash data. The logging does not appear in the\n system.log and is only visible in the Crashlytics dashboard. \n\n Declaration \n Objective-C \n\n - (void)logWithFormat:(nonnull NSString *)format arguments:(va_list)args;\n\n Parameters\n\n- `\n ``\n ``\n `\n\n [-setCustomValue:forKey:](#/c:objc(cs)FIRCrashlyticsReport(im)setCustomValue:forKey:)`\n ` \n Sets a custom key and value to be associated with subsequent fatal and non-fatal reports.\n When setting an object value, the object is converted to a string. This is\n typically done by using the object's description. \n\n Declaration \n Objective-C \n\n - (void)setCustomValue:(nullable id)value forKey:(nonnull NSString *)key;\n\n Parameters\n\n- `\n ``\n ``\n `\n\n [-setCustomKeysAndValues:](#/c:objc(cs)FIRCrashlyticsReport(im)setCustomKeysAndValues:)`\n ` \n Sets custom keys and values to be associated with subsequent fatal and non-fatal reports.\n The objects in the dictionary are converted to strings. This is\n typically done by using the object's description. \n\n Declaration \n Objective-C \n\n - (void)setCustomKeysAndValues:(nonnull NSDictionary *)keysAndValues;\n\n Parameters\n\n- `\n ``\n ``\n `\n\n [-setUserID:](#/c:objc(cs)FIRCrashlyticsReport(im)setUserID:)`\n ` \n Records a user ID (identifier) that's associated with subsequent fatal and non-fatal reports.\n\n If you want to associate a crash with a specific user, we recommend specifying an arbitrary\n string (e.g., a database, ID, hash, or other value that you can index and query, but is\n meaningless to a third-party observer). This allows you to facilitate responses for support\n requests and reach out to users for more information. \n\n Declaration \n Objective-C \n\n - (void)setUserID:(nullable NSString *)userID;\n\n Parameters"]]