r/iOSProgramming • • 8d ago

Question Is there a ToS-compliant way to send app data through a Google AI web view or any other AI for a free hobby app?

I have a small free iOS app (SwiftUI) that sends a photo or a text prompt to a hidden WKWebView showing Google's AI Mode, reads the answer back, and uses it in the app . I've realised this is automated access to a Google service, which their terms don't allow, so I want to stop doing it that way.
What I'm trying to find out: - Is there a way to get the same result, sending data from my app to a Google AI and reading the response, that stays within Google's terms? Or any other AI which allows this kind of behaviour- If the web view approach can't be made compliant, what's the closest allowed route that is also free for end users?

It's a free open-source hobby project, so I can't pay for a backend or ask users to pay. Any guidance from people who've dealt with this would help.

2 Upvotes

12 comments sorted by

2

u/WeirdIndividualGuy 8d ago

Don't worry about ToS, Google won't find out nor care, especially for a hobbyist app

1

u/apurva_k 8d ago

Thanks for the motivation🙈 But I am looking for a proper way out 🙈

1

u/Doctor_Fegg 8d ago

I can't even manually open Google in a private browsing window without getting rejected 20% of the time. This sounds like a surefire way to build an unreliable app that will annoy your users when it inevitably fails, I'm afraid.

1

u/apurva_k 8d ago

Agreed!

1

u/Same-Appointment-285 8d ago

Sounds like you're just trying to steal free usage? Nice if you can get away with it, but I wouldn't build anything important on it.

2

u/apurva_k 8d ago

It isn’t sounding mate, I am stealing free usage, and I have the realisation.
What I need is a solution for it dear!

1

u/ThalesMother9938 8d ago

If you can target iOS 26, Apple's Foundation Models framework runs on device, costs nothing and needs no network, but it only works on Apple Intelligence capable devices. For devices that can't run it, the Gemini API has a free tier with rate limits, so check the current limits before you plan around them. Since the app is open source, any key you ship can be pulled out of the repo or the binary, so a bring-your-own-key field in settings is the safer shape. Do you need the photo input on day one, or could text prompts cover the first version?

1

u/InteractionWrong4029 7d ago

One thing this thread hasn't separated: the ToS problem and the review problem are the same problem here. Driving WKWebView into a consumer AI product is automated access to a third-party service, which is exactly the pattern review treats as unauthorized use (5.2.2), and it is also the pattern that gets a free app pulled after the fact instead of at submission.

Whatever route replaces it, do not ship a key in the binary. The repo is open source, so a key in the app is a key on GitHub, and a shared key puts the bill on you. A field in settings where each user pastes their own key keeps the app free for them and safe for you.

1

u/jrkral2 7d ago

I'm the developer of Faraday, a therapy notes app that does its drafting on-device with Apple's Foundation Models framework, so a few practical notes from shipping it:

  • Check SystemLanguageModel.default.availability before showing the feature. It only runs on Apple Intelligence devices with it turned on, so you need a fallback for everyone else.
  • The context window is 4,096 tokens for input and output combined. Chunk long text and summarize in passes.
  • If your input is images or scans, run Vision text recognition first and pass the text in.
  • @Generable structs with guided generation save you from parsing free-form output.
  • Guardrails will refuse some content. Catch the guardrailViolation error and tell the user instead of failing silently.
  • If you need a bigger model, letting users paste their own API key keeps you clear of the ToS problem.

Wrapping Google's consumer web UI and pulling responses out of it is the part that usually breaks their terms, so I'd avoid that route.

1

u/acqui-ai 3d ago

And don’t forget to handle refusals gracefully.