1

When run my app built on SDK 9 on iPhone with iOS 10 and click remote notification the app is open on main screen on not on the specific item. From looking at my logs I see that the method didReceiveRemoteNotification is not call. (the api is deprecate on sdk 10 but AFAIK should not affect sdk 9). Any suggestion?

Moran77
  • 119
  • 8
  • You can follow this link to resolve your issue :http://stackoverflow.com/questions/39490605/push-notification-issue-with-ios-10?answertab=votes#tab-top – Ashish Shah Sep 19 '16 at 11:04
  • My problem was with SDK 9. I was force at the end to move to SDK 10 earlier than I planned. – Moran77 Sep 20 '16 at 06:55
  • @Moran77 did you try iOS 10.1? I had the same issue, and I fixed using iOS10 sdk, but still not release the app. Some people saying this could be iOS10 issue and it'll fix in iOS10.1. BTW, I didn't try yet – smartsanja Oct 17 '16 at 09:33
  • @sajaz When I move to build with SDK 10 (Xcode 8) it was solve. – Moran77 Oct 19 '16 at 04:57

1 Answers1

0

iOS 10 has introduced UNUserNotificationCenter, which is used now for all local and push notifications. For example:

UNUserNotificationCenter.current().requestAuthorization(options: [.alert])
{ (granted, error) in
    if granted == true{
        NSLog("Granted")
    }
    if let error = error {
        NSLog("Error: \(error.description)")
    }
}

UIApplication.shared().registerForRemoteNotifications()

You can check the settings using getNotificationSettings()

WWDC video: https://developer.apple.com/videos/play/wwdc2016/707/

wg_hjl
  • 535
  • 3
  • 9