I am registering my app for remote notifications using below code,
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let notificationSettings = UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories: categories)
application.registerUserNotificationSettings(notificationSettings)
application.registerForRemoteNotifications()
return true
}
func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
print("token: \(deviceToken)")
}
func application(application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: NSError) {
print("Error : Fail to register to APNS : \(error)")
}
For iPhone 6, It is not calling the method didRegisterForRemoteNotificationsWithDeviceToken or didFailToRegisterForRemoteNotificationsWithError, for other devices like 5c/4s it is being registered and printing deviceToken
Initially I thought it was OS issue but then, I had checked with other device with same version 9.3.2, It worked.
Did anyone face the same issue?