You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Michal Mocny (JIRA)" <ji...@apache.org> on 2013/02/25 19:36:14 UTC
[jira] [Resolved] (CB-2239) Support returning multiple
plugin-result values from native->js
[ https://issues.apache.org/jira/browse/CB-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michal Mocny resolved CB-2239.
------------------------------
Resolution: Fixed
Done
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/f4142e7d
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/5bd34923
(and needed a patch on android)
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/62421ee4
Will file another issue to create documentation. Right now, app devs should not be affected at all.
> Support returning multiple plugin-result values from native->js
> ---------------------------------------------------------------
>
> Key: CB-2239
> URL: https://issues.apache.org/jira/browse/CB-2239
> Project: Apache Cordova
> Issue Type: Improvement
> Components: iOS
> Affects Versions: 2.3.0
> Reporter: Michal Mocny
> Assignee: Michal Mocny
> Priority: Minor
> Fix For: 2.5.0
>
>
> Currently, on both Android and iOS, we support calling a plugin with multiple arguments, but only support a single return value.
> If all your return values are json serializable, you can construct a json array or dictionary and return that, and that has gotten us this far.
> However, we have recently added support for sending ArrayBuffers, which are not json serializable. Some plugins require returning data along with an ArrayBuffer result (such as a success indicator).
> We propose adding a new return type to CDVPluginResult (ios) and to PluginResult (android) which is some multi-value container, semantically a list of PluginResult. The types this container supports are the same as we have supported until now, and the current PluginResults implementations can be written in terms-of a list of size 1 so as to support the common case while not diverging implementations.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira