Closed mcg95 closed 5 years ago
What permissions is the problem for? For all?
All of them. I am currently using it to allow Camera, Location and Notification. SPPermission.isAllow returns false for all three of them. I tested this by adding a print statement in the didAllow function in the SPPermissionDialogDelegate. All three returned false after tapping on the Allow button for all three. The buttons are also showing allowed. Once I restart the app, they are all true like they should be. Allowing notifications permission also retrieves my APNS token. So I think they work, but the bool value does not update.
@mcg95 I am added print
func to example project and all work correctly.
func didAllow(permission: SPPermissionType) {
if SPPermission.isAllow(permission) {
print("all work")
}
}
Got it working. I assigned the bool value to my own variable to check if it was true or not. That did not work. But I just used SPPermission.isAllow(.camera) to check if its allowed or not and it worked. Thanks for your help! Looking forward to the update which will allow change colours of the buttons and UI.
Hi,
I am trying to make sure that the Permission Request only comes up if the permissions required are set to false. But even after I provide the permissions, the SPPermission.isAllow for each respective permission is still false. Only if I restart the app it becomes true.
Any clue as to why I have to restart for the SPPermission.isAllow changes its bool value from false to true?
Thanks.