Platform support
Install in an Expo SDK 54+ app or a React Native app with compatible Expo modules. The library minimum is iOS 15.1 and Android API 24; the llm and speech options require Android API 26. Every capability is opt-in at build time, so requirements apply only to the options you enable. Individual features may require a newer OS or specific hardware.
Use a native development or production build. Expo Go and web are not supported.
Requirements by feature
| Feature | iOS | Android |
|---|---|---|
| LLM: built-in | Enable llm; iOS 26+, Apple Intelligence device with Apple Intelligence enabled and model ready | Enable llm; ML Kit Prompt API on supported devices |
| LLM: downloadable | Enable llm; LiteRT-LM with enough memory for the selected model | Enable llm; LiteRT-LM on arm64 with enough memory for the selected model |
| Speech | iOS 26+, SpeechAnalyzer | Android 12+, ML Kit Speech Recognition; enable speech |
| Vision: background removal | iOS 17+, physical device | Enable vision; Google Play services model |
| Vision: image labels | Physical device | Enable vision; bundled model |
| Vision: OCR | Apple Vision; also works in Simulator | Enable vision; Google Play services script models |
| Vision: face detection | Apple Vision on a physical device; no Apple Intelligence requirement | Enable vision; bundled detector |
| Embeddings | iOS 17+, NLContextualEmbedding | Enable androidEmbeddings; prepare EmbeddingGemma |
All LLM functions—text, streaming, structured output, and tool calling—use the selected text model. Vision and speech do not require an available LLM.
Check at runtime
Use isAvailable() for built-in text, getSpeechRecognitionAvailability() for speech, getVisionAvailability() for images, and getEmbeddingModelStatus() for embeddings. A library-compatible OS alone does not guarantee model availability.
Android built-in text can be supported before its model is downloaded. Await prepareBuiltInModel() before generation. For other features, follow their preparation steps.
Testing and fallbacks
Test on physical devices. iOS Simulator cannot run background removal, image labeling, or face detection. Downloadable text models are disabled on Android x86/x86_64 because the LiteRT-LM backend can crash; use arm64.
When built-in text is unavailable, offer a downloadable model or a fallback in your UI. Native failures surface as typed errors.
See Android setup for build configuration and troubleshooting for failures.