Check if APNS are enabled in your App

Posted on

- (BOOL)isPushEnabled { UIApplication *application = [UIApplication sharedApplication]; return application.enabledRemoteNotificationTypes != UIRemoteNotificationTypeNone; }

Example:

NSLog(@"APNS are %@enabled.", [self isPushEnabled] ? @"" : @"not ");

Leave a Reply

Your email address will not be published.