The slides from the presentation I did at iOS Conf 2015 in Singapore on October 24th. The presentation deals with tips and tricks for debugging iOS applications.
5. Developing for iOS is
complicated
• Multiple platforms - iOS, watchOS, tvOS
Multiple devices - iPhone, iPad, Apple Watch, Apple TV
Apps vs. extensions
10. Test on Device!
Don’t rely on just the simulator for all your testing.
If you notice a bug (or strange behaviour) on the simulator, test on a
device (or several devices) too.
Some issues are there just on the simulator and this can cause you
many wasted hours.
12. Trust in the Google
Search to see if others have encountered the issue. In most cases,
they probably have.
If you’re working with a beta version of iOS/Xcode, the Apple
developer forums (http://forums.developer.apple.com/) will almost
always have somebody else talking about the issue.
13. What Changed?
Version control systems are your friend - they can help you identify
what actually changed when you did that last revision
Compare versions to see if you can identify the change that is
causing the bug you see.
14. Git Outta Here
Git isn’t just for the command-line any more!
• Xcode - Built-in source control functionality.
• SourceTree - Free. Works with both Git and Mercurial
repositories. http://sourcetree.com
• GitUp - Free. Allows you to do some complicated operations via
the GUI. http://gitup.co
• GitHub Desktop - Free. Integrates with GitHub workflow.
https://desktop.github.com
• Git Tower - Paid. Beautiful, clean, and functional UI. http://git-
tower.com
15. Crash Logs
Crash logs provide a lot of valuable information to identify the root
cause for a bug.
Third party tools can help too:
• Crashlytics/Fabric - Tiny footprint, easy to set up. Now owned by
Twitter. http://fabric.io
• Hockey - Multi-platform - Android, iOS, Windows, Unity. Now
owned by Microsoft. http://hockeyapp.net
16. Pare it Down!
Have a bug in a complicated project?
Simplify it!
Clone and reduce the project down to the simplest form possible
where the bug is still present.
17. Basic Xcode Debugging
• Break points - The basic tool of debugging
• Logging - Get rid of all those NSLog statements …
• Watch points - How do you know when a variable changes?
• Symbol breakpoints - Break on specific methods.
• Exception breakpoints - Catching those elusive crashes
25. Questions?
More questions? Or need help with debugging? Or want to discuss
debugging related stuff?
Contact me via e-mail at:
fahim@rooksoft.sg
Or on Twitter:
@FahimFarook