I have used NSURLConnection (asynchronous) in my app which is working fine on wifi (iOS5 & iOS6). But its creating an issue with 3G. When I run my app 3G connection then I dont get any data in my didReceiveData method.
I have putted logs in my delegate methods, but while using 3G, The request is getting timed out. What can be the issue.
EDIT: On server side -> It shows that my request has been sent to server & server has also sent the response to the client.
EDIT 2:
The code which I have written is as follows.
NSURL *url = [NSURL URLWithString:@"someURL"];
NSMutableURLRequest *req = [[NSMutableURLRequest alloc] initWithURL:url
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:40.0];
//[req setHTTPShouldUsePipelining:YES];
[req setValue:@"x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[req setValue:@"someValue" forHTTPHeaderField:@"Accept"];
[req setValue:@"myCrdentails" forHTTPHeaderField:@"Authorization"];
[req setHTTPMethod:@"GET"];
[[NSURLConnection alloc] initWithRequest:req delegate:self startImmediately:YES];
The response headers are as below
< HTTP/1.1 200 OK
< X-Powered-By: Express
< Access-Control-Allow-Origin: *
< Content-Type: text/event-stream; charset=utf-8
< Connection: keep-alive
< Transfer-Encoding: chunked