0

I got rejected when I upload my application to iOS because of Per our 5.1.5 guideline. I use the NSLocationAlwaysUsageDescription feature, have always been using it and didn't have any problems when I uploaded previous versions until iOS 10. Do i just need to put the below in my config.xml file and is that the correct syntax for it?

          <config-file parent="NSLocationAlwaysUsageDescription " platform="ios" target="*-Info.plist">
            <string>This application requires location services to work.</string>
           </config-file>    

          <config-file parent="NSLocationWhenInUseUsageDescription" platform="ios" target="*-Info.plist">
            <string>This application requires location services to work.</string>
           </config-file>              
</platform>

1 Answers1

0

Just adding those <config-file> blocks to your config.xml will not work. Cordova currently (cordova@6.4.0) does not parse <config-file> blocks in project config.xml files. It only works if <config-file> blocks are added to the plugin.xml of a plugin which is then added to the project.

However, if you add cordova-custom-config to your project, it will add support for <config-file> blocks in config.xml, making your above configuration work.

There are numerous usage description keys which are now required by iOS 10 if your app requests the relevant functionality - see Apple's Cocoa Keys for the full list.

One other thing: in your code above you have a trailing space in one of the attributes: parent="NSLocationAlwaysUsageDescription ". That is enough to cause the build to fail.

DaveAlden
  • 30,083
  • 11
  • 93
  • 155
  • thanks. I did a cloud build from adobe phonegap and it didn't error with the NSLocationAlwaysUsageDescription problem you stated. – Joseph Luong Dec 23 '16 at 20:59
  • It maybe that PhoneGap Build provides additional functionality. Cordova CLI does not. But cordova-custom-config will not work in cloud environment anyway due to lack of hook script support. – DaveAlden Dec 23 '16 at 21:04
  • please help me resolve the following rejection by apple. "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." Next Steps Please revise the NSLocationAlwaysUsageDescription value in the Info.plist to specify the intended purpose of using the user's location while the app is in the background. – Joseph Luong Jan 31 '17 at 20:50