[
https://issues.apache.org/jira/browse/CB-8063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14223601#comment-14223601
]
Shazron Abdullah commented on CB-8063:
--------------------------------------
Looking at the JS code, success is 0 or 1:
https://github.com/apache/cordova-js/blob/f6db82f4c737bd96a14fbc77e0a67b6d799ec06a/src/ios/exec.js#L308
Which corresponds to NO_RESULT and OK:
https://github.com/apache/cordova-ios/blob/dd54d96bd0eddb7f8967d0d1fcfb90f2635ed22a/CordovaLib/Classes/CDVPluginResult.h#L24-L25
So, it's not that. It appears these are the lines:
https://github.com/apache/cordova-js/blob/1fc2526faa6197e1637ecb48ebe0f876f008ba0f/src/cordova.js#L203-L207
> CDVCommandStatus.NO_RESULT calls fail on ios
> --------------------------------------------
>
> Key: CB-8063
> URL: https://issues.apache.org/jira/browse/CB-8063
> Project: Apache Cordova
> Issue Type: Bug
> Components: iOS
> Affects Versions: 4.0.0
> Reporter: James Keshavarzi
>
> Cordova version: 4.1.2
> When returning a pluginResult with a resultWithStatus of NO_RESULT, the fail
> callback gets called for a plugin, when it shouldn't. Previously nothing was
> called in the client (success/fail) and the plugin was free to continue
> execution and later send a status of OK or ERROR as it deemed necessary.
> Sending a NO_RESULT seems to perform the same operations as sending an ERROR,
> which seems wrong.
> The below code ends up calling the fail callback.
> {code}
> pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_NO_RESULT];
> pluginResult.keepCallback = [NSNumber numberWithInt:1];
> [self.commandDelegate sendPluginResult:pluginResult
> callbackId:command.callbackId];
> {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]