iOS App Store rejections with the "location" background mode

For iOS standalone apps, both the Background Location and Geofencing APIs require that the “location” background mode is specified in the Info.plist file.

During the App Store review process, applications with this setting must demonstrate features that require persistent location. If the App Store reviewers believe the application fails to demonstrate this, they may reject the binary with the following message:

Guideline 2.5.4 - Performance - Software Requirements

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. Apps that declare support for location in the UIBackgroundModes key in your Info.plist file must have features that require persistent location.

Next Steps

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

If your app does not require persistent real-time location updates, please remove the “location” setting from the UIBackgroundModes key. You may wish to use the significant-change location service or the region monitoring location service if persistent real-time location updates are not required for your app features.

Resources

For more information, please review the Starting the Significant-Change Location Service and Monitoring Geographical Regions.

This is fair, but the suggestion that “Monitoring Geographical Regions” is an alternative that doesn’t require the location setting in UIBackgroundModes seems at odds with what’s currently possible in Expo.

Couple of questions:

  1. Has anyone dealt with similar problems releasing an application that makes use of the Geofencing or Background Location APIs?

  2. Does it seem reasonable to allow the Geofencing API to be used with an option to disable the allowsBackgroundLocationUpdates in iOS? Seems like this would allow applications to monitor regions as an alternative to background location updates without necessitating the location background mode, as the App Store reviewers suggest.

Not sure about how difficult this would be, but wanted to see if anyone had any experience or thoughts!

1 Like

Hey @drtangible,

For my own clarification, does your app intend and make use of background location? If so, how? Curious why the reviewer wouldn’t be able to identify its usage.

Cheers,
Adam

1 Like

Hey, Adam!

Right now, our application allows users to join “sites”. We register geofences around those sites’ addresses. When a user enters / leaves those sites, we persist it on the backend, and give the user a visual record of the sites they entered and left each day on a timeline.

You may wish to use the significant-change location service or the region monitoring location service if persistent real-time location updates are not required for your app features.

This suggestion from the reviewer offers region monitoring as an alternative to persistent real-time location updates, one which doesn’t require location to be in UIBackgroundModes. (At least that’s how I’m interpreting it).

However, it appears that the Geofencing API in Expo still requires this key to be present, which triggers this piece of scrutiny during the review process.

For applications that wish to use region monitoring, but don’t need persistent use of real-time location updates, I’m wondering if it’s a worthwhile exploration to see if Expo can allow use of the Gefencing API without requiring the “location” UIBackgroundModes setting. If it’s possible, it seems like some applications may have an easier App Store review process.

Realized I forgot to mention you on my response, @adamjnav – apologies!

No worries, @drtangible. I believe we should be able to remove the necessity of having UIBackgroundModes enabled to use the Geofencing API. Created an issue for it Determine if we can skip background mode check when using Geofencing · Issue #5054 · expo/expo · GitHub but the code owner is currently on vacation so it may be a little bit before we could get a change pushed out.

Cheers!

Thanks, @adamjnav!

I just took a look at their other suggestion, which also might be worthwhile to look into if the investigations overlap:

review the Starting the Significant-Change Location Service

It sounds like this service also can be used to receive location updates without requiring the “location” background mode setting.

If you leave the significant-change location service running and your iOS app is subsequently suspended or terminated, the service automatically wakes up your app when new location data arrives. At wake-up time, the app is put into the background and you are given a small amount of time (around 10 seconds) to manually restart location services and process the location data.

Supporting this via the Location API may let Expo apps that wish to use background location but are okay with only significant changes get through review more quickly and easily.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.