iOS 8 [UIApplication sharedApplication].scheduledLocalNotifications empty

后端 未结 4 1554
悲哀的现实
悲哀的现实 2020-12-11 06:04

i\'m trying to update my app to iOS 8. In a function i schedule a local notification (i\'ve already checked that firedate and all other parts of the notification are right)

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-11 06:24

    This is not iOS 8 issue, but

    [UIApplication sharedApplication].scheduledLocalNotifications
    

    issue. Most relevant answer which i found here

    Having similar issues right now. My guess here is that iOS does not schedule the notifications immediately but only at the end of the current run loop. I am running into these problems when setting the scheduledLocalNotifications property several times in the same run loop and changes don't seem to be updated accordingly. I think I will just keep a copy of the local notifications array myself and only set scheduledLocalNotifications and never read it.

提交回复
热议问题