Deep Linking
Overview of how the SDK handles deep links and how to perform custom navigation within your application
Implementing URL Handling Delegates
PushSDK.setNotificationLifecycleDelegate(self)[PushSDK setNotificationLifecycleDelegate:self];import Pushly
@main
class AppDelegate: UIResponder, UIApplicationDelegate, PNNotificationLifecycleDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
PushSDK.setConfiguration(appKey: "YOUR_APP_KEY", withLaunchOptions: launchOptions)
PushSDK.PushNotifications.showPermissionPrompt() { granted, settings, error in
// optional callback
print("User accepted permissions: \(granted)")
}
PushSDK.setNotificationLifecycleDelegate(self)
return true
}
func pushSDK(didReceiveNotificationDestination destination: String, withInteraction interaction: PNNotificationInteraction) -> Bool {
// Navigate to a view within your application using the destination (the Landing URL)
// Return true to inform the SDK that it should not navigate
return true
}
}Notification Interaction Delegates
Notification Opened With URI/URL Destination
Last updated