2014-09-22 61 views
0

我與解析與下面的代碼註冊推:解析 - 推送通知iOS中不工作8

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) { 
    UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert | 
                UIUserNotificationTypeBadge | 
                UIUserNotificationTypeSound); 
    UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes 
                     categories:nil]; 
    [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; 
    [[UIApplication sharedApplication] registerForRemoteNotifications]; 
} else 
#endif 
{ 
    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | 
                      UIRemoteNotificationTypeAlert | 
                      UIRemoteNotificationTypeSound)]; 
} 

在iOS系統7它的正常工作,但是當我從iOS的8把它發送推不工作,返回此錯誤:

enabledRemoteNotificationTypes is not supported in iOS 8.0 and later parse.

任何想法我做錯了什麼?

+0

是由於@admdrew。這是問題。 – San007 2014-09-22 17:38:47

回答