I moved my app's AI from Claude to Apple's cloud

I moved my app's AI from Claude to Apple's cloud
ContenidoContents

In my spare time I’m building an iOS app to log workouts and nutrition —it’ll be the first one I publish on the App Store—. All the AI parts —analyzing meals, a conversational coach, generating routines— ran on the Claude API, from Anthropic. It works great, but it has a known catch: you pay per call, and you depend on an external provider that, as I wrote recently, can cut you off overnight.

This week Apple gave me access to its cloud AI. And I spent the last few days doing something about it: swapping Anthropic for Apple’s models.

What Apple gave me

At this year’s WWDC, Apple opened free access to its Foundation Models running in the cloud —its Private Cloud Compute, PCC— for small-programme developers with apps under two million first-time downloads. Below that threshold, the AI calls cost nothing.

For someone building an app in their spare time, that removes the scary part: the variable cost. The more your app gets used, the more you pay the API of the day… unless Apple provides the AI for free.

The pattern: Apple first, Claude as backup

I didn’t throw Claude away. I built a layer on top that tries Apple’s model first and, if needed, falls back to Claude. The nicest practical difference: the Anthropic API key is no longer required. Before, without it there was no AI; now it’s optional, just the plan B.

A couple of things worth knowing about PCC, because they took me a while to pin down:

  • It requires iOS 27 + Apple Intelligence enabled. On iOS 26, the same layer falls back to the on-device model (smaller, but right on the phone).
  • You have to request a specific entitlement from Apple to use the cloud; they grant it and it’s signed into the app.

What I migrated… and what I didn’t

I moved the heavy services to Apple: the nutrition analysis (text, plus a day summary that computes in streaming), the multi-turn coach, and the routine generator (with typed, structured output thanks to @Generable, validated against my exercise catalogue).

But not everything fit on the first try, and this is the honest part. The big-plan generator —the mesocycle, whole weeks of training— hung on PCC: the long, heavily-guided generation timed out. For now that part still runs on Claude, while I work out how to adapt it to Apple’s model —splitting the generation up, guiding it differently—. For a single response, Apple is more than enough; for a huge plan in one go, I’m still turning it over. It’s exactly the kind of limit I got to explore this week.

And while I was at it, new features

While I had my hands in the AI engine, I took the chance to add things that were on my list. It’s not that they need Apple’s models —they’d work with Claude too—, but the migration was the perfect excuse to put them in:

  • Identifying an exercise from a photo. Point the camera (or pick from the library), the model recognizes it —constrained to my catalogue— and you add it to the workout. iOS 27 only, because image input starts there.
  • Progression analysis for an exercise. It takes your whole history (big context → to the cloud) and writes the analysis with streaming, filling in live as you read.
  • A coach with tool calling. The model can read your data (workouts, an exercise’s progress, today’s nutrition) and act —log water or a meal— always with your confirmation. That, for now, only with Apple’s model.

To not get lost among backends, I built an indicator in Settings (dev mode) that tells me which engine each service ended up using: PCC, on-device or Claude. Essential for debugging from TestFlight without the Mac in front of me.

The fine print

So I’m not selling smoke:

  • What’s free are Apple’s models. Claude, kept as backup, is still paid if it ever gets used.
  • The threshold is two million downloads. If an app takes off and passes it, it moves to a paid scheme Apple hasn’t detailed yet. Free while you’re small.
  • This is in validation. Next is testing real quality on TestFlight, removing the temporary logs and continuing the list (more coach tools, meal photos, auto-naming workouts). It’s not done.

What I take away

A few days ago I wrote about how fragile it is to build your product on top of a paid AI you don’t control. This week, without planning it that way, I flipped it in my own app: the core now runs for free, on Apple’s cloud, and Claude went from being the only engine to being just the safety net.

Less cost, less dependency, and a few new features along the way that I’d been wanting to add for a while. Not bad for a week.

CompartirShare