iOS/RestKit - request timed out

114 Views Asked by At

My iOS app use RestKit framework for implementing RESTful web services client.

Sometimes, I have a problem when I call my server from my application. The request is not sent and it fails at the end of the expiration with this error:

Error Domain=NSURLErrorDomain Code=-1001 "The request timed out."

At the first openning, it is impossible to reproduce this.

The problem occurs when the application is put into the background and it restarts 10 minutes later or more (it does not produce every time). At this point, there is no server side call .

Then, the only way to solve this problem is to force-quit the application.

We checked there is no error of url, of header, etc ...

HELP ME :'(

1

There are 1 best solutions below

0
Ved Rauniyar On

Try to set time interval like

[manager.requestSerializer setTimeoutInterval:yourTimeInterval];