views:

119

answers:

1

I am trying to to establish a connection between my app and an internet service and I am using asihttprequest but I'm having a small problem. Everything works great when I am on WiFi but when I turn it off and use GPRS(EDGE) or 3G nothing seems to work. Should I change something. Here is some of my code

[self setRequest:[ASIFormDataRequest requestWithURL:[NSURL URLWithString:@"example.url.php"]]];

[request setPostValue:textString forKey:@"mytext"];
[request setData:imageData withFileName:theFinal andContentType:@"image/png" forKey:@"userfile"];
[request setPostValue:textString2 forKey:@"description"];
[request setPostValue:latitude forKey:@"latitude"];
[request setPostValue:longitude forKey:@"longitude"];
[request setPostValue:finalIdString forKey:@"city_id"];

[request setTimeOutSeconds:60];
[request setUploadProgressDelegate:progressIndicator];
[request setDelegate:self];
[request setDidFailSelector:@selector(uploadFailed:)];
[request setDidFinishSelector:@selector(uploadFinished:)];
[request startAsynchronous];
A: 

found it i had to use

    [ASIHTTPRequest setShouldThrottleBandwidthForWWAN];
alecnash