1
if([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
[self registerForiOS8PushSettings]; //for iOS8
} else {
//iOS7 or earlier
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
}
無法將推送通知發送到iOS7設備。 didRegisterForRemoteNotificatiosnWithDeviceToken
被調用,實際上消息已成功發送。在iOS8中運行良好。iOS推送通知在iOS 8上工作,但不在iOS SDK 8.1中的iOS 7上
可能重複[iOS 8的功能的設備沒有收到推送通知後,代碼更新](http://stackoverflow.com/questions/25909568/ IOS -8-啓用-設備未接收推通知 - 後 - 編碼 - 更新) – CRDave 2014-11-05 11:08:06