calculateDirectionsWithCompletionHandler not returning with error or response

206 Views Asked by At

I'm calling the calculateDirectionsWithCompletionHandler method from MKDirections, but the completion handler is never called. Not even with an error. And since the request is made in the main thread, the entire application gets stuck. I ensure that the directionRequest has source and destination and both locations are not nil. Someone have experienced the same?

[directions calculateDirectionsWithCompletionHandler:^(MKDirectionsResponse * _Nullable response, NSError * _Nullable error) {


    if (error) {

        NSLog(@"%@", error);

    }else{

        // Deal with the response

    }

}];
0

There are 0 best solutions below