Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The key situation you should be concerned with, IMHO, is when the network, itself, is not available to the device. In that case, you'd generally use <a href="http://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.html" rel="nofollow">Reachability</a> to have a notification posted to your app when the network becomes available. No point in repeatedly retrying when (a) you know the network is unavailable; and (b) you easily can be notified when the network becomes available again.</p> <p>If you're concerned about server-specific issues, I would be careful about send a request in 5 seconds. Let's say your server is overwhelmed and cannot respond to all the client requests. Having large numbers of clients proceeding to retry every 5 seconds might not improve the situation. It sort of depends upon why your server is not responding. You just want to make sure that the attempts to connect again will never make the situation worse.</p> <p>(As an aside, the description for 403 says, "The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated.")</p> <p>If you're going to employ a retry process, I'd specify some reasonable maximum number of retries (which, judging by your revised answer, you are doing). And perhaps you'd want something that when the app returns to foreground, you reinitiate your "retry three times, once every 15 seconds" logic (or whatever you settle upon). The scenario I'm thinking about is "user started app, it failed after exceeding max retries, and hit the home button on their device, and a few minutes/hours later, they tap on the app again (which might still be running)."</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload