Prerequisite: To enable deep linking, you must define your app’s scheme in the app.json file.
app.json
{
  "expo": {
    // replace this with your app scheme
    "scheme": "myapp"
  }
}
The Pushbase SDK supports deep linking, provided that the route is defined according to your app’s navigation structure. To navigate a user to a specific screen via a notification, include the target route in the notification payload. When deep linking is enabled, the SDK automatically handles routing the user to the specified screen upon interaction. 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 Project structure
.
└── app/
    ├── _layout.tsx
    ├── destinations/
    │   └── [slug].tsx
    └── index.tsx
destinations/[slug] is a dynamic route, where slug is a unique identifier representing each city’s route.
A deep link to a specific destination screen should follow this format:
  • destinations/san-francisco - San Francisco
  • destinations/new-york-city - New York City
  • destinations/miami - Miami
  • destinations/washington-dc - Washington DC
All deep links are configured and attached to notifications directly through the Pushbase dashboard. Create a deep link List of deep links Assign deep link to a notification
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