Field Dictionary Keys
Keys, used at the lowest level of the pass.json
file, that define an individual field.
Standard Field Dictionary Keys
Information about a field.
These keys are used for all dictionaries that define a field.
Key name | Type | Description |
---|---|---|
| localizable string, ISO 8601 date as a string, or number | Optional. Attributed value of the field. The value may contain HTML markup for links. Only the
This key’s value overrides the text specified by the Available in iOS 7.0. |
| localizable format string | Optional. Format string for the alert text that is displayed when the pass is updated. The format string must contain the escape If you don’t specify a change message, the user isn’t notified when the field changes. |
| array of strings | Optional. Data detectors that are applied to the field’s value. Valid values are:
The default value is all data detectors. Provide an empty array to use no data detectors. Data detectors are applied only to back fields. |
| string | Required. The key must be unique within the scope of the entire pass. For example, “departure-gate.” |
| localizable string | Optional. Label text for the field. |
| string | Optional. Alignment for the field’s contents. Must be one of the following values:
The default value is natural alignment, which aligns the text appropriately based on its script direction. This key is not allowed for primary fields or back fields. |
| localizable string, ISO 8601 date as a string, or number | Required. Value of the field, for example, |
Date Style Keys
Information about how a date should be displayed in a field.
If any of these keys is present, the value of the field is treated as a date. Either specify both a date style and a time style, or neither.
Key name | Type | Description |
---|---|---|
| string | Style of date to display. Must be one of the styles listed in Table 4-1. |
| Boolean | Optional. Always display the time and date in the given time zone, not in the user’s current time zone. The default value is The format for a date and time always requires a time zone, even if it will be ignored. For backward compatibility with iOS 6, provide an appropriate time zone, so that the information is displayed meaningfully even without ignoring time zones. This key does not affect how relevance is calculated. Available in iOS 7.0. |
| Boolean | Optional. If This key does not affect how relevance is calculated. |
| string | Style of time to display. Must be one of the styles listed in Table 4-1. |
The date styles and time styles have the same meaning as the Cocoa formatter styles with corresponding names, as shown in Table 4-1.
Date style | Corresponding formatter style |
---|---|
| |
| |
| |
| |
|
Number Style Keys
Information about how a number should be displayed in a field.
These keys are optional if the field’s value is a number; otherwise, they are not allowed. Only one of these keys is allowed per field.
Key name | Type | Description |
---|---|---|
| string | ISO 4217 currency code for the field’s value. |
| string | Style of number to display. Must be one of the following values:
Number styles have the same meaning as the Cocoa number formatter styles with corresponding names. For more information, see |
Copyright © 2017 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2017-11-16