iOS / SwiftUI / Local AI
Localight
Localight is a small demo app for trying Apple’s on-device language models in a native iOS chat interface. It is built around fast, private, offline responses without a server or internet connection.
Purpose
What it is for
The project exists to show how a local LLM can feel inside a focused SwiftUI app. It keeps the product surface intentionally small, so the important parts are the Foundation Models integration, the session lifecycle, model availability handling, and the user-facing chat flow.
Behavior
What it does
Implementation
How it is built
The codebase keeps separate iOS 26 and iOS 27 implementations so API differences stay explicit.
LocalightApp selects the right implementation for the current operating system.
Version-specific files and types use _26 and _27 suffixes, with grouped folders for chat, model, settings, and reusable components.
Error handling maps model availability and generation failures into user-facing fallbacks instead of exposing raw framework errors.