Rollup.shared.indexing.state, or follow it with Rollup.shared.indexing.states. Later versions can add states and fields, so switch with a default case.
SDK 0.3 adds
preparing and unfinished, and gives indexing, ready and paused a single value: IndexingProgress or IndexSummary. Write case .indexing(let progress) where 0.2 had case .indexing(let indexed, let total, let searchable). In 0.2, indexed and total counted the current run only; now they count the whole index.Cases
The selection was checked successfully, but no photos matched it. There is nothing to search yet. Change the window or media types, or wait for new photos.
A run has started but is not indexing photos yet: it is starting, loading models or reading the library. See IndexingProgress.
A run is indexing photos.
indexed of total covers the whole index, including earlier runs. See IndexingProgress.The index holds every photo its options take. See IndexSummary.
No run is under way, and the index still lacks photos.
reason says why. See IndexSummary.Indexing is paused by
indexing.pause() until indexing.resume(). See IndexSummary.Indexing is blocked, or failed before anything was indexed, with a
RollupError. With accessRevoked, your app’s access stopped and the index is locked. With appPendingApproval, your app is waiting for Rollup’s approval.Properties
true when search, query and profile have an index to read: the searchable of preparing, indexing, ready, unfinished and paused.IndexingProgress
A run under way, inpreparing and indexing.
Whether the run goes on off screen:
continuing, endedByIOS or processingTask. nil when it stops with the app.IndexSummary
The index while no run is under way, inready, unfinished and paused.
The library changed since the last update. With
updatesAutomatically, an update runs when your app is next on screen.Reasons
JSON
Each case encodes as one flat object:type, then the fields of its value. Fields without a value are left out, and dates are ISO 8601.