> Markdown version of [/videos/1515-harnessing-apple-intelligence-live-coding-with-swift-for-ios?t=6](https://www.wearedevelopers.com/videos/1515-harnessing-apple-intelligence-live-coding-with-swift-for-ios?t=6). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Harnessing Apple Intelligence: Live Coding with Swift for iOS Ditch external APIs and run a 3-billion-parameter LLM locally on iOS. This live coding demo reveals how simple Swift code unlocks Apple Intelligence for private, on-device text generation. - **Speakers:** [MIlan Todorović](https://www.wearedevelopers.com/@milan-todorovic) - **Event:** World Congress 2025 - **Published:** August 20, 2025 - **Duration:** 28:54 - **URL:** https://www.wearedevelopers.com/videos/1515-harnessing-apple-intelligence-live-coding-with-swift-for-ios ## Summary Apple Intelligence unifies Apple's evolving suite of machine learning tools into a singular, privacy-first generative AI ecosystem. Historically relying on localized frameworks like Core ML, Vision, and Create ML, Apple now prioritizes executing AI workflows directly on-device or via a highly secure private cloud to eliminate network-based data vulnerabilities. This hardware-optimized approach ensures developers can build inherently private applications while offloading complex inference tasks directly to the user's hardware. The modern Apple AI toolkit empowers developers to integrate sophisticated capabilities using MLX for Apple Silicon-optimized model tuning and Foundation Models for generative functionality. By utilizing a compact, roughly 3-billion-parameter on-device large language model (LLM), developers bypass network calls to external platforms like OpenAI for common NLP tasks. This makes essential features like data summarization, text generation, and named entity recognition much faster and highly secure. Furthermore, system-wide features like App Intents are introduced as a critical upcoming game-changer for surfacing custom app logic globally across iOS. A live coding demonstration in Xcode 16 Beta showcases how to practically leverage SwiftUI alongside the `LanguageModelSession` object. Setting up local AI functionality now requires only a few lines of standard asynchronous Swift code to ingest text blocks and extract specific data points locally. For iOS developers, embracing these native NLP frameworks presents a frictionless opportunity to quickly embed intelligent features into their domain-specific apps without compromising data compliance or user trust. **Keywords:** apple intelligence, swiftui live coding, xcode 16 beta, on-device machine learning, privacy-first AI, core ML framework, apple foundation models, local LLM integration, named entity recognition, mlx optimization, create ML tool, ios app intents, asynchronous swift execution, natural language processing, apple silicon models ## Chapters 1. **Introduction to the Apple Intelligence developer ecosystem** (00:06) — An overview of Apple Intelligence as the unified umbrella for all generative AI capabilities across Apple platforms. 1. **Apple's privacy-first approach to on-device processing** (01:40) — Why executing compute workloads on-device is critical for protecting user data and minimizing remote network risks. 1. **Implementing machine learning with Core ML and Vision** (02:26) — A breakdown of existing purpose-built frameworks for device-optimized model execution, natural language, and image processing tasks. 1. **Training and fine-tuning models natively using MLX** (06:40) — Using the MLX framework framework to train, tune, and test machine learning models seamlessly on Apple Silicon hardware. 1. **Exploring generative intelligence features and App Intents** (07:53) — How system-wide AI enhancements integrate deeply into existing software applications through functional extensions and App Intents. 1. **Comparing local foundation models to cloud-based language models** (10:26) — Assessing the practical capabilities of localized foundation models utilizing three billion parameters against larger network-based architectures. 1. **Setting up a native SwiftUI application in Xcode** (11:34) — Creating a new cross-platform Swift project utilizing AI-assisted completion features and user interface states available in newer developer environments. 1. **Implementing language model sessions using Swift asynchronous coding** (18:31) — Importing foundational libraries and structuring asynchronous Swift execution tasks to safely query local language model sessions. 1. **Testing entity extraction via the on-device language model** (22:25) — Commanding the local language model to dynamically extract specific personal names from unstructured historical text blobs. 1. **Configuring system prompts utilizing Apple developer API documentation** (24:50) — Exploring official API references to properly parameterize standard foundation models using structured intent variables and conversational prompts. ## Related Moments - [Navigating Apple's evolving on-device AI and machine learning stack](https://www.wearedevelopers.com/videos/100225-edge-ai-on-ios-beyond-the-cloud-designing-the-next-generation-of-intelligent-on-device-apps) (from "Edge AI on iOS: Beyond the Cloud, Designing the Next Generation of Intelligent On-Device Apps") - [Shifting from AI features to AI-assisted iOS development](https://www.wearedevelopers.com/videos/100195-xcode-development-redefained) (from "Xcode development redefAIned") - [Reviewing Xcode implementations and Vision framework documentation reference resources](https://www.wearedevelopers.com/videos/167-let-your-ios-app-read-texts) (from "Let your iOS app read texts") - [Understanding the iPhone moment of software engineering](https://www.wearedevelopers.com/videos/2137-what-to-do-about-hackathons-in-the-time-of-agents-mike-swift) (from "What to Do About Hackathons in the Time of Agents - Mike Swift") - [Leveraging AI tooling for accelerated learning and productivity](https://www.wearedevelopers.com/videos/882-coffee-with-developers-dan-mindru-product-marketing-for-developers) (from "Coffee with Developers - Dan Mindru - Product Marketing for Developers") - [Testing the AI generated Apple iOS Flashcards application](https://www.wearedevelopers.com/videos/100195-xcode-development-redefained) (from "Xcode development redefAIned") ## Related Articles - [MLOps And AI Driven Development](https://www.wearedevelopers.com/magazine/82-mlops-and-ai-driven-development) - [Dev Digest 132 - Binging WADFlix?](https://www.wearedevelopers.com/magazine/473-dev-digest-132-binging-wadflix) - [Stephan Gillich - Bringing AI Everywhere](https://www.wearedevelopers.com/magazine/489-stephan-gillich-bringing-ai-everywhere) - [Dev Digest 137 - AI'm not sure about this](https://www.wearedevelopers.com/magazine/485-dev-digest-137-ai-m-not-sure-about-this) ## Related Jobs - [Founding Mobile Engineer (iOS)](https://www.wearedevelopers.com/jobs/ext/1648532-founding-mobile-engineer-ios) at **Almedia** - [iOS Engineer, Swift/SwiftUI/Combine (B2C Broker)](https://www.wearedevelopers.com/jobs/ext/1611832-ios-engineer-swift-swiftui-combine-b2c-broker) at **Bitpanda** - [Machine Learning Engineer](https://www.wearedevelopers.com/jobs/ext/1355348-machine-learning-engineer) at **TWILIO** - [Machine Learning Engineer](https://www.wearedevelopers.com/jobs/ext/588393-machine-learning-engineer) at **Twilio** - [AI Software Engineer (Germany)](https://www.wearedevelopers.com/jobs/48317-ai-software-engineer-germany) at **Sunhat** - [Artificial Intelligence (AI)](https://www.wearedevelopers.com/jobs/ext/1952055-artificial-intelligence-ai) at **Twilio**