indragiek / INAppStoreWindow

NSWindow subclass with a highly customizable title bar and traffic lights
BSD 2-Clause "Simplified" License
1.06k stars 162 forks source link

Base64 fallback on previous OS X versions #161

Closed indragiek closed 10 years ago

indragiek commented 10 years ago

Just realized that -[NSData initWithBase64Encoding] is only available on OS X 10.9. There are many apps that still require OS X 10.7+ compatibility, so there needs to be a fallback of some kind. One way is to include a base64 decoder in INAppStoreWindow.m from one of the many open source implementations out there. Another option is to fall back to using the old drawing method when running on anything lower than 10.9. I'm leaning towards the former.

/cc @jakepetroules

jakepetroules commented 10 years ago

So, the method I used is only available in the 10.9 SDK but is available in the runtime from 10.6. And is deprecated. Suggested solution: duplicate the forward declaration. Simple but effective.

indragiek commented 10 years ago

@jakepetroules Is that documented anywhere?

jakepetroules commented 10 years ago

Yes, in the comments next to the method in the corresponding system header file.

Also, in the signature of the NS_AVAILABLE macro annotating the method.

indragiek commented 10 years ago

:+1: I'll push that change tomorrow.

jakepetroules commented 10 years ago

Please release a v1.5 on CocoaPods soon too! :)

indragiek commented 10 years ago

After closing this and figuring out whats up with #162 that sounds like a good time to tag a new release.