synchronization - Auto-update iPhone content -


i developing enterprise app has lot of dynamic content. there way have app auto update content(new stories, download new videos, etc) @ 3am every sunday.

is possible?

while it’s not possible when app isn’t running, can @ launch or while running (if it’s going running @ 3 am). here’s i’d do:

  • store nsdate using nsuserdefaults last time updated.
  • at launch, if 3 period has passed since date, initiate sync.
  • also @ launch, start nstimer long interval—5 minutes or so. @ each firing, check if 3 period has passed , if has, initiate sync. roll last bullet’s code nstimer’s firing method , run once @ launch. sure update nsdate object each time.
  • in application delegate, in methods called returning background, check time , sync if necessary—or start nstimer , have fire first.

that should cover of scenarios need update app.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -