Requesting access to the CAMERA and CONTACTS works fine. I use the same code but switch the permission to CAMERA_ROLL, but I never get a pop-up. I got to Settings → Expo and then I see that I have Camera and Contacts permissions, but Camera Roll doesn’t appear. Any thoughts on that aspect?
Can you recreate the issue on a snack?
I created a snack here: Unnamed Snack - Snack
I only have a physical Android device which works fine in the snack and in my project with the same code. However, this code doesn’t work with the iOS simulator.
Try this one Unnamed Snack - Snack
I think knowing the status beforehand helps.
It’s still the strangest thing. My code worked for the last two months. I tried your snack and it gives me a status of “granted”. However, it still fails and says it does not have camera roll permissions. The app settings does not list that as a permission, however. Is this possibly a simulator bug? I’m using iPhoneX simulator. Anyone else having this issue?
Edit: I get the same error with iPhoneX simulator, iPhone SE simulator and my friend’s iPhone 8 Plus. I think they are all running the latest version of iOS 11.3.
Edit 2: I’m using Expo version 24.0.0
Earlier in this thread there is discussion about fixes to this permission in v25, it also looks like maybe there was some kind of backwards compatibility issue. Updating to v27 seems to solve the problem. Sorry for the inconvenience
I’ll try updating my version and see if that fixes it an report back. Thanks!
If you do not want to upgrade, changing
package.json to containt
expo: 24.0.3 should fix the issue, or if you have
^24.0.0, just reinstall dependencies with npm
I did get my project updated to version 27.0.0, not finished with everything, but I noticed this under the breaking changes section of the upgrade guide (Expo SDK v27.0.0 is now available | by Ben Roth | Exposition):
roll permissions are now required to use ImagePicker.launchCameraAsync() and ImagePicker.launchImageLibraryAsync(). You can ask for them by calling Permissions.askAsync(Permissions.CAMERA_ROLL).
It appears as though the image picker is working again, so hopefully that helps others.
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.