iOS Swift. How to get a GPS metadata from just a UIImage (NSURL)?
问题 Have a reference to an image only having its NSURL. How to get a GPS metadata from it? Of course, I can load a UIImage from NSURL, but then what? Majority of answers I've found here is regarding UIImagePicker, and using ALAssets then, but I have no such option. 回答1: Answering my own question. The memory-effective and fast way to get a GPS metadata is let options = [kCGImageSourceShouldCache as String: kCFBooleanFalse] if let data = NSData(contentsOfURL: url), imgSrc =