You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** Return a BugSplatAttachment object providing an NSData object the crash report being processed should contain
63
+
NOTE: For iOS, if this method returns a non-nil BugSplatAttachment, any attributes added via setAttribute:value: to BugSplat will NOT be included in the Crash Report.
/** Return a BugSplatAttachment object providing an NSData object the crash report being processed should contain
90
-
NOTE: If this method returns a non-nil BugSplatAttachment, any attributes added via setAttribute:value: to BugSplat will NOT be included in the Crash Report.
* Attributes and values represent app supplied keys and values to associate with a crash report.
145
+
* Add an attribute and value to a dictionary of attributes that will potentially be included in a crash report.
146
+
* If the attribute is an invalid XML entity name, or the attribute+value pair cannot be set,
147
+
* the method will return NO, otherwise it will return YES.
148
+
*
149
+
* Attributes and values represent app supplied keys and values to associate with a crash report, should the app crash during this session.
153
150
* Attributes and values will be bundled up in a BugSplatAttachment as NSData, with a filename of CrashContext.xml, MIME type of "application/xml" and encoding of "UTF-8".
154
151
*
155
152
* IMPORTANT: For iOS, only one BugSplatAttachment is currently supported.
@@ -159,28 +156,34 @@ NS_ASSUME_NONNULL_BEGIN
159
156
* NOTES:
160
157
*
161
158
* This method may be called multiple times, once per attribute+value pair.
162
-
* Attributes are backed by an NSDictionary so attribute names must be unique.
159
+
* This method may be called at any time during the app session prior to a crash.
160
+
* Attributes are persisted to NSUserDefaults within a NSDictionary<NSString *, NSString *>, so attribute names must be unique.
163
161
* If the attribute does not exist, it will be added to attributes dictionary.
164
162
* If attribute already exists, the value will be replaced in the dictionary.
165
163
* If attribute already exists, and the value is nil, the attribute will be removed from the dictionary.
166
164
*
167
165
* When this method is called, the following preprocessing occurs:
168
-
* 1. attribute will first have white space and newlines removed from both the beginning and end of the String.
166
+
* 1. attribute will be checked for XML entity name rules. If validation fails, method returns NO.
169
167
*
170
-
* 2. attribute will then be processed by an XML escaping routine which looks for escapable characters ",',&,<, and >
168
+
* 2. values will then be processed by an XML escaping routine which looks for escapable characters ",',&,<, and >
* Any XML comment blocks or CDATA blocks found will disable XML escaping within the block.
173
171
*
174
-
* 3. values will then be processed by an XML escaping routine which looks for escapable characters ",',&,<, and >
175
-
* Any XML comment blocks or CDATA blocks found will disable XML escaping within the block.
172
+
* 3. After processing both attribute and value for XML escape characters, the attribute+value pair will be
173
+
* persisted to NSUserDefaults within a NSDictionary<NSString *, NSString *>.
176
174
*
177
-
* 4. After processing both attribute and value for XML escape characters, the attribute+value pair will be stored in an NSDictionary.
175
+
* 4. If the attribute or value cannot be set, the method will return NO, otherwise it will return YES.
178
176
*
179
177
* If a crash occurs, attributes and values will be bundled up in a BugSplatAttachment as NSData, with a filename of CrashContext.xml, MIME type of "application/xml"
180
178
* and encoding of "UTF-8". The attachment will be included with the crash data (except as noted above regarding iOS BugSplatAttachment limitation).
181
-
*
179
+
*
180
+
* Attributes and their values are only valid for the lifetime of the app session and only used in a crash report if the crash occurs during that app session.
181
+
* Any attributes set in the prior app session will be bundled up in a BugSplatAttachment as NSData, with a filename of CrashContext.xml,
182
+
* MIME type of "application/xml" and encoding of "UTF-8". The attachment will be added to the crash report when it is processed during the next launch of the app.
183
+
* If the app terminates normally, any attributes persisted during the prior `normal` app session will be erased during the next app launch.
0 commit comments