Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNAuthorizationOptionAlert
- | UNAuthorizationOptionSound
- | UNAuthorizationOptionBadge;
- + if (@available(iOS 12.0, *)) {
- + authOptions = authOptions | UNAuthorizationOptionProvidesAppNotificationSettings;
- + }
- [[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:authOptions completionHandler:^(BOOL granted
- , NSError * _Nullable error) {
- }];
- #endif
- @@ -702,6 +705,16 @@ NSString *const kGCMMessageIDKey = @"gcm.message_id";
- [[UIApplication sharedApplication] registerForRemoteNotifications];
- }
- +- (void)userNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(UNNotification *)notification {
- + // Open notification settings screen in app
- +}
- +
Add Comment
Please, Sign In to add comment