How to Avoid iOS App Rejections Due to “Background Services Not Used Properly”

Sponsored Links

Most of the apps are being rejected by the App Store with the saying “Background Services have not been used properly”. As a developer, it’s our responsibility to furnish the apps with the required services efficiently in an appropriate manner.

To access the Location services, we need CoreLocation Framework to be linked with our application.

Sponsored Links

How to Develop iOS Apps That Use Background Services Properly

Determining the need of Location Services in Application

For using Location Services properly in our app, we have to include UIRequiredDeviceCapabilities key in info.plist file. The reason for adding UIRequiredDeviceCapabilities key is to specify the requirements of our app to be installed in any iOS device. So that App Store will prevent users from downloading apps in the devices which are not having the listed requirements.

The features that UIRequiredDeviceCapabilities (array of strings) are

Sponsored Links

#1. Location Services: We can add this string for using Location Services generally.

#2. GPS: We can add this string when our application requires accuracy offered by GPS hardware.

Getting User’s Current Location

The CoreLocation Framework helps to locate the current Location of the device and use that information in our application.

Sponsored Links

The services that help to get the user’s current location are:

#1. The Standard Location Service.

#2. The Significant-Change Location Service.

Starting with Standard Location Service

Sponsored Links

This is a general service for getting location data and tracking location accurately. We can configure the desired accuracy of the location data in our application.

For using this service, we have to create an instance of the CLLocationManager class and configure its desiredAccuracy and distanceFilter properties. To begin receiving location notifications, assign a delegate to the object and call the startUpdatingLocationmethod.

If a location update has already been delivered, we can stop Location updates by calling  stopUpdatingLocation.

In Background:

Sponsored Links

If Location services in background is a must for our application and to maintain good battery life for user’s device, we have to set location manager’s pausesLocationUpdatesAutomatically to YES. Then CoreLocation pauses location updates when the user is not moving anywhere.

When the location manager pauses location updates, it notifies its delegate object by calling its locationManagerDidPauseLocationUpdates: method. When the location manager updates, it calls the delegate’s locationManagerDidResumeLocationUpdates: method. We can use these delegate methods to perform tasks or adjust the behavior of your app.

Starting Significant-Change Location Service

This service is a power-saving alternative service to the Standard Location Service. This service uses Cellular data or Wi-Fi to determine the user’s location. The significant-change location service can also wake up an iOS app that is currently suspended or not running in order to deliver new location data.

To use the significant-change location service, create an instance of the CLLocationManagerclass, assign a delegate to it, and call the startMonitoringSignificantLocationChangesmethod.

Apple Issues and Appropriate Solutions:

Issue 1: We found that your app uses a background mode but does not include functionality that requires that mode to run persistently. This behavior is not in compliance with the AppStoreReviewGuidelines.

We noticed your app declares support for location in the UIBackgroundModes key in your Info.plist but does not include features that require persistent location.

It would be appropriate to add features that require persistent use of real-time location updates while the app is in the background or remove the “location” setting from the UIBackgroundModes key. If your application does not require persistent, real-time location updates, we recommend using the significant-change location service or the region monitoring location service.

For more information on these options, please see the “Starting the Significant-Change Location Service” and “Monitoring Shape-Based Regions” sections in the LocationAwarenessProgrammingGuide.

Solution:

You can include the functionality and methods for the location services if your app needs Location services or remove the Location Updates from UIBackgroundMode key in plist, So that your app will be approved by App store.

Issue 2: we found that your app uses a background mode but does not include the following battery use disclaimer in your Application Description:

“Continued use of GPS running in the background can dramatically decrease battery life.”

Solution:  

If we want to use Standard Location Services continuously in foreground or background, we have to mention in the app description that “Continuous usage of GPS will makes the battery to dry”. So that your app will be approved by App store.

Madhuri R
Madhuri R is an iOS application developer @Contus, the leading mobile apps development service company. She is a passionate tech geek curious about learning and developing new app interfaces for iOS platforms.
- Advertisment -

Latest Articles

25 iPad and iPhone Apps Price Drop – 18 March 2019

What happens when you come to know that one of your favorite iPhone/iPad apps price has just dropped-and available at a huge discount? A...

22 Paid iPad and iPhone Apps Gone Free Today – 18 March 2019

iOS Games Gone Free TodayiOS Apps Gone Free TodayWhile there are tons of awesome apps available for free, a number of extraordinary ones come...

Best Gaming PCs in 2019: Unleash Your Gaming Skills with These Power Packed Machines

We already have a post for best gaming consoles, but many hardcore gamers prefer to showcase their talent on a traditional desktop machine. However,...

Most Anticipated Apple’s Original TV Shows and Series

When you think of Apple and streaming services, you can picture two original programs (Planet of the Apps and Carpool Karaoke: The Series) Apple...