+1 (415) 943-4271

On-Device and Cloud AI Features in React Native Apps

"Add AI to the app" is on every 2026 roadmap. Here is a sober map of how LLM features actually fit into a React Native app — patterns we have shipped, with the trade-offs stated.

Cloud LLMs behind your backend

The default architecture: the app never holds a model-provider API key. Your backend (for us, typically Node/GraphQL) proxies the provider, owns the prompts, and streams responses to the client.

  • Streaming UI is the whole game for perceived quality. Server-sent events or a streaming fetch into an append-only message list; render tokens as they arrive, keep the input responsive, support cancel.
  • Cost control lives server-side: per-user quotas, model tiering (cheap model first, escalate on demand), response caching for repeated queries.
  • Privacy: decide per feature what user content may leave the device, and say so in your privacy policy — reviewers increasingly check.

On-device models

For features that must work offline or must not send content anywhere:

  • Apple Foundation Models (iOS 26+) — Apple's on-device LLM, reachable from React Native via a small Turbo Module. Free, private, fast for summarisation/classification-sized tasks; not a GPT-class writer.
  • llama.rn and similar llama.cpp bindings run small open models cross-platform. Budget real engineering time for model size, memory, and thermal behaviour on mid-range Android.

On-device is a feature-level choice, not an app-level one: many apps ship both, routing by task.

Speech and vision

Speech-to-text (native APIs or Whisper-class models server-side) and camera-based vision (frame processors feeding a vision model) both fit the same shape: capture natively, process where the privacy/latency trade-off says, stream results into React state.

App Store review notes

Label AI-generated content as such, provide a report mechanism for generated content in social contexts, and disclose model/data usage in your privacy details. We have not had a client rejection when those three were handled up front.

Where we fit

We build these end to end: the Turbo Module for the on-device path, the streaming chat UI, and the Node/GraphQL backend that keeps keys and costs under control. If that is your roadmap, talk to us.