[
https://issues.apache.org/jira/browse/CB-11376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15401288#comment-15401288
]
ASF GitHub Bot commented on CB-11376:
-------------------------------------
GitHub user jcesarmobile opened a pull request:
https://github.com/apache/cordova-plugin-camera/pull/226
CB-11376: (ios): fix CameraUsesGeolocation error
<!--
Please make sure the checklist boxes are all checked before submitting the
PR. The checklist
is intended as a quick reference, for complete details please see our
Contributor Guidelines:
http://cordova.apache.org/contribute/contribute_guidelines.html
Thanks!
-->
### Platforms affected
iOS
### What does this PR do?
The plugin was sending the result twice, the first one as soon as the user
takes the picture and the second one when the geolocation success or fails. On
the second one the callbackId was null because it is set to null on the first
one.
If the user is using CameraUsesGeolocation, the plugin doesn't have to send
the first result when the picture is taken, it has to wait until the
geolocation success or fails and then send the image with the geolocation data.
### What testing has been done on this change?
Tested on real devices (iOS 8 and iOS 9)
### Checklist
- [X] [ICLA](http://www.apache.org/licenses/icla.txt) has been signed and
submitted to [email protected].
- [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html)
in the JIRA database
- [X] Commit message follows the format: "CB-3232: (android) Fix bug with
resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform
affected.
- [ ] Added automated test coverage as appropriate for this change.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jcesarmobile/cordova-plugin-camera CB-11376
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-camera/pull/226.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #226
----
commit 1f62944638146288e7898d2656091da8bf746b57
Author: Julio César <[email protected]>
Date: 2016-07-31T18:15:49Z
CB-11376: (ios): fix CameraUsesGeolocation error
----
> iOS: CameraUsesGeolocation=true throws "Invalid callback id received by
> sendPluginResult"
> -----------------------------------------------------------------------------------------
>
> Key: CB-11376
> URL: https://issues.apache.org/jira/browse/CB-11376
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Camera
> Affects Versions: 2.2.0
> Environment: cordova 6.1.0
> cordova-plugin-camera 2.2.0
> iOS 9.3.2
> Reporter: Michael Schmidt
> Labels: iOS, triaged
>
> iOS: CameraUsesGeolocation=true throws "Invalid callback id received by
> sendPluginResult"
> situation:
> setting the geolocation to true:
> {code}
> <preference name="CameraUsesGeolocation" value="true" />
> {code}
> problem:
> creates the following error message:
> {code}
> Invalid callback id received by sendPluginResult
> {code}
> stacktrace:
> {code}
> (
> 0 CordovaApp 0x00000001001259b4
> -[CDVCommandDelegateImpl sendPluginResult:callbackId:] + 208
> 1 CordovaApp 0x00000001000f1eb0 -[CDVCamera
> imagePickerControllerReturnImageResult] + 1616
> 2 CordovaApp 0x00000001000f16bc -[CDVCamera
> locationManager:didUpdateToLocation:fromLocation:] + 1984
> 3 CoreLocation 0x00000001890c4a14
> CLClientGetCapabilities + 22184
> 4 CoreLocation 0x00000001890c0aac
> CLClientGetCapabilities + 5952
> 5 CoreLocation 0x00000001890bae48
> CLClientInvalidate + 880
> 6 CoreFoundation 0x0000000182320f84 <redacted> +
> 20
> 7 CoreFoundation 0x00000001823208bc <redacted> +
> 308
> 8 CoreFoundation 0x000000018231ed04 <redacted> +
> 1960
> 9 CoreFoundation 0x0000000182248c50
> CFRunLoopRunSpecific + 384
> 10 GraphicsServices 0x0000000183b30088
> GSEventRunModal + 180
> 11 UIKit 0x0000000187532088
> UIApplicationMain + 204
> 12 CordovaApp 0x00000001000e97bc main + 76
> 13 libdyld.dylib 0x0000000181de68b8 <redacted> +
> 4
> )
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]