2015-01-12 3 views
0

이제 ios7에서 ios8로 앱을 업그레이드하고 있습니다. pushnotificatin은 iphone5에서는 작동하지만 iphone6에서는 작동하지 않습니다. 이 분야에 경험이있는 사람들을 대답하십시오. 감사합니다. .iphone6에서 기기 토큰 받기

답변

1

나는 동일한 문제에 직면 해 있으며 다음과 같은 도움이 도움이 될 것입니다. ios sdk8에서 팔로우 코드를 사용할 수 없습니다.

[application registerForRemoteNotificationTypes: 
 
    (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];

이 하나를 시도하십시오.

UIUserNotificationSettings *settings = 
 
    [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | 
 
    UIUserNotificationTypeBadge | 
 
    UIUserNotificationTypeSound 
 
             categories:nil]; 
 
    [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; 
 
    [[UIApplication sharedApplication] registerForRemoteNotifications];