我正在显示带有来自开始和结束目的地的方向的苹果地图。我希望它在用户打开带有路线的地图时打开并启动siri。由于某种原因,它成功打开了网址但没有打开siri来引导用户
用于它的代码如下所示:
NSString* versionNum = [[UIDevice currentDevice] systemVersion];
NSString *nativeMapScheme = @"maps.apple.com";
if ([versionNum compare:@"6.0" options:NSNumericSearch] == NSOrderedAscending)
nativeMapScheme = @"maps.google.com";
NSString* url = [NSString stringWithFormat: @"http://%@/maps?daddr=%@&saddr=%f,%f",nativeMapScheme,[description stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],mylat, mylon];
NSLog(@"Location - %@",url);
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];