Notifications in iOS 9 with iOS 10's UserNotifications framework

2.5k Views Asked by At

Reading here it suggests the UserNotifications framework should work fine on iOS 9, but [UNUserNotificationCenter currentNotificationCenter] is always nil for me on my iOS 9 device. Has anyone run into this issue..?

1

There are 1 best solutions below

0
CMash On BEST ANSWER

Looks like you need to use the old API for pre-iOS 10 devices, which is a pain. But makes sense really from a technical point of view, it just seemed from the link I posted that it was possible to use the same code on iOS 9 and 10 but when you look at his source code it does have OS version checks to use the relevant API.