1

I have been using react-native-deep-linking package for my project.

My Scenario:

In my React Native application, I have a screen called User Registration. Once the user enters all the information including email, the account verification link goes to the user's email. Once the user click the link on the email then It opens mobile web browser and I need to redirect automatically inside my app. To do that I'm using above mentioned package and my Android App works fine. But in iOS it won't opens the application.

  • I have added URL Types in Info Xcode
  • I have added Associated Domains in Xcode
  • I have modified AppDelegate.m according to instructions.

AppDelegate.m

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url
 options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
 return [RCTLinkingManager application:app openURL:url options:options];
}

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity
 restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
  return [RCTLinkingManager application:application
                   continueUserActivity:userActivity
                     restorationHandler:restorationHandler];
}

Info.plist

<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>wapp</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>wapp</string>
            </array>
        </dict>
    </array>

Sample Email Verification URL:

https://app.myapp.com/core/?userReference=someValue

enter image description here

enter image description here

If anyone can guide me, highly appreciated.

Akila Devinda
  • 5,054
  • 3
  • 19
  • 35

0 Answers0