@@ -179,17 +179,17 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
179
179
}
180
180
181
181
NSData *_Nullable GDTCOREncodeArchive (id <NSSecureCoding > obj,
182
- NSString *archivePath ,
182
+ NSString *filePath ,
183
183
NSError *_Nullable *error) {
184
184
BOOL result = NO ;
185
- if (archivePath .length > 0 ) {
185
+ if (filePath .length > 0 ) {
186
186
result = [[NSFileManager defaultManager ]
187
- createDirectoryAtPath: [archivePath stringByDeletingLastPathComponent ]
187
+ createDirectoryAtPath: [filePath stringByDeletingLastPathComponent ]
188
188
withIntermediateDirectories: YES
189
189
attributes: nil
190
190
error: error];
191
191
if (result == NO || *error) {
192
- GDTCORLogDebug (@" Attempt to create directory failed: path:%@ error:%@ " , archivePath , *error);
192
+ GDTCORLogDebug (@" Attempt to create directory failed: path:%@ error:%@ " , filePath , *error);
193
193
return nil ;
194
194
}
195
195
}
@@ -207,12 +207,12 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
207
207
GDTCORLogDebug (@" Encoding an object failed: %@ " , *error);
208
208
return nil ;
209
209
}
210
- if (archivePath .length > 0 ) {
211
- result = [resultData writeToFile: archivePath options: NSDataWritingAtomic error: error];
210
+ if (filePath .length > 0 ) {
211
+ result = [resultData writeToFile: filePath options: NSDataWritingAtomic error: error];
212
212
if (result == NO || *error) {
213
- GDTCORLogDebug (@" Attempt to write archive failed: path:%@ error:%@ " , archivePath , *error);
213
+ GDTCORLogDebug (@" Attempt to write archive failed: path:%@ error:%@ " , filePath , *error);
214
214
} else {
215
- GDTCORLogDebug (@" Writing archive succeeded: %@ " , archivePath );
215
+ GDTCORLogDebug (@" Writing archive succeeded: %@ " , filePath );
216
216
}
217
217
}
218
218
} else {
@@ -222,12 +222,12 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
222
222
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
223
223
resultData = [NSKeyedArchiver archivedDataWithRootObject: obj];
224
224
#pragma clang diagnostic pop
225
- if (archivePath .length > 0 ) {
226
- result = [resultData writeToFile: archivePath options: NSDataWritingAtomic error: error];
225
+ if (filePath .length > 0 ) {
226
+ result = [resultData writeToFile: filePath options: NSDataWritingAtomic error: error];
227
227
if (result == NO || *error) {
228
- GDTCORLogDebug (@" Attempt to write archive failed: URL:%@ error:%@ " , archivePath , *error);
228
+ GDTCORLogDebug (@" Attempt to write archive failed: URL:%@ error:%@ " , filePath , *error);
229
229
} else {
230
- GDTCORLogDebug (@" Writing archive succeeded: %@ " , archivePath );
230
+ GDTCORLogDebug (@" Writing archive succeeded: %@ " , filePath );
231
231
}
232
232
}
233
233
} @catch (NSException *exception) {
@@ -238,7 +238,7 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
238
238
userInfo: @{NSLocalizedFailureReasonErrorKey : errorString}];
239
239
}
240
240
GDTCORLogDebug (@" Attempt to write archive. successful:%@ URL:%@ error:%@ " ,
241
- result ? @" YES" : @" NO" , archivePath , *error);
241
+ result ? @" YES" : @" NO" , filePath , *error);
242
242
}
243
243
return resultData;
244
244
}
0 commit comments