I'd like to request permission only for camera usage and not for the user's photos library

Basically I have a problem while publishing my app on the appstore.

My app uses the camera to scan some barcodes (I use the barcode-scanner community plugin) and to be able to use the camera I need to ask the user for permission. I do this by using the official camera plugin with the “.requestPermissions” method. This besides asking for the camera permission also asks permissions for accessing the devices photos too. My app doesn’t need to access the user’s photo.

This wouldn’t be a problem but by doing so I’m forced to add “NSPhotoLibraryAddUsageDescription” and “NSPhotoLibraryUsageDescription” properties in the info.plist file for the iOs project and applestore doesn’t want any useless properties there (since my app doens’t have the need to access the user’s photo).

Now I’m trapped because I either find a way to remove those properties (which I tried but it gives me an error when uploading to the appstore, such as “there’s a library in your app that needs access to the user’s photos so you nedd to add the permissions”) or I somehow implement a feature where I actually access the user’s photos.

I would like better the first option, but I can’t find a way.
Any solution?

When taking a picture, it stores the image in a temp folder within the device until it is handled. That’s why it ask for device photo lib permission.

Just add the required info.plist properties. it does 0 harm.

requestPermissions allows to pass an alias as param, so you can just ask for camera alias so it only ask for camera permissions. Camera.requestPermissions({ permissions: ['camera'] })