<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSUserActivity/mapItem",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSUserActivity(py)mapItem"
  },
  "title" : "mapItem"
}
-->

# mapItem

Attaches the specified map item to a user activity object.

```
var mapItem: MKMapItem! { get set }
```

## Discussion

Use this property to share a map item’s location information with other apps so that users can benefit from a more contextually integrated experience. For example, if a user views a location in an app that provides restaurant reviews, this property can make the same location available to the user when they switch to an app that helps them make travel plans.

Setting the [`mapItem`](/documentation/Foundation/NSUserActivity/mapItem) property also populates the user activity object’s [`contentAttributeSet`](/documentation/Foundation/NSUserActivity/contentAttributeSet) property. After attaching a map item to a user activity object, you can easily adopt app search by setting the object’s [`isEligibleForSearch`](/documentation/Foundation/NSUserActivity/isEligibleForSearch) property to <doc://com.apple.documentation/documentation/Swift/true>. To learn more about participating in app search, see [App Search Programming Guide](https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/index.html#//apple_ref/doc/uid/TP40016308).

---

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)