S.J S.J - 5 months ago 350
Swift Question

Will UILocalNotification crash on iOS 10

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 JAL
Answer

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.