How to deal with background modes in apple review

2019-08-27 05:48发布

问题:

I have upload my app to itunes yesterday and i receive a mail from the apple that is:

From Apple 2. 5 Performance: Software Requirements Guideline 2.5.4 - Performance - Software Requirements

We noticed that your app declares support for location in the UIBackgroundModes key in your Info.plist file but does not have any features that require persistent location. Specifically, your app uses location background mode for the sole purpose of tracking employees, which is not appropriate on the App Store.

Next Steps

To resolve this issue, please revise your app to include additional features for your users that require the persistent use of real-time location updates while the app is in the background.

If tracking your employees' locations is your only intended use of background location, it would be more appropriate to distribute and sell your app as a custom B2B app through the Volume Purchase Program. Additional information about the Volume Purchase Program and the Custom B2B Store is also available in iTunes Connect Developer Help.

Request a phone call from App Review

At your request, we can arrange for an Apple Representative to call you within the next three business days to discuss your App Review issue.

To request a call and ensure we have accurate contact information, reply directly to this message with a contact name and direct phone number to reach you.

But fetching location in background is compulsory in my app.now what should i do whether reply them in notes or anything else??

回答1:

Apple is very much strict with its background mode usage policies. If your app happened to use any of the background modes available, you better be sure that app adds the value to the user by opting the background mode.

1. App using Location Changes to do some background stuff (adding no direct value to user)

If your app uses user location changes just to do some background task (like uploading data to server or trying to keep ur app in sync with the server stuff like that), you must ensure you opt for SignificantLocationChanges only.

Make sure your location manager is observing significant location changes by using

[locationManager startMonitoringSignificantLocationChanges];

rather than using [locationManager startUpdatingLocation];

Using startUpdatingLocation will cause your app continuously monitor user location changes and will result in battery drain out. Which anyway is not appreciated by apple as your app is not using the location data directly.

2.App using Location changes and adding value to user (Like map app)

If your app on the other hand needs to monitor user location constantly and your app uses user location to actually add value to user like tracking user and showing it in map or something like that, you can use [locationManager startUpdatingLocation];

But because startUpdatingLocation makes your app monitor location changes constantly, make sure you set distanceFilter and desiredAccuracy properly and does not exploit the location background mode unnecessarily.

Finally:

  1. Make sure you add Privacy - Location Always Usage Description key to your info.plist and provide a detailed text explaining user why is your app uses his location info.

  2. Go back to itunesConnect account, write a detailed explanation as to why is your app using location background mode and how it adds value to user and provide the steps to see how it reflects in app.

Hope it helps.