1

I am using Apple maps to show direction to a location from the users current location. The address details are updated in the addressDictionary as lat long are not present.

MKPlacemark *destination = [[MKPlacemark alloc] initWithCoordinate:endingCoord addressDictionary:addressDictionary];  
MKMapItem *destinationItem = [[MKMapItem alloc] initWithPlacemark:destination];  
NSMutableDictionary *launchOptions = [[NSMutableDictionary alloc] init];  
[launchOptions setObject:MKLaunchOptionsDirectionsModeDriving forKey:MKLaunchOptionsDirectionsModeKey];  
[destinationItem openInMapsWithLaunchOptions:launchOptions]; 

This works perfectly fine till iOS 12 for the same address. Now in iOS 13, it always says "Directions Not Available".

Has anyone else faced the situation and knows the solution?

4

0 回答 0