Ionic Plugin Camera Crash

If you add Ionic’s native camera plugin and it crashed when opened in iOS device, add following entries in `Info.plist`, see previous post on how to add entries.

  • NSCameraUsageDescription
  • NSPhotoLibraryUsageDescription
  • NSLocationWhenInUseUsageDescription
  • NSPhotoLibraryAddUsageDescription

It’s important to add description, this is iOS requirement when apps try to access users data.


Ionic Plugin Camera Info.plist

To add entries to `Info.plist`, use `edit-config` tag in `config.xml`, for example:

<edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
    <string>need camera access to take pictures</string>

cordova plugin camera crash

To verify, build Ionic for iOS platform, then open project properties in Xcode.
cordova plugin camera crash 2