didRegisterForRemoteNotificationsWithDeviceToken is not called up in ios 9

前端 未结 3 1056
旧巷少年郎
旧巷少年郎 2020-12-11 20:30

I have to implement APNS in my project, I have created APNS SSL in developer portal, and using this i have created new pro

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-11 21:21

    I think you forget your didRegisterUserNotificationSettings method so:

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

    at the same place check the following scenario also.

    • try in another device once

提交回复
热议问题