File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -625,27 +625,20 @@ - (void)initSessionWithLaunchOptions:(NSDictionary *)options
625625 [self .class addBranchSDKVersionToCrashlyticsReport ];
626626 self.shouldAutomaticallyDeepLink = automaticallyDisplayController;
627627
628- // If the SDK is already initialized, this means that initSession was called after other lifecycle calls.
629- if (self.initializationStatus == BNCInitStatusInitialized) {
630- [self initUserSessionAndCallCallback: YES sceneIdentifier: nil urlString: nil ];
631- return ;
632- }
633-
634- // Save data from push notification on app launch
628+ // Check for Branch link in a push payload
629+ NSString *pushURL = nil ;
635630 #if !TARGET_OS_TV
636631 if ([options objectForKey: UIApplicationLaunchOptionsRemoteNotificationKey]) {
637632 id branchUrlFromPush = [options objectForKey: UIApplicationLaunchOptionsRemoteNotificationKey][BRANCH_PUSH_NOTIFICATION_PAYLOAD_KEY];
638633 if ([branchUrlFromPush isKindOfClass: [NSString class ]]) {
639634 self.preferenceHelper .universalLinkUrl = branchUrlFromPush;
640635 self.preferenceHelper .referringURL = branchUrlFromPush;
636+ pushURL = (NSString *)branchUrlFromPush;
641637 }
642638 }
643639 #endif
644640
645- // Handle case where there's no URI scheme or Universal Link.
646- if (![options.allKeys containsObject: UIApplicationLaunchOptionsURLKey] && ![options.allKeys containsObject: UIApplicationLaunchOptionsUserActivityDictionaryKey]) {
647- [self initUserSessionAndCallCallback: YES sceneIdentifier: nil urlString: nil ];
648- }
641+ [self initUserSessionAndCallCallback: YES sceneIdentifier: nil urlString: pushURL];
649642}
650643
651644- (void )setDeepLinkDebugMode : (NSDictionary *)debugParams {
You can’t perform that action at this time.
0 commit comments