Skip to main content
3Nsofts logo3Nsofts
Foundation ModelsUpdated · July 2026

Foundation Models API in iOS 27: What Is Open, Gated, and Entitlement-Only

Author
Ehsan Azish · 3NSOFTS
Updated
July 2026
Read time
11 min read
Level
Intermediate
Platform
Xcode 27 beta, Swift concurrency basics, Apple Intelligence-capable test hardware

Implementation Notes

  • ~/ What broke: A production edge case that generic tutorials skip.
  • ~/ What to do: Ship the production fix with clear state, errors, and fallback behavior.
Foundation Models iOS 27LanguageModelSessionPrivateCloudComputeLanguageModelFoundation Models entitlementcustom model adapteriOS 27 on-device AI

The Foundation Models framework was introduced in iOS 26 and expands substantially in iOS 27. The important production distinction is not simply “available” versus “unavailable.” Some APIs are open to ordinary apps, some depend on Apple Intelligence hardware, language, and regional availability, and two capabilities require managed entitlements.

This guide separates those cases using Apple’s current iOS 27 beta documentation. Because these APIs are prerelease, recheck the final SDK and test on the final operating-system release before shipping.

The short answer

You do not need a Foundation Models-specific entitlement for:

  • SystemLanguageModel
  • LanguageModelSession
  • instructions and prompts
  • structured output with @Generable
  • streaming responses
  • ordinary tool calling
  • iOS 27 multimodal prompts supported by the selected model

You do need a managed entitlement for:

  • loading a custom Foundation Models adapter
  • using PrivateCloudComputeLanguageModel

An individual tool may still need the entitlement or permission required by the framework it calls. Tool calling itself is not the gated capability.

Baseline sessions require no managed entitlement

The default on-device model is exposed through SystemLanguageModel. Check its availability before creating AI-dependent UI:

import FoundationModels

let model = SystemLanguageModel.default

switch model.availability {
case .available:
    let session = LanguageModelSession(model: model)
    let response = try await session.respond(
        to: "Summarize this note in three bullets."
    )
    print(response.content)

case .unavailable(let reason):
    // Present a deterministic non-AI path.
    print("Model unavailable: \(reason)")
}

Availability can change with device eligibility, Apple Intelligence settings, supported language, region, or system readiness. Treat the unavailable path as product behavior, not an exceptional crash state.

Instructions, generation options, and structured output

Persistent session guidance is supplied as Instructions, commonly through the session initializer:

let session = LanguageModelSession(
    instructions: "Return concise, factual answers for a developer audience."
)

The public API does not use a SystemPrompt type or a LanguageModelSession.Configuration object. Generation behavior is controlled with GenerationOptions; iOS 27 also adds ContextOptions for model-specific prompting behavior such as reasoning effort where supported.

For typed output, declare a @Generable model and request that type:

@Generable
struct ReleaseSummary {
    let title: String
    let risks: [String]
    let recommendation: String
}

let response = try await session.respond(
    to: "Review this release note...",
    generating: ReleaseSummary.self
)

Guided generation is part of the normal framework surface. It does not require a managed entitlement.

Tool calling is open; the underlying capability may not be

The Tool protocol lets the model call code you provide. Tool definitions consume context, and your implementation remains responsible for authorization, validation, side effects, and error handling.

Creating a tool does not require a Foundation Models entitlement. If the tool reads contacts, health data, location, calendars, or another protected resource, the normal permission model for that framework still applies. A model deciding to call a tool never bypasses those controls.

For side-effecting tools:

  • validate generated arguments before execution;
  • ask for confirmation when the action is consequential;
  • keep authorization checks inside the tool;
  • return bounded, structured output to the session;
  • avoid placing secrets in tool descriptions or transcripts.

iOS 27 multimodal and dynamic capabilities

iOS 27 adds multimodal prompting for models that advertise the required capability, plus dynamic profiles that can change models, tools, and instructions during a continuous session. Do not infer support from the OS version alone. Inspect the selected model’s availability and capabilities, and maintain a fallback for unsupported input.

The framework also introduces the LanguageModel and LanguageModelExecutor protocols for integrating other on-device or server providers behind the same session-style interface. Those protocols do not grant access to a provider; authentication, billing, privacy, and network behavior remain the provider implementation’s responsibility.

Custom adapters require an entitlement

Custom adapters specialize Apple’s on-device model with your training data. Training and local testing use Apple’s adapter toolkit, but distributing and loading an adapter in an app requires the Foundation Models Framework Adapter Entitlement.

Adapters are version-specific. Apple states that an adapter must match the corresponding system-model version, which means a production plan needs:

  • evaluation data and repeatable quality tests;
  • compatible adapters for supported OS/model versions;
  • hosted asset delivery rather than an oversized app bundle;
  • fallback behavior when a compatible adapter is unavailable;
  • time for the Account Holder to request the entitlement.

Tool calling and prompt engineering should be evaluated before an adapter because they have a much lower operational burden.

Private Cloud Compute requires a separate managed entitlement

PrivateCloudComputeLanguageModel is Apple’s server-based Foundation Model option. It offers stronger reasoning and a larger context window than the on-device model, but it requires:

  • the com.apple.developer.private-cloud-compute managed entitlement;
  • an eligible app and developer account;
  • Apple Intelligence availability;
  • a network connection;
  • handling per-user quota state and service errors.
let cloudModel = PrivateCloudComputeLanguageModel()

guard cloudModel.isAvailable else {
    // Fall back to the on-device model or a non-AI path.
    return
}

let session = LanguageModelSession(model: cloudModel)
let response = try await session.respond(
    to: "Compare these architecture options."
)

This is an explicit model choice, not a silent fallback performed by an ordinary SystemLanguageModel session. If your product promises that content never leaves the device, do not route that content to PCC.

Context size is a model property, not a hidden entitlement

Apple documents a 4,096-token context window for the on-device model and a larger context for PCC. There is no separate public “extended on-device context” entitlement. Read the selected model’s contextSize, budget for instructions, schemas, tool definitions, tool results, prompts, and generated output, then recover from context exhaustion deliberately.

For long documents, use chunking, extraction, summarization, or PCC only when its network and privacy tradeoffs fit the product.

App Store and production checklist

Before release:

  1. Gate UI on the exact model’s availability.
  2. Test prompts against every supported system-model version.
  3. Handle cancellation, guardrail, context, quota, and network failures.
  4. Declare permissions for every protected capability used by tools.
  5. Ensure App Privacy answers match any server or PCC data path.
  6. Verify managed entitlements in the distribution provisioning profile.
  7. Keep a useful non-AI fallback.
  8. Recheck Apple’s beta documentation against the final SDK.

The practical rule is simple: baseline on-device generation is broadly available, tool calling inherits the permissions of what it touches, and only custom adapters and Private Cloud Compute add Foundation Models-specific entitlement work.

Authoritative references

Authoritative References