My iPhone application has been "lagging" or rather "frozen" when it got past the start up screen. I think this is due to the registration for remote push notifications is send as a synchronous request and therefore I would like to change this to asynchronous.
This is a problem since I am already sending one asynchronous request for retrieving some data and save it to the phone.
So, I would like to send both of these requests asynchronously and have them do two different things in - (void)connectionDidFinishLoading:(NSURLConnection *)connection
. Therefore I need to know which of the two connections that finished.
Is there any way to do this? Would there be any way to distinguish by the URL of the finished connection?
Actually, I thought it would be as easy as set a tag
and check this in - (void)connectionDidFinishLoading:(NSURLConnection *)connection
but this does not seem to be possible.
Does anyone know how I can do this?