Contents

location(category:)

Tells the system a widget is relevant close to points of interest of a specific category.

Declaration

static func location(category: MKPointOfInterestCategory) -> RelevantContext?

Parameters

  • category:

    The points-of-interest category; for example, restaurants, parks, or stores.

Return Value

A contextual clue that the system uses to determine the relevance of a widget in the Smart Stack on Apple Watch.

Discussion

To indicate relevance at points of interest of a specific category, import MapKit and request a person’s permission to access their location with the When in Use or Always access level. For more information on creating a widget that can access location information, refer to Accessing location information in widgets.

See Also

Location clues