SKILL

foundation-models-on-device

Apple FoundationModels framework for on-device LLM — text generation, guided generation with @Generable, tool calling, and snapshot streaming in iOS 26+. Use when adding on-device LLM features with Apple FoundationModels on iOS 26+.

Target: Mobile development. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • FoundationModels: On-Device LLM (iOS 26)
  • When to Activate
  • Core Pattern — Availability Check
  • Core Pattern — Basic Session
  • Core Pattern — Guided Generation with @Generable
  • 1. Define a Generable Type
  • 2. Request Structured Output
  • Supported @Guide Constraints

Patterns for integrating Apple's on-device language model into apps using the FoundationModels framework. Covers text generation, structured output with @Generable, custom tool calling, and snapshot streaming — all running on-device for privacy and offline support. Building AI-powered features using Apple Intelligence on-device Generating or summarizing text without cloud dependency Extracting structured data from natural language input Implementing custom tool calling for domain-specific AI actions Streaming structured responses for real-time UI updates Need privacy-preserving AI (no data leaves the device) Always check model availability before creating a session: Key points for instructions: Define the model's role ("You are a mentor") Specify what to do ("Help extract calendar events") Set style preferences ("Respond as briefly as possible") Add safety measures ("Respond with 'I can't help with that' for dangerous requests") Generate structured Swift types instead of raw strings: .range(0...20) — numeric range .count(3) — array element count description: — semantic guidance for generation Let the model invoke custom code for domain-specific tasks: Stream structured responses fo

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
affaan-m/ECC
Source file
pi/core/skills/foundation-models-on-device/SKILL.md
Fixed revision
d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Read the complete original documentation ↗

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T15:01:43.010Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.