Didregisterforremotenotificationswithdevicetoken Not Called in Ios8, But Didregister...Settings Is

didRegisterForRemoteNotificationsWithDeviceToken not called in ios8, but didRegister...Settings is

Your code seems to be correct. As a minor improvement you could write your didRegisterUserNotificationSettings method like so:

- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
if (notificationSettings.types != UIUserNotificationTypeNone) {
NSLog(@"didRegisterUser");
[application registerForRemoteNotifications];
}
}

There may be a configuration problem that causes a failed APN registration.

  1. Assure that your Provisioning Profile contains the aps-environment entry

  2. Assure that you have a unique App Identifier (a string without any "*") set in your Provisioning Profile. You should also use this exact identifier as "Bundle identifier" in your Info.plist

  3. Maybe you have declined the Push-Feature after the initial installation - in this case you will never see the in-app-push-alert again and have to enable Push in the settings app again.

  4. Try another device.

didRegisterForRemoteNotificationsWithDeviceToken not called for iOS 13 (Objective C)

What I did is I put above code (of registering for push notification) in one function and call that function every 5 seconds.
Surprisingly, I get token now, but token for iOS 13 onwards, token is not as I get before. I need to check further on this issue. Once I check, I will post an answer for this question.

But calling register push function every 5 seconds did the trick.

I am putting this answer as no one will understand Edit 1 I have above is the answer. Better to have an answer for the question.

Registering for Push Notifications does not get any response

That is not your fault. There is some issue in APNS as on 19 July, 2016.
For reference check this
didRegisterForRemoteNotificationsWithDeviceToken not called in ios8, but didRegister...Settings is

Once APNS start working , you will start receiving device token and work with push.



Related Topics



Leave a reply



Submit