Platform Support

Understanding platform requirements and compatibility for expo-ai-kit.

iOSAndroid

Overview

expo-ai-kit provides on-device AI capabilities by leveraging native platform frameworks. Both iOS and Android are fully supported.

There are two model paths. The built-in OS models — Apple Foundation Models on iOS and ML Kit on Android — are managed by the operating system rather than bundled with your app. Android may download its model on first use. Downloadable models (Gemma, Qwen, Phi via LiteRT-LM) run on both platforms and broaden support to devices without a built-in model, as long as they have enough RAM. See the Models guide.

Supported

PlatformDetails
iOS 26+Apple Foundation Models
Android (supported devices)ML Kit

Unsupported

PlatformFallback Behavior
iOS < 26Returns fallback message
Android (unsupported devices)Throws DEVICE_NOT_SUPPORTED

Downloadable models broaden support

“Unsupported” above refers only to the built-in OS model. A device without it can still run a downloadable model (Gemma / Qwen / Phi) if it meets the model's RAM requirement — check getRecommendedModel() at runtime.

Requirements

  • Expo SDK 54+
  • iOS: iOS 26.0+ (full support), iOS 15.1+ (limited)
  • Android: API 26+, Supported devices

iOS Support

iOS iOS 26+ provides full on-device AI support.

How It Works

expo-ai-kit uses Apple's Foundation Models framework introduced in iOS 26. The on-device language model runs entirely locally with no internet connection required.

iOS < 26

On iOS versions below 26, the module returns a fallback message. This allows you to develop and test your app on older devices while still building the UI.

Android Support

Android Android provides full on-device AI support via Google's ML Kit.

How It Works

expo-ai-kit uses Google's ML Kit. The model may need to be downloaded on first use on supported devices. Check the supported devices list for compatibility.

Unsupported Android Devices

On Android devices that don't support ML Kit, the module throws a typed DEVICE_NOT_SUPPORTED error. UseisAvailable() to check support before preparing the model or making requests.

For Android-specific setup instructions, see the Android Setup Guide.


Feature Comparison

Feature availability by platform:

FeatureiOS 26+Android (Supported)
isAvailable()
sendMessage()
prepareBuiltInModel()✅ availability validation✅ prepares OS-managed model
streamMessage()
System prompts✅ Native✅ Prepended
Multi-turn context
Cancel streaming
generateObject() (structured output)
generateText() (tool calling)
Downloadable models (Gemma / Qwen / Phi)
embed() (embeddings & RAG)✅ iOS 17+ (zero-download OS model)✅ opt-in (androidEmbeddings config-plugin flag + ~184 MB model download)

Graceful Degradation

Design your app to handle cases where on-device AI isn't available. Always check availability at runtime:

hooks/useAI.tstypescript
import { useState, useEffect } from 'react';
import {
  isAvailable,
  prepareBuiltInModel,
  sendMessage,
  type LLMMessage,
} from 'expo-ai-kit';

export function useAI() {
  const [available, setAvailable] = useState(false);

  useEffect(() => {
    void (async () => {
      if (!(await isAvailable())) return;
      await prepareBuiltInModel();
      setAvailable(true);
    })();
  }, []);

  const askAI = async (question: string) => {
    if (!available) {
      // Use cloud AI fallback or show appropriate message
      return null;
    }

    const response = await sendMessage([
      { role: 'user', content: question }
    ]);
    return response.text;
  };

  return { available, askAI };
}

Best Practice

Always provide a fallback experience. Not all users will have compatible devices. Consider cloud AI as a fallback, or design features that work without AI.