Dim no As NativeObject = Me
no.RunMethod("NotificationStatus", Null)
Wait For Authorization_Status(status As Int)
'0 - not determined
'1 - denied
'2 - authroized
'3 - provisional (authorized)
Log(status)
#if OBJC
#import <UserNotifications/UserNotifications.h>
- (void) NotificationStatus {
[[UNUserNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler: ^(UNNotificationSettings* settings) {
[self.bi raiseUIEvent:nil event:@"authorization_status:" params:@[@(settings.authorizationStatus)]];
}];
}
#End If