Wayne Fisher created CB-8650:
--------------------------------
Summary: Camera crashes on iOS if popoverOptions is set
Key: CB-8650
URL: https://issues.apache.org/jira/browse/CB-8650
Project: Apache Cordova
Issue Type: Bug
Components: Plugin Camera
Affects Versions: 3.8.0
Environment: iOS 8.1.2, iPad 2
Reporter: Wayne Fisher
My app has been using the camera plugin for some time now to both capture
pictures directly from the camera and to retrieve them from the photo library.
I recently updated Cordova to 3.8.0 and the 0.3.5 camera plugin. The app now
crashes when trying to get an image from the photo library on my iPad 2.
The javascript code looks similar to the following:
{code}
// Get a new picture from the library.
var offset;
var options = {
quality: 80,
sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY
};
// Correctly position the arrow of the iOS dialog.
offset = getElementOffset(this);
options.popoverOptions = new CameraPopoverOptions(offset.x, offset.y,
this.clientWidth, this.clientHeight,
Camera.PopoverArrowDirection.ARROW_ANY);
navigator.camera.getPicture(captureSuccess, captureFailure, options);
{code}
If I comment out the lines where options.popoverOptions gets set, it works fine
(other than the popover being poorly located).
Also going back to the 0.3.4 version of the camera plugin works fine.
The crash is reported as:
{quote}
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason:
'[<CDVCamera 0x14558790> valueForUndefinedKey:]: this class is not key value
coding-compliant for the key x.’
{quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]