The short answer
- Text tasks such as summaries, extraction, classification and short writing: start with the Foundation Models framework on the device.
- Your own model, such as a vision or audio model you trained: Core AI (iOS 27) or Core ML.
- Bigger language tasks without paying per request: Apple’s models on Private Cloud Compute, if your app is eligible.
- The strongest image generation or the newest frontier models: usually still a server or a hosted API.
The options
| Technology | From | Runs | Good for |
|---|---|---|---|
| Foundation Models framework | iOS 26 | On device; Private Cloud Compute; other providers in iOS 27 | Language tasks with structured output and tool calling |
| Private Cloud Compute | iOS 27 | Apple’s servers | Apple’s next-generation models, at no cloud API cost for eligible apps |
| Core AI | iOS 27 | On device | Running your own models, compiled for Apple silicon |
| Core ML | iOS 11 | On device | Established models and tooling |
| Vision and VisionKit | Long established | On device | Text recognition, barcodes, image analysis |
| Image Playground API | iOS 27 model | Private Cloud Compute | Image generation in many styles, inside your app |
The Foundation Models framework
A Swift API for the same on-device model that powers Apple Intelligence (documentation). A session takes instructions and prompts and returns text or typed values:
import FoundationModels
let session = LanguageModelSession(instructions: "You write short, friendly product descriptions.")
let response = try await session.respond(to: "Describe a reusable water bottle in one sentence.")
print(response.content)With guided generation, the model fills in a Swift type instead of returning free text, which is far easier to put on screen reliably:
@Generable
struct Recipe {
@Guide(description: "A short, appetising name")
var name: String
var ingredients: [String]
}
let recipe = try await session.respond(
to: "A quick vegetarian dinner for two",
generating: Recipe.self
).contentIn iOS 27, according to Apple, the framework adds multimodal prompts (images alongside text), Vision tools such as OCR and barcode readers that the model can call on the device, Dynamic Profiles for swapping models, tools and instructions within a session, and an Evaluations framework for testing AI features beyond unit tests. It can also work with any language model that conforms to its Language Model protocol, including cloud models such as Claude and Gemini, through the same Swift API.
Check availability first
The on-device model only runs where Apple Intelligence is supported and turned on. Check before showing the feature, and decide what happens otherwise:
switch SystemLanguageModel.default.availability {
case .available:
showSmartFeatures = true
case .unavailable(let reason):
// Not every device or region has Apple Intelligence turned on.
// Hide the feature, or fall back to a server model.
showSmartFeatures = false
print(reason)
}Private Cloud Compute
For tasks too big for the device, the framework can use Apple’s next-generation models on Private Cloud Compute. Apple says apps enrolled in the App Store Small Business Program with fewer than 2 million total first-time App Store downloads can use it at no cloud API cost (Apple). For a young app that qualifies, that can replace a hosted API bill entirely. The Image Playground API also generates images on Private Cloud Compute, so photos are not stored or shared, according to Apple.
Core AI and Core ML: your own models
Core AI, new in iOS 27, is Apple’s framework for bringing your own models to the device: a Swift API to load, specialise and run them, with ahead-of-time compilation for quick loading and no server or per-token cost. Core ML remains for existing models and pipelines. Both suit focused models, such as classifying a photo or cleaning up audio, more than very large general models.
On the device or on a server?
| On device | Server or hosted API | |
|---|---|---|
| Cost per request | None | Per request, per token or per GPU hour |
| Privacy | Data stays on the iPhone | Data leaves the device; disclose it and ask first |
| Offline | Works | Does not |
| Model size and quality | Limited by the device | As large as you can pay for |
| Availability | Depends on the device and settings | Same for everyone |
| Android and web | Separate solution needed | Shared with every client |
Many good apps use both: quick, private tasks on the device, heavy generation on a server. Whatever you choose, guideline 5.1.2(i) requires a clear disclosure and explicit permission before personal data goes to a third-party AI service.
Bringing your app to Siri
The other half of Apple Intelligence is letting the system use your app. In iOS 27, App Intents schemas make your content and actions available to Siri through natural language, entity schemas add your content to the Spotlight semantic index, and the View Annotations API lets people refer to what is on screen. An App Intents Testing framework checks the integration end to end.
Related: AI app development · What an AI app costs · What’s new in iOS 27