In Xcode 7.0, Objective-C has generic arrays, so your placemarks
array is no longer [AnyObject]?
but is now [CLLocation]?
. You don't need to cast the array, you can just unwrap the optional. With the addition of guard statements, your completion block is now as simple as:
geocoder.reverseGeocodeLocation(location) { placemarks, error in guard let placemarks = placemarks else { print(error); return; } guard let placemark = placemarks.first else { return; } // ...}