-
-
Notifications
You must be signed in to change notification settings - Fork 85
PhotoPermission always starts at 'unknown' and is therefore never requested #142
Comments
The same can be said about the Camera permission. Version Number of Plugin: 3.0.0.12 Edit: I forgot to put this line in my activity, to get the result:
And this line in the AssemblyInfo.cs:
It's working normally now. |
This says if it is Unknown (which is the default) then request it. That code works as expected from all of my tests..... |
My bad, I read the Permissions.ios.cs line 413 too fast I guess. It checks for != unknown |
I'll give it another quick debug through and check. |
We are seeing this issue as well. Everything has been working well for the last 6-months+ however after updating to the latest nugets for XF, Permissions, MediaPlugin etc the permissions are no longer working. |
Bug Information
Version Number of Plugin: 5.0-beta
Device Tested On: iPhone/iPad (both iOS 12)
Version of Xamarin: 4.0
Steps to reproduce the Behavior
Try to request Photos permissions on ios:
It will return unknown always.
Also, checking it returns unknown always:
This is because https://github.com/jamesmontemagno/PermissionsPlugin/blob/master/src/Plugin.Permissions/Permissions.ios.cs#L413 checks for unknown in RequestPhotosPermission() and then returns unknown without trying a request.
I created my own 'ForceRequestPhotosPermission' in my ios project, with the same code as in Permissions.ios.cs RequestPhotosPermission() but without the check for unknown. Everything works like a charm then. After approve or deny, the status is never unknown again
The text was updated successfully, but these errors were encountered: