iosmapkitgoogle-places-apiapple-maps

Does Apple MapKit have a unique identifier like Google Places does?


I've looked through Apple's documentation and can't find if Apple Maps (i.e. MapKit) offers a unique ID similar to what Google offers with the Places SDK - https://developers.google.com/places/ios-sdk/place-id

I've reviewed all the MapKit documentation and can't find anything.

Why am I asking this? I'm building an app that will allow users to save/bookmark 'places'. I need a way of being able to retrieve that place's details using the unique ID so that I can retrieve its info again. At the moment it seems like my best option is to use the Google Places SDK as this will allow me to search and find a place, saving the place ID in my database and then use the same place ID to look it up again later.


Solution

  • You can initiate a Place Search in the Places SDK using a name, address, or phone number to retrieve the Place ID, which you can then use as planned. This allows you to store a name or address and use that for lookup. Your other option is to go native and use CLPlacemark, which can be initialized using a CLLocation and stored/retrieved. Here's a helpful article on native geocoding