---
title: "activate(_:activationData:completion:)"
framework: passkit
role: symbol
role_heading: Instance Method
path: "passkit/pkpasslibrary/activate(_:activationdata:completion:)"
---

# activate(_:activationData:completion:)

Activates a Secure Element pass using the specified data.

## Declaration

```swift
func activate(_ secureElementPass: PKSecureElementPass, activationData: Data, completion: (@Sendable (Bool, (any Error)?) -> Void)? = nil)
```

```swift
func activate(_ secureElementPass: PKSecureElementPass, activationData: Data) async throws -> Bool
```

## Parameters

- `secureElementPass`: The Secure Element pass to activate.
- `activationData`: A cryptographic value that the activation process requires.
- `completion`: A closure that PassKit executes after it attempts activation.

## Discussion

Discussion You must provision the Secure Element pass and make sure it’s in the PKSecureElementPass.PassActivationState.requiresActivation state before you call this method.

## See Also

### Managing passes

- [isSecureElementPassActivationAvailable](passkit/pkpasslibrary/issecureelementpassactivationavailable.md)
- [replacePass(with:)](passkit/pkpasslibrary/replacepass(with:).md)
- [removePass(_:)](passkit/pkpasslibrary/removepass(_:).md)
