iOS - Background Transfer Service for Auto Update data at fixed intervel

319 Views Asked by At

I am developing an app of feeds, that fetches feed from server and display to users for read. It working fine when app starts but i want to load data in background when is suspended or terminate(in both case). As we can create IntentService in android and with a AlarmManager we can start that service after a every fixed hours (for ex. 3 hours), so whenever user comes to online he will be able to see latest data without waiting fetch for new feeds.

I have read Background Transfer Service & NSURLSession with silent remote notification but i could not understand how this will help me to achieve my objective.

When getting a remote notification how can i resume a NSURLSessionDataTask form AppDelegate.m file because we can't use delegate there.

Please help me to sort out this issue. Googling from last 2 days but didn't get success to achieve this.

1

There are 1 best solutions below

0
On

You need to use Background Fetch instead of Background Transfer. Main purpose of Background Transfer is uploading or downloading files while when app in background state.