Connection didfailwitherror method called when testing in device

681 views Asked by At

In my app I am sending my data into a database by calling a web service. I am able to send my data into the database when i tested my app in the simulator. When I deployed same code in my device(iPhone- connected to a wifi(working)), the app is not working. In the below code, Checkout status is a label I have kept for debugging. Failed to connect was the error it is showing as written in the code.

Thanks in advance.

    -(void) connection:(NSURLConnection *)connection  didFailWithError:(NSError *)error 
{
    [checkoutStatus setText:[NSString stringWithFormat:@"Failed to connect.. "]];
    [webData release];
    [connection release];

}
0

There are 0 answers