location(_:)
Tells the system a widget is relevant at a specific location.
Declaration
static func location(_ exact: CLRegion) -> RelevantContextParameters
- exact:
A person’s location; for example, their favorite coffee shop.
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 a specific location, 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.