Getting Started
React Native Foundation Models is a Nitro module that provides access to Apple's Foundation Models (Apple Intelligence) for iOS 26.0+. This module enables AI features directly on-device with support for tool calling and streaming responses.
Prerequisites
- iOS 26.0+ physical device or simulator
- Apple Intelligence enabled in Settings > Apple Intelligence & Siri
- Compatible hardware (Apple Silicon Macs, newer iPhones/iPads)
- React Native development environment
- Xcode for iOS development
Installation
npm install react-native-foundation-models
# or
yarn add react-native-foundation-models
# or
bun add react-native-foundation-models
iOS Setup
No additional setup is required for iOS. The module will automatically detect Apple Intelligence availability.
Quick Start
import { useLanguageModel } from 'react-native-foundation-models';
function MyComponent() {
const { session, send, loading, isSessionReady, error } = useLanguageModel({
instructions: "You are a helpful assistant."
});
const handleSendMessage = async () => {
try {
const response = await send("Hello!");
console.log(response);
} catch (error) {
console.error('Error:', error);
}
};
if (!isSessionReady) {
return <Text>Apple Intelligence is not available</Text>;
}
return (
<View>
<Button
title={loading ? "Sending..." : "Send Message"}
onPress={handleSendMessage}
disabled={loading}
/>
</View>
);
}