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

[iOS] Remove usage of NSData+Base64

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0
    • Component/s: cordova-ios
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: