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

[iOS] Remove usage of NSData+Base64

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0
    • cordova-ios
    • None

    Description

      There is built in support since iOS 7. Once we drop iOS 6, we can do this.

      https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/index.html#//apple_ref/doc/uid/20000172-SW36

      Lines:
      1. https://github.com/apache/cordova-ios/blob/1a44a4eed9f22024cc0480733a4c21af63f92ab5/CordovaLib/Classes/CDVInvokedUrlCommand.m#L88
      2. https://github.com/apache/cordova-ios/blob/1a44a4eed9f22024cc0480733a4c21af63f92ab5/CordovaLib/Classes/CDVPluginResult.m#L40

      Replace with:
      1. [[NSData alloc] initWithBase64EncodedString:data options:0]
      2. [data base64EncodedStringWithOptions:0]

      Test mobilespec bridge benchmark before this change and after, then report the results.

      Attachments

        Issue Links

          Activity

            People

              shazron Shazron Abdullah
              shazron Shazron Abdullah
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: