Instance Method

pass(withPassTypeIdentifier:serialNumber:)

Returns the pass with the given pass type identifier and serial number.

Declaration

func pass(withPassTypeIdentifier identifier: String, serialNumber: String) -> PKPass?

Parameters

identifier

The pass’s pass type identifier.

serialNumber

The pass’s serial number.

Return Value

The pass with the given pass type identifier and serial number, or nil if there is no such pass or if the app doesn’t have the appropriate entitlement.

See Also

Accessing Passes

class func isPassLibraryAvailable() -> Bool

A Boolean value that indicates whether the pass library is available.

func passes() -> [PKPass]

Returns the passes in the user’s pass library to which the app has access.

func containsPass(PKPass) -> Bool

Indicates whether the user’s pass library contains the specified pass.

func passes(of: PKPassType) -> [PKPass]

Returns the passes of the specified pass type.

func remotePaymentPasses() -> [PKPaymentPass]

Returns a list of passes stored on a remote device.