1.3. Compiling iOS Apps
Problem
You have learned how to create an iOS app and wonder how it behaves.
Solution
Compile and run your iOS apps using Apple’s latest compiler. Then test your app on iOS Simulator and also, preferably, on a device.
Discussion
Creating an iOS App can be categorized under the following tasks:
Planning
Prototyping
Designing
Implementing and Testing
Delivering
During the implementation of an app, you will constantly need to run your app on a simulator or on various devices to make sure it is consistent, adheres to the design guidelines that you or your teammates created for this project, and most importantly, is stable enough for the App Store.
Note
Crashes provide one of the major reasons for app rejections in the Apple App Store. Apps that are not stable and crash often are not good enough for consumers and Apple is very likely to reject them. So always make sure that you thoroughly test your apps on iOS Simulator and on devices.
When we write our code, as we will learn very soon, we need to make sure that what we are writing is correct. The process by which Xcode changes our code into executable instructions is called compilation. The compiler does the compilation. In Xcode, we use various build commands to compile our apps:
- Build for Running
Use this when you want to debug your applications on the simulator or on a device. Debugging is the process by which you can find mistakes in your code.
- Build for Testing
Use this build setting to run unit-tests that you’ve written ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access