Guides and Sample Code

Developer

Playground Book Format Reference

On This Page

Book Manifest
ブックマニフェスト

The Manifest.plist file for a book contains the following key-value pairs specifying the attributes for a book:
ブックのためのManifest.plistファイルは、ブックの属性を指定している以下のキー値ペアを含みます:

  • Metadata such as book version and book target platform
    ブックバージョンおよびブック対象プラットホームなどのメタデータ

  • Order of chapters
    章の順序

  • User-viewable name for the book
    ユーザに見られるブックの名前

The file is located in the Contents folder inside the top-level .playgroundbook folder.
このファイルは、最上位.playgroundbookフォルダ内部のContentsフォルダの中に位置します。

Key List
キーのリスト

Table 2-1 describes each key for a book, its type, and whether the key is required.
表 2-1 は、ブックのための各キー、それの型、そしてそのキーが必須とされるかどうかを記述します。

Table 2-1Keys for a book
表 2-1 ブックに対する様々なキー

Key
キー

Type

Description
説明

Required
必須

Chapters

Array of strings
いくらかの文字列からなるArray

The list of chapters in the book, in the order in which they appear in the table of contents. See Chapters Key.
ブックの中の章のリスト、それらが目次に現れる順序で。Chaptersキーを見てください。

ContentIdentifier

String

The bundle ID, a unique identifier string for the book in reverse DNS format. See ContentIdentifier Key.
バンドルID、ブックのための逆DNS形式での特有識別子文字列。ContentIdentifierキーを見てください。

ContentVersion

String

A developer-defined version number for the book. See ContentVersion Key.
ブックのための開発者定義のバージョン番号。ContentVersionキーを見てください。

DeploymentTarget

String

The minimum version of iOS required for the book. See DeploymentTarget Key.
このブックに必要とされる最小限のiOSのバージョン番号。DeploymentTargetキーを見てください。

DevelopmentRegion

String

The default language and region for the book. See DevelopmentRegion Key.
このブックのための省略時の言語と地域。DevelopmentRegion Keyを見てください。

ImageReference

String

The name of the image used for the book icon in Swift Playgrounds. See ImageReference Key.
Swift Playgroundsにおいてブックアイコンに使われる画像の名前。ImageReferenceキーを見てください。

 

Name

String

The name displayed in the user interface. See Name Key.
ユーザインターフェイスにおいて表示される名前。Nameキーを見てください。

Version

String

The playground book format version. See Version Key.
プレイグラウンドブック形式バージョン。Versionキーを見てください。

SwiftVersion

String

The version of Swift that the playground book uses. See SwiftVersion Key.
プレイグラウンドブックが使うSwiftのバージョン。SwiftVersionキーを見てください。

MinimumSwiftPlaygroundsVersion

String

The minimum version of Swift Playgrounds that is required for using the book. See MinimumSwiftPlaygroundsVersion Key.
このブックを使うために必要とされるSwift Playgroundsの最小バージョン。MinimumSwiftPlaygroundsVersion Keyを見てください。

Chapters Key
Chaptersキー

An array of the .playgroundchapter folders used for the chapters in a book. Each entry in the array contains the name and extension of a folder in the Chapters folder of the book package. The table of contents for the playground book displays only the chapters listed in this array. The order of the items in the Chapters array defines the order of the chapters in the book.
ブックの章のために使われるいくらかの.playgroundchapterフォルダからなるある配列。配列の各登録項目は、ブックパッケージのChaptersフォルダの中のあるフォルダの名前と拡張子を含んでいます。プレイグラウンドブックのための目次は、この配列の中に列記される章だけを表示します。Chapters配列の中の項目の順番は、ブックの章の順番を定義します。

Figure 2-1 shows a table of contents with two chapters. The name of each chapter is taken from the value of the Name key in the chapter manifest file.
図 2-1 は、2つの章を持つ目次を示します。各章の名前は、章マニフェストファイルの中のNameキーの値から取られます。

Figure 2-1Chapters in the table of contents
図 2-1 目次の中のいくらかの章
image: ../Art/SP_manifest_book_Chapters_TOC_2x.png

ContentIdentifier Key
ContentIdentifierキー

A unique identifier for the book package. The recommended format is a reverse DNS string starting with your company or personal identifier followed by a name for the book.
ブックパッケージのための特有な識別子。推奨される形式は、逆DNS文字列で、あなたの会社または個人識別子で始まり、後にブックの名前が続くものです。

ContentVersion Key
ContentVersionキー

The content developer's version number for the book. The value contains only numbers and periods (.).
ブックのためのコンテンツの開発者用バージョン番号。この値は、数字とピリオド(.)だけを含みます。

DeploymentTarget Key
DeploymentTargetキー

The minimum version of iOS that can use your playground book. The format of the string is:
あなたのプレイグラウンドブックを使うことができる最小限のバージョンのiOS。その文字列の書式は:

  • iosmajor-version.minor-version

The version number must be at least 10.0.
バージョン番号は、少なとも10.0である必要があります。

DevelopmentRegion Key

The default language and region for the book, as a Language ID. For more information, see Language IDs and CFBundleDevelopmentRegion.
このブックのための省略時の言語と地域、Language IDとして。さらなる情報として、Language IDsCFBundleDevelopmentRegionを見てください。

ImageReference Key
ImageReferenceキー

A reference to an image used for the book icon. The image is a .png file in the book’s Resources folder. The icon must be an image with a 4:3 aspect ratio. The recommended image size is 400 by 300 pixels.
ブックアイコンに使われる画像への参照。この画像は、ブックのResourcesフォルダの中の.pngファイルです。アイコンは、縦横比4:3の画像でなければなりません。推奨される画像サイズは、400 × 300 ビクセルです。

Figure 2-2 shows a custom image used for the book icon.
図 2-2 は、ブックアイコンに使われるカスタム画像を示します。

Figure 2-2Custom book icon
図 2-2 カスタムブックアイコン
image: ../Art/SP_manifest_book_ImageReference_icon_2x.png

Name Key
Nameキー

The display name of the book in the user interface; for example, the name of the book in the table of contents.
ユーザインターフェイスにおけるブックの表示名;例えば、目次におけるブックの名前。

Version Key
Versionキー

The version of the playground book format.
プレイグラウンドブック形式のバージョン。 Use 3.0.

SwiftVersion Key
SwiftVersionキー

The version of Swift that the playground book uses. If unspecified, 3.1 is used.
プレイグラウンドブックが使うSwiftのバージョン。指定されないならば、3.1が使われます。

MinimumSwiftPlaygroundsVersion Key
MinimumSwiftPlaygroundsVersionキー

The minimum version of the Swift Playgrounds app that the playground book uses. If unspecified, 1.2 is used.
プレイグラウンドブックが使うSwift Playgroundsアプリの最小限のバージョン。指定されないならば、1.2が使われます。