KSImageNamed: Xcode autocomplete for imageNamed

A few months ago I discovered and installed ColorSense for Xcode, which set my mind to thinking what other common annoyances or inconveniences be improved in Xcode. It took me about three and a half seconds to jump from colors to images, as Xcode doesn’t autocomplete imageNamed: calls. It’s impossible to remember the names of all the images in a project, especially when there are a hundred or more images. Switching to the Project Navigator to check if the image is named button-highlighted-pressed.png or button-pressed-highlighted.png gets old quickly. Additional trips to check whether an image’s 2x representation is added to the project only makes matters worse.

Armed with a new idea, a few free hours, and class-dump, I sat down and started hacking. I figured out how to insert items into Xcode’s autocomplete lists, ran into a couple of roadblocks, quit for the day, and then promptly forgot about the matter entirely. And so the project sat and collected dust, as code is prone to do. Finally, last week I forgot the name of one image too many. So I now present to you KSImageNamed, an Xcode plug-in for getting the imageNamed: autocomplete that should have been there in the first place.

KSImageNamed in action

Want NSImage/UIImage imageNamed: autocomplete bliss in your copy of Xcode? Go clone and build KSImageNamed on GitHub.

Hopefully this will save you a little frustration the next time you type imageNamed: and can’t remember the name of the image you were about to use. Even better, maybe this will get some people thinking about scratching an itch and making Xcode a little more pleasant to use. If there’s any interest, I may do a follow-up with some details on how the plug-in works so others can start hacking on Xcode themselves.

Cleaning up and starting over

It’s been almost two years since I’ve made any changes at all to this website, so it’s finally time to do something about the cobwebs that have gathered. There have been occasions where I’ve wanted a place to post something small and simple, but the sole orientation of this site towards Chax and Warp has sort of prevented me from doing so.

Almost 100% of my development work in the last two and a half years has been consumed by Flexibits, where Michael Simmons and I have been busy building Fantastical and other apps. While this has resulted in some great new apps for everyone to use, it also means Chax and Warp have been completely ignored. Neither projects have been in active development for almost three years now, so it’s time to clean things up here and move those projects officially into storage. Functionally this means nothing is going to change, so this is more of an official acknowledgement of reality so I don’t have to feel guilty about ignoring them anymore.

Chax and Warp are still available for older versions of Mac OS X (10.4-10.6 for Chax, 10.5 and 10.6 for Warp), so they haven’t disappeared completely. The source code for Chax and Warp are also available on GitHub in case anyone ever wants to try to breathe new life into them. At the very least, the source code to Chax is an interesting case study in using the Objective-C runtime to make large-scale modifications to another application.

I’d like to think that someday I’ll bring back Chax in a very limited fashion, if only to scratch my own itches with the rather uninspiring experience that is Messages. That is what Chax originally started as, but the sheer number of features and additions made it harder and harder to maintain in the face of ever-faster system updates. If Chax were to ever come back, it would be a back-to-basics version, changing just the things that annoy me the most.

Keep an eye out here for future posts, probably mostly related to Mac or iOS development in some form.