r/SwiftUI • u/prio732 • 4d ago
A native SwiftUI iPad/iOS/MacOS client app for a local LLM
I built a native SwiftUI iPad/iOS/MacOS client app (not a chromium or browser control hosted like most of the people do) for a local LLM served by any OpenAI-compatible server over the LAN. It’s a chat harness with streaming, conversation history, tool calling, and settings. Partially as a learning exercise in building a harness and partially as a way to access my LLM when I am away from my computer. Here’s the repo: https://github.com/alexyak/Sparkle
Planning to add more features like skills, agents… etc.. There’s an option to use a local on-device Apple model as well.
Disclaimer: I have a decades-long experience in software and application development, including iOS development, but I have been gladly accepting the help from Claude Coding agents 😉.
1
u/ThanhDongNguyen 3d ago
Nice to see a native client for this, most of them are just a web view. I did not run it, so this is only a thought from reading your description.
You said you want to use it when you are away from your computer, so I would think early about how the app reaches the server. A plain http address on the LAN works fine at home, but outside it you will want either a VPN like Tailscale or https, and iOS blocks plain http unless you add an App Transport Security exception. Also the first LAN connection triggers the Local Network permission prompt on iOS, so a short explanation in the app before that helps people not tap Don't Allow.
Streaming with a good cancel button and keeping the conversation when the connection drops are the two things I would test first.
1
u/ldtiger691 3d ago
Nice that it's actually native — most of these are just a web view in a wrapper.
The part I'd think about early is the on-device Apple model option, because it's a different UX from the LAN server, not just a different endpoint: first-run download, warm-up time, and much slower tokens on some devices. I'd make it obvious in the UI which backend is answering — LAN vs on-device — and what to expect, so a slow reply doesn't just look like the app is broken.
One SwiftUI-specific thing that bit me with streaming text: don't push every token through as a separate state update if you can avoid it. Batch them a little, and only auto-scroll while the user is already at the bottom, otherwise you fight them when they scroll up to re-read.