iOS 10 compatibility

For anyone using <input type='file'> in their apps for choosing/uploading photos, in iOS 10 it is now mandatory to provide a description for Camera and Photos permissions, otherwise your app will crash when user tries to pick a photo (or take one with the camera).

To fix that, you will need to add Cordova’s custom config plugin:

meteor add cordova:cordova-custom-config@2.0.3

Then in your mobile-config.js file add the following section:

App.appendToConfig(`<platform name="ios">
    <config-file platform="ios" target="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
      <string>YOUR DESCRIPTION (PHOTOS PERMISSION) HERE</string>
    </config-file>
    <config-file platform="ios" target="*-Info.plist" parent="NSCameraUsageDescription">
      <string>YOUR DESCRIPTION (CAMERA PERMISSION) HERE</string>
    </config-file>
  </platform>`);

Also, make sure you run the latest version of Meteor and other packages.

12 Likes