In my current iOS app, I need to perform several network operation when the app becomes active (I'd rather get everything at once than to query things when user click on dedicated tab). I'm using a UIViewController that should be displayed when the app goes to the foreground and handle all network stuff in it.
Is that the recommended way to do it ?
The requests I need to issue are something like:
request1
if result1
request2
request3
else if result2
request4
request3
In order to avoid spaghetti code, is there a lib to use that enable chained requests like those ones? I'm using ASIHttpRequest and I did not find any nice way to perform that (even with queue).