Cordova-plugin-background-geolocation: App store rejected because not providing a reason clarifies the purpose in the location modal alert

Created on 1 Jun 2016  路  17Comments  路  Source: mauron85/cordova-plugin-background-geolocation

Apple store reject my submission because not providing a reason that clarifies the purpose of background location service in the location modal alert as required in the iOS Human Interface Guidelines. Did anyone experience the samething? if so, how did you guy get around this?

Basically, they don't like the standard message in the alert(see below image). they want me to have a custom message saying the purpose of this background location. (Which i think is non-sense since I already explained it in the app description. Hate this bad apple. ) Is there a way to have a custom message for this alert in the backgroundGeoLocation.configure? because I can't seem to find a location where I can set a custom message for this alert. I am using phonegap build. Please share your experience If anyone have a solution or experience on how to deal with this issue. Many thanks

custom msg

Here's what they mention in the email.

Your app uses background location services but does not clarify the purpose of its use in the location modal alert as required in the iOS Human Interface Guidelines.

Please reconfigure the UIAlertControllerStyleAlert in your code and specify the intended purpose of using background location in its message field.

For additional information and instructions on configuring and presenting an alert, see the Accessing User Data section of the iOS Human Interface Guidelines and the UIKit Framework Reference.

question

Most helpful comment

Hi, from my own experience, app description is what really matters. Describe as much as possible why are you using bg tracking. And custom message can be changed in plugin.xml.

<platform name="ios">
   <!-- required background modes:  App registers for location updates -->
   <config-file target="*-Info.plist" parent="NSLocationAlwaysUsageDescription">
       <string>This app requires background location tracking</string>
   </config-file>
...
</platform>

Steps needed:

  1. git clone https://github.com/mauron85/cordova-plugin-background-geolocation.git
  2. modify plugin.xml message as shown above
  3. in your project remove plugin and add modified plugin
cordova plugin rm cordova-plugin-mauron85-background-geolocation
cordova plugin add file:///absolute_path_to_cloned_plugin/cordova-plugin-background-geolocation/

All 17 comments

Hi, from my own experience, app description is what really matters. Describe as much as possible why are you using bg tracking. And custom message can be changed in plugin.xml.

<platform name="ios">
   <!-- required background modes:  App registers for location updates -->
   <config-file target="*-Info.plist" parent="NSLocationAlwaysUsageDescription">
       <string>This app requires background location tracking</string>
   </config-file>
...
</platform>

Steps needed:

  1. git clone https://github.com/mauron85/cordova-plugin-background-geolocation.git
  2. modify plugin.xml message as shown above
  3. in your project remove plugin and add modified plugin
cordova plugin rm cordova-plugin-mauron85-background-geolocation
cordova plugin add file:///absolute_path_to_cloned_plugin/cordova-plugin-background-geolocation/

Thank you so much for your help. I didn't have any problem with this bg location service before. The app was approved fine until recent update(0.9.6) on monday. They just keep giving me hard time about this custom message. I don't understand why they have to do this. Do they really have to be that picky about a message in the alert? It really pissed me off. Anyway, bad apple.

One more question, I never used the cli to add the plugin before. I am familiar with the approach in your step 3. Normally, I just add the following line in the config.xml and let pgb does the rest. is there a way to add the plugin using this similar method? Thanks again for your help
<plugin name="cordova-plugin-mauron85-background-geolocation" source="npm" spec="0.9.6"/>

You can't change message in pgb directly. You've to either create private repo of the plugin with changed plugin.xml or build locally via cli.

Thanks. I'll just go with the private repo way. Thanks again for you help

Hi

I have the same problem, I use PGB to compile on ios and the app store refuse my app because of the missing alert message for background task.

I work on Windows, and when i check plugin.xml file the lines you suggest to add are already there, so Im wondering why this message is not displayed on ios ? Are they differencies between plugin depending on cli or pgb ?

I think I'll try the private repo for PGB ios but i don't know how to do this, can you provide me some docs please ?

Thanks in advance
Regards
Gilles

There is default message right now. So it should not be case in eyes of Apple. Also in next version it would be configurable. Till then, edit plugin.xml

        <config-file target="*-Info.plist" parent="NSLocationAlwaysUsageDescription">
            <string>Your custom description</string>
        </config-file>

Not sure about PGB.

Hi mauron85

My problem is that i don't see the same default message. Mine is only _"MyApp" Would Like to Use Your Current Location_ and not Allow _"MyApp" to also access your location even when you are not using the app_

I'm testing on iPhone 4 with iOS 7.1.2

Am I missing somthing ?

Thks in advance
Gilles

photo

Are you using any other geolocation plugin?

Also you will NOT see that customized message on iOS < 9. You're good to go as you have it on iOS7. Apple is complaining about iOS9. Test on Simulator.

Works like a charm on iOS>=8 !

Sorry for my posts, didn't see that info

Thks a lot
++

No problem

I am having this same issue. I really do hate how picky Apple is about these things. I am using Phonegap Build as well, is my only option to set up my own repo for the plugin?

@culland there is new option. quote from docs:

Default iOS location permission prompt can be changed in your config.xml:

<plugin name="cordova-plugin-mauron85-background-geolocation" spec="^2.2.0">
    <variable name="ALWAYS_USAGE_DESCRIPTION" value="This app requires background tracking enabled" />
</plugin>

Change attr spec to latest version.
Not sure if this works with phonegap. Give a try and report. thanks.

will do thanks

Submitted for round 2, lets see what they say. One thing I notice is that I cannot include spec="^2.2.0" with phonegap build, it errors the build every time, if I leave that off its fine.

That worked, got through the App Store. Yay.

Congratulations. ;-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

frankzhangxd picture frankzhangxd  路  6Comments

MKHSKY picture MKHSKY  路  7Comments

netbitsolutions picture netbitsolutions  路  10Comments

maurojones picture maurojones  路  3Comments

steveharbick picture steveharbick  路  5Comments