Overview
Deep linking allows you to open a specific page within your app from an external source such as a website, email, or SMS. If the app is not installed, users are redirected to the appropriate app store. If on an unsupported platform, users are redirected to a fallback website. This guide covers setup and usage of deep linking across:- Android (App Links)
- iOS (Universal Links and URL Schemes)
- Push notifications
- Emails
- In-app messages
To function correctly, deep links must:
- Be hosted over HTTPS
- Include the required verification files:
- Android setup
- iOS setup
Android setup
Use Android Studioâs App Links Assistant to simplify setup.Steps:
- Open Android Studio â Tools â App Links Assistant
- Follow steps to set up links to your site
- Android Studio auto-generates the required code and
assetlinks.jsonfile
Manifest example:
Activity handler example:
assetlinks.json file must be hosted at:Send with deeplinks
- Send push notification with deeplinks
- Send email with deep links
- Send in-app messages with deep links
Include the deep link as:
urlproperty (Launch URL)- Or
dataproperty (recommended for iOS to suppress browser redirect)
- Android: Opens to linked activity directly
- iOS: Opens browser, then app (unless suppressed with plist flag)
FAQ
Why does my iOS deep link open the browser first before opening my app?
OneSignalâs iOS SDK usesopenURL for Launch URL, which redirects to the browser first, then back into the app.
To suppress this behavior:
- Use
datainstead ofurlin the API and handle the deep link in your Notification Click Listener - Or add
OneSignal_suppress_launch_urlsto yourInfo.plistas a Boolean with valueYES
