我正在尝试实施Google回调网址计划,除了将从Google地图应用调用我的应用的“源应用”按钮外,一切正常。
NSMutableString *googleMapURL = [NSMutableString stringWithString:@"comgooglemaps-x-callback://"];
[googleMapURL appendFormat:@"?saddr=%@",sourceAddress];
[googleMapURL appendFormat:@"&daddr=%@",destinationAddress];
[googleMapURL appendFormat:@"&x-success=myridepicker://?resume=true&x-source=AirApp"];
NSLog(@"Google Map URL %@",googleMapURL);
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:googleMapURL]];
来自日志的完整网址:comgooglemaps-x-callback://?saddr=C+Block%2C+Noida%2C+Uttar+Pradesh&daddr=Sector+4%2C+New+Delhi%2C+Delhi%2C+India&x-success=myridepicker://?resume=true&x-source=AirApp
答案 0 :(得分:0)
您的URLScheme必须是:myridepicker
不是:myridepicker://?resume
答案 1 :(得分:0)
只需在plist中添加myridepicker
。