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