Google地图回调中没有源应用按钮

时间:2015-09-16 10:53:46

标签: ios objective-c google-maps

我正在尝试实施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

my_url_scheme_in_plist

no_app_name_button_here

no_app_name_here_also

2 个答案:

答案 0 :(得分:0)

您的URLScheme必须是:myridepicker

不是:myridepicker://?resume

答案 1 :(得分:0)

只需在plist中添加myridepicker