My app got rejected by Apple three times, all with the same rejection letter, which is:
We found that your app uses a background mode but does not inc
This question is old and already answered but you dont need the UIBackgroundModes
key if you collect locations using the startMonitoringSignificantLocationChanges
API
startMonitoringSignificantLocationChanges don't require a background mode registration. Only continuous location changes do.
In locationManager:didUpdateToLocation:fromLocation: or in updateMyLocationToServer: You should check if application is in background state by eg.
[UIApplication sharedApplication].applicationState == UIApplicationStateBackground
And then if Your app is in background mode You should use eg.
backgroundTask = [[UIApplication sharedApplication]
beginBackgroundTaskWithExpirationHandler:
^{
[[UIApplication sharedApplication] endBackgroundTask:backgroundTask];
}];
/*Write Your internet request code here*/
if (bgTask != UIBackgroundTaskInvalid)
{
[[UIApplication sharedApplication] endBackgroundTask:backgroundTask];
bgTask = UIBackgroundTaskInvalid;
}
This way application should perform this task completely.