1
Notification
のメソッドをすべてAppDelegate
クラスに更新しました。 PushNotification
は、アプリが開いていてクローズモードのときに受信しています。私のアプリが閉じているときに、私は問題に直面し、私は通知を受け、通知をタップしてみてください、それはしかし、これらのコード行が呼び出されていないアプリの画面が開きます:UIApplicationLaunchOptionsRemoteNotificationKeyでプッシュ通知が機能しない
let remoteNotification: NSDictionary! = launchOptions?[UIApplicationLaunchOptionsRemoteNotificationKey] as? NSDictionary
print("remoteNotification = \(remoteNotification)")
if (remoteNotification != nil) {
print("***************************************\n\n\n\n\n launchOptions = \(launchOptions)\n ***************************************\n\n\n\n\n")
self.notificationHandlingFunction(remoteNotification)
}
を、私はログを見たいときにLog
リストに表示されなくなります。
私のデバイスはXcode
を添付しますが実行されていません。 コードではRemoteNotification
が表示されますが、このキーワードを検索すると表示されません。 私はSwift
でこの問題に直面しています。
このケースが発生した場合、どうすればNotification
メソッドを管理できますか?
http://stackoverflow.com/questions/30297594/uiapplicationlaunchoptionsremotenotificationkey-not-getting-userinfo –