Continue webservice call after transition from foreground to background in iOS objective C -


suppose call webservice when app in foreground. if user sends app background how make sure webservice call keeps executing in background.

this piece of code using in app.

login* login = [[login alloc]init]; [login initiatesigninprocess]; 

initiatesigninprocess has 4 web service calls. normal functions. using afnetworking.

if of services fail, call again delay in failure block of afnetworking code below:-

failure:^(afhttprequestoperation *operation, nserror *error)          { [self performselector:@selector(getuserid)  withobject:nil afterdelay:5]; } 

now want know if user sends app background, how code execute? call function in bakcground till succeeds?

best use background process fetch. here great tutorial solution [ http://code.tutsplus.com/tutorials/ios-7-sdk-working-with-background-fetch--mobile-20520


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -