Skip to main content

Get access

1

Sign up for a developer account

2

Create your app

Create your app in the dashboard to get its publishable key (rk_live_...). It works right away. The free plan has one app and 5 devices: to add another app, remove the first or upgrade in the dashboard for up to 3 apps and 10,000 devices.

Set up with a coding agent

You can have your coding agent set Rollup up instead of following the rest of this guide by hand.

With the Rollup MCP server

Connect the MCP server and your agent finds your key, follows the setup and checks that your iPhone registered.
Then ask it:

Add Rollup with the MCP server.

Open in Cursor

With a prompt

Give your coding agent this prompt. Replace rk_live_... with your key.

Add Rollup to an iOS app.

Open in Cursor

Add the SDK

In Xcode, choose File, then Add Package Dependencies, and enter the package URL. Add the Rollup library to your app target.
Or add it to Package.swift:
Package.swift
The framework is dynamic, signed by Rollup, and includes its own privacy manifest. Xcode embeds it in your app. Rollup’s enums, such as IndexingState and RollupError.Code, can gain cases in later versions. When you switch over one, include a default or @unknown default case.

Configure your app target

Add these entries to your Info.plist, and add the App Attest capability to your target.
Info.plist
configure throws an error naming any missing entry. Without App Attest, the first call to Rollup’s server throws appAttestFailed. New Xcode projects have no Info.plist file. Add the entries in your target’s Info tab, or create an Info.plist outside your app’s source folder and set Info.plist File (INFOPLIST_FILE) in Build Settings to its path. A file inside a synchronized source folder is also copied as a resource, and the build fails.

Configure the SDK

Register the background tasks and configure the SDK when your app starts. registerBackgroundTasks must run before your app finishes launching. If your app supports iOS before 26, put both inside if #available(iOS 26, *) (see Requirements).
MyApp.swift
If your app already has Photos access, configure starts indexing and downloading models right away. To index only for people who turn the feature on, call configure once they do, and at every launch after that. By default the SDK indexes the last three months of photos, screenshots and videos, and keeps adding new ones. To change what it indexes, pass IndexOptions. See Index options.

Ask for Photos access

Call requestPhotoAccess from a screen where the person has just chosen to turn the feature on. iOS shows its Photos prompt once.
When the person grants access, the first index starts at once. It downloads about 165 MB of models on first run, then indexes the newest photos first. If the person leaves your app, indexing continues in the background, and iOS shows its progress. See Background indexing. With limited Photos access, the SDK indexes only the photos the person selected.

Watch indexing

indexing.states reports the current state and every change after it.
Search, query and profile work as soon as state.isSearchable is true: the index answers from the photos it holds so far, newest first, while older ones fill in.

Search, ask and fill a profile

search runs on the iPhone. query and profile need a network connection, and each takes a few seconds to about 20 seconds.
Before your app calls query or profile, it must tell the person that results of their photo index are sent to Rollup and its model provider, and get their permission. See Privacy and App Review.

Next steps

Index options

Choose the time window, media and places.

Profile schemas

What a schema can ask for and what comes back.

Keys and revocation

Rotate keys and understand what happens when access stops.

Troubleshooting

Common errors and what they mean.