I want to access data in an object MKMapItem. After searching for information, I ask the community. According to the Apple class reference, the following properties exist:
- Label
- isCurrentLocation
- name
- phone number
- URL
If I register MKMapItem, I get what appears in the JSON dictionary of dictionaries, such as:
- The address
- structured address
- Centre
- location
- etc.
Many elements contain the information I want, which are not standard properties MKMapItem. Is there a way to analyze and model these elements? I tried
NSDictionary *mapItemDictionary = (NSDictionary *)mapItem;
[mapItemDictionary valueForKey:@"key"];
leading to failure:
[<MKMapItem 0xb02d830> valueForUndefinedKey:]: This class is not the key for encoding for the key address.