---
title: ContactResolver
framework: corespotlight
role: symbol
role_heading: Protocol
path: corespotlight/contactresolver
---

# ContactResolver

Resolves the current user’s identity for search queries involving people.

## Declaration

```swift
protocol ContactResolver : Sendable
```

## Mentioned in

Making your indexed content available to Foundation Models

## Overview

Overview When a search involves people (e.g., “emails from me”, “notes I created yesterday”), the search tool needs to know who “me” is. Implement this protocol to provide the current user’s contact information from your app’s identity source — such as an account profile, Contacts framework, or other source. Example: struct MyContactResolver: ContactResolver {     func userIdentity() -> ResolvedContact {         var contact = ResolvedContact(displayName: "John Appleseed")         contact.emailAddresses = ["john@example.com"]         return contact     } }

var configuration = SpotlightSearchTool.Configuration() configuration.contactResolver = MyContactResolver()

## Topics

### Returning the identity data

- [userIdentity()](corespotlight/contactresolver/useridentity().md)

## Relationships

### Inherits From

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Contact resolution

- [ResolvedContact](corespotlight/resolvedcontact.md)
