Ada*_*aka 5 localnotification ios10 usernotifications
关闭应用程序(不在后台)时如何处理新的iOS10通知操作?
当应用最小化时,一切都可以正常使用:
UNUserNotificationCenter.current().delegate = x
Run Code Online (Sandbox Code Playgroud)
并处理它
class x: UNUserNotificationCenterDelegate {
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Swift.Void) {
}
}
Run Code Online (Sandbox Code Playgroud)
但是在应用程序关闭并且用户在通知中轻按操作时什么也没叫...也许我无法处理后台任务,而且我总是必须启动应用程序?
| 归档时间: |
|
| 查看次数: |
2733 次 |
| 最近记录: |