Apache Cordova
  1. Apache Cordova
  2. CB-7000

Remove deprecated CDVPlugin and CDVPluginResult methods

    Details

    • Type: Task Task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0
    • Component/s: iOS
    • Labels:
      None

      Description

      https://github.com/apache/cordova-ios/blob/0bf656c3bccbe85813964bcf13c6705e0da37192/CordovaLib/Classes/CDVPlugin.h#L61-L66
      // Deprecate these in favour of using CDVCommandDelegate directly.
      // - (NSString*)writeJavascript:(NSString*)javascript;
      // - (NSString*)success:(CDVPluginResult*)pluginResult callbackId:(NSString*)callbackId;
      // - (NSString*)error:(CDVPluginResult*)pluginResult callbackId:(NSString*)callbackId;

      These are remnants of how older plugins used pluginResult and are not doc'ed anymore since 3.x (it was in 2.x). Time to migrate people.

      Also, CDVPluginResult corresponding methods should be removed as well:
      https://github.com/apache/cordova-ios/blob/0bf656c3bccbe85813964bcf13c6705e0da37192/CordovaLib/Classes/CDVPluginResult.h#L63-L66

        Issue Links

          Activity

          Hide
          Shazron Abdullah added a comment - - edited

          writeJavaScript needs to be removed anyway since how writeJavaScript will work for a WKWebView will be different – WKWebView uses blocks to async return the return value of a JavaScript evaluation instead of UIWebView's synchronous evaluation.

          Show
          Shazron Abdullah added a comment - - edited writeJavaScript needs to be removed anyway since how writeJavaScript will work for a WKWebView will be different – WKWebView uses blocks to async return the return value of a JavaScript evaluation instead of UIWebView's synchronous evaluation.
          Hide
          ASF subversion and git services added a comment -

          Commit ffdf7742fecee6dc75e2fb31686aec1a13d2560f in cordova-ios's branch refs/heads/4.0.x from Shazron Abdullah
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;h=ffdf774 ]

          CB-7000 - Remove deprecated CDVPlugin and CDVPluginResult methods

          Show
          ASF subversion and git services added a comment - Commit ffdf7742fecee6dc75e2fb31686aec1a13d2560f in cordova-ios's branch refs/heads/4.0.x from Shazron Abdullah [ https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;h=ffdf774 ] CB-7000 - Remove deprecated CDVPlugin and CDVPluginResult methods

            People

            • Assignee:
              Shazron Abdullah
              Reporter:
              Shazron Abdullah
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development