1192
Views
17
Comments
Solved
[Camera Plugin] Missing Info.plist key on iOS app submission
Question
camera-plugin
Mobile icon
Forge asset by OutSystems

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.


2023-05-18 09-00-19
Ricardo Vaz Alves
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

2021-09-08 08-01-41
Lorena Sabou

Hi Ricardo,


The check is failing again (we have version 7.1.7 at the moment) and from all the answers I see above, it seems like the extensibility configurations of the plugin have changed in the meantime such that they don't include anymore the descriptions.

Can you let us know what's the official and proper way to do it at the moment?


2021-05-05 13-05-18
Mykola (Nick) Tkachenko

Hi Ricardo,

Thanks for your reply - it worked perfectly!


2019-01-25 13-11-28
Kommer-Jan Allart

Thanks, this worked for me as well! :)

UserImage.jpg
Bram van Mensvoort

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

2018-05-10 22-41-57
Carlos Filipe Simões
Staff

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

UserImage.jpg
Bram van Mensvoort

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

2018-05-10 22-41-57
Carlos Filipe Simões
Staff

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

Thanks for sharing!

Carlos Simões

2022-02-18 15-32-27
João Almeida
Champion

Carlos Simões wrote:

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

Thanks for sharing!

Carlos Simões

Both your solutions are unmanageable in a factory... Outsystems default values for CAMERA_USAGE_DESCRIPTION and PHOTOLIBRARY_USAGE_DESCRIPTION were just refused by Apple, so we need to change the Camera plugin so that those values will work for all apps in the factory using the plugin.



2018-05-10 22-41-57
Carlos Filipe Simões
Staff

João Almeida wrote:

Carlos Simões wrote:

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

Thanks for sharing!

Carlos Simões

Both your solutions are unmanageable in a factory... Outsystems default values for CAMERA_USAGE_DESCRIPTION and PHOTOLIBRARY_USAGE_DESCRIPTION were just refused by Apple, so we need to change the Camera plugin so that those values will work for all apps in the factory using the plugin.



Hello, João,

Sorry to hear that... :\ Unfortunately, Apple's review process can occasionally be a bit more rigorous and these messages may miss the mark. In that sense, we could have a better message, but always keeping in mind it needs to be applicable to all apps using the plugin.

Still, in scenarios where multiple apps use the same plugin, the only current solution is to, effectively, create a new plugin based off of the original one from the Forge, by cloning it. This has the obvious drawback that we would need to merge updates from the original plugins to the clones.

Can you please share this via the Ideas section? This is a great way to have this feedback reach the teams and get their attention. Another request, also related with extensibility configurations, was recently put on the radar of the team.

Best regards,

Carlos Simões

2022-02-18 15-32-27
João Almeida
Champion

That Idea's focus is slightly different, but would definitely work for me.Thanks!

2018-05-10 22-41-57
Carlos Filipe Simões
Staff

João Almeida wrote:

That Idea's focus is slightly different, but would definitely work for me.Thanks!

Yes, not at all the same thing (although still related with tweaking Extensibility Configurations), but definitely a most valid one! I will be on the lookout to vote myself!

Thanks and best regards,

Carlos Simões


UserImage.jpg
Akshay Tank

Hi Carlos Simões


We  are also using the camera plugin , and by default there are configurations present like this in extensibility schema : 



But we are not able to see this usage description on real devices, instead we are seeing default usage description by the iOS system.

Apart from this i need to know If this configurations are present then does it guarantee that apple will not reject the app submission ? 

Regards,

Akshay Tank.

2019-04-09 13-53-33
Shreyas Bhondve

Hi,

When I call TakePicture action of the plugin I am seeing the alert as shown in the screenshot.


I want to show the custom message that I have configured in the extensiblity configuration.

IMG_0207.PNG
2024-03-25 06-19-08
Harlin Setiadarma

Shreyas Bhondve wrote:

Hi,

When I call TakePicture action of the plugin I am seeing the alert as shown in the screenshot.


I want to show the custom message that I have configured in the extensiblity configuration.

You have denied access once, so it will not show your custom message.

To view your custom message, try deleting your app first in your mobile device, then reinstall.

It should ask for permission again with custom message.


2019-04-09 11-25-58
Annemarie Sonnenberg

Hello,

Does anyone have experience with the best way to override the default messages? Apple keeps refusing the publication of apps when the default message is shown instead of a message that has been customized for the app that we want to publish in the iOS app store.

Any help is much appreciated!

2018-08-04 18-19-00
André Pinho

Annemarie, did you solve this?
On your app try adding this to the extensibility configuration:


{

  "preferences": {

    "ios": [

      {

        "name": "NSPhotoLibraryUsageDescription",

        "value": "This application needs access to your Photo Library because x"

      }

    ]

  }

}

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.