<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PassKit",
  "identifier" : "/documentation/PassKit/PKPassLibrary",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "PassKit (Apple Pay and Wallet)"
    ],
    "preciseIdentifier" : "c:objc(cs)PKPassLibrary"
  },
  "title" : "PKPassLibrary"
}
-->

# PKPassLibrary

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

```
class PKPassLibrary
```

## Overview

The `PKPassLibrary` isn’t thread-safe. Use instances of this class only on a single thread.

## Topics

### Accessing passes

[`isPassLibraryAvailable()`](/documentation/PassKit/PKPassLibrary/isPassLibraryAvailable())

Returns a Boolean value that indicates whether the pass library is available.

[`passes()`](/documentation/PassKit/PKPassLibrary/passes())

Returns the passes in the user’s pass library that the app can access.

[`passes(of:)`](/documentation/PassKit/PKPassLibrary/passes(of:))

Returns the passes of the specified pass type.

[`pass(withPassTypeIdentifier:serialNumber:)`](/documentation/PassKit/PKPassLibrary/pass(withPassTypeIdentifier:serialNumber:))

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

[`containsPass(_:)`](/documentation/PassKit/PKPassLibrary/containsPass(_:))

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

[`serviceProviderData(for:completion:)`](/documentation/PassKit/PKPassLibrary/serviceProviderData(for:completion:))

Calls a completion handler that returns the custom data for a Secure Element pass.

[`remoteSecureElementPasses`](/documentation/PassKit/PKPassLibrary/remoteSecureElementPasses)

The Secure Element passes that PassKit stores on paired devices.

### Adding passes

[`canAddSecureElementPass(primaryAccountIdentifier:)`](/documentation/PassKit/PKPassLibrary/canAddSecureElementPass(primaryAccountIdentifier:))

Returns a Boolean value that indicates whether PassKit can add a Secure Element pass for the specified account.

[`canAddFelicaPass()`](/documentation/PassKit/PKPassLibrary/canAddFelicaPass())

Returns a Boolean value that indicates whether the library can add FeliCa™ passes.

[`addPasses(_:withCompletionHandler:)`](/documentation/PassKit/PKPassLibrary/addPasses(_:withCompletionHandler:))

Presents a user interface for adding multiple passes at once.

[`PKPassLibraryAddPassesStatus`](/documentation/PassKit/PKPassLibraryAddPassesStatus)

Statuses that PassKit uses when it adds passes to the pass library.

### Managing passes

[`isSecureElementPassActivationAvailable`](/documentation/PassKit/PKPassLibrary/isSecureElementPassActivationAvailable)

A Boolean value that indicates whether the device supports creating Secure Element passes.

[`activate(_:activationData:completion:)`](/documentation/PassKit/PKPassLibrary/activate(_:activationData:completion:))

Activates a Secure Element pass using the specified data.

[`replacePass(with:)`](/documentation/PassKit/PKPassLibrary/replacePass(with:))

Replaces a pass in the user’s pass library with the specified pass.

[`removePass(_:)`](/documentation/PassKit/PKPassLibrary/removePass(_:))

Removes the pass from the user’s pass library.

### Presenting and suppressing passes

[`present(_:)`](/documentation/PassKit/PKPassLibrary/present(_:)-9467u)

Presents a Secure Element pass.

[`isSuppressingAutomaticPassPresentation()`](/documentation/PassKit/PKPassLibrary/isSuppressingAutomaticPassPresentation())

Returns a Boolean value that indicates whether the system suppresses the automatic presentation of Apple Pay passes.

[`requestAutomaticPassPresentationSuppression(responseHandler:)`](/documentation/PassKit/PKPassLibrary/requestAutomaticPassPresentationSuppression(responseHandler:))

Prevents the device from automatically displaying the Apple Pay interface.

[`PKAutomaticPassPresentationSuppressionResult`](/documentation/PassKit/PKAutomaticPassPresentationSuppressionResult)

The result of an attempt to suppress automatic pass presentation.

[`endAutomaticPassPresentationSuppression(withRequestToken:)`](/documentation/PassKit/PKPassLibrary/endAutomaticPassPresentationSuppression(withRequestToken:))

Reenables the automatic display of the Apple Pay interface.

[`PKSuppressionRequestToken`](/documentation/PassKit/PKSuppressionRequestToken)

A token that represents a request to suppress the automatic presentation of payment passes.

### Setting up payments

[`openPaymentSetup()`](/documentation/PassKit/PKPassLibrary/openPaymentSetup())

Opens the user interface to set up credit cards for Apple Pay.

### Signing data

[`sign(_:using:completion:)`](/documentation/PassKit/PKPassLibrary/sign(_:using:completion:))

Signs an opaque value using a cryptographic signature.

### Receiving notifications

[`PKPassLibraryNotificationKey`](/documentation/PassKit/PKPassLibraryNotificationKey)

The user info keys that a pass library notification uses.

[`PKPassLibraryNotificationName`](/documentation/PassKit/PKPassLibraryNotificationName)

The types of notifications that the pass library posts.

### Deprecated

[Deprecated Symbols](/documentation/PassKit/deprecated-symbols)

Review unsupported symbols and their replacements.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)