Start a project

← All posts

Apple's Foundation Models Framework: What Shipped in iOS 27

· Dracode · ios · ai · apple-intelligence · developer-tools
Close-up of a developer workspace with a coding screen, smartphone, and tech gadgets on a desk

What WWDC 2026 Actually Shipped

Apple dropped the iOS 27 beta on June 8. The headline in tech media this week is Siri AI. The more consequential story for app developers is one layer below: Foundation Models, the framework that gives any iOS app direct API access to Apple’s on-device LLM — no API key, no per-token cost, no third-party server.

This is different from the Siri Extensions framework — which lets users choose Gemini or Claude as their system-level Siri model — where Foundation Models is for the AI features you build inside your own app, running on your user’s device.

The Foundation Models Framework API

The iOS 27 beta release notes document the Foundation Models additions. The framework exposes two inference paths:

  • On-device inference — fully local, Neural Engine-accelerated, no network call. Apple optimized the Neural Engine for FP8-quantized weights in iOS 27, so the same A-series and M-series hardware gets more throughput at lower latency than FP16-weight models from iOS 26.
  • Private Cloud Compute (PCC) fallback — for queries that exceed the on-device model’s context window or capability ceiling. PCC routes requests to Apple’s secure server infrastructure under a protocol that is cryptographically auditable — third-party researchers can verify the servers do not log or retain prompt data.

Both paths surface through the same API, and the framework decides at runtime which to use. From the developer’s perspective, the call looks identical.

Tool Calling: The Agentic Primitive

Tool calling lets you define Swift functions the model can invoke mid-generation. The model reasons about which tools are relevant to the query, assembles arguments, and your app executes the call. This is the primitive you need for in-app assistants that interact with real data:

struct FetchOrderStatus: Tool {
    let name = "fetch_order_status"
    let description = "Returns the current status and estimated delivery for a given order ID"

    func call(arguments: [String: Any]) async throws -> ToolResult {
        guard let orderId = arguments["order_id"] as? String else {
            return ToolResult(content: "missing order_id")
        }
        let status = try await OrderStore.shared.status(for: orderId)
        return ToolResult(content: status.asJSON)
    }
}

let session = FoundationModelSession(tools: [FetchOrderStatus()])
let response = try await session.respond(to: "What's the status of order #4821?")

The model decides whether to call fetch_order_status, assembles { "order_id": "4821" }, your handler runs, and the model incorporates the result into its final response. This pattern works for in-app search, database lookups, or any action your app can already perform — now driven by natural language.

@Generable: Structured Output Without the Fragility

Structured output from LLMs has traditionally meant asking the model to output JSON, then parsing it and handling the cases where it doesn’t comply. Foundation Models replaces that with @Generable — a macro that constrains the model to produce a valid instance of a Swift struct you define:

@Generable
struct AppReviewSummary {
    var sentiment: String       // "positive", "negative", "mixed"
    var topIssues: [String]
    var featureRequests: [String]
    var overallRating: Double   // 1.0–5.0
}

let session = FoundationModelSession()
let summary: AppReviewSummary = try await session.respond(
    to: "Summarize this app store review: \(reviewText)"
)
// summary is a fully typed Swift struct
print(summary.sentiment)      // "negative"
print(summary.topIssues)      // ["crashes on startup", "slow sync"]

The guided generation enforces the output schema at the model level. No regex, no JSON parsing, no fallback for hallucinated field names. For workflows built around structured data — classifying support tickets, extracting fields from free text, tagging content — @Generable makes the feature reliable enough to ship.

Why PCC Changes the Privacy Calculus

When an iOS app calls OpenAI or Anthropic today, user data leaves the device and lands on a third-party server. For consumer apps this is typically fine. For apps in healthcare, legal, finance, or HR — categories where the products we build frequently land — it triggers procurement reviews, data processing agreements, and sometimes hard blocks.

PCC addresses this structurally. The published architecture and audit process means a compliance team can evaluate Apple’s data handling properties the same way they would evaluate an on-device feature. You are not asking them to take your word for it, and you are not adding a new vendor to the data processing agreement.

That is a meaningful legal difference from any alternative that routes through a third-party API.

What This Doesn’t Replace

Foundation Models is optimized for compact, structured tasks: intent extraction, summarization of short documents, classification, form assistance, contextual suggestions. It is not a replacement for GPT-4o or Claude Opus on tasks requiring complex multi-step reasoning, broad world knowledge, or long context windows.

The iOS 27 beta release notes list over 40 known issues with Siri and the underlying model infrastructure — expected for a June beta, but worth noting for any team planning to build on Foundation Models before fall. Test on device, test early, and don’t commit to a ship date based on the beta’s current behavior.

The right scope for the framework this year: discrete AI features within a well-defined input/output boundary. Long-horizon agent workflows that require general reasoning are still better served by a cloud model, even if PCC makes the privacy story easier.

What We’re Watching

The App Store Connect API 4.4 shipped alongside the iOS 27 beta. We’re looking at how the new subscription bundle endpoints interact with apps that want to gate Foundation Models-powered features behind a paywall — the metered consumption model doesn’t map cleanly to recurring subscriptions, and that’s a product design problem worth solving before you architect the backend.

The second WWDC session to track: Foundation Models and App Intents together. The release notes show new EntityStringQuery and IntentValueQuery types that connect structured entity resolution to the Foundation Models inference path — which suggests Apple intends these two frameworks to compose. We’ll write that up once the session transcripts are available.

If you’re building an iOS product with AI features that need to operate on sensitive user data, the beta is worth running today. The /contact page is there if you want to think through the architecture before committing to an approach.

Sources

  1. iOS and iPadOS 27 Beta Release Notes — Apple Developer, June 8 2026
  2. Apple Developer Releases — June 2026 — Apple Developer, June 8 2026
  3. Private Cloud Compute: A new frontier for AI privacy in the cloud — Apple Security Research
  4. I tried Siri AI, and so far it actually works — The Verge, June 2026
  5. App Store Connect API 4.4 Release Notes — Apple Developer, June 8 2026