---
title: "On-device AI Assistant with Apple Intelligence Foundation Models | Nutrient iOS SDK"
canonical_url: "https://www.nutrient.io/guides/ios/ai-assistant/on-device/"
md_url: "https://www.nutrient.io/guides/ios/ai-assistant/on-device.md"
last_updated: "2026-05-14T16:53:43.860Z"
description: "Learn about on-device AI Assistant with Nutrient iOS SDK to enable private document Q&A — all within your iOS-based document viewer."
---

# On-device AI Assistant with Apple Intelligence

On-device AI Assistant answers questions about documents using Apple’s Foundation Models (which power Apple Intelligence).

Users can ask questions and get answers about the text in the open document. This feature works best when users phrase questions in natural language to extract specific information from the document. AI Assistant can make mistakes, so users are advised to verify important information.

Apple’s Foundation Models have a limited context window, but this is **not** a document size limit in Nutrient’s on-device AI Assistant. Nutrient’s on-device retrieval pipeline (RAG) selects relevant passages from the full document, so users can ask questions about large documents.![Screenshot of on-device AI Assistant on iPad](@/assets/guides/ios/releases/26-2-on-device-ai-assistant.png)

## Requirements

On-device AI Assistant requires a device [compatible with Apple Intelligence](https://support.apple.com/en-us/121115) on iOS 26 or later. Users must have Apple Intelligence enabled in the Settings app (iOS and visionOS) or System Settings (macOS).

For production, your license for Nutrient iOS SDK must include the on-device AI Assistant feature. If you’d like to add this to your license, [get in touch](https://support.nutrient.io/hc/en-us/requests/new).

## Enabling on-device AI Assistant

### SwiftUI

Add [`AIAssistantButton`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/aiassistantbutton) to your toolbar. Here’s a simple example with no other buttons:

```swift

struct DocumentViewerWithAIAssistant: View {
    let document: Document
    @PDFView.Scope private var scope

    var body: some View {
        PDFView(document: document).toolbar {
                AIAssistantButton()
            }.pdfViewScope(scope)
    }
}

```

The [`Scope`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfview/scope) must be set for the view hierarchy so the toolbar button and [`PDFView`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfview) can communicate.

### UIKit

Add your [`PDFViewController`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller/)’s [`aiAssistantButtonItem`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller/aiassistantbuttonitem) to its navigation bar or toolbar. Here’s a simple example with no other buttons:

```swift

pdfViewController.navigationItem.setRightBarButtonItems(
    [pdfViewController.aiAssistantButtonItem],
    for:.document,
    animated: false
)

```

For more details, refer to our [guide on customizing the toolbar](https://www.nutrient.io/guides/ios/user-interface/main-toolbar.md).

Nutrient will automatically hide this button if Apple Intelligence isn’t available or isn’t enabled in the Settings or System Settings app.

## Privacy and security

On-device AI Assistant is built for privacy: Documents and questions are processed on users’ devices without being sent to a server.

Nutrient uses two internal persistent stores on a device when using on-device AI Assistant:

- A cache that will be populated each time a document is opened in AI Assistant to improve loading time. This contains the full text of documents.

- The chat history, including the user’s questions and the AI answers, which will typically include content from documents.

## Limitations

- In some cases, on-device AI Assistant may fail to find information that’s present in a document.

- Showing the AI Assistant chat UI programmatically isn’t supported.

- Asking questions about multiple documents isn’t supported.

- Navigating to the part of the document where the AI found the answer isn’t supported.

- Persisting multiple separate chat histories for the same document isn’t supported.

- Password-protected documents aren’t supported.

- On-device AI Assistant isn’t recommended for summarizing large documents, unless the document itself already includes a summary. However, it’s still suitable for finding specific information in large documents.

- On-device AI Assistant supports the languages supported by Apple Intelligence, but may favor responding in English.

We have many ideas for improvements and would love your [feedback](https://support.nutrient.io/hc/en-us/requests/new) to help prioritize AI Assistant enhancements.
---

## Related pages

- [Customize AI Assistant appearance](/guides/ios/ai-assistant/appearance-customization-swiftui.md)
- [Add AI capabilities to Nutrient document viewer](/guides/ios/ai-assistant.md)
- [Introduction to AI Assistant](/guides/ios/ai-assistant/introduction.md)
- [Work with multiple documents in AI Assistant](/guides/ios/ai-assistant/multiple-documents-uikit.md)
- [Work with multiple documents in AI Assistant](/guides/ios/ai-assistant/multiple-documents-swiftui.md)
- [Customize AI Assistant appearance](/guides/ios/ai-assistant/appearance-customization-uikit.md)

