How to open a playgroundbook on mac?

IS there a way to open a playgroundbook on a MacBook? I tried to open it but it didn't work out. I shared the file over the iCloud drive.

Accepted Reply

A playground book is a package of Swift files and extra sources in a specific file layout on disk. You can right click on the .playgroundbook file and choose Show Package Contents in Finder to see all of the individual Swift files. The organization of the files is documented in the Playground Book Format Reference. While regular playgrounds can be edited and run within Xcode (regardless if the platform for the playground is iOS or macOS) or in the Swift Playgrounds app, playground books need the Swift Playgrounds app on iPad to run.

  • That's a pity!

Add a Comment

Replies

A playground book is a package of Swift files and extra sources in a specific file layout on disk. You can right click on the .playgroundbook file and choose Show Package Contents in Finder to see all of the individual Swift files. The organization of the files is documented in the Playground Book Format Reference. While regular playgrounds can be edited and run within Xcode (regardless if the platform for the playground is iOS or macOS) or in the Swift Playgrounds app, playground books need the Swift Playgrounds app on iPad to run.

  • That's a pity!

Add a Comment

If you open the playgroundbook in Xcode, and then press "Command" + 1, it'll give you the layout of the file explorer that you need to setup a playgroundbook. This way you don't have to keep clicking Show Package Contents in finder. Just make sure that the files are in the right places when you send the file to an iPad. If they aren't the files won't complie or run.