ディープリンク
SDK がディープリンクをどのように処理するか、およびアプリケーション内でカスタムナビゲーションを実行する方法の概要
URL 処理デリゲートの実装
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
// 任意のコールバック
print("User accepted permissions: \(granted)")
}
PushSDK.setNotificationLifecycleDelegate(self)
return true
}
func pushSDK(didReceiveNotificationDestination destination: String, withInteraction interaction: PNNotificationInteraction) -> Bool {
// destination(ランディング URL)を使用して、アプリケーション内のビューへ移動
// SDK に対して遷移しないよう通知するために true を返す
return true
}
}通知インタラクション デリゲート
URI/URL 宛先付きで通知が開かれた場合
最終更新