Karthik Rao
Karthik Rao

Reputation: 189

unable to launch application using deeplink url in detox for the IOS application

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.

Upvotes: 0

Views: 1021

Answers (1)

Peter Zosiak
Peter Zosiak

Reputation: 318

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'});

Upvotes: 2

Related Questions