当 iOS 设备锁定且我没有立即响应时接收远程通知
我的应用程序正在接收远程通知 (APNS),并且适用于所有常见场景:
- 应用程序未运行 (didFinishLaunchingWithOptions:)
- 应用程序正在运行且处于活动状态 (didReceiveRemoteNotification:)
- 应用程序正在运行,手机已锁定,我会尽快解锁设备当我收到通知时(didReceiveRemoteNotification:)
但是,如果我在最后一种情况下选择不立即解锁设备(使用滑块)并且我等到屏幕再次变黑,则不会。消息/通知仍然显示在锁定屏幕中,但滑块现在只能解锁设备,当我解锁时, didReceiveRemoteNotification: 根本不会被调用。
My app is receiving remote notifications (APNS) and is working for all the common scenarios:
- App is not running (didFinishLaunchingWithOptions:)
- App is running and active (didReceiveRemoteNotification:)
- App is running, the phone is locked and I unlock the device as soon as I get the notification (didReceiveRemoteNotification:)
However, not if I in the last case choose not to unlock the device immediately (with the slider) and I wait until the screen goes black again. The message/notification is still shown in the lock screen, but the slider can now only unlock the device and when I do, didReceiveRemoteNotification: doesn't get called at all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
恐怕这是预期的行为。引用本地和推送通知编程指南部分< em>安排、注册和处理通知:
I’m afraid this is the intended behaviour. Quote the Local and Push Notification Programming Guide, part Scheduling, Registering, and Handling Notifications: