Rollup
static let String
The SDK’s version, such as
"0.1.0".@MainActor static func
Registers the background processing task that keeps the index up to date (
<bundle ID>.rollup.update). Call it before your app finishes launching, as iOS requires. It does nothing if your Info.plist does not permit that identifier.@MainActor static func throws
Sets up the SDK with your app’s publishable key and what to index. Calling it again changes the options; the index follows them.Throws
simulatorUnsupported in the Simulator, notConfigured for a key that does not start with rk_, and missingRequirement naming each missing Info.plist entry. It cannot check for the App Attest capability: a missing capability shows when the device first registers, as appAttestFailed.The client for every other call.
static var JSONEncoder
Encodes SDK results with ISO 8601 dates and sorted keys.
static var JSONDecoder
Decodes SDK results with ISO 8601 dates.
RollupClient
Rollup.shared. Every method except requestPhotoAccess throws notConfigured before configure, and accessRevoked while your app’s access is stopped. search, query and profile throw photoAccessDenied while Photos access is denied or restricted.
async -> PhotoAccess
Shows iOS’s Photos prompt, once. If the person grants access, the first index starts at once and continues in the background. Returns the person’s answer, including
denied and restricted; it does not throw.async throws -> SearchResults
Searches the index on the iPhone: dates, places, media, and what photos show or say. Most relevant first. Throws
noIndex when nothing is indexed yet. See Search.async throws -> Answer
Answers a question about the person’s life from the index. The model runs on Rollup’s server; its tools run on the iPhone, and only their text results leave it. See Query.
async throws -> Profile
async throws
Deletes everything the SDK keeps: the index, downloaded models and place data, queued run reports, the device credential, and the device’s record on Rollup’s server. Indexing starts again from scratch when next started.
Indexing
Rollup.shared.indexing.
IndexingState
Where indexing is now. See IndexingState.
AsyncStream<IndexingState>
The current state, then every change after it.
func
Starts indexing now, or brings the index up to date, and lets it continue in the background with the system progress UI. Call it from a person’s action, such as a tap. A run that is already under way gains background continuation.
IndexOptions
What to index. Setting it changes the index in place on the next run, which starts shortly. See Index options.
PhotoAccess
limited, the SDK indexes only the photos the person selected.
