아이폰푸시상태
-
[iOS] 현재 앱의 푸시 지원 상태체크0x02 Tips/iOS 2015. 1. 9. 13:48
현재 앱의 푸시가 켜져있는지 확인해야할 경우 다음과 같은 코드를 이용하시면 됩니다. iOS 7 기준 코드 UIRemoteNotificationType status = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; if (status == UIRemoteNotificationTypeNone) { NSLog(@"User doesn't want to receive push-notifications"); } iOS 8 기준 코드 BOOL status = [[UIApplication sharedApplication] isRegisteredForRemoteNotifications]; if (!status) { NSLog(@"User does..