File tree Expand file tree Collapse file tree 3 files changed +1
-76
lines changed
Branch-TestBed/Branch-SDK-Tests Expand file tree Collapse file tree 3 files changed +1
-76
lines changed Original file line number Diff line number Diff line change @@ -872,50 +872,12 @@ - (NSInteger)readIntegerFromDefaults:(NSString *)key {
872872
873873#pragma mark - Preferences File URL
874874
875- + (NSString *)prefsFile_deprecated {
876- NSString * path =
877- [[NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES )
878- firstObject ]
879- stringByAppendingPathComponent: BRANCH_PREFS_FILE];
880- return path;
881- }
882-
883875+ (NSURL * _Nonnull) URLForPrefsFile {
884876 NSURL *URL = BNCURLForBranchDirectory ();
885877 URL = [URL URLByAppendingPathComponent: BRANCH_PREFS_FILE isDirectory: NO ];
886878 return URL;
887879}
888880
889- + (void ) moveOldPrefsFile {
890- NSString * oldPath = self.prefsFile_deprecated ;
891- NSURL *oldURL = (oldPath) ? [NSURL fileURLWithPath: self .prefsFile_deprecated] : nil ;
892- NSURL *newURL = [self URLForPrefsFile ];
893-
894- if (!oldURL || !newURL) { return ; }
895-
896- NSError *error = nil ;
897- [[NSFileManager defaultManager ]
898- moveItemAtURL: oldURL
899- toURL: newURL
900- error: &error];
901-
902- if (error && error.code != NSFileNoSuchFileError) {
903- if (error.code == NSFileWriteFileExistsError) {
904- [[NSFileManager defaultManager ]
905- removeItemAtURL: oldURL
906- error: &error];
907- } else {
908- BNCLogError ([NSString stringWithFormat: @" Can't move prefs file: %@ ." , error]);
909- }
910- }
911- }
912-
913- + (void ) initialize {
914- if (self == [BNCPreferenceHelper self ]) {
915- [self moveOldPrefsFile ];
916- }
917- }
918-
919881@end
920882
921883#pragma mark - BNCURLForBranchDirectory
Original file line number Diff line number Diff line change @@ -365,49 +365,12 @@ + (NSString *)exceptionString:(NSException *)exception {
365365 [exception.callStackSymbols componentsJoinedByString: @" \n\t " ]];
366366}
367367
368- + (NSString *)queueFile_deprecated {
369- NSString *path =
370- [[NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES )
371- firstObject ]
372- stringByAppendingPathComponent: BRANCH_QUEUE_FILE];
373- return path;
374- }
375-
376368+ (NSURL * _Nonnull) URLForQueueFile {
377369 NSURL *URL = BNCURLForBranchDirectory ();
378370 URL = [URL URLByAppendingPathComponent: BRANCH_QUEUE_FILE isDirectory: NO ];
379371 return URL;
380372}
381373
382- + (void ) moveOldQueueFile {
383- NSURL *oldURL = [NSURL fileURLWithPath: self .queueFile_deprecated];
384- NSURL *newURL = [self URLForQueueFile ];
385-
386- if (!oldURL || !newURL) { return ; }
387-
388- NSError *error = nil ;
389- [[NSFileManager defaultManager ]
390- moveItemAtURL: oldURL
391- toURL: newURL
392- error: &error];
393-
394- if (error && error.code != NSFileNoSuchFileError) {
395- if (error.code == NSFileWriteFileExistsError) {
396- [[NSFileManager defaultManager ]
397- removeItemAtURL: oldURL
398- error: &error];
399- } else {
400- BNCLogError ([NSString stringWithFormat: @" Failed to move the queue file: %@ ." , error]);
401- }
402- }
403- }
404-
405- + (void ) initialize {
406- if (self == [BNCServerRequestQueue self ]) {
407- [self moveOldQueueFile ];
408- }
409- }
410-
411374#pragma mark - Shared Method
412375
413376+ (id )getInstance {
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ - (void)testCollectUserAgent {
7070 [expectation fulfill ];
7171 }];
7272
73- [self waitForExpectationsWithTimeout: 2 .0 handler: ^(NSError * _Nullable error) {
73+ [self waitForExpectationsWithTimeout: 4 .0 handler: ^(NSError * _Nullable error) {
7474
7575 }];
7676}
You can’t perform that action at this time.
0 commit comments