Skip to content

Commit be64242

Browse files
authored
Merge pull request #582 from BranchMetrics/cold-launch-universal-links
[SDK-1035] Handle Universal Links on cold launch (iOS)
2 parents 7071356 + eea525d commit be64242

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ios/RNBranch.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,13 @@ + (void)initSessionWithLaunchOptions:(NSDictionary *)launchOptions isReferrable:
169169

170170
+ (void)initializeBranchSDK
171171
{
172+
// Universal Links
173+
NSUserActivity *coldLaunchUserActivity = savedLaunchOptions[UIApplicationLaunchOptionsUserActivityDictionaryKey][@"UIApplicationLaunchOptionsUserActivityKey"];
174+
if (coldLaunchUserActivity.webpageURL) {
175+
[self willOpenURL:coldLaunchUserActivity.webpageURL];
176+
}
177+
178+
// URI schemes
172179
NSURL *coldLaunchURL = savedLaunchOptions[UIApplicationLaunchOptionsURLKey];
173180
if (coldLaunchURL) {
174181
[self willOpenURL:coldLaunchURL];

0 commit comments

Comments
 (0)