2

This is current UILocalNotification class and this is iOS 10 UserNotification which apple just announced in wwdc 16.

Will the old apps using UILocalNotification will crash on iOS 10?

JAL
  • 41,701
  • 23
  • 172
  • 300
S.J
  • 3,063
  • 3
  • 33
  • 66

1 Answers1

6

Creating a UILocalNotification object will not cause a crash on an iOS 10 device (I just tried it with the Xcode 8 beta). Xcode will warn you that UILocalNotification was deprecated as of iOS 10 and UNNotificationRequest in the UserNotifications module should be used instead. It is strongly encouraged to migrate your code to use UNNotificationRequest if you are targeting iOS 10 and above.

JAL
  • 41,701
  • 23
  • 172
  • 300
  • my Xcode 8 beta download is in progress ..... I asked the question because I am extremely curious to know what will happen to my app :) ..... thanks a lot for answering with confirmation :) – S.J Jun 14 '16 at 06:04
  • No worries! It's a valid question. In fact, there are some weird crashes that can occur on iOS 10. Like if you remove the Mail app from the phone and call `MFMailComposeViewController() ` your app will crash. See [this](http://stackoverflow.com/q/37800021/2415822) question. – JAL Jun 14 '16 at 06:05
  • Can you please tell me one more thing, In UILocalNotification we use NSCalendarUnitMinute..... but I can't find in doc ... how can I use NSCalendarUnitMinute like repetition in iOS 10 UserNotification – S.J Jun 14 '16 at 06:13
  • @S.J you should ask a new question. – JAL Jun 14 '16 at 06:14
  • please view the question http://stackoverflow.com/questions/37804287/how-to-use-nscalendarunitminute-like-repetition-in-ios-10-usernotification – S.J Jun 14 '16 at 06:18