2010-11-30 5 views
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"]; 

助けてください。乾杯!

答えて

2

はい、これはまさに起こっていることです。それを見て、彼らはその上の文字列書式設定コードにエラーがあるのではなく、その投稿がサーバーに到達していることを確認したがっていましたか?

+0

Arggggh!どのように迷惑な! –

関連する問題