iOS – UILocalNotification 为同一个通知触发两次 [英] iOS – UILocalNotification fired twice for same notification
问题描述
如果我安排两个 UILocalNotification
并将它们都设置为在完全相同的 fireDate 触发.然后在设备(这不是模拟器错误)的 fireDate 上,application:didReceiveLocalNotification:
将触发 4 次(每个通知 2 次).这是一个已知的错误?因为我一直没能找到关于它的任何信息.
If I schedule two UILocalNotification
s and set them both to fire at the exact same fireDate. Then on the device (this is not the simulator bug) on the fireDate the application:didReceiveLocalNotification:
will fire 4 times (2 times for each notification). Is this a known bug? Because I have not been able to find any information about it.
推荐答案
话虽如此,之前已经注意到,虽然模拟器中存在错误,但设备上似乎也存在错误.
Having said that, it has been noticed before that while there is the bug in the simulator there also appears to be a bug on the device.
查看关于这个 SO 问题的评论和答案:本地通知didReceiveLocalNotification";调用两次
See the comments and answers on this SO question: local notification "didReceiveLocalNotification" calls twice
这篇关于iOS – UILocalNotification 为同一个通知触发两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!