CocoaSecurity icon indicating copy to clipboard operation
CocoaSecurity copied to clipboard

Remove #import "Base64.h"

Open hlung opened this issue 10 years ago • 7 comments

As noted in https://github.com/nicklockwood/Base64 readme.

"In the iOS 7 and Mac OS 10.9 SDKs, Apple introduced new base64 methods on NSData that make it unnecessary to use a 3rd party base 64 decoding library. What's more, they exposed access to private base64 methods that are retrospectively available back as far as IOS 4 and Mac OS 6."

I wanted to fork and submit a PR. But in NSData base64 encoding, there is this NSDataBase64EncodingOptions parameter that I'm not sure which one I should use. So I created this issue instead. https://developer.apple.com/library/ios/documentation/cocoa/reference/foundation/classes/NSData_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSDataBase64EncodingOptions

hlung avatar Sep 15 '14 11:09 hlung

Thanks for raising this issue @hlung. I have fixed this in my fork and opened a pull request. I just passed in 0 for NSDataBase64EncodingOptions and that seemed to work. I had to make a small change to return nil if an empty string is passed in, but now all tests are passing.

timrossinfo avatar Oct 09 '14 02:10 timrossinfo

@timrossinfo looks like this was also submitted as a change by @Whirlwind (https://github.com/kelp404/CocoaSecurity/pull/14), but his pull request is failing. Did you submit a pull request for your changes?

abc2mit avatar Dec 12 '14 17:12 abc2mit

Hi @abc2mit I had originally opened pull request #12, but @Whirlwind noted there was a problem with compatibility on iOS 6, so opened #14 to fix this. I'm not sure why the build is failing through.

timrossinfo avatar Dec 16 '14 22:12 timrossinfo

Had to revert to 1.2.2 because of the deprecation warning...

kovpas avatar Dec 31 '14 09:12 kovpas

after extracting -master.zip , file Base64.h not found. i add this manually from https://github.com/nicklockwood/Base64

nvdcmptr avatar Jan 12 '15 10:01 nvdcmptr

Installing with cocoa pods results in a 'Base64.h' file not found as well

daneov avatar Sep 14 '16 10:09 daneov

Also not here with Cocoa Pods download till now but HEY, nvdcmptr's solution works like a charm!

Elindor avatar Jan 10 '17 19:01 Elindor