---
title: "init(entities:)"
framework: appintents
role: symbol
role_heading: Initializer
path: "appintents/entitycollection/init(entities:)"
---

# init(entities:)

Creates a new entity identifier collection from entities.

## Declaration

```swift
init(entities: [Entity])
```

## Parameters

- `entities`: The entities to add to the collection.

## Discussion

Discussion This initializer adds the identifier for each entity to the collection and caches the entity instances for fast retrieval later.
