<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreSpotlight",
  "identifier" : "/documentation/CoreSpotlight/CSSearchableItem/associateAppEntity(_:priority:)-736lx",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Spotlight",
      "CoreSpotlight"
    ],
    "preciseIdentifier" : "s:So16CSSearchableItemC10AppIntentsE09associateC6Entity_8priorityyx_SitAC07IndexedF0RzlF"
  },
  "title" : "associateAppEntity(_:priority:)"
}
-->

# associateAppEntity(_:priority:)

Associates an app entity with this searchable item.

```
func associateAppEntity(_ appEntity: some IndexedEntity, priority: Int = 0)
```

## Parameters

`appEntity`

The app entity that will be associated with this searchable item.

`priority`

The importance of this item compared to the other donated items.

---

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)