Skip to content

Commit bd330d1

Browse files
authored
Prefs crash fix DEVEX-258 (#799)
* Prevent a recursive call. * Added another search path.
1 parent 02394ce commit bd330d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Branch-SDK/Branch-SDK/BNCPreferenceHelper.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ + (void) initialize {
874874
if (success) {
875875
return branchURL;
876876
} else {
877-
BNCLogError(@"CreateBranchURL failed: %@ URL: %@.", error, branchURL);
877+
NSLog(@"[branch.io] Info: CreateBranchURL failed: %@ URL: %@.", error, branchURL);
878878
}
879879
}
880880
return nil;
@@ -883,6 +883,7 @@ + (void) initialize {
883883
NSURL* _Nonnull BNCURLForBranchDirectory_Unthreaded() {
884884
NSArray *kSearchDirectories = @[
885885
@(NSApplicationSupportDirectory),
886+
@(NSLibraryDirectory),
886887
@(NSCachesDirectory),
887888
@(NSDocumentDirectory),
888889
];
@@ -905,7 +906,7 @@ + (void) initialize {
905906
attributes:nil
906907
error:&error];
907908
if (!success) {
908-
BNCLogError(@"Worst case CreateBranchURL error: %@ URL: %@.", error, branchURL);
909+
NSLog(@"[io.branch] Error: Worst case CreateBranchURL error was: %@ URL: %@.", error, branchURL);
909910
}
910911
return branchURL;
911912
}

0 commit comments

Comments
 (0)