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

@stewmore/expo-ai-apple-foundation-models

v0.7.2

Published

Apple Foundation Models (on-device, iOS 26+) provider for the Expo AI Runtime.

Readme

@stewmore/expo-ai-apple-foundation-models

Apple Foundation Models (on-device, iOS 26+) provider for the Expo AI Runtime.

Install & use

import { ExpoAI } from '@stewmore/expo-ai-core';
import '@stewmore/expo-ai-apple-foundation-models'; // registers the iOS adapter (side-effect import)

const caps = await ExpoAI.getCapabilities();
if (caps.available && caps.provider === 'apple-foundation-models') {
  const result = await ExpoAI.generate({ prompt: 'Write a haiku about Swift.' });
  console.log(result.text); // privacy: on-device
}

Config plugin

The native module autolinks on its own, but add the config plugin so expo prebuild also sets the iOS deployment target the pod needs — no manual expo-build-properties editing:

{
  "expo": {
    "plugins": ["@stewmore/expo-ai-apple-foundation-models"]
  }
}

Override the floor (defaults to 15.1, the pod minimum) if needed:

{
  "expo": {
    "plugins": [["@stewmore/expo-ai-apple-foundation-models", { "iosDeploymentTarget": "16.4" }]]
  }
}

Requirements

  • iOS / iPadOS 26+ on an Apple Intelligence–capable device with Apple Intelligence enabled.
  • A development build (custom native code — not Expo Go): npx expo prebuild && npx expo run:ios.

On unsupported OS/devices the adapter reports available: false with a reason (unsupported_os_version, unsupported_device, apple_intelligence_disabled, model_initializing), so the runtime can fall back per the app's policy.

What it maps

| Runtime | Foundation Models | | -------------------- | ------------------------------------------------------------------------------------------------ | | generate | LanguageModelSession.respond(to:options:) | | stream | LanguageModelSession.streamResponse(...) (cumulative snapshots → token deltas) | | createSession | native stateful LanguageModelSession (generateInSession / resetSession / disposeSession) | | capability detection | SystemLanguageModel.availability | | errors | LanguageModelSession.GenerationErrorExpoAIError |

Structured output (generateObject), summarize/rewrite/proofread are provided by the core runtime over generate. Native guided generation via DynamicGenerationSchema is a planned enhancement (see ios/ source notes).

The FoundationModels API surface follows the WWDC25 docs; verify exact symbol names against your installed Xcode SDK if the native build flags a mismatch.