dmitry-salnikov opened a new issue, #832: URL: https://github.com/apache/cordova-plugin-camera/issues/832
# 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 <!-- Include all relevant information that might help understand and reproduce the problem --> All specified options for `getPicture` ```ts quality: 100, allowEdit: false, targetWidth: 1000, targetHeight: 1000, sourceType: Camera.PictureSourceType.PHOTOLIBRARY, mediaType: Camera.MediaType.PICTURE, encodingType: Camera.EncodingType.PNG, destinationType: Camera.DestinationType.FILE_URI, ``` ### Command or Code <!-- What command or code is needed to reproduce the problem? --> Just call `getPicture` with the specified options on iOS device. ### Environment, Platform, Device <!-- In what environment, on what platform or on which device are you experiencing the issue? --> Use real iOS device. ### Version information <!-- What are relevant versions you are using? For example: Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins Other Frameworks: Ionic Framework and CLI version Operating System, Android Studio, Xcode etc. --> iOS 16.3.1 cordova-plugin-camera@6.0.0 ## Checklist <!-- Please check the boxes by putting an x in the [ ] like so: [x] --> - [x] I searched for existing GitHub issues - [x] I updated all Cordova tooling to most recent version - [x] I included all the necessary information above --- 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` is `nil` then PNG option is picked. That happens, because `self.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? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org