Contents

containsPass(_:)

Returns a Boolean value that indicates whether the user’s pass library contains the specified pass.

Declaration

func containsPass(_ pass: PKPass) -> Bool

Parameters

  • pass:

    The pass to query.

Return Value

true if the user’s pass library contains the pass; otherwise, false.

Discussion

This method lets you determine that the pass library contains a pass even though your app can’t read or modify the pass. For example, an email client doesn’t have entitlements to read or write any passes from the library.

Your app can use this method to provide a UI that indicates whether a pass is already in the library.

See Also

Accessing passes