Deep Linking not working on iOS standalone

I have implemented the _handleDeepLink method as per the documentation. And it’s working perfectly when I run the app on Expo, generate a link and click on it. It takes me back to the Expo app and opens the required screen based on the deep link data.

BUT. It doesn’t work on my iOS standalone app. When I share a link from this app, the link generates just fine. It opens the app just fine. Even has all the data. Even goes inside the if condition. But the page never goes to the one it should. Not when the app is closed, and not even when it is in background. Why would it work on Expo and not here?

_handleDeeplink = (url) => {
    let { path, queryParams } = Expo.Linking.parse(url);

    this.setState({ needToHandleDeepLink: true });
    var screen = this;
    // alert(`Linked to app with path: ${path} and data: ${JSON.stringify(queryParams)}`);
    // alert('path =' + path + ';');

    AsyncStorage.getItem("isLoggedIn").then((isLoggedIn) => {
      if (isLoggedIn == 'no') {
      } else {
        if (path == "Poll") {
          // Alert.alert('poll id = ' + queryParams['pollId']);
          if (queryParams['pollId'] != null && queryParams['pollId'] != undefined && queryParams['pollId'] != '') {
            ***screen.props.navigation.navigate('Poll', {pollId: queryParams['pollId'], poll: '', vote: '-1', comingFrom: 'DeepLink'});
        } else if (path == "Profile") {
          if (queryParams['userId'] != null && queryParams['userId'] != undefined && queryParams['userId'] != '') {
            screen.props.navigation.navigate('OtherProfile', {userId: queryParams['userId'], comingFrom: 'DeepLink'})

The problem is that it reaches the if condition where I have marked the line with ***. But it doesn’t navigate!

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