You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I too get an error return when I specify PNG on iOS.
The error also occurs on iOS 14.1.
Does anyone have a corrected version of the commit?
encodingType: camera.EncodingType.PNG,.
Bug Report
Problem
What is expected to happen?
getPicture should return valid file url.
What does actually happen?
getPicture calls error callback with no error message.
Information
All specified options for
getPicture
Command or Code
Just call
getPicture
with the specified options on iOS device.Environment, Platform, Device
Use real iOS device.
Version information
iOS 16.3.1
[email protected]
Checklist
It seems there's a bug in this place:
https://github.com/apache/cordova-plugin-camera/blob/master/src/ios/CDVCamera.m#L591
Here
self.data
isnil
then PNG option is picked. That happens, becauseself.data
is not assigned above:https://github.com/apache/cordova-plugin-camera/blob/master/src/ios/CDVCamera.m#L380-L382
So, call to
[self.data mutableCopy]
produces nil, and the next call obviously fails:https://github.com/apache/cordova-plugin-camera/blob/master/src/ios/CDVCamera.m#L599-L601
It seems that this issue could be easily fixed by assigning
self.data = data
in the mentioned code:https://github.com/apache/cordova-plugin-camera/blob/master/src/ios/CDVCamera.m#L380-L382
Could you please take a look?
The text was updated successfully, but these errors were encountered: