1 |
efrain |
1 |
// Copyright 2021 Google LLC
|
|
|
2 |
//
|
|
|
3 |
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
4 |
// you may not use this file except in compliance with the License.
|
|
|
5 |
// You may obtain a copy of the License at
|
|
|
6 |
//
|
|
|
7 |
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
8 |
//
|
|
|
9 |
// Unless required by applicable law or agreed to in writing, software
|
|
|
10 |
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
11 |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
12 |
// See the License for the specific language governing permissions and
|
|
|
13 |
// limitations under the License.
|
|
|
14 |
|
|
|
15 |
#import <Foundation/Foundation.h>
|
|
|
16 |
|
|
|
17 |
NS_ASSUME_NONNULL_BEGIN
|
|
|
18 |
|
|
|
19 |
/**
|
|
|
20 |
* The Firebase Crashlytics Report provides a way to read and write information
|
|
|
21 |
* to a past Crashlytics reports. A common use case is gathering end-user feedback
|
|
|
22 |
* on the next run of the app.
|
|
|
23 |
*
|
|
|
24 |
* The CrashlyticsReport should be modified before calling send/deleteUnsentReports.
|
|
|
25 |
*/
|
|
|
26 |
NS_SWIFT_NAME(CrashlyticsReport)
|
|
|
27 |
@interface FIRCrashlyticsReport : NSObject
|
|
|
28 |
|
|
|
29 |
/** :nodoc: */
|
|
|
30 |
- (instancetype)init NS_UNAVAILABLE;
|
|
|
31 |
|
|
|
32 |
/**
|
|
|
33 |
* Returns the unique ID for the Crashlytics report.
|
|
|
34 |
*/
|
|
|
35 |
@property(nonatomic, readonly) NSString *reportID;
|
|
|
36 |
|
|
|
37 |
/**
|
|
|
38 |
* Returns the date that the report was created.
|
|
|
39 |
*/
|
|
|
40 |
@property(nonatomic, readonly) NSDate *dateCreated;
|
|
|
41 |
|
|
|
42 |
/**
|
|
|
43 |
* Returns true when one of the events in the Crashlytics report is a crash.
|
|
|
44 |
*/
|
|
|
45 |
@property(nonatomic, readonly) BOOL hasCrash;
|
|
|
46 |
|
|
|
47 |
/**
|
|
|
48 |
* Adds logging that is sent with your crash data. The logging does not appear in the
|
|
|
49 |
* system.log and is only visible in the Crashlytics dashboard.
|
|
|
50 |
*
|
|
|
51 |
* @param msg Message to log
|
|
|
52 |
*/
|
|
|
53 |
- (void)log:(NSString *)msg;
|
|
|
54 |
|
|
|
55 |
/**
|
|
|
56 |
* Adds logging that is sent with your crash data. The logging does not appear in the
|
|
|
57 |
* system.log and is only visible in the Crashlytics dashboard.
|
|
|
58 |
*
|
|
|
59 |
* @param format Format of string
|
|
|
60 |
* @param ... A comma-separated list of arguments to substitute into format
|
|
|
61 |
*/
|
|
|
62 |
- (void)logWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1, 2);
|
|
|
63 |
|
|
|
64 |
/**
|
|
|
65 |
* Adds logging that is sent with your crash data. The logging does not appear in the
|
|
|
66 |
* system.log and is only visible in the Crashlytics dashboard.
|
|
|
67 |
*
|
|
|
68 |
* @param format Format of string
|
|
|
69 |
* @param args Arguments to substitute into format
|
|
|
70 |
*/
|
|
|
71 |
- (void)logWithFormat:(NSString *)format
|
|
|
72 |
arguments:(va_list)args NS_SWIFT_NAME(log(format:arguments:));
|
|
|
73 |
|
|
|
74 |
/**
|
|
|
75 |
* Sets a custom key and value to be associated with subsequent fatal and non-fatal reports.
|
|
|
76 |
* When setting an object value, the object is converted to a string. This is
|
|
|
77 |
* typically done by using the object's description.
|
|
|
78 |
*
|
|
|
79 |
* @param value The value to be associated with the key
|
|
|
80 |
* @param key A unique key
|
|
|
81 |
*/
|
|
|
82 |
- (void)setCustomValue:(nullable id)value forKey:(NSString *)key;
|
|
|
83 |
|
|
|
84 |
/**
|
|
|
85 |
* Sets custom keys and values to be associated with subsequent fatal and non-fatal reports.
|
|
|
86 |
* The objects in the dictionary are converted to strings. This is
|
|
|
87 |
* typically done by using the object's description.
|
|
|
88 |
*
|
|
|
89 |
* @param keysAndValues The values to be associated with the corresponding keys
|
|
|
90 |
*/
|
|
|
91 |
- (void)setCustomKeysAndValues:(NSDictionary *)keysAndValues;
|
|
|
92 |
|
|
|
93 |
/**
|
|
|
94 |
* Records a user ID (identifier) that's associated with subsequent fatal and non-fatal reports.
|
|
|
95 |
*
|
|
|
96 |
* If you want to associate a crash with a specific user, we recommend specifying an arbitrary
|
|
|
97 |
* string (e.g., a database, ID, hash, or other value that you can index and query, but is
|
|
|
98 |
* meaningless to a third-party observer). This allows you to facilitate responses for support
|
|
|
99 |
* requests and reach out to users for more information.
|
|
|
100 |
*
|
|
|
101 |
* @param userID An arbitrary user identifier string that associates a user to a record in your
|
|
|
102 |
* system.
|
|
|
103 |
*/
|
|
|
104 |
- (void)setUserID:(nullable NSString *)userID;
|
|
|
105 |
|
|
|
106 |
@end
|
|
|
107 |
|
|
|
108 |
NS_ASSUME_NONNULL_END
|