Documentation Archive

Developer

Asset Catalog Format Reference

On This Page

Data Set Type

A set of files containing any sort of data except device-executable code (Mach-O) generated by Xcode.

Extension

.dataset

Folder Contents

Any files except Mach-O executable code.

Contents.json File (Required)

Metadata, on-demand resource tags, and App Slicing properties (Table 12-1).

Table 12-1Data set tags

Key

Type

Description

info

Dictionary

Versioning information for the asset catalog.

   author

String

The application that authored the asset catalog.

   version

Number

The version of the asset catalog.

properties

Dictionary

Properties for the data set.

   on-demand-resource-tags

Array of strings

The on-demand resource tags for the data set.

data

Array of dictionaries

The data items in the set.

   color-space

Slot component

The color space for the data item. For the values, see color-space in Image Set Type.

   display-gamut

Slot component

The color gamut of the device display. For the values, see display-gamut in Image Set Type.

   filename

String

The file for the data item.

   idiom

Slot component

The device type for the data item. For the values, see idiom in Image Set Type.

   graphics-feature-set

Slot component

The graphics features required for the data item. For the values, see graphics-feature-set in Image Set Type.

   memory

Slot component

The memory required by the data item. For the values, see memory in Image Set Type.

   universal-type-identifier

String

A type identifier for developers to determine which kind of data item they are accessing.

At runtime, the value of this tag is accessed using the typeIdentifer property of type NSDataAsset.

Values for Enumerated Tags

color-space

See color-space in Image Set Type.

display-gamut

See display-gamut in Image Set Type.

idiom

See idiom in Image Set Type.

graphics-feature-set

See graphics-feature-set in Image Set Type.

memory

See memory in Image Set Type.

Sample Contents.json File

  1. {
  2. "data" : [
  3. {
  4. "idiom" : "universal",
  5. "filename" : "Scripted Answer Llama.twl",
  6. "universial-type-identifier" : "com.testdeveloper.testapp.twl",
  7. "memory" : "2GB",
  8. "graphics-feature-set" : "metal2v2"
  9. },
  10. ],
  11.   "info" : {
  12.       "author" : "com.developerName",
  13.       "version" : 1
  14.    },
  15.   "properties" : {
  16. "on-demand-resources : [
  17. "llama",
  18. "mountain"
  19. ]
  20.    }
  21. }