What you need for this book
The exercises in this book are written and tested for Swift 1.1, which is bundled with Xcode 6.1. To run the exercises, you need to have a Mac OS X computer running 10.9 or above with Xcode 6.1 or higher. If newer versions of Swift are released, check the book's GitHub repository or the book's errata page at PacktPub for details about any changes that might affect the book's content.
Xcode can be installed via the App Store as a free download; search for Xcode in the search box. Alternatively, Xcode can be downloaded from https://developer.apple.com/xcode/downloads/, which is referenced from the iOS Developer Center at https://developer.apple.com/devcenter/ios/.
Once Xcode is installed, it can be launched from /Applications/Xcode.app
or from Finder. To run the command-line based exercises, Terminal can be launched from /Applications/Utilities/Terminal.app
, and if Xcode is installed successfully, Swift can be launched by running xcrun swift
.
The iOS applications can be developed and tested in the iOS simulator that comes bundled with Xcode. It is not necessary to have an iOS device to write or test code. However, if you want to run the code on an iOS device, then you need to join the iOS developer program. More information is available at https://developer.apple.com/programs/ios/.