r/iOSProgramming • • Jun 25 '26

Discussion [UPDATE] - Feedback on using coreML for insane on-device performances

Post image
106 Upvotes

Hi everyone, a few months ago I made a post about how using CoreML for on-device AI models was a great experience.

My workflow was:

  1. Picture taken
  2. Pre-processing
  3. YOLO-like model for bounding boxes
  4. Post-processing
  5. Embeddings for each image using CLIP

In the demo I show here, it's 40 inferences in less than a second (pre and post-processing included)!

I started experimenting with ONNX models at first. My app was made in Flutter and I did not want any platform-specific code.

My experience with ONNX was not great**:** a lot of operations were not running on the neural engine but on the CPU instead, which did cause a really slow inference time. I also had issues with FP16 quantization: the FP16 model refused to run on ONNX.

In addition to that, Dart and Flutter are not made for heavy workloads. My pre-processing was way too slow for what I wanted.

To give you some numbers, on my first iterations, a single card scan was about 1.2 seconds long. Too much.

After that I decided to switch my detection engine to native:

  • 1 - Exporting to CoreML FP16 format was one line,
  • 2 - Inference speed went from 250ms to 10ms!

Because of that, I was finally able to work on the interface and deploy the Skanit app. I made it free because I had almost no costs.

PROS:

  • Super fast
  • No backend costs
  • Privacy

CONS:

  • Model updates must be done via an app update
  • You cannot use a big model**,** accuracy loss
  • Different pre-processing code and models for each platform (with different performance)
  • App experience depends on the user**'s** device (super true for Android users)

I hope you found it interesting!

ps, I know there is a mistake on one card here, surely because i was scanning my laptop screen instead of real cards :)


r/iOSProgramming • • Jun 25 '26

Tutorial Taking control of toolbar items in SwiftUI

Thumbnail
swiftwithmajid.com
6 Upvotes

r/iOSProgramming • • Jun 25 '26

Question As solo developer how do you implement AI features into your app?

15 Upvotes

Hi,

Wondering what are the options if I want to create an AI features into in my app. I know about openAI api and other various API’s. The thing is I am a tad scared to use them because I hardly understand how they charge. I know a lot of stories where people used it wrongly and got huge bills for that.

Also, do we always need these powerful models? Can’t we use in some cases like qwen 8b or something like that running on a VPS?


r/iOSProgramming • • Jun 25 '26

Question Easiest way to create SF Symbols

6 Upvotes

In my app I’m using icons created with illustrator and exported as png. I would convert them to SF Symbols, is there some way to do that in a easy way?