Having It All With Xcode 4 Static Libraries

It’s been a long, annoying road to getting a usability balance with libraries in Xcode 4. Well, strike that. iOS static libraries have always been a little hellish experience-wise, whether it was your app crashing if that library had categories or the compiler not being able to find headers.

In Xcode 4, we got another obnoxious facet to this issue: auto completion, or, in Apple Magicâ„¢ terms, Code Sense. Long story short, Code Sense does not like external headers. It really doesn’t. Sometimes it just won’t index those external headers, making the experience for using, say, BlocksKit incredibly annoying. In working on PSFoundation, I ran into a much bigger issue where Xcode decides it just won’t highlight your code at all.

As most can guess, when things are a crapshoot like this, actually being able to compile and use your code was the primary issue over getting autocomplete to work. After weeks of investigation and toying around, I feel like I’ve worked things out.

Continue reading

Say Hello To BlocksKit

While working on and being generally OCD with my branch of PSFoundation, I came upon a revelation that most Objective-C developers hit at some point in their experiences: blocks are flipping amazing. However, the only issue with blocks to someone obnoxiously obsessive like me is that they aren’t everywhere.

Today I’m introducing BlocksKit, which gathers a number of blocks-based extensions for Foundation and UIKit that I’ve stumbled upon over the last couple of weeks. These class extensions are open source and extensively documented. The (surprisingly simple) code is available on my GitHub. Online documentation is available right here on this site, and you can add a documentation set to Xcode 4 using this feed URL.

Continue reading