Skip to content

Commit 45f1e9c

Browse files
committed
SDK-1831 add unity iOS resource path
1 parent d5b9020 commit 45f1e9c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

BranchSDK/BranchJsonConfig.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,18 @@ - (void)findConfigFile
9999
@"branch"
100100
];
101101

102+
NSLog( @"Bundle path: %@" , [[NSBundle mainBundle] bundlePath] );
103+
102104
[filesToCheck enumerateObjectsUsingBlock:^(NSString * _Nonnull file, NSUInteger idx, BOOL * _Nonnull stop) {
103105
configFileURL = [mainBundle URLForResource:file withExtension:@"json"];
104106
*stop = (configFileURL != nil);
105107
}];
106-
108+
109+
// Unity places the config at [[NSBundle mainBundle] bundlePath] + /Data/Raw/branch.json
110+
if (!configFileURL) {
111+
configFileURL = [mainBundle URLForResource:@"branch" withExtension:@"json" subdirectory:@"Data/Raw"];
112+
}
113+
107114
if (!configFileURL) {
108115
BNCLogDebug(@"No branch.json in app bundle.");
109116
return;

0 commit comments

Comments
 (0)