As we are closing this year, let's take a look at few simple things you can add to your iOS developer toolbox to make your life easier and be more productive in 2016.
Using the power of User Breakpoints
We use breakpoints quite a lot, but I see that most of my friends only use regular breakpoints whilst debugging.
There is much more you can do with them, e.g. you can elevate your custom breakpoint to User Breakpoint and have them work in all your projects, why would you do that?
Because you can create symbolic breakpoint's that execute code whenever a specific point is reached, e.g. UIApplicationMain:
{{< img class="center" src="/2015/12/symbols.png" >}}
Did you see what did I do there?
Now whenever I debug ANY project I'm working on, instead of:
{{< img class="center" src="/2015/12/before_symbols.png" >}}
I can get straight to business with:
{{< img class="center" src="/2015/12/after_symbols.png" >}}
Without extra steps.
And you can do so much more:
Making Xcode better
Plugins
Here are some of my favourite plugins for Xcode, if you don't give them a try you might be missing out on some really great features:
-
Alcatraz - this is a plugin that adds a PackageManager into Xcode, which you will use to install all other plugins.
-
KZLinkedConsole - adds ability to jump straight to the source code that logged an error
{{< img class="center" src="https://github.com/krzysztofzablocki/KZLinkedConsole/raw/master/logs.gif?raw=true" >}} -
XCodeColors - while would you not want to have colors in your Xcode console? makes error stand out so much more
-
KSImageNamed - adds intelisense with preview to your imageNamed: calls
{{< img class="center" src="https://camo.githubusercontent.com/c354bf04524df86daeabe7a6d2b9926fac790f85/68747470733a2f2f7261772e6769746875622e636f6d2f6b7375746865722f4b53496d6167654e616d65642d58636f64652f6d61737465722f73637265656e73686f742e676966" >}}
-
OMColorSense - adds preview to your UIColors and it even allows you to use Color Picker straight from that to modify the code.
-
VVDocumenter - if you write libraries you should be adding documentation to them, this plugin makes it easy by giving you context-aware templates
{{< img class="center" src="https://camo.githubusercontent.com/ca5518c9872e15b8a95b9d8c5f44bc331977d710/68747470733a2f2f7261772e6769746875622e636f6d2f6f6e65766361742f5656446f63756d656e7465722d58636f64652f6d61737465722f53637265656e53686f742e676966" >}}
Hidden options
Open your terminal and type those:
- Want to see how long it takes to build your project?
defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
- Better autocompletion with Fuzzy mode?
defaults write com.apple.dt.Xcode IDECodeCompletionFuzzyMode 3
defaults write com.apple.dt.Xcode IDEWorkaroundForRadar6288283 3
- Faster build times by leveraging multi-core CPU ?
defaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks `sysctl -n hw.ncpu`
Other
- Use iRamDisk to put your Derived Data and iOS Simulator on fastest memory you have. Even on new SSD it makes a difference.
- Use KZPlaygrounds to implement your new features faster in both Swift and Objective-C
- Using interface builder? you probably got annoyed by view being added as a subview everytime you move it? Just hold cmd and it won’t do that ever again.
- See if some other tools I've used can save you time