Skip to main content
Pass IndexOptions to configure, or change them later through Rollup.shared.indexing.options. Every option has a default, so you only set what you want to change.

Options

Hidden photos are never indexed. With limited Photos access, the SDK indexes only the photos the person selected.

Time window

The window decides which capture dates the index holds. Spans can be days, weeks, months or years: .days(30), .weeks(8), .months(3), .years(1).
.growing(from: .months(3)) reaches back three months from the day the index was first built, and keeps adding new photos from then on. Nothing ages out, so the index grows with the library.

Changing options

A change applies to the existing index in place. The SDK does not rebuild the index, except when you turn places on or off.
  • Widening the window or adding a media type indexes the photos that are now missing.
  • Narrowing the window, removing a media type, a sliding window passing a photo, or reaching maxPhotos removes the photos that fall outside.
  • Turning focus to .food removes indexed photos that are not food. Turning it back to .everything indexes the photos it left out.
  • Turning places on or off rebuilds the index.
The change takes effect on the next indexing run, which starts shortly.
Removing photos needs full Photos access. With limited access, the SDK adds photos but does not remove them when you narrow the selection.

Places

With places on, the SDK resolves where photos were taken: the venue of each visit (a restaurant, a museum, a stadium), its cuisine for food visits, and the neighborhood and city. To do this it downloads place data from Rollup’s server for the areas the photos fall in.
To download place data, the SDK sends Rollup’s server the grid cells, 0.01 degrees on a side (about 1 km), that the person’s photos were taken in. The server can see which areas those are. Mention this in your privacy disclosures, or turn places off.
Without places, search still reads dates, cities and countries from an offline geography on the device, and everything a photo shows or says. Venue names, cuisines and venue categories are not available.

Food focus

focus = .food indexes only food photos, as Apple’s on-device food detection finds them. Screenshots are not indexed in this mode. On one library this was about one photo in ten, so indexing is much faster, but search, query and profile only know about food.

Cellular data

With allowsCellular set to false, every download waits for Wi-Fi, including the about 225 MB of models on first run. iCloud Photos follows the person’s own Photos settings when the SDK needs a photo that is not on the iPhone.