Push notification IOS8注册通知不工作。为什么?

Push notification IOS8注册通知不工作。为什么?,push-notification,ios8,apple-push-notifications,Push Notification,Ios8,Apple Push Notifications,我的应用程序APNS在不到ios8的情况下运行良好,但在ios8中,我没有获得设备令牌,甚至没有调用DidRegisterForRemotionTificationsSwithDeviceToken委托方法。请告知。我在申请时遇到了同样的问题,请参考下面的链接并解决此问题 可点击链接 显示您的APNS注册代码。 #ifdef __IPHONE_8_0 - (void)application:(UIApplication *)application didRegisterUserNotifica

我的应用程序APNS在不到ios8的情况下运行良好,但在ios8中,我没有获得设备令牌,甚至没有调用DidRegisterForRemotionTificationsSwithDeviceToken委托方法。请告知。

我在申请时遇到了同样的问题,请参考下面的链接并解决此问题

可点击链接


显示您的APNS注册代码。
#ifdef __IPHONE_8_0
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:    (UIUserNotificationSettings *)notificationSettings
{
//register to receive notifications
[application registerForRemoteNotifications];
}

- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString    *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void(^)())completionHandler
{
  //handle the actions
 if ([identifier isEqualToString:@"declineAction"]){
}
else if ([identifier isEqualToString:@"answerAction"]){
}
}
#endif