We developed a photo editor app using phonegap and vanilla javascript and built using phonegap build. This app typically uses cordova-plugin-camera to capture still photos and PICK photos from the camera roll. In the testing environment, we use real devices for both platforms, Android and iOS. This works perfectly in Android, however in iOS11, the plugin does NOT ask for the First-Use permission upon using the picture picker, users can access their camera roll directly. We haven't noticed this thing during the testing phase, the app review team have raised this issue to our attention that the app is not requesting user permission before accessing sensitive information.
This code does not ask for first-use permission on iOS11 when app is built on phonegap build (xcode9)
navigator.camera.getPicture(onSuccess, onFail, {
destinationType: Camera.DestinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY
});
There is no issue with using Camera.PictureSourceType.CAMERA as the plugin is capable of handling the permission issue properly. It is worth mentioning that we have implemented all the permission descriptions required for iOS10+ in the *-Info.plist and as well as during plugin installation. Even more, we have noticed that the app doesn't crash on iOS11.4 if those descriptions were omitted from the configuration files.
<engine name="ios" spec="latest" />
<preference name="phonegap-version" value="cli-8.0.0" />
<preference name="target-device" value="handset" />
<preference name="TARGETED_DEVICE_FAMILY" value="1" />
<preference name="IPHONEOS_DEPLOYMENT_TARGET" value="10.0" />
We tested this on iphone 7, iphone 8, and iphone X with the latest iOS11.4 update, all of which reproduced the same results, no permission asked.
We tested the plugin cordova-imagePicker from Telerik Team and it works well with first-use permission, however we noticed that they didn't implement a fallback if the user rejected the request, the app will crash.
So, anyone have noticed this recently? Any clues how to deal with this? Is this caused by phonegap build?
Thanks for your time.