I’ve been planning a “Toolbox” post for awhile to make a record of all the different tools I use on a daily basis while developing iOS and Mac apps. The list always seems so long that never get through it all at once. Instead, I’ve decided to post it in pieces as I work on it until I run our of topics.
To start, here’s a list of great Xcode plugins I use on a daily basis.
Xcode’s source formatting is weak. Often I’m working on a file that’s a mess and I just want a quick way to get it formatted the way I want. I’ve experimented with Uncrustify and Xcode behaviours but it always felt cumbersome and eliminated the “undo” options after a re-format. The ClangFormat plugin uses clang-format and simple style options to reformat your code directly in Xcode. It doesn’t have as many options as Uncrustify but it has enough to suit my needs. I’ve configured ^F so I can easily reformat a file as needed.
I’ve mentioned CocoaPods before so I won’t go into detail about it but this plugin provides handy CocoaPods options under the Product menu to allow you to perform basic
pod operations from Xcode.
HOStringSense gives you an easy way to edit complicated string with escaped characters. When you select a
@"string", this plugin provides a handy popup where you can edit the string without worrying about escaping special characters. When you’re done, the string will have all escapes applied where necessary. Great for editing regular expressions, HTML and more.
The Injection plugin allows you to apply hot-fixes to your live running objective-c classes. It’s great for debugging small code changes on the fly instead of waiting for code the recompile. Here’s the description from the plugin’s site:
Using Injection it is possible to make a change to the implementation of an Objective-C® class and have it take effect as soon as the class is saved without having to restart the application. This feature works for OS X and iOS applications in the simulator and on iOS devices.
Injection works by compiling your class in a bundle project in the normal way which is then loaded into your application. The new method implementations are then “swizzled” onto the original class so they take effect immediately. This is completely automated by the plugin and a short stub of code #imported into main.m.
KSImageNamed is autocompletion and preview for
imageNamed:. Enough said.
Use Lin to select an
NSLocalizedString() or related localization functions and you’ll be presented with a popover that contains the related keys and translations from all your localization files. You can add and edit translations directly which make it much easier to use proper “keys” instead of languages phrases for the localization keys.
OMColorSense is an inline colour picker for
NSColor that displays a swatch and allows you to pick colors using the standard system wide colour pickers.
Lastly, XToDo give you a nice little window to display all your
!!!! comment so you can easily find your place. I also like to show mine as warnings.