Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16373] iOS7 : Implement missing backgroundRefreshStatus property

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.2.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterTiman Rebel
AssigneeUnknown
Created2014-02-03T09:57:13.000+0000
Updated2018-02-28T20:03:46.000+0000

Description

Since iOS7 it is possible to disable the background app refresh in Settings. In most cases it means that the app is not allowed to refresh its data in the background, but it also means that GPS apps (like a fitness tracker) cannot use GPS in the background. Background App Refresh has been implemented in Appcelerator Titanium, but this property is not. The following code contains the check:
if ([[UIApplication sharedApplication] backgroundRefreshStatus] == UIBackgroundRefreshStatusAvailable) {

    NSLog(@"Background updates are available for the app.");
}else if([[UIApplication sharedApplication] backgroundRefreshStatus] == UIBackgroundRefreshStatusDenied)
{
    NSLog(@"The user explicitly disabled background behavior for this app or for the whole system.");
}else if([[UIApplication sharedApplication] backgroundRefreshStatus] == UIBackgroundRefreshStatusRestricted)
{
    NSLog(@"Background updates are unavailable and the user cannot enable them again. For example, this status can occur when parental controls are in effect for the current user.");
}

Comments

  1. Ritu Agrawal 2014-02-04

    Moving this improvement request to engineering for further evaluation and prioritization.

JSON Source