2

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..?

pedrouan
  • 12,762
  • 3
  • 58
  • 74
CMash
  • 1,987
  • 22
  • 35
  • 2
    You can't use iOS 10 APIs under iOS 9. And no, that link doesn't say you can use the new APIs under iOS 9. – rmaddy Sep 22 '16 at 21:05
  • It compiles and largely runs fine (though crashed trying to add an image attachment to a notification) and from the link I posted it suggests the same code works on both iOS 9 and 10... Or am I just assuming incorrectly and really the guy is showing how iOS 9 used to work? – CMash Sep 22 '16 at 21:06

1 Answers1

2

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.

CMash
  • 1,987
  • 22
  • 35