Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

React native branch io not detecting installed application iOS on pasting link redirecting to default URL working in android but not in ios

$
0
0

I want to open app with branch io link pathwayhcapp.test-app.link but it is redirecting to defualt url

info.plist

<string>pathwayhcapp.test-app.link</string><key>URL Types</key><array><dict><key>URL Schemes</key><array><string>pathwayhcapp</string></array></dict></array><key>branch_universal_link_domains</key><array><string>pathwayhcapp.test-app.link</string><string>pathwayhcapp-alternate.test-app.link</string><string>pathwayhcapp.app.link</string><string>pathwayhcapp-alternate.app.link</string></array><key>branch_key</key><dict><key>live</key><string>key_live_mdHXB3jrNOkv3131311i3t6vv</string><key>test</key><string>key_test_fhI8v9dwGSbtZGb41441413tZwI</string></dict>

and Appdelegate.m

#import "AppDelegate.h"#import <React/RCTBridge.h>#import <React/RCTBundleURLProvider.h>#import <React/RCTRootView.h>#import <Firebase.h>#import <RNBranch/RNBranch.h> // at the top@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{  if ([FIRApp defaultApp] == nil) {    [FIRApp configure];  }  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge                                                   moduleName:@"Pathway"                                            initialProperties:nil];  [RNBranch useTestInstance];  [RNBranch initSessionWithLaunchOptions:launchOptions isReferrable:YES]; // <-- add this  NSURL *jsCodeLocation;  #ifdef DEBUG    jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];  #else    jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];  #endif  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];  UIViewController *rootViewController = [UIViewController new];  rootViewController.view = rootView;  self.window.rootViewController = rootViewController;  [self.window makeKeyAndVisible];  return YES;}- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge{#if DEBUG  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];#else  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];#endif}- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {    if ([RNBranch application:app openURL:url options:options])  {        // 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];}@end

and bundle id is same also from branch dashboard and from the Xcode project tried every steps but it is not opening app in ios. im triing to open app from chrome and safarai both but still got no luck


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>