Deep Linking in newly detached Expokit app on iOS

I detached our Expo app to Expokit and am trying to get deep links working again (they were working before detaching).

I have them working in Android, but not in iOS in Xcode. My app scheme opens the app, but the query string is not being returned in getInitialURL() when the app is closed, and Linking.addEventListener(‘url’, …) doesn’t seem to work at all.

In response to any deep link, getInitialURL() returns the detach.scheme in app.json every time (exp followed by many random characters). I can’t ever get it to return anything else, no query strings, just the exact detach.scheme with ://.

Expo.Constants.linkingUri returns this same scheme with a + sign.

I have a scheme declared in app.json as well as a detach.scheme that was apparently generated by Expo (the exp followed by random characters).

I added “RCTLinkingIOS” to my cocoapods podfile under React subspecs and ran pod install.

I added a few lines to my AppDelegate.m that I’m told are necessary:

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

…but still no luck. Again, the app opens in response to the deep links, but the url is not handled by getInitialURL and the listener does not appear to work when the app is in the background.

I would guess I’m still missing a step with the iOS native code?

I have the same issue, have you solved it?

No. Since I posted this, I went through all the procedures to link the RCTLinking library in XCode using this guide, but no luck:

I’m now almost certain the library is linked properly, the additional code is added to AppDelegate.m, but the deep links still do not work in XCode.

I suppose my next step is to remove Expo entirely, perhaps it’s an expokit issue?

Thanks for your reply, it’s just what i want to try:
i reject to pure react native project,
and launch app or bring to foreground event.url bring the correct param now.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.