Last Updated: March 06, 2019
·
2.987K
· gilotm

Check if APNS are enabled in your App

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

Example:

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

1 Response
Add your response

Isn't it true that enabledRemoteNotificationTypes can be UIRemoteNotificationTypeNone but if Badge App Icon is ON you'll still get APNS messages? My testing seems to show that Alert Style can be none and it doesn't matter as long as Badge App Icon is ON.

over 1 year ago ·