ios - Should I call setMinimumBackgroundFetchInterval every time the app restarts? -
i developed app uses background fetch. set minimum interval between updates minimum:
[[uiapplication sharedapplication] setminimumbackgroundfetchinterval:uiapplicationbackgroundfetchintervalminimum]; i thought value saved system, don't have set again when/if app restarts. however, i've noticed last background fetch on 1 of devices 2 weeks ago. know, interval between updates can vary, don't think 2 weeks normal. considering fact worked several months, calling background update every 20-30 minutes.
unfortunately, couldn't find way minimumbackgroundfetchinterval check theory (does know how way?). checked application.backgroundrefreshstatus, , equal uibackgroundrefreshstatusavailable, think (i'm not sure) means user allows app use background updates.
well, turned out no, don't need call setminimumbackgroundfetchinterval every time app restarts.
i had experiment: set uiapplicationbackgroundfetchintervalminimum (turned background fetch on), shut app down manually (via task manager) , restarted it, didn't call setminimumbackgroundfetchinterval. app continued perform background fetches used to.
i hope, information helpful someone, since not explicitly stated in documentation (at least, didn't see it). me, have find possible reason why app didn't work 2 weeks.
Comments
Post a Comment