Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-8063

CDVCommandStatus.NO_RESULT calls fail on ios

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 4.0.0
    • None
    • cordova-js
    • None
    • iOS

    Description

      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.

      pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_NO_RESULT];
      
      pluginResult.keepCallback = [NSNumber numberWithInt:1];
      
      [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
      

      Attachments

        Issue Links

          Activity

            People

              jcesarmobile jcesarmobile
              jkeshavarzi James Keshavarzi
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: