티스토리 뷰
registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later.
썩소천사 2014. 12. 5. 15:07APNS등록시 iOS 8 버전부터 변경 됨.
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)])
{
//iOS8
UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings];
[[UIApplication sharedApplication] registerForRemoteNotifications];
} else {
//iOS7
[[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
}
앱 실행시(시뮬이던, 디바이스던) 푸쉬정보 동의 팝업이 떠야 정상.
참고 사이트 : http://corinnekrych.blogspot.kr/2014/07/how-to-support-push-notification-for.html
'iOS > 에라고만...' 카테고리의 다른 글
[ios] app store review 20.2, 3.1 reject (0) | 2015.02.11 |
---|---|
시뮬레이터 빌드시 에러 : FBSOpenApplicationErrorDomain (0) | 2014.12.31 |
[부트캠프]윈도우 설치방법 및 먹통이 될 때 (0) | 2014.07.03 |
[iOS]custom framework error. (0) | 2014.06.26 |
[iOS]The requested URL was not found on this server. (0) | 2014.06.12 |