Xcode says that PHAsset doesn't have the 'location' member.
What's the remedy for Swift?
Xcode says that PHAsset doesn't have the 'location' member.
What's the remedy for Swift?
Short answer: you might have forgotten to import CoreLocation;
import Photos
import CoreLocation
let asset: AnyObject? = nil
if let asset = asset as? PHAsset {
let location = asset.location
}
When I remove the CoreLocation import, I can replicate your error.