0

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];

}
  • What kind of error does it give to you? – krafter Mar 17 '14 at 14:14
  • I have used a label(checkoutstatus) to find out where the app is getting crashed. I have found that the above mentioned method was called and the app stopped functioning from that point.. There wasnt any error shown But the app is not functioning further. – rdraviteja Mar 17 '14 at 14:19
  • Can you try browsing some url with the device's safari browser? Does that work? – Anindya Sengupta Mar 17 '14 at 14:19
  • Also log the NSError description and let us know. – Anindya Sengupta Mar 17 '14 at 14:21
  • There is an error parameter in that method "didFailWithError:(NSError *)error". Print it out in NSLog, it will tell the reason it failed. – krafter Mar 17 '14 at 14:21
  • ya., the device got connected to a wifi and I was able to browse many sites. Thats where even I am stuck up. It got connected to network but the failwitherror was called. – rdraviteja Mar 17 '14 at 14:21
  • "The request timed out" is the error it is showing. – rdraviteja Mar 17 '14 at 14:39

0 Answers0