A cheat sheet can be a handy tool to quickly reference Xcode, Swift or iOS logic from a compact overview. Ideally, you can print them out and lay them down on your desk. This makes it really easy to access and use them often. Therefore, I’ll show you a few useful cheat sheets which you can use during development.
Assert, precondition or fatalError
Marcin Krzyzanowski created a great blog post called Swift asserts – the missing manual about the differences between assert, precondition, and fatalError. He explains each of them and what the impact is in terms of termination when using each in a production app without a debugger attached.
The cheat sheet
Make sure to check out the original version from Marcin in his blog post.
A lot of Xcode cheat sheets exists. Some are just a big list of shortcuts like the one from ShortcutFoo while others are more visual and useful to print out. Personally, I like to use the one from Craig Grummitt which is very visual and covers most of the basic shortcuts in Xcode 10.
GIT Cheat Sheet
GIT is what we use on daily basis to manage version control and if you’re a terminal GIT user it can sometimes be hard to remember all commands. Therefore, it can be very handy to use the GIT cheat sheet provided by GIT tower. It’s especially handy for those commands you don’t often use. Besides, it’s also worth to mention their Xcode cheat sheet.
More Xcode Shortcuts
If you would like to read more about Xcode shortcuts, you can check out my blog post on Shortcuts essentials in Xcode to speed up your workflow.