iOS apps are developed using the iOS SDK and Apple’s Xcode development environment. Xcode is an integrated development environment (IDE) within which you will code, compile, test, and debug your iOS apps. The Xcode environment also includes a feature called Interface Builder, which enables you to graphically design your app’s user interface using the UIKit Framework’s components. This chapter will cover the steps involved in installing Xcode and the iOS 16 SDK on macOS.
Identifying Your macOS Version
The Xcode 14 environment requires that the version of macOS running on the system be version 12.3 or later. If you are unsure of the version of macOS on your Mac, you can find this information by clicking on the Apple menu in the top left-hand corner of the screen and selecting the About This Mac option from the menu. In the resulting dialog, check the macOS line:
If the “About This Mac” dialog indicates that an older macOS is installed, click on the More Info… button to display the System Settings dialog, followed by the General -> Software Update option to check for operating system upgrade availability.
Installing Xcode 14 and the iOS 16 SDK
The best way to obtain the latest Xcode and iOS SDK versions is to download them from the Apple Mac App Store. Launch the App Store on your macOS system, enter Xcode into the search box, and click on the Get button to initiate the installation.
Having successfully installed the SDK and Xcode, the next step is to launch it to create a sample iOS 16 app. To start up Xcode, open the Finder and search for Xcode. Since you will be using this tool frequently, take this opportunity to drag and drop it into your dock for easier access in the future. Next, click on the Xcode icon in the dock to launch the tool. You may be prompted to install additional components the first time Xcode runs. Follow these steps, entering your username and password when prompted.
Once Xcode has loaded and assuming this is the first time you have used Xcode on this system, you will be presented with the Welcome screen from which you are ready to proceed:
Adding Your Apple ID to the Xcode Preferences
Whether or not you enroll in the Apple Developer Program, it is worth adding your Apple ID to Xcode now that it is installed and running. First, select the Xcode -> Settings… menu option and select the Accounts tab. Then, on the Accounts screen, click the + button highlighted in Figure 3-3, choose Apple ID from the resulting panel, and click on the Continue button. When prompted, enter your Apple ID and associated password and click the Sign In button to add the account to the preferences.
Developer and Distribution Signing Identities
Once the Apple ID has been entered, the next step is to generate signing identities. Select the newly added Apple ID in the Accounts panel to view the current signing identities and click on the Manage Certificates… button. At this point, a list of available signing identities will be listed. If you have not yet enrolled in the Apple Developer Program, it will only be possible to create iOS and Mac Development identities. To create the iOS Development signing identity, click on the + button highlighted in Figure 3-4 and make the appropriate selection from the menu:
If the Apple ID has been used to enroll in the Apple Developer program, the option to create an iOS Distribution certificate will, when clicked, generate the signing identity required to submit the app to the Apple App Store. Having installed the iOS SDK and successfully launched Xcode 14, we can now look at Xcode in more detail.