Most of us have read or at least heard of Gulliver’s Travels by Jonathan Swift. Well, we kind of feel like a Gulliver now, as we take a big step forward and start with Swift support in AppCode!
This summer, soon after the Apple event, we announced basic editing and highlighting for Swift code. Since then we’ve implemented resolve in Swift code and built a couple of useful features on top of that. So, let’s have a look at what’s already available in this EAP.
Start with creating a Swift-based project or just a new Swift file (select New | File from Xcode Template…) in the currently existing project. Now you can write some code, autocompletion for the language keywords will assist you with that.
After implementing the most part of resolve in Swift code, we are able now to provide you with smart features. Find Usages goes first! It helps you quickly find all pieces of code referencing a symbol at the caret, no matter if the symbol is a class, function, variable, constant, or type.
If you simply place a caret on a symbol in your Swift code, AppCode highlights all the usages within the current file and also marks them all in the right gutter:
If you are interested in the full list of usages, press
Alt+F7 to have AppCode find all usages for you and collect them in a separate window. You can group the usages there by your preferred criteria, for example by directory: