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, events or people 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, events or people 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, indexing sends no location. Search still reads dates and everything a photo shows or says, and places each photo in its country and the nearest city of 15,000 people or more (within 75 km) from geography on the device. Venue names, cuisines, venue categories and neighborhoods are not available.

Events

With events on, the SDK also looks up the event a visit was at: the concert, festival, game or race (a tennis tournament, a horse race, a marathon, a NASCAR race or a Formula 1 weekend) at a venue near the visit while the person was there. Search finds the visit’s photos by the event’s name, each result carries it in event, and query and profile can use it (“Which games did I go to this year?”). The SDK looks up only visits that look like an event: photos that look like a crowd, a stage or a stadium, or a stadium, arena or concert venue nearby. It keeps an event only when the photos support it, so a walk past an arena on a game night does not count.
For each such visit, the SDK sends Rollup’s server the names and addresses of the venues near it, the visit’s start and end times, and the 0.01-degree grid cell it is in (one of the cells the place data download already sends), never coordinates or photos. The server asks third-party event listing services and Rollup’s own calendars of tennis tournaments and races. It keeps no visit: no times, and nothing that says which device or person asked. To ask the listings less often, it keeps a venue’s name and city once it has been looked up, and the listings it received, for 30 days at most. Mention this in your privacy disclosures.

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 165 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.