1
私たちがもういなくなった請負業者によって作成されたiPhoneアプリケーションをデバッグしようとしています。私の背景はC#であり、Objective Cにはまったく精通していません。ここの誰かが私のためのコードを解釈できるかどうか疑問に思っていました。目的C - リクエストオブジェクト内の変数を設定する
少しの背景を与えるために、アプリケーションは要求オブジェクトを通じて.NETサービスに緯度/経度座標を提供しています。
(void)ShowNearestPOI:(CLLocationCoordinate2D)coordinate {
ASIFormDataRequest *theRequest = [ASIFormDataRequest requestWithURL:
[self URLBuilderFunctionWithEndpointName:kServiceIdGetNearestPOI]
];
/*
NSString *tmpGeoLatString = [[NSString stringWithFormat:@"%2.6f", coordinate.latitude] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *tmpGeoLongString = [[NSString stringWithFormat:@"%2.6f", coordinate.longitude] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[theRequest setPostValue:tmpGeoLatString forKey:@"latitude"];
[theRequest setPostValue:tmpGeoLongString forKey:@"longitude"];
*/
[theRequest setPostValue:@"1" forKey:@"latitude"];
[theRequest setPostValue:@"1" forKey:@"longitude"];
[theRequest setPostValue:kINGMethodNameGetNearestPOI forKey:@"method"];
[theRequest addRequestHeader:@"User-Agent" value:kCustomUserAgent];
[theRequest setDelegate:self];
[theRequest startAsynchronous];
request_state = 1; // Loading please wait
}
私が知りたいのは、契約者が緯度と経度をそれぞれ1と1でハードコードしているかどうかです。私がこれが起こっていると信じている2つの行は以下の通りです:
[theRequest setPostValue:@"1" forKey:@"latitude"];
[theRequest setPostValue:@"1" forKey:@"longitude"];
助けてください。乾杯!
Arggggh!どのように迷惑な! –