How to find out the webPath for the push notification?

Please provide the following:

  1. SDK Version: “expo-server-sdk”: “^3.4.0”,
  2. Platforms(Android/iOS/web/all): iOS,
  3. “expo”: “^35.0.0”

I’m looking to have a expo’s push notification direct the user to a certain screen on my app:

// Web-specific fields

/** * The web path that will be opened/focused after the user
clicks the * notification. * Defaults to “/” (root) */
webPath?: string,

If my screen architecture looks something like the following:

const MainNavigator = createBottomTabNavigator({
    Main: {
        screen: createBottomTabNavigator({
            Home: {
                screen: createStackNavigator({
                    Home: {
                        screen: HomeScreen,
                    },
                    Map: {
                        screen: MapScreen,
                    },
                })
            }
        })
    }
})

what is the exact webPath of the MapScreen?

Hi. I believe “webPath” is only for notifications to web browsers when using Expo web. Not Android/iOS.

To do what you want to do I think you would have to send something in the notification’s data (maybe { nav: "MapScreen" }) and when you receive it your app could interpret it as “navigate to the MapScreen”.

I have not tried this myself, but I think it should work.

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