<!--
{
  "availability" : [
    "iOS: 13.4.0 -",
    "iPadOS: 13.4.0 -",
    "macCatalyst: 13.4.0 -",
    "macOS: 10.12.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PassKit",
  "identifier" : "/documentation/PassKit/PKPassLibrary/activate(_:activationData:completion:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PassKit (Apple Pay and Wallet)"
    ],
    "preciseIdentifier" : "c:objc(cs)PKPassLibrary(im)activateSecureElementPass:withActivationData:completion:"
  },
  "title" : "activate(_:activationData:completion:)"
}
-->

# activate(_:activationData:completion:)

Activates a Secure Element pass using the specified data.

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

## 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.

- `success`: A value that indicates whether activation is successful..
- `error`: If activation fails, an error that describes the failure; otherwise, otherwise, `nil`.

## Discussion

You must provision the Secure Element pass and make sure it’s in the [`PKSecureElementPass.PassActivationState.requiresActivation`](/documentation/PassKit/PKSecureElementPass/PassActivationState-swift.enum/requiresActivation) state before you call this method.

---

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)