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.
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 The bundle ID must be the one you registered in the dashboard.
app.json or app.config.js, add the plugin with the text iOS shows when it asks for Photos access:app.json
3
Build for your iPhone
NSPhotoLibraryUsageDescription, from thephotosPermissionoption.- The background task identifiers
<bundle ID>.rollup.indexing.*and<bundle ID>.rollup.updateinBGTaskSchedulerPermittedIdentifiers, andprocessinginUIBackgroundModes. - 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.
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
useIndexingState keeps the indexing state current, and isSearchable tells you when search, query and profile have an index to read:
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 aRollupError. 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.
