---
title: "containsPass(_:)"
framework: passkit
role: symbol
role_heading: Instance Method
path: "passkit/pkpasslibrary/containspass(_:)"
---

# containsPass(_:)

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

## Declaration

```swift
func containsPass(_ pass: PKPass) -> Bool
```

## Parameters

- `pass`: The pass to query.

## Return Value

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

## Discussion

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

- [isPassLibraryAvailable()](passkit/pkpasslibrary/ispasslibraryavailable().md)
- [passes()](passkit/pkpasslibrary/passes().md)
- [passes(of:)](passkit/pkpasslibrary/passes(of:).md)
- [pass(withPassTypeIdentifier:serialNumber:)](passkit/pkpasslibrary/pass(withpasstypeidentifier:serialnumber:).md)
- [serviceProviderData(for:completion:)](passkit/pkpasslibrary/serviceproviderdata(for:completion:).md)
- [remoteSecureElementPasses](passkit/pkpasslibrary/remotesecureelementpasses.md)
