Instance Property

mapItem

Attaches the specified map item to a user activity object.

Declaration

@property(nonatomic, strong) MKMapItem *mapItem;

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 property also populates the user activity object’s contentAttributeSet property. After attaching a map item to a user activity object, you can easily adopt app search by setting the object’s eligibleForSearch property to YES. To learn more about participating in app search, see App Search Programming Guide.