To get the most out of this book
This book has been completely revised for iOS 16, macOS 13.0 Ventura, Xcode 14, and Swift 5.7. Part 4 of this book also covers the latest technologies introduced by Apple during WWDC 2022, which are Mac Catalyst, SwiftUI, Lock screen widgets, and WeatherKit.
To complete all the exercises in this book, you will need:
- A Mac computer running macOS 12.0 Monterey, macOS 13.0 Ventura, or later
- Xcode 14.0 or later
To check if your Mac supports macOS 13.0 Ventura, see this link: https://www.apple.com/my/macos/macos-ventura-preview/. If your Mac is supported, you can update macOS using Software Update in System Preferences.
To get the latest version of Xcode, you can download it from the Mac App Store. Most of the exercises can be completed without an Apple Developer account and use the iOS Simulator. If you wish to test the app you are developing on an actual iOS device, you will need a free or paid Apple Developer account, and the following chapters require a paid Apple Developer account:
- Chapter 26, Getting Started with WeatherKit
- Chapter 27, Testing and Submitting Your App to the App Store
Instructions on how to get a paid Apple Developer account are in Chapter 27, Testing and Submitting Your App to the App Store.
Download the example code files
The code bundle for the book is hosted on GitHub at https://github.com/PacktPublishing/iOS-16-Programming-for-Beginners-Seventh-Edition. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Code in Action
The Code in Action videos for this book can be viewed at https://bit.ly/3MOasI3.
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://packt.link/ybxJ5.
Conventions used
There are a number of text conventions used throughout this book.
CodeInText
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. For example: “Mount the downloaded WebStorm-10*.dmg
disk image file as another disk in your system.”
A block of code is set as follows:
class Animal {
var name: String = ""
var sound: String = ""
var numberOfLegs: Int = 0
var breathesOxygen: Bool = true
func makeSound() {
print(self.sound)
}
}
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
let cat = Animal()
cat.name = "Cat"
cat.sound = "Mew"
cat.numberOfLegs = 4
cat.breathesOxygen = true
print(cat.name)
Bold: Indicates a new term, an important word, or words that you see on the screen. For instance, words in menus or dialog boxes appear in the text like this. For example: “Launch Xcode and click Create a new Xcode project.”
Warnings or important notes appear like this.
Tips and tricks appear like this.