I start with the Media Library Framework on OS X, especially regarding access to the user's user library. After a lot of wrangling, I managed to access each photo as an MLMediaObject, but now I got to the checkpoint:
How can I access the location of a GPS photograph from an MLMediaObject?
This information is easy to get from the old ALAssetsLibrary system or from Framework Photos on iOS using the CLLocation property associated with the media object, but I cannot figure it out using the Media Library Framework. The documentation lists them as the only properties of the MLMediaObject object:
attributes mediaType contentType name URL originalURL fileSize modificationDate thumbnailURL artworkImage
At first, I thought attributes looked promising, but as far as I can tell, there are very few options for this property, and none of them are related to location.
Then I thought that if I have a file URL, I should get the GPS information directly from the file, but that turned out to be much more complicated than I expected.
Is there an installed tool to get CLLocation or another form of GPS data from a photograph using MLMediaObject? Or, if not, can anyone think of a more workaround way to access this information, starting with MLMediaObject?
source share