In this chapter, you will learn how to debug your code. Debugging is a critical item in any developer’s tool belt. The ability to debug properly can save you hundreds of hours. You will also learn how to read Apple’s documentation. The documentation is like an encyclopedia provided by Apple; it has the answers to all your tough questions. Finally, you will learn how to add an app icon and a launch image to your apps. Let’s keep building your knowledge base and get started.
A major part of developing software is making mistakes and solving issues. Issues, also known as bugs, are defined when an application is not running as expected. The process used to triage and troubleshoot issues is called debugging. Apple even provides a suite of tools inside of Xcode to assist with debugging.
Debugging is part of the development process; no matter how many apps you make, you will always have to debug. Just like spell check in Microsoft Word, just because you have written 500 essays doesn’t mean you won’t make spelling or grammar mistakes. Don’t be discouraged when you are debugging; remember it is part of the process, and you are improving the quality of your app.
There are two major types of issues: compile time and runtime.
To understand compile-time issues, you must understand how Xcode works behind the scenes. Xcode takes the Swift code and translates it into zeros and ones in order for an iOS device ...