Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Uploaded Build Missing NSLocationAlwaysAndWhenInUseUsageDescription Key Despite this Key Being in the Info.plist File

Hey All!

I keep receiving an email from Apple stating "You have a missing purpose string in your Info.plist" for the key "NSLocationAlwaysAndWhenInUseUsageDescription". The thing is, though, that we are setting that value within our build Info.plist. The data in that value is even reflected into the application after build, with the correct purpose string showing up when requesting location services.

We currently do our builds via Azure Devops CI/CD, where we use xcodebuild for this process. The archive also generates an Info.plist without the location key, so I tried manually inserting it before deployment. Also no luck.

Anyone else had this issue or know how to resolve it?

Snippet to show how the location key is currently set during build:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>NSLocationWhenInUseUsageDescription</key>
	<string>Application uses location data for accurate maps display</string>
</dict>
</plist>

Thanks!

In my app, my target's info settings list a key against the setting, not the actual text. This may be because my app is localised so the info settings need to be able to pick the right text for the right language.

So, in this screenshot each item has a key next to it:

Then, those keys are expanded in an InfoPlist.strings file, e.g.:

NSLocationWhenInUseUsageDescription = "Application uses location data for accurate maps display";

Give it a go for your app. Just add an InfoPlist.strings file with the above text, and in the Info settings in your app target, add the key as seen in the screenshot. See whether that works.

If it doesn't work, then I'm not sure what the fix is, sorry.

Uploaded Build Missing NSLocationAlwaysAndWhenInUseUsageDescription Key Despite this Key Being in the Info.plist File
 
 
Q