IndexOptions() and set what you want to change. Changing options later changes the index in place: a wider window or a new media type indexes what is missing, a narrower one removes what falls outside. See Index options.
Properties
Window
default:".growing(from: .months(3))"
Which capture dates the index holds.
[MediaType]
default:"[.photos, .screenshots, .videos]"
Which kinds of captures to index.
Focus
default:".everything"
.food indexes only photos of food.Bool
default:"true"
Resolve venues, cuisines and neighborhoods. Sends Rollup’s server the 0.01 degree cells photos were taken in. Turning it on or off rebuilds the index.
Bool
default:"true"
Read screenshot entities with Apple’s on-device model, where Apple Intelligence is available.
Bool
default:"true"
Allow every download over cellular data, the first-run models included.
Bool
default:"true"
Add new photos on library changes while your app runs, and in background processing runs.
Int?
default:"nil"
The most photos the index holds. The oldest are removed beyond it.
BackgroundProgress
default:"BackgroundProgress()"
The title and subtitle of the system progress UI while indexing continues in the background.
Window
case
The first index reaches back
from the day it is first built, and new photos keep being added. Nothing ages out.case
Only the most recent span. Older photos are removed as time passes.
{"type":"growing","span":{"unit":"months","value":3}}.
Span
.days(_:), .weeks(_:), .months(_:) or .years(_:), or Span(_ value: Int, _ unit: Unit).
Unit
.days, .weeks, .months or .years.Int
How many units.
func -> Date
The first day of the span that ends on a given day, at its start of day, in a calendar (
.current by default).MediaType
Focus
BackgroundProgress
nil.
