Create interactive learning experiences for the Swift Playgrounds app.
You create content for the Swift Playgrounds app by writing playground books. Like traditional books, playground books are made up of chapters and pages. Unlike traditional books, they include executable Swift code that displays the results live, right on the page.
The pages of a playground book can include features that you use to teach a lesson or to encourage code experimentation. The basic building blocks you use are:
Prose that introduces the material on the page.
Blocks and modules of Swift code that learners can edit and expand upon.
The always-on live that view you use to show visualizations of running the page’s code.
The following screenshot of a page from Learn to Code 1 shows a lesson on the left and an interactive live view on the right.
You can further enrich a playground book and tailor it to your audience by adding cutscenes, glossaries, hints, and assessments. When you're done writing a playground book, you can distribute it locally in a classroom or workshop environment, or publish it online as a subscription.