When I look in PushPlugin's code,我看到它應該是正確處理了iOS 8案例:
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
if ([[UIApplication sharedApplication]respondsToSelector:@selector(registerUserNotificationSettings:)]) {
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UserNotificationTypes categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
[[UIApplication sharedApplication] registerForRemoteNotifications];
} else {
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:notificationTypes];
}
#else
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:notificationTypes];
#endif
現在我取這個從叉the original PushPlugin repo。
您應該1)查看您的PushPlugin.m文件,以確保代碼正在處理iOS 8的情況下,2)如果沒有,您應該獲取an iOS 8 compatible version of the PushPlugin repo。
您使用的是哪個版本的PhoneGap/cordova? –
@MichaelDautermann phonegap 2.9.1 – SKumar