On-Device Apple LLM Support Comes to React Native

Authors

Today, we are excited to announce the preview release of @react-native-ai/apple, a new package that brings the power of Apple's on-device foundation models to the React Native ecosystem.

You can start experimenting with it today by installing it from npm:

npm install @react-native-ai/apple

This initial release is in preview and requires React Native 0.80+ (or Expo Canary) and requires New Architecture to be enabled. Our goal is to align the stable release of this library with the official public release of iOS 26. In the meantime, we are developing documentation and examples to help you get the most out of it.

What is Apple Intelligence?

At its core, Apple Intelligence is a suite of generative models, including a ~3 billion parameter model optimized to run directly on a user's device. While new to the public, this technology has been developed and deployed by Apple in production, powering features across its operating systems.

The on-device model's architecture is what sets it apart. It is a Transformer-based model specifically engineered for the resource constraints of mobile hardware. Apple's research highlights several key design choices that enable its efficiency:

  • Purpose-Built Architecture: The model is not a scaled-down version of a larger server model but was designed from the ground up for on-device execution, balancing performance with capability.
  • Advanced Compression: Through techniques like quantization, the model's memory footprint is significantly reduced, making it viable for mobile devices.
  • Dynamic Adapters (LoRA): Instead of a single, monolithic model, Apple uses Low-Rank Adaptation (LoRA) to create specialized, lightweight "adapters". These adapters are loaded on-demand to fine-tune the model for specific tasks, such as text summarization or generating smart replies, without altering the base model.

The primary benefit of this architecture is its ability to deliver powerful AI features with high performance and efficiency while preserving user privacy.

Why Local Computing Matters

While cloud-based models have their place, local computing offers a distinct set of advantages that are particularly relevant for mobile experiences:

  • Privacy by Default: Since all processing happens on the user's device, no sensitive data is sent to the cloud. This is a critical advantage for applications that handle personal information, enabling a new class of AI features that are secure and private by design.
  • Zero-Latency Interaction: On-device models eliminate network latency, resulting in near-instantaneous responses. This is crucial for creating fluid, real-time user experiences, such as interactive content creation tools or responsive assistants.
  • Offline Capability: Applications that rely on local models are not dependent on an internet connection. This unlocks powerful functionality for users in areas with poor connectivity or for use-cases where offline access is a requirement.

Potential use-cases for on-device AI are vast, ranging from intelligent text editors that can summarize notes offline to privacy-preserving assistants that can reason over a user's on-device data to provide context-aware suggestions. In the coming weeks, we will be posting few examples to help you get started.

Supported Features

This initial release of @react-native-ai/apple provides a solid foundation for building with Apple Intelligence.

Text Generation and Streaming

You can generate text from a prompt and stream the response in real-time for a more interactive experience. The API is designed to be intuitive and easy to integrate.

import { foundationModels } from '@react-native-ai/apple';

const response = await foundationModels.generateText([
  { role: 'user', content: 'Explain quantum computing in simple terms' }
]);

console.log(response);

For a more interactive experience, you can stream the response:

import { foundationModels } from '@react-native-ai/apple';

const stream = foundationModels.generateStream([
  { role: 'user', content: 'Write a short story about AI' }
]);

for await (const chunk of stream) {
  if (chunk.type === 'text-delta') {
    console.log(chunk.textDelta);
  }
}

Vercel AI SDK Compatibility

For developers already using the Vercel AI SDK, our library offers a compatible interface, allowing you to switch to Apple's on-device model with minimal code changes.

import { generateText } from 'ai';
import { apple } from '@react-native-ai/apple';

const { text } = await generateText({
  model: apple(),
  prompt: 'Explain quantum computing in simple terms',
});

It is part of our design choices to remain compatible with Vercel AI SDK for foreseeable future, so you can expect full feature parity with all latest SDK changes.

Structured Outputs

The library supports generating structured JSON output from a given Zod schema, enabling you to work with typed data directly from the model.

import { foundationModels } from '@react-native-ai/apple';
import { z } from 'zod';

const schema = z.object({
  name: z.string(),
  age: z.number().int().min(0).max(150),
  email: z.string().email(),
});

const result = await foundationModels.generateText([
  { role: 'user', content: 'Create a user profile' }
], { schema });

console.log(result.name); // John Doe

The underlying model has certain limitations on the complexity of the schemas it can handle. We will be publishing more detailed guides on how to work effectively with structured outputs in upcoming articles.

Future Roadmap

Our work on @react-native-ai/apple is part of a broader initiative to bring first-class, local on-device AI support to React Native. Previously, we have shipped support for running any arbitrary model with MLC Engine.

Here's a look at what's next:

  • Stable Release: We're targeting a stable, production-ready release to coincide with the official launch of iOS 26.
  • Tool Calling: We'll be adding robust tool calling support. This crucial feature will enable AI models to interact with external functions and APIs, paving the way for more powerful and integrated AI agents within your React Native applications.
  • On-Demand Adapters: We plan to expose Apple's on-demand adapter system. This will empower developers to dynamically load specialized, lightweight models. These adapters can fine-tune the base AI model for specific tasks, like text summarization or generating smart replies, without altering the core model itself.

While our initial focus is on Apple devices, our vision extends far beyond, preparing React Native for the future of AI-powered applications. In parallel, we're working on supporting Android devices with similar level of native on-device capabilities, bringing them together behind a single unified API.

Join Us!

We are incredibly excited about the potential of on-device AI and what the React Native community will build with it. We encourage you to try out the library, provide feedback, and get involved.

Star the repository on GitHub to stay up-to-date on our progress. We look forward to seeing what you create.

Table of contents
Integrating AI into your React Native workflow?

We help teams leverage AI to accelerate development and deliver smarter user experiences.

Let’s chat
Link copied to clipboard!
//
Insights

Learn more about

AI

Here's everything we published recently on this topic.

Sort
//
AI

We can help you move
it forward!

At Callstack, we work with companies big and small, pushing React Native everyday.

React Native Development

Hire expert React Native engineers to build, scale, or improve your app — from day one to production.