Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/BranchSDK/BNCServerInterface.m
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ - (void)genericHTTPRequest:(NSURLRequest *)request retryNumber:(NSInteger)retryN

- (BOOL)isLinkingRelatedRequest:(NSString *)endpoint postParams:(NSDictionary *)post {

BOOL hasIdentifier = (post[BRANCH_REQUEST_KEY_LINK_IDENTIFIER] != nil ) || (post[BRANCH_REQUEST_KEY_LINK_IDENTIFIER] != nil) || (post[BRANCH_REQUEST_KEY_UNIVERSAL_LINK_URL] != nil);
BOOL hasIdentifier = (post[BRANCH_REQUEST_KEY_LINK_IDENTIFIER] != nil ) || (post[BRANCH_REQUEST_KEY_SPOTLIGHT_IDENTIFIER] != nil) || (post[BRANCH_REQUEST_KEY_UNIVERSAL_LINK_URL] != nil); // ND - Fix it

// Allow install to resolve a link.
if ([endpoint containsString:@"/v1/install"]) {
Expand Down
8 changes: 4 additions & 4 deletions Sources/BranchSDK/Branch.m
Original file line number Diff line number Diff line change
Expand Up @@ -704,18 +704,18 @@ - (void)initSessionWithLaunchOptions:(NSDictionary *)options
self.shouldAutomaticallyDeepLink = automaticallyDisplayController;

// Check for Branch link in a push payload
BranchOpenRequestLinkParams *params = [[BranchOpenRequestLinkParams alloc] init];
BOOL appLaunchViaPushNotification = NO;
#if !TARGET_OS_TV
if ([options objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]) {
id branchUrlFromPush = [options objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey][BRANCH_PUSH_NOTIFICATION_PAYLOAD_KEY];
if ([branchUrlFromPush isKindOfClass:[NSString class]]) {
params.referringURL = (NSString *)branchUrlFromPush;
appLaunchViaPushNotification = YES;
}
}
#endif

if(params.referringURL || [[options objectForKey:@"BRANCH_DEFER_INIT_FOR_PLUGIN_RUNTIME_KEY"] isEqualToNumber:@1] || (![options.allKeys containsObject:UIApplicationLaunchOptionsURLKey] && ![options.allKeys containsObject:UIApplicationLaunchOptionsUserActivityDictionaryKey]) ) {
[self initUserSessionAndCallCallback:YES sceneIdentifier:nil urlParams:params reset:NO];
if( [[options objectForKey:@"BRANCH_DEFER_INIT_FOR_PLUGIN_RUNTIME_KEY"] isEqualToNumber:@1] || (![options.allKeys containsObject:UIApplicationLaunchOptionsURLKey] && ![options.allKeys containsObject:UIApplicationLaunchOptionsUserActivityDictionaryKey] && !appLaunchViaPushNotification)) {
[self initUserSessionAndCallCallback:YES sceneIdentifier:nil urlParams:nil reset:NO];
}
}

Expand Down
Loading