Ios 创建url的NSString时出错

Ios 创建url的NSString时出错,ios,gps,wcf-rest,Ios,Gps,Wcf Rest,我想用restful服务从iphone/ipad发送我的gps数据,但我收到了一个错误 'NSInvalidArgumentException原因:无法识别的选择器已发送到 阶级的 我在以下代码中遇到错误 [NSString stringwithFormat:@"http://192.168.0.105/TestServices/Service2.svc/gpsdata?latitude=%f&longitude=%f",location.coordinate.latitude,loc

我想用restful服务从iphone/ipad发送我的gps数据,但我收到了一个错误

'NSInvalidArgumentException原因:无法识别的选择器已发送到 阶级的

我在以下代码中遇到错误

 [NSString stringwithFormat:@"http://192.168.0.105/TestServices/Service2.svc/gpsdata?latitude=%f&longitude=%f",location.coordinate.latitude,location.coordinate.longitude];

大写不正确,应为stringWithFormat

谢谢,真的很遗憾,我没能弄清楚我自己。这是Objective-C的一个缺点,当类似的事情发生时,你不会得到编译时错误@克拉福:不过你会收到编译时警告。