Adhoc is a deployed application on the device, the application works fine with Wi-Fi, but does not work with a 3g connection. Any idea what I am missing?
Do not get much help from google.
Also, the installed application does not appear in the "Use mobile data for: list
The code:
//To handle time out issue with 3g
configuration.timeoutIntervalForResource = 60
// Mark using Alamofire to do the downloads
self.alamofireManager = Alamofire.Manager(configuration:configuration)
self.alamofireManager!.request(.GET, jsonUrl).responseJSON(){
(_, _, JSON, _) in
println("printing json :\(JSON)")
if JSON != nil {
let imageInfos = (JSON!.valueForKey("image") as [NSDictionary]).map {
ImageInfo(id: $0["id"] as String, url: $0["url"] as String)
}
self.tableData.addObjectsFromArray(imageInfos)
}
Error Log:
I get
(Error Domain = NSURLErrorDomain Code = -1004 )
no matter how much I increase timeoutInterval. I tried both with the resource and with the request
I forgot to mention that the server was a raspberry Pi, and I could not access the server outside the local network, which caused the problem. Thanks for the help. The timeout was very useful when processing server errors.