iOS Question xCode getNotificationSettings

fbritop

Active Member
Licensed User
Longtime User
How can this be implemented with NativeObject in order to check the Remote Notifications status for iOS>=10?

B4X:
center.getNotificationSettings(completionHandler: { settings in
  switch settings.authorizationStatus {
  case .authorized, .provisional:
    print("authorized")
  case .denied:
    print("denied")
  case .notDetermined:
    print("not determined, ask user for permission now")
  }
})

based on: https://dev.to/onmyway133/how-to-check-if-push-notification-is-actually-enabled-in-ios-20o8

Or any global solution that allows us to check independant from the OS version, if remote notifications have been authorized.

Thanks
FBP
 
Last edited:
Top