npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@eitjuh/expo-apple-intelligence

v0.1.1

Published

Access Apple's on-device Foundation Models (Apple Intelligence) from React Native/Expo. Private, fast, offline AI.

Readme

expo-apple-intelligence


✨ Features

  • 🔒 Complete Privacy - All AI processing happens on-device. Your data never leaves the phone.
  • Blazing Fast - Powered by Apple Neural Engine for instant responses.
  • 📴 Works Offline - No internet connection required.
  • 💬 Session Support - Maintain conversation context across messages.
  • 🎯 Simple API - Just a few functions to get started.

📋 Requirements

| Requirement | Minimum | |-------------|---------| | iOS Version | iOS 26.0+ | | Device | iPhone 15 Pro+ / iPad with M1+ | | Apple Intelligence | Must be enabled in Settings | | Xcode | 26.0+ |

⚠️ Beta Notice: iOS 26 and the Foundation Models framework are currently in beta. APIs may change.

🚀 Installation

npx expo install @eitjuh/expo-apple-intelligence

Development Build Required

This package requires native code, so you'll need a development build:

# Install expo-dev-client if you haven't already
npx expo install expo-dev-client

# Build for iOS
npx expo run:ios

📖 Quick Start

import * as AppleIntelligence from '@eitjuh/expo-apple-intelligence';

// Check if Apple Intelligence is available
const available = await AppleIntelligence.isAvailable();

if (available) {
  // Generate a response
  const result = await AppleIntelligence.generateResponse(
    'Explain quantum computing in simple terms'
  );
  
  if (result.success) {
    console.log(result.response);
  }
}

📚 API Reference

isAvailable()

Check if Apple Intelligence is available on the current device.

const available: boolean = await AppleIntelligence.isAvailable();

getAvailabilityStatus()

Get detailed availability information including reasons for unavailability.

const status = await AppleIntelligence.getAvailabilityStatus();

// status: {
//   status: 'available' | 'unavailable' | 'unsupported' | 'unknown';
//   isAvailable: boolean;
//   reason?: string;
//   message: string;
// }

Possible statuses:

  • available - Apple Intelligence is ready to use
  • unavailable - Device supports it but it's not enabled/ready
  • unsupported - Device or iOS version doesn't support Apple Intelligence
  • unknown - Unable to determine status

generateResponse(prompt)

Generate a response using Apple's on-device language model.

const result = await AppleIntelligence.generateResponse('Your prompt here');

// result: {
//   success: boolean;
//   response?: string;  // The generated text
//   error?: string;     // Error message if failed
// }

createSession(options?)

Create a conversation session that maintains context across messages.

const session = await AppleIntelligence.createSession({
  systemPrompt: 'You are a helpful coding assistant.' // Optional
});

// Send messages that build on each other
const response1 = await session.sendMessage('What is TypeScript?');
const response2 = await session.sendMessage('How do I use interfaces?');
// The model remembers the context from previous messages

// Reset the conversation
await session.reset();

💡 Examples

Basic Chat

import { useState } from 'react';
import * as AppleIntelligence from '@eitjuh/expo-apple-intelligence';

function ChatScreen() {
  const [response, setResponse] = useState('');
  const [loading, setLoading] = useState(false);

  async function handleSend(message: string) {
    setLoading(true);
    
    const result = await AppleIntelligence.generateResponse(message);
    
    if (result.success) {
      setResponse(result.response ?? '');
    } else {
      console.error(result.error);
    }
    
    setLoading(false);
  }

  return (/* your UI */);
}

Checking Availability

import { useEffect, useState } from 'react';
import * as AppleIntelligence from '@eitjuh/expo-apple-intelligence';

function App() {
  const [status, setStatus] = useState<string>('Checking...');

  useEffect(() => {
    async function checkAvailability() {
      const result = await AppleIntelligence.getAvailabilityStatus();
      setStatus(result.message);
    }
    checkAvailability();
  }, []);

  return (/* show status */);
}

Persistent Conversation

import * as AppleIntelligence from '@eitjuh/expo-apple-intelligence';

// Create a session once
const session = await AppleIntelligence.createSession({
  systemPrompt: 'You are a friendly assistant who speaks casually.'
});

// Send multiple messages - context is preserved
await session.sendMessage('Hi! My name is Alex.');
await session.sendMessage('What did I just tell you my name was?');
// The model will remember "Alex"

❓ FAQ

Why does it show "unavailable" on my device?

Apple Intelligence requires:

  1. iOS 26 or later - Currently in beta
  2. Supported hardware - iPhone 15 Pro/Pro Max or later, iPad with M1 chip or later
  3. Apple Intelligence enabled - Go to Settings → Apple Intelligence & Siri → Turn on Apple Intelligence
  4. Model downloaded - The on-device model may need to download first

Does this work on Android?

No. Apple Intelligence is an Apple-only feature. On Android, isAvailable() will return false and all generation functions will return an error indicating the platform is unsupported.

Is my data sent to Apple's servers?

No. All processing happens entirely on your device using Apple's Neural Engine. This is one of the key privacy benefits of Apple Intelligence.

Can I use this with Expo Go?

No. This package requires native code, so you need to use a development build or a standalone app.

🔧 Troubleshooting

"Native module not loaded"

Make sure you've created a development build:

npx expo run:ios

"Foundation Models not available"

Your Xcode or iOS simulator may not be on version 26+. Check your versions:

xcodebuild -version

Build errors with Swift

Ensure your project is set up for Swift. The module requires Swift 5.9+.

📄 License

MIT © eitjuh

🙏 Acknowledgments

  • Apple for the Foundation Models framework
  • The Expo team for expo-modules-core