I have the Swift book open in iBooks, and see the note “For the best experience, open this chapter as a playground in Xcode.” How is this done?
-
11View the Swift book in Xcode (it's in docs). At the top is a button offering to let you "download" a copy. Click it. Look in your downloads folder. There's the playground file. Double-click it to open it in Xcode. – matt Jun 04 '14 at 04:35
-
2If you are trying it from browser, download it as zip (Use .zip option). Then extract the file from zip (.playground file). Double click to open in XCode6-beta – binary Jun 05 '14 at 07:57
-
2Or without dealing with download - Open the docs from Xcode, search "swift" and open the `A Swift Tour` chapter, click the `Action` button on the right, and choose `Open Playground` – Aviel Gross Jun 05 '14 at 10:36
2 Answers
- Launch Xcode 6
- Documentation and API Reference Window (command-shift-0)
- Search for “The Swift Programming Language”
- Click first suggestion
You will see a series of collapsable menus on the left side of the screen detailing different sections, such as “A Swift Tour”, and “Language Guide”. You can click through these to get different bits of information about different aspects of the language.
Many sections will feature the “Open Playground” links that you’ve described, except from here, they’re clickable. When you click one of these "Open Playground" links, the .playground
file associated with this section will be downloaded to your downloads folder, and can be directly opened with Xcode 6.
There is even another option that allows you to open the playground files directly without first dropping them in your downloads folder.
In the documentation viewer in Xcode 6, search for "A Swift Tour", or any other term that you find to yield you an article you're looking for:
Click a result that has a .playground icon to its left. From here, you can use the "Action" button on the right side of the window to open the file directly in an Xcode Playground.

- 129,200
- 40
- 280
- 281
-
2Note: if you have downloaded the "Xcode 6 Library" you won't see "The Swift Programming Language" until the documentation is fully downloaded and you restart XCode. – Jun 20 '14 at 01:00
It's simple, open the book on your Mac or iPad, you will see a "Download playground" link just bellow that statement "open this chapter as a playground in Xcode". You have to download that playground and open it, that's all.
I was tricked because I thought I don't need to download the playground since I already had Xcode installed, apparently I should do it.

- 191
- 1
- 6