Guest User

Untitled

a guest
Jun 13th, 2018
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. UNAuthorizationOptionAlert
  2. | UNAuthorizationOptionSound
  3. | UNAuthorizationOptionBadge;
  4. + if (@available(iOS 12.0, *)) {
  5. + authOptions = authOptions | UNAuthorizationOptionProvidesAppNotificationSettings;
  6. + }
  7. [[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:authOptions completionHandler:^(BOOL granted
  8. , NSError * _Nullable error) {
  9. }];
  10. #endif
  11. @@ -702,6 +705,16 @@ NSString *const kGCMMessageIDKey = @"gcm.message_id";
  12. [[UIApplication sharedApplication] registerForRemoteNotifications];
  13. }
  14.  
  15. +- (void)userNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(UNNotification *)notification {
  16. + // Open notification settings screen in app
  17. +}
  18. +
Add Comment
Please, Sign In to add comment