Fix Camera crash on IOS


Tinn Aphopchung

Just to share how to fix it in Appbuilder. If you use old camera plugin in cordova. (in Appbuilder too.) After IOS 10 have been change rules.You need to set description when App request permission. How to fix in AppbuilderOpen App option => Cordova tab => Configuration in cordova tab => Extra XML in  Configuration and paste below.

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

<edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge"> <string>need photo library access to get pictures from there</string> </edit-config>

<edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge"> <string>need location access to find things nearby</string> </edit-config>

<edit-config target="NSPhotoLibraryAddUsageDescription" file="*-Info.plist" mode="merge"> <string>need photo library access to save pictures there</string> </edit-config>

Another solution is use other plugin that update like media-capture(Old camera plugin did not update for 2 years.)


decsoft

Hello Tin,

Thanks for share it with us. Certainly, this issue is refered in the iOS quirks of the plugin's documentation, when you can see another possible way to provide the appropriate permissions descriptions for iOS, using the command line. But what you provide is perfectly valid too.


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.