10个用于iOS开发的Xcode插件

jopen 10年前

XcodeColors is a plugin developed by Robbie Hanson that adds color to Xcode's console. This plugin is especially useful in combination with CocoaLumberjack, a wonderful logging library Robbie wrote. This combination has been a true lifesaver for me over the years, it has made debugging easier and more, well, colorful. Read this quick tip if you want to read more about XcodeColors and CocoaLumberjack.

figure-xcodecolors.png

This plugin not only highlights TODO, FIXME, ???, and !!! comments, it also presents them in a convenient list.

figure-todo.png

Some plugins may seem trivial or simple, but they are fantastic if you consider their value. Backlight is such a plugin. All it does, is highlight the line that's currently being edited. It's simple, but very helpful.

figure-backlight.png

CocoaPods is the de facto dependency manager for iOS and OS X development. If you're not using CocoaPods, then I encourage you to give it a try. This tutorial will get you started in less than ten minutes.

There's also a CocoaPods plugin for Xcode, which makes integrating CocoaPods even easier. The CocoaPods plugin adds a CocoaPods menu item to Xcode's Product menu. If you don't like the command line, then you'll certainly like this plugin.

figure-cocoapods.png

Like Xcode plugins, managing code snippets isn't trivial in Xcode. Arnaud Coomans shared this opinion and created a nifty plugin that synchronizes your Xcode code snippets with a git repository.

figure-codesnippets.png

The beauty is that the code snippets you've manually added in Xcode are left untouched. Importing code snippets from a git repository only takes a few clicks. This is also a clever way to back up your code snippets or keep them in a central location if you use multiple machines.

A graphical user interface makes working with git less daunting for many developers. While applications like Tower and SourceTree are great, I often want to know what has changed in the file I'm currently working on, in Xcode's code editor. The GitDiff plugin makes this possible and it's great.

It's a subtle enhancement of Xcode's code editor, adding just enough visual information to know what has changed since the last commit.

figure-gitdiff.png

Autocompletion is great, especially if you're writing Objective-C. Wouldn't it be great if Xcode autocompleted file names, such as the names of image files?

Kent Sutherland created the KSImageNamed plugin that does exactly that. Not only will it save you time, it will make sure that typos are a thing of the past.

figure-fuzzyautocomplete.png

Adding import statements can be pesky sometimes. If you need to import a header of a pod, for example, then Xcode's autocompletion won't work for you. The Peckham plugin solves this issue.

Press Command-Control-P, type a few letters of the header you're looking for, and select it from the list of options presented by the plugin. It's a great addition to Xcode's autocomplete functionality.

figure-peckham.png

Speaking of autocomplete, the majority of iOS and OS X developers have come to rely on Xcode's great autocomplete functionality. However, Xcode's implementation of autocomplete isn't perfect and you don't always get the suggestions you expected or hoped for.

Jack Chen and Leszek Ślażyński have created an alternative in the form of the FuzzyAutocomplete plugin. It leverages the algorithm Xcode uses for its Open Quickly feature, which does an excellent job in terms of pattern matching. It works very, very well.

figure-fuzzyautocomplete.png

Dash is an amazing piece of software for browsing documentation. I use it every single day. What I like even more is its integration with Xcode, thanks to its Xcode plugin. You probably know that you can Option-Click a symbol in Xcode's editor to go to the documentation. However, I'm not a big fan of Xcode's documentation browser and that's where the Dash plugin comes into play.

figure-dash.png

The plugin opens Dash instead of Xcode's documentation browser if you Option-Click a symbol. Not only is Dash very fast, it also integrates with CocoaDocs. If you for example Option-Click a method of the AFNetworking library, then Dash will show the documentation of that method. I love this feature.