The first index
When the person grants Photos access throughrequestPhotoAccess, the first index starts at once. Because the grant is the person’s own action, the SDK asks iOS to let the run continue in the background (a continued processing task). If the person leaves your app, iOS keeps the run going and shows its progress in a system UI, which uses the title you set in backgroundProgress.
If Photos access was granted at an earlier launch, and the index is missing or unfinished, the SDK indexes while your app is on screen.
You can also start or continue indexing from a button with indexing.start(). Call it from a tap: iOS only accepts continued processing that a person started.
Keeping the index up to date
WithupdatesAutomatically on, the SDK adds new photos:
- While your app is on screen, shortly after the library changes, when the network comes back, when the window moves to a new day, or when you change options.
- In the background, with a background processing task (
<bundle ID>.rollup.update). It also finishes an index that was not finished. It has no charging or network requirement; iOS chooses when it runs, usually when the iPhone is idle.
What iOS controls
- The person can stop continued processing from the system UI.
- Slow progress can make iOS ask the person whether to continue, and iOS can end the task if they do not answer or if the system is under load.
- Background work is slower. iOS runs indexing several times slower off screen than on screen.
- Background processing tasks run when iOS decides, which may be hours later or overnight.
Showing progress
Show the person what is happening withindexing.states. Search works as soon as the first slice is finished, so you can show results before indexing is done.

