Preamble
I wrote a mobile application that should show upcoming events. The application downloads data from the server. Data is prepared in batches once every 24 hours and is ready for download at 4 a.m. This gives me a great opportunity to synchronize it overnight and immediately provide new data when the user opens the application.
Background fetch
This was my first approach for synchronizing data with the server. It is touted as a very powerful feature, but using it alone (outside the test environment) is not enough:
- It is not possible to force background captures at exact intervals.
I thought the background sampling rate could be customized
let timeIntervalEveryHour: NSTimeInterval = 3600
let sharedApp = UIApplication.sharedApplication()
sharedApp.setMinimumBackgroundFetchInterval(timeIntervalEveryHour)
, , , .
()
, , , , :
- , .
- . , , Apple, , , - , ..
, . , "alert" = ""; . ( )
- Silent Push , " " -
, , , , , . . , , .
.
VOIP. , . , .
-, ? , , .., ?