Reputation: 121
The camera is causing problems for me in iOS 8. It works if I don't specify the allowEdit, targetWidth, and targetHeight options. The camera turns on and it appears to take the picture. However, the success and failure functions are never called when the options are specified. Instead, the console shows the following text:
2014-08-20 15:22:09.964 HI PMVI[3309:172101] Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates. Aug 20 15:22:12 ITI-Dev-Pad-2 HI PMVI[3309] : ImageIO: PNG Not enough image data Aug 20 15:22:12 ITI-Dev-Pad-2 HI PMVI[3309] : ImageIO: PNG Not enough image data
I am using Cordova 3.5 in xCode 6 on a Mac with Mavericks installed. Your help would be much appreciated.
Upvotes: 2
Views: 2497
Reputation: 577
In addition to Jn Fitys awesome answer, in Xcode I had to add CoreLoaction.framework , ImageIO.framework to Link Binaries and add CDVCamera.m to compile sources.
Upvotes: 0
Reputation: 125
Remove the camera plugin:
cordova plugin remove org.apache.cordova.camera
Then add again direct from github (as they haven't been distributed by apache yet):
cordova plugin add https://github.com/apache/cordova-plugin-camera.git
Also see http://shazronatadobe.wordpress.com/2014/09/18/cordova-ios-and-ios-8/ which lists several other plugins needing to be updaing to work properly in iOS8.
Upvotes: 3
Reputation: 121
Cordova has there plugins fixed in the master copy, but not the released copy. Using the following command in plug man installed the latest camera plugin.
cordova plugin add https://github.com/apache/cordova-plugin-camera.git
Upvotes: 1