devgeeks / Canvas2ImagePlugin

PhoneGap / Cordova plugin for iOS to save the contents of an HTML canvas to the device's Photo Library
211 stars 218 forks source link

Cordova 6.2 #73

Open ponpoko55 opened 8 years ago

ponpoko55 commented 8 years ago

No working without any Error.

MornaK commented 6 years ago

As a hint, in later versions of iOs, when accessing to the camera and photo gallery, the app MUST include a text to ask permission to the user.

I realized the aplication (using Canvas2Image plugin) crashed because of this "security" issue ...

It could be fixed by including the next lines in you config.xml of your project, into the section

<config-file parent="NSPhotoLibraryUsageDescription" platform="ios" target="*-Info.plist"> <string>This app needs access to your Photo Library to include a screenshot.</string> </config-file> <config-file parent="NSCameraUsageDescription" platform="ios" target="*-Info.plist"> <string>This app needs access to the Camera.</string> </config-file>

It worked like a charm for me.

(inspired by this StackOverflow answer)