Skip to content

On-device AI on iPhone: Foundation Models, Core AI and Core ML

Since iOS 26, any app can use the language model behind Apple Intelligence, and iOS 27 adds Core AI for running your own models on the device. This is a map of the options, what each one is good for, and where the limits are.

Pull House · 9 min read · Updated

Book a 30-min call

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

TechnologyFromRunsGood for
Foundation Models frameworkiOS 26On device; Private Cloud Compute; other providers in iOS 27Language tasks with structured output and tool calling
Private Cloud ComputeiOS 27Apple’s serversApple’s next-generation models, at no cloud API cost for eligible apps
Core AIiOS 27On deviceRunning your own models, compiled for Apple silicon
Core MLiOS 11On deviceEstablished models and tooling
Vision and VisionKitLong establishedOn deviceText recognition, barcodes, image analysis
Image Playground APIiOS 27 modelPrivate Cloud ComputeImage 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
).content

In 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 deviceServer or hosted API
Cost per requestNonePer request, per token or per GPU hour
PrivacyData stays on the iPhoneData leaves the device; disclose it and ask first
OfflineWorksDoes not
Model size and qualityLimited by the deviceAs large as you can pay for
AvailabilityDepends on the device and settingsSame for everyone
Android and webSeparate solution neededShared 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

FAQ

Quick answers

Not covered here? Write to hello@pull.house.

  • Yes. The Foundation Models framework gives apps the on-device model behind Apple Intelligence from iOS 26, and Core AI (iOS 27) and Core ML run your own models on the device.

Start a project

Have an iOS app to build?

Tell us what you are making. If we are not the right team for it, we will say so.

Book a 30-min call
hello@pull.house