0

Unable to launch application using deeplink for the ios app in detox

Initially the landing page in non react-native, after clicking on the link will be entering into the react-native page.

Tried with the

await device.relaunchApp({url: url});

But this is not launching the deeplink url page.

Thanks in advance.

Karthik Rao
  • 179
  • 1
  • 1
  • 9

1 Answers1

2

Look at this

You need update AppDelegate

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

and then in tests:

await device.openURL({url: 'url://someUrl',
                     sourceApp: 'some.app.id'});
Peter Zosiak
  • 321
  • 1
  • 10