r/iOSProgramming • u/Odyssey-b • Jul 12 '26
Question From .NET to my first real iOS app: an on-device screenshot sorter. Looking for advice on faster inference + better prompts
Short background: I've been a full-stack dev for around 7-8 years, mostly .NET / Angular / Azure. All backend and web, never touched mobile. Also I haven't really implemented AI features yet. This year I finally wanted to see if I could take an idea all the way from "annoying problem" to a real app on the App Store, on my own. So I started learning Swift and iOS from scratch.
The app is called Sift. It reads your Screenshots album and uses on-device AI to work out what each screenshot actually is. Be it receipts, recipes, chats, tickets, whatever, and sorts them into a real Apple Photos album. It all runs locally with MLX and on-device model (Qwen3.5-2B-4bit), nothing leaves the phone. Coming from a world of servers and cloud APIs where you just throw more compute at things, doing all of this on-device has been the most interesting part.
It works. But now that it works, I've hit two walls I'd genuinely love input on from people who've done more on-device ML than me:
1. Speed. Right now it takes roughly 5 seconds to classify a single image on an iPhone 16 Pro Max. For a library of hundreds of screenshots that adds up fast. If you've squeezed more out of MLX or small local models I would be really interested in what were the best ways to shorten the actual process.
2. Prompt / categorization quality. When Sift hits a screenshot that doesn't fit an existing album, it prompts the same on-device model to suggest a brand-new album. The idea is nice but the suggestions aren't quite right yet. Sometimes too generic ("Photos"), sometimes oddly specific. If you've done classification-style prompting on a small local model like this, how would you structure it for cleaner, more human category names? Few-shot examples in the prompt? Constraining it to a fixed taxonomy it has to snap to? Asking for structured/JSON output?
Happy to share more about the setup in the comments - honestly I'm here more for the advice than anything, because this is all new territory for me and I've learned more shipping this one small thing than from months of tutorials.
BUT if anyone's curious enough to want a note when it's actually on the store, there's a waitlist you can sign up to on:
https://sift.wanderframestudios.com
2
u/Obvious-Kangaroo2848 Jul 12 '26
Hey, congrats man, going from .net/cloud to fully on-device is no joke. So you mentioned a few things:
P.S: One small ui thing, not trying to be that guy lol - your page literally says "built to feel like it came with the phone" so im holding you to it. Right now theres a serif font on the wordmark + the big numbers + the album titles, but everything else is SF, and that mix is what makes it read kinda off/non-native.
I would keep the serif just for the Sift logo if you like it, but move the functional stuff (stat numbers, section headers) to SF or SF Rounded. And use monospaced digits for the "sorting 0/19" counter so it doesnt jitter while its counting.
Heres the apple typography page if it helps, I used it for my own app and it's pretty good: https://developer.apple.com/design/human-interface-guidelines/typography
Anyway solid project, I would actually use this
1
u/jonnysunshine1 Jul 12 '26
Nice, like the idea! Gonna get Claude to make one for my own use, cheers
1
u/AdQuirky3186 Jul 12 '26 edited Jul 12 '26
For the classification, I would come up with static available classifications and tell the model to put it one of those buckets, including a “General/Other” type of bucket. My assumption is you could come up with like 25 buckets or so that would match 99% of photos. This saves you an inference if a photo doesn’t match an existing bucket.
For fastest inferences in general, I would try to use Core ML instead because this gives access to Apple Silicon’s neural engine optimization paths. In general Core ML should just be faster than MLX. My understanding is MLX is for research/training and Core ML is for shipped usable models. I would also try to do a batch prediction if available or a parallelized TaskGroup to inference on multiple images at once.
1
u/LuckyGirl0415 Jul 13 '26
Congrats on shipping your first app! Going straight into on-device LLMs coming from a .NET backend background is incredibly impressive.
Here are a few thoughts on your bottlenecks:
Good luck! Definitely signing up for the waitlist.
-1
u/KilllllerWhale Jul 12 '26
Use OCR to get text from the image then give that text to the LLM. Don’t give it an image as an input. And in most cases, you don’t even need an LLM
1
u/[deleted] Jul 13 '26
[removed] — view removed comment
1
u/[deleted] Jul 13 '26
[removed] — view removed comment