我正在尝试使用以下方法从 Google 返回 JSON:
NSString *urlString = [NSString stringWithFormat:@"http://maps.google.com.br/maps/api/directions/json?origin=%@&destination=%@&sensor=false", pointOrigem, pointDestino];
NSURL *url = [NSURL URLWithString:urlString];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[NSURLConnection connectionWithRequest:request delegate:self];
NSLog(@"%@", urlString);
如您所见,我已经记录了 url 以确保一切正常。这里是:
有人知道我的代码有什么问题吗?谢谢你的帮助!