Prerequisite: To enable deep linking, you must define your app’s scheme in the
app.json file.app.json
To illustrate how deep linking works with the Pushbase SDK, consider a travel app that lists hotels across major U.S. cities.
Suppose the marketing team wants to send push notifications featuring city-specific discount codes. When a user taps on a notification, the app should automatically navigate to the targeted city and display a list of hotels specific to that location.
To enable this deep linking behavior, the app’s file structure should be organized based on the navigation strategy being used— Expo Router or React Navigation. Each approach requires a different configuration to correctly handle and route deep link URLs to the targeted screen.
- Expo Router
Expo Router Project structure
destinations/[slug] is a dynamic route, where slug is a unique identifier
representing each city’s route.Defining deep links
A deep link to a specific destination screen should follow this format:destinations/san-francisco- San Franciscodestinations/new-york-city- New York Citydestinations/miami- Miamidestinations/washington-dc- Washington DC
List of deep links
Assign deep link to a notification
Handle Deep Link Routing
- Expo Router
With Expo Router, Pushbase SDK automatically handles deep link navigation when a user taps on a notification that includes an assigned deep link. No extra works needed.
Having trouble setting up or configuring the SDK? Our support team is here to
help — feel free to reach
out