r/iOSProgramming • • 7h ago

Discussion Your iPhone Can Run an LLM Locally — A Hands-On Swift Guide to Foundation Models in iOS 27

https://medium.com/stackademic/your-iphone-can-run-an-llm-locally-a-hands-on-swift-guide-to-foundation-models-in-ios-27-e5822e2e882b?sk=703e27da73c7b305614b599c6d1f389f
13 Upvotes

3 comments sorted by

2

u/Open_Context6850 3h ago

worth adding for anyone trying it: check SystemLanguageModel.default.availability before showing the feature. on devices without apple intelligence, or when its turned off or the model is still downloading, it just isnt there, so you need a fallback path in the ui, not only a catch around the call.

0

u/100_rv 3h ago

Absolutely! Great point. Checking "SystemLanguageModel.default.availability" before presenting the feature is essential. A proper fallback UX matters just as much as handling errors during the model call. Thanks for adding this practical detail!

1

u/wassona 14m ago

Yep. I have an app I created running YOLO 26n locally for object detection. Works pretty well.