User Notifications frameworkで、ローカル通知表示時の処理についてです。
アプリがバックグラウンドで、通知が表示された段階で何か処理を行いたいのですが、何か良い方法はありますでしょうか。
以下の2ケースは処理できることを存じております。
1.アプリがフォアグラウンドで通知日時を迎えた場合
(func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification,‥)
2.アプリがバックグラウンドで通知日時を迎え、その通知をタップした場合
(func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse,‥)
環境は以下です。
iOS10.3.2、Xcode8.3.3、Swift3.1
何卒よろしくお願いいたします。
あなたの回答
tips
プレビュー