<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PassKit",
  "identifier" : "/documentation/PassKit/PKIdentityDocumentDescriptor/addElements(_:intentToStore:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PassKit (Apple Pay and Wallet)"
    ],
    "preciseIdentifier" : "c:objc(pl)PKIdentityDocumentDescriptor(im)addElements:withIntentToStore:"
  },
  "title" : "addElements(_:intentToStore:)"
}
-->

# addElements(_:intentToStore:)

Adds a list of identity element and defines the way an app, or it’s server, stores the elements.

```
func addElements(_ elements: [PKIdentityElement], intentToStore: PKIdentityIntentToStore)
```

## Parameters

`elements`

A list of identity elements.

`intentToStore`

An object that defines how long an app or it’s server stores the elements.

## Discussion

---

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)