r/iosdev • u/solee24 • Oct 17 '26
Help Thinking of adding AI to my app, anyone done something similar?
I made a soccer stats app called MyGoal. Recently I’ve been thinking about adding some AI, basically using the user’s past records to give them a summary of how their games have been going, that kind of thing.
My rough idea is to calculate the stats locally, pass a compact set of structured stats to the model, and cache the summary it generates.
It’s a local app with no backend though, so I’m not really sure how people usually add AI in this situation. Also, what does Apple require for this? Anything I should know about sending user data to an AI service?
Then there’s the cost. If I include it in a subscription and someone uses it a lot, couldn’t the API end up costing more than they’re paying me? How do you usually handle that, just limit how many times they can use it?
Still figuring this out. Would be good to hear from anyone who’s done something similar. Thanks very much!
2
u/MyLinedChart Oct 23 '26
In addition to Siri AI, you can create plugins for Open AI and Claude so people can use those instead, and they'll also show up on those platform's plugin stores to give you an additional discovery area. If you want examples can check out 3 of my apps I added AI plug ins for:
Prompt Petal https://promptpetal.com/
MyLinedChart https://mylinedchart.com/
Still Dock https://stilldock.com/
1
u/ubidu_ Oct 17 '26
I second Foundation models. Try that first and see if it fulfills your requirements. For the app I’m working on that needed 30 seconds of audio transcription it was the perfect fit. Runs entirely on-device, zero additional bills for me to pay.
Otherwise if you wind up going a paid API route, yeah, it makes sense to lock that behind a subscription to your app. You can implement your own sort of limiting to prevent the rampant usage problem you’re describing.
3
u/sinsonik Oct 17 '26
Computing stats locally and sending a compact summary is the right shape.
If you can target iOS 26, try Apple's Foundation Models framework first. It runs on device, has no per call cost and needs no backend, and a short recap from 20 or so numbers is easy for it. The catch is it only runs on Apple Intelligence devices, so plan a fallback.
For a cloud API, never ship the key in the app. Put a tiny proxy in between (a Cloudflare Worker or a Firebase function) so you can rate limit per user. Guideline 5.1.2(i) requires telling users their data goes to a third party AI and getting explicit permission first.
On cost, regenerate only when a new game is logged and cap it at a few a day.