How do I "open this chapter as a playground in Xcode"?

XcodeSwiftSwift Playground

Xcode Problem Overview

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?

Xcode Solutions

Solution 1 - Xcode

  • 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.

enter image description here

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:

enter image description here

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.

enter image description here

Solution 2 - Xcode

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.


All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionvonlostView Question on Stackoverflow
Solution 1 - XcodeMick MacCallumView Answer on Stackoverflow
Solution 2 - XcodeTiberiu OpreaView Answer on Stackoverflow