Cordova Plugin for NSCameraUsageDescription in iOS 10

In my last blog post I wrote about the iOS 10 NSCameraUsageDescription Permission issue we encountered during the development of our Ionic/Cordova App.

To further automate the npm-based build process, I wrote a simple cordova plugin, which can be installed with the cordova plugin installation routine.

Latest published version on npm (with Cordova CLI >= 5.0.0)
cordova plugin add cordova-plugin-ios-camera-permissions --save

Latest version from GitHub
cordova plugin add https://github.com/Cordobo/cordova-plugin-ios-camera-permissions.git --save

The plugin adds a new key/value pair to your apps *.Info.plist:

For now, the string is as is – if you want to change the value, you need to overwrite the value in plugin.xml.

For the changes to plugin.xml to take effect, you must refresh the ios.json file (inside the /plugin folder):

If you use the flag --save like I did in the example code shown above, cordova adds an additional entry to your main config.xml file:

Leave a Reply

Your email address will not be published. Required fields are marked *