预定的 UILocalNotifications 是 iOS 设备备份的一部分吗?
我的意思是,我们的应用程序安排了一些本地通知。用户对系统进行备份并在新设备上恢复。先前安排的本地通知是否会在新系统上触发,或者我们是否需要在新系统上再次重新安排它们?
I mean, our app schedules a couple of local notifications. User makes a backup of the system and restores it on a new device. Will previously scheduled local notifications fire on the new system, or do we need to reschedule them again on the new system?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为可以恢复/复制到新设备,或者也许您必须使用新设备来测试此工作流程......
I think that can be restore/copy to new device, or maybe you have to use new device to test this workflow ...
最后我强迫自己去做测试。结果:
是 - 计划的本地通知是备份的一部分,这意味着它们已在新设备上恢复并计划。恢复会覆盖目标设备上同一应用程序之前安排的任何本地通知。甚至图标徽章编号也会保留在备份中并恢复到新设备 - 显示在图标上。
Finally I forced myself to do the test. The result:
YES - scheduled local notifications are part of backup, this means they are restored and scheduled on the new device. The restore overwrites any previously scheduled local notifications for the same app on the target device. Even icon badge number is preserved in backup and restored to the new device - showed on the icon.