[TIMOB-27652] Add functions to check if user has accepted permission for local notifications
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | None |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2021-01-19T20:30:07.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | griffin-app |
Reporter | Brenton House |
Assignee | Brenton House |
Created | 2019-12-12T14:16:58.000+0000 |
Updated | 2021-01-19T20:30:07.000+0000 |
Description
Currently, there is no way to check to see if a user has already accepted or rejected the permission for local notifications.
This causes several issues such as the ability to prompt an onboarding screen before asking for permissions and the ability to see that they have rejected permissions and onboard them on how to change it in settings.
There exists similar functions for other permissions:
hasAudioRecorderPermissions()
hasCameraPermissions( )
hasMusicLibraryPermissions( )
hasPhotoGalleryPermissions( )
[~cwilliams] - Do you know if this is the Apple function that we would need to use to support this? https://developer.apple.com/documentation/usernotifications/unusernotificationcenter/1649524-getnotificationsettings
[~bhouse] You can use https://titaniumsdk.com/api/titanium/app/ios/usernotificationcenter.html#requestusernotificationsettings and check for https://titaniumsdk.com/api/structs/getusernotificationsettings.html#authorizationstatus to get the permission.
Thank you [~vijaysingh]! Works like a charm!
This issue is being closed because there is a way to get this information using another function in the SDK.