Create a folder with a manifest that describes the chapter's name and page order.
You use chapters to group the pages of a playground book by topic.
Create a Chapter Folder
Create a new folder in the Chapters folder inside your playground book's Contents folder. The new chapter's folder name must end with the suffix .playgroundchapter.
In Xcode, create a property list file called
Manifest in the new chapter's folder. Choose
File > New > File, then choose the Property List template from
i. Use the manifest property list to list the chapter's name and the order of its pages, which can include both playground pages (.playgroundpage) and cutscene pages (.cutscenepage).
The following image shows the example chapter, "First Chapter," which contains two pages.
Name the Chapter
Choose a name for your new chapter by adding a
Name key to the
Manifest property list. This name is displayed to learners in the table of contents for your book in Swift Playgrounds.
Arrange Pages in the Chapter
Pages in your playground book must be placed in a chapter. The page folders you place within chapter folders determine which pages go into which chapters. You choose the order of pages in a chapter by adding a
Pages key to the chapter's
Manifest file. The
Pages key is an ordered array of page folder names. Add the names of a chapter's pages in the order in which you want those pages to appear in the chapter.