我正在尝试在我的应用程序和互联网服务之间建立连接,并且我正在使用 asihttprequest 但我遇到了一个小问题。当我使用 WiFi 时,一切都很好,但是当我关闭它并使用 GPRS(EDGE) 或 3G 时,似乎没有任何效果。我应该改变什么。这是我的一些代码
[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];