UNTimeIntervalNotificationTrigger causes an exception when the time interval is 0
| Originator: | robotspacer | ||
| Number: | rdar://26935607 | Date Originated: | 22-Jun-2016 00:37 AM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 10 beta 1 (14A5261v) |
| Classification: | Other Bug | Reproducible: | Always |
Summary: The WWDC session "Introduction to Notifications" included the statement that a time interval trigger "lets you schedule a notification immediately by setting the time interval to zero". In practice this actually causes an exception. I'm able to work around the bug setting the interval to a very small number, but it would be preferable if I could use 0 to have it delivered as soon as possible. Steps to Reproduce: 1. Try to create a notification trigger with this code: UNTimeIntervalNotificationTrigger *trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:0 repeats:NO]; 2. Run the app. Expected Results: The notification trigger should be created without an exception. Actual Results: An exception is raised: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'time interval must be greater than 0' Version: iOS 10 beta 1 (14A5261v) Notes: Configuration: iPhone 6s Plus Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!