This behavior is often due to a safety mechanism in iOS. When an app (or an SDK within it) tries to programmatically open a Universal Link that is associated with the app itself, iOS may default to opening the link in Safari to prevent potential redirect loops.
To ensure your Universal Links open your app directly from a push notification, you should send the link in the Custom Data payload instead of the standard "Link" field.
Follow these steps:
- Modify Your Push Payload: When composing your push notification in the Pushwoosh Control Panel or via the API, leave the standard "Link" field empty.
Use the Custom Data Field: Add your Universal Link URL to the "Custom Data" section (in the Control Panel) or as part of the
dataobject in your API request. Use a descriptive key for your link.Example API
dataobject:{ "data": { "deep_link": "https://your-domain.com/your-path" } }- Handle the Link in Your App: Update your application's code to listen for push notification open events. When a push is opened, parse the custom data payload to retrieve the URL from the
deep_linkkey and then use your app's internal navigation logic to direct the user to the correct screen.
Comments
0 comments
Please sign in to leave a comment.