Skip to main content
expo-rollup brings the Rollup SDK to Expo and React Native apps. It wraps the native iOS SDK: indexing and search run in Swift on the iPhone, and the module passes calls and results to JavaScript. Its config plugin sets up your iOS project for you.
Rollup runs on iPhone only, with iOS 26 or later. In the iOS Simulator, configure rejects with simulatorUnsupported. On Android and the web, every call rejects with unsupportedPlatform, so a cross-platform app still builds and runs there.

Before you start

  • An approved app in the developer dashboard, with your Apple Team ID, your app’s bundle ID and its publishable key (rk_live_...). The Quickstart explains how to get one.
  • A development build. Expo Go does not include this module.
  • A real iPhone with iOS 26 or later. Development builds on a device work: they attest in Apple’s development App Attest environment, which Rollup accepts.

Install

1

Add the package

2

Add the config plugin

In app.json or app.config.js, add the plugin with the text iOS shows when it asks for Photos access:
app.json
The bundle ID must be the one you registered in the dashboard.
3

Build for your iPhone

Or build with EAS Build.
The config plugin makes every change the Quickstart describes for a native app:
  • NSPhotoLibraryUsageDescription, from the photosPermission option.
  • The background task identifiers <bundle ID>.rollup.indexing.* and <bundle ID>.rollup.update in BGTaskSchedulerPermittedIdentifiers, and processing in UIBackgroundModes.
  • The App Attest entitlement.
  • An iOS deployment target of 26.0.
  • The Rollup pod in your Podfile, from Rollup’s podspec. Rollup is not on CocoaPods trunk.
The module also registers Rollup’s background task when the app launches, so you don’t need to change your app delegate.

Plugin options

Bare React Native

Set up Expo Modules first (npx install-expo-modules@latest), then install the package with npm install expo-rollup. Without a config plugin, make its changes yourself: the Info.plist entries and App Attest capability from the Quickstart, the iOS 26 deployment target, and this line in your Podfile’s app target, after use_expo_modules!:
Podfile

Use

In a component, useIndexingState keeps the indexing state current, and isSearchable tells you when search, query and profile have an index to read:
Then search the index on the iPhone, ask about the person’s life, or fill a profile:
Each call works as in the Swift SDK. See Search, Query, Profile and Index options.

Showing photos

Results identify photos by their PhotoKit local identifier: result.id in search results, answer.assetIdentifiers for an answer, and profile.evidence for each filled field. Show them with expo-media-library, or in React Native’s Image with a ph:// URI:

Errors

Calls reject with a RollupError. Its code is one of the Swift SDK’s error codes, or one of two that come from the module: unsupportedPlatform (not an iPhone) and invalidOptions (index options the SDK can’t read). Errors from Rollup’s server also carry serverCode, retryable and retryAfter.

API

Values have the same fields as the Swift types, with dates as ISO 8601 strings and enums as objects tagged by type (for example { type: 'ready', photos: 1200, updatedAt: '...' }). The package ships TypeScript types for all of them. queryUpdates, which streams an answer as it is written, is not in the module yet. Use query for the finished answer.

Versions

Privacy and App Review

search runs on the iPhone. query and profile send text the index derived from the person’s photos to Rollup’s server and its model provider: dates, places, labels and text read in photos. Before your app calls them, tell the person and get their permission. App Store Review Guideline 5.1.2(i) requires this for personal data shared with third-party AI. See Privacy.