An object that represents a single pass.


class PKPass : PKObject


The properties of this class correspond to fields of the pass. For details on what individual fields mean, see PassKit Package Format Reference.


Accessing the Pass in Wallet

var passURL: URL?

The URL that opens the pass in the Wallet app.

Updating Passes

var webServiceURL: URL?

The URL for your web service.

var authenticationToken: String?

The token used to authenticate update requests.

Identifying a Pass

var passTypeIdentifier: String

The pass’s type identifier.

var serialNumber: String

A value that uniquely identifies the pass.

var passType: PKPassType

The pass’s type.

enum PKPassType

Types of passes.

var paymentPass: PKPaymentPass?

For passes that represent payment cards, the underlying payment pass.

var deviceName: String

The name of the device hosting the pass.

var localizedName: String

The localized name for the pass’s template.

var localizedDescription: String

The pass’s localized description.

var isRemotePass: Bool

A Boolean value that indicates whether the pass is stored on a device that is paired with the current iOS device (for example, Apple Watch).

Displaying a Pass

var icon: UIImage

The pass icon.

var organizationName: String

The name of the organization that created the pass.

func localizedValue(forFieldKey: String) -> Any?

Returns the localized value for specified field of the pass.

var relevantDate: Date?

The date when the pass is most likely to be needed or useful.

Custom Information

var userInfo: [AnyHashable : Any]?

Developer-specific custom data.

Creating a Pass

init(data: Data)

Initializes and returns an instance of the class.

Handling Errors

let PKPassKitErrorDomain: String

Error domain for PassKit errors.

enum PKPassKitError.Code

Errors used by the PassKit framework.


Inherits From

Conforms To

See Also


class PKPassLibrary

Provides an interface to the user’s library of passes.

class PKTransitPassProperties

The properties of a transit pass.

class PKSuicaPassProperties

The properties of a Suica pass.

class PKObject

An opaque type that acts as the superclass for the PKPass class.

Supporting Semantic Tags in Wallet Passes

Allow the system to offer Wallet passes to users intelligently by adding machine-readable metadata.