Our app gets rejected by Apple multiple times because of the use of location in UIBackgroundModes:
Our answer in the Resolution Center was this:Your app declares support for location in the UIBackgroundModes key in your Info.plist file but still 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. Specifically, we were unable to locate features within the app that needs to use location in the background.
So in summary, our app needs to detect an iBeacon in the background and for that needs the location background mode. But Apple keeps persisting that we don't need it.This app is monitoring UUID’s to detect iBeacons in the background. The proces is as following:
This all is happening in the background, without requiring the user to open the app. The "location" setting in the UIBackgroundModes key is needed to detect the iBeacon.
When the device is in range of an iBeacon, the app is activated in the background by a call on the delegate function ‘didEnterRegion’ from CLLocationManager.
The app starts ranging for iBeacons to detect the Major and Minor.
The app uses that information to know which desk this is and connects with the BLE Dongle in the desk.
Finally it sends the preferred height of the user to the BLE Dongle, which will result in the desk moving to that height.
When we remove the background mode and test the app in background, the process of detecting beacons is stopped.
In the info.plist it's like this:
Code Block <key>UIBackgroundModes</key> <array> <string>bluetooth-central</string> <string>location</string> </array>
The bluetooth-central background mode is needed to connect with a BLE device.
Is there something wrong with our setup, or do we need some different way of explaining this to Apple?