<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RelevanceKit",
  "identifier" : "/documentation/RelevanceKit/RelevantContext/location(category:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "RelevanceKit",
      "MapKit"
    ],
    "preciseIdentifier" : "s:12RelevanceKit15RelevantContextV01_ab4_MapB0E8location8categoryACSgSo25MKPointOfInterestCategorya_tFZ"
  },
  "title" : "location(category:)"
}
-->

# location(category:)

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

```
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,
or `nil` if the category is not supported.

## Discussion

To indicate relevance at points of interest of a specific category, import
<doc://com.apple.documentation/documentation/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
<doc://com.apple.documentation/documentation/WidgetKit/Accessing-Location-Information-in-Widgets>.

> Note: Smart Stacks are available in iOS, iPadOS, and watchOS. However, functionality provided by RelevanceKit API is only available
> in watchOS. Calling its API on other platforms doesn’t have any effect.
> For more information, refer to <doc://com.apple.documentation/documentation/WidgetKit/Widget-Suggestions-In-Smart-Stacks>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)