Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 [XCode] NSURLRequest timeoutInterval not as set?

views
     
bandit9956
post Nov 11 2015, 12:51 PM

Getting Started
**
Junior Member
65 posts

Joined: Nov 2008
Hi,

If it were for me, I won't use the native URL request in Objective C

Try looking for AFNetworking.

Almost ALL iOS apps runs on it. It handles your timeout session in a block, and it is asynchronous, hence, you can control the timeout block as you like. smile.gif

Furthermore, if you were to check for slow / no internet, you should not use timeout as a threshold to determine whether 3g/4g/Wifi is available. It is not recommended.

Edit :

You can refer to this.
http://stackoverflow.com/questions/8304560...th-afnetworking

It maybe due to your POST request, and it was only fixed iOS 6 and above.

Try setting the timeout period higher, maybe to 60~120 seconds, see will it run correctly or not.

This post has been edited by bandit9956: Nov 11 2015, 12:57 PM

 

Change to:
| Lo-Fi Version
0.0112sec    0.75    6 queries    GZIP Disabled
Time is now: 16th December 2025 - 11:14 AM