2
Writing a Swift Program
WHAT'S IN THIS CHAPTER?
- Setting up your developer account
- Getting Xcode
- Experimenting in playgrounds
- Creating Swift programs in Xcode
- Building Swift programs with Xcode
WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
You can find the wrox.com downloads for this chapter at http://www.wrox.com/go/proswift on the Download Code tab. The code for this chapter is contained in the following files:
- SwiftIsFun.playground
- Swiftisms.zip
Swift is a new language, but luckily, little has changed when you develop and build applications in Xcode, even if you are writing your new application in Swift. This chapter gives a quick overview of the new Swift-related features in Xcode 6, the first version of Xcode to support Swift development. It builds on the skills and knowledge you have already acquired as an advanced iOS or OS X developer. You'll find that little has changed in the Xcode toolchain to support development of Swift applications.
SETTING UP XCODE
Xcode is Apple's integrated development environment (IDE) for OS X and iOS development. It supports the creation of programs in Objective-C, Swift, C, and C++, as well as a number of other less commonly used languages (such as Python). Xcode is based on Project Builder, an IDE you use to write programs for the NeXTSTEP operating system, the forerunner of Mac OS X, as well as Interface Builder, the environment for designing graphical interfaces on NeXTSTEP. As you can imagine, Xcode has changed substantially since its humble ...
Get Professional Swift now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.