Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Background sync in iOS7

We have to develop an app which will support data sync operations at some time interval, whether the app is in foreground or in background.

I want to know that in iOS7…

  • is it possible to sync data (i.e. call web services) while the app is in background?
  • can we access SQLite data base file/can we do DB operations while the app is in background?
  • can we run timers in background?
  • can we show alerts about some updates while the app is in background?

Thanks in advance.

like image 353
patel kavit Avatar asked Oct 20 '22 15:10

patel kavit


1 Answers

  1. Yes, it is.
  2. Yes, you can.
  3. Sometimes, but you shouldn't.
  4. Yes, you can.

Go and research iOS 7 background operations. Talk of using timers and background operations at some time interval indicate you're approaching the problem in a way that won't work. While the answer to most of your questions is yes, your approach is probably no...

Start with application:performFetchWithCompletionHandler:.

like image 59
Wain Avatar answered Oct 29 '22 23:10

Wain