[TIMOB-16373] iOS7 : Implement missing backgroundRefreshStatus property
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 3.2.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Timan Rebel |
Assignee | Unknown |
Created | 2014-02-03T09:57:13.000+0000 |
Updated | 2018-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.");
}
Moving this improvement request to engineering for further evaluation and prioritization.