[Camera Plugin] Missing Info.plist key on iOS app submission

[Camera Plugin] Missing Info.plist key on iOS app submission

  
Forge Component
(5)
Published on 2016-12-15 by OutSystems R&D
5 votes
Published on 2016-12-15 by OutSystems R&D

Hi,

We are currently submitted app to the App Store, but there is an issue with the data usage protection:

"Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.

Once these issues have been corrected, you can then redeliver the corrected binary."

How can I fix it?

On github description it is mentioned that I have to pass some values when generating the app.


Since iOS 10 it's mandatory to add a NSCameraUsageDescription and NSPhotoLibraryUsageDescription in the info.plist.

  • NSCameraUsageDescription describes the reason that the app accesses the user’s camera.
  • NSPhotoLibraryUsageDescription describes the reason the app accesses the user's photo library.

When the system prompts the user to allow access, this string is displayed as part of the dialog box.

To add this entry you can pass the following variables on plugin install.

  • CAMERA_USAGE_DESCRIPTION for NSCameraUsageDescription
  • PHOTOLIBRARY_USAGE_DESCRIPTION for NSPhotoLibraryUsageDescription

Example:

cordova plugin add cordova-plugin-camera --variable CAMERA_USAGE_DESCRIPTION="your usage message" --variable PHOTOLIBRARY_USAGE_DESCRIPTION="your usage message"

If you don't pass the variable, the plugin will add an empty string as value.


How can I pass this variables or override default empty string to use in ServiceStudio app generator?

Thank you.


Solution

Hi Mykola,

We already did that fix in the latest version of the plugin.You shouldn't have that problem anymore. Can you please check if you're using the latest version and try again?

Let me know how it went please.

Best regards,

Ricardo Alves

Solution

Hi Ricardo,

Thanks for your reply - it worked perfectly!


Thanks, this worked for me as well! :)

Hi Ricardo,

Our app is in dutch and also want extra information about privacy for the permissions.

Currently the texts are:
"We access your camera to take pictures."
"We access your photo library to load or save pictures."

How is it possible to adjust the current texts?

Kind regards

Hello, Bram,

If you're only looking a Dutch localization of the message (and can forego English), you can open the Camera Plugin and edit it's extensibility configurations. It should then look something like this:

You will lose the ability to upgrade the plugin directly from the Forge and will have to publish newer versions manually (and re-add the Dutch descriptions).

Another, similar option would be to actually "clone" the plugin module and do your edits there. Then, you would keep the Forge upgrade capabilities and would just have to merge them to your clone.

Would this do?

Best regards,

Carlos Simões

Thanks for the quick reply. And for the good suggestions.

The second option (cloning) seems workable, so we are going to implement that.

We avoid the first option, since we might use this plugin in multiple applications (with different contexts) in the future.

Kind regards,
Bram van Mensvoort

Good point, Bram. Bigger factories will find the first option as unmanageable.

Thanks for sharing!

Carlos Simões