react-native-branch
react-native-branch copied to clipboard
Branch link is detected as non_branch_link on iOS in react-native project
I have integrated branch in my react-native app using npm install react-native-branch and followed the documentation available for react-native integration on docs.branch.io. When ever i am clicking a branch link it opens the app correctly but the link opens as +non_branch_link.
I have added this in capabilities
applinks:xxxx.xxxxx.com
activitycontinuation:xxxx.xxxxx.com
Added these in Info pList
branch_app_domain => xxxx.app.link
branch_key => MY_APP_KEY
Have added branch.json in my root folder (where .xcworkspace file is)
Added MY_SCHEME as URL scheme
Added these changes in my AppDelegate.m file in didFinishLaunchingWithOptions
....
[RNBranch initSessionWithLaunchOptions:launchOptions isReferrable:YES];
jsCodeLocation ..
.....
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { if (![RNBranch.branch application:application openURL:url sourceApplication:sourceApplication annotation:annotation]) { // do other deep link routing for the Facebook SDK, Pinterest SDK, etc } return YES; }
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler { return [RNBranch continueUserActivity:userActivity]; }
This is what I am getting as link params
{+clicked_branch_link: false, +is_first_session: false, +non_branch_link: "https://xxxx.xxxxx.com/xxxx"}