Meet MapKit for SwiftUI Error

I keep receiving this error:

Value of type 'MKDirections.Response?' has no member 'route'

Here is my code:

Task { let directions = MKDirections(request: request) let response = try? await directions.calculate() route = response.route.first }

any pointers on how to fix?

Thanks!

You'll want to use response.routes.first

Yep, that did it. GHeez, couldn't see it.

thank you!

Meet MapKit for SwiftUI Error
 
 
Q