File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
example/ios/IntercomReactNativeExample Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,18 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
4646#ifdef FB_SONARKIT_ENABLED
4747 InitializeFlipper (application);
4848#endif
49- RCTBridge *bridge = [[RCTBridge alloc ] initWithDelegate: self launchOptions: launchOptions];
49+
50+ NSMutableDictionary *newLaunchOptions = [NSMutableDictionary dictionaryWithDictionary: launchOptions];
51+ if (launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey]) {
52+ NSDictionary *remoteNotif = launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey];
53+ if (remoteNotif[@" uri" ]) {
54+ NSString *initialURL = remoteNotif[@" uri" ];
55+ if (!launchOptions[UIApplicationLaunchOptionsURLKey]) {
56+ newLaunchOptions[UIApplicationLaunchOptionsURLKey] = [NSURL URLWithString: initialURL];
57+ }
58+ }
59+ }
60+ RCTBridge *bridge = [[RCTBridge alloc ] initWithDelegate: self launchOptions: newLaunchOptions];
5061 RCTRootView *rootView = [[RCTRootView alloc ] initWithBridge: bridge
5162 moduleName: @" IntercomReactNativeExample"
5263 initialProperties: nil ];
You can’t perform that action at this time.
0 commit comments