Getting the location of a PHAsset in Swift
It turns out that the answer is really simple. The problem is that the Swift file don't know what a CLLocation
is, and thus refuses to import that function. Importing CoreLocation
solves the issue.
import CoreLocation
LocationGetter.locationForAsset(ass)
EDIT: Apple has since included .location
as a getter on the PHAsset
. Getting the location is now as easy as asset.location
.