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.


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.