Reputation: 1115
I am developing app with push notification via azure at backend. I was following this tutorial. Everything was fine, I have tested push notification in developer mode, then I send my app to TestFlight. I generated production certificate and add it to azure admin panel, but push notifications didn't work. The strange thing is that push notifications didn't work on iPhone6 with iOs9, but works fine on iPhone5s with iOs9. I have also tested iPhone6 device in developer mode and it didn't work too. I have no idea whats wrong. Here are some facts that maybe will help to understand whats wrong:
1) Works fine on iOs9 + iPhone5s, doesnt work on iOs9+iPhone6 (in developer and production mode);
2) Looks like the problem is not in certificates, bcs all works fine on iPhone5s;
3) In developer mode (when I am using iPhone6) there is no error in device registration in azure PNS , but didReceiveRemoteNotification method just don't called.
Maybe some1 have idea whats wrong? Below is my AppDelegate mode:
func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
let hub = SBNotificationHub(connectionString: "***", notificationHubPath: "***")
hub.registerNativeWithDeviceToken(deviceToken, tags: NSSet(array: [String(Api.guid)]) as Set<NSObject>) { (error) -> Void in
if (error != nil) {
// handle error
} else {
// success
}
}
}
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) {
// TODO receive notification when app is launched
}
Upvotes: 1
Views: 392
Reputation: 1115
Looks like that bug was appearing bcs I used one apple id on the same devices (when I downloaded app from test flight)
Upvotes: 1