The problem, clearly displayed in your log, is that One, Two, Three, and Four are being performed on a background thread. This means, for example, that you are saying:
[self performSegueWithIdentifier:@"login_success_new" sender:self];
...on a background thread. That is so wrong. You must NEVER say anything to or about the interface on a background thread. You need to get your threading straightened out. (The fact that One, Two, Three, and Four do not happen in order is also a clue that you may have set this up incoherently.)
EDIT: In a comment, you say that you now used dispatch_async(dispatch_get_main_queue()...
, thus correctly moving the call to performSegueWithIdentifier:
onto the main thread. Excellent! Your logging should now show that all calls connected with the interface (including especially "Three" in prepareForSegue:
) are now on the main thread.
However, you still need to be careful. Basically everything in both completion:
handlers happens on a background thread! You are even calling [self sendGetRequest:...]
on a background thread! And you are apparently talking to instance variables of self
on this a background thread. All of that is dangerous. What I would do is step out to the main thread right at the start of each completion
handler, so that even if the completion handler is called on a background thread, everything I then do happens on the main thread.