Handling deep/universal links
Follow this guide to get started with deep/universal linking in the Knock iOS SDK.
💡
Note: We recommend taking advantage of our KnockAppDelegate to simplify deep link handling.
Deep Links
Follow the steps below to configure URLs that deeply link to specific content in your iOS application.
1
Define URL schemes
- In Xcode, navigate to your app target's Info tab.
- Add a new URL type under URL Types with a unique scheme.

2
Include a deep link in your Knock message payload
- In your trigger
data
payload that you send to Knock, include a property with a value for your deep link. The name of the property doesn't matter, so long as you know beforehand what it will be called. - You can configure the format of the API request sent to APNs in your workflow step's payload overrides.

3
Handle incoming URLs from a push notification
You can handle incoming URLs from a push notification by implementing the pushNotificationTapped
method in your KnockAppDelegate
. This can also be done manually.
Universal Links
Universal links will redirect users to a browser when the app is not installed.
1
Enable Associated Domains
- Add the Associated Domains capability in your app target's Signing & Capabilities tab.
- Add your domain in the format
applinks:yourdomain.com
.
2
Handle incoming links
Implement application(_:continue:restorationHandler:)
in your AppDelegate
or SceneDelegate
.
3
Server configuration
- Ensure your server hosts an Apple App Site Association (AASA) file at
https://yourdomain.com/.well-known/apple-app-site-association
.
For more detailed instructions on configuring universal links, visit Apple's Official Documentation.