"Missing Purpose String in Info.plist File" not actually missing - ios

Attached is what I get from Apple after uploading to the App Store Connect, even though all of these are included in my info.plist. I have tried nearly 10 times to change the name of my string ranging from long strings (e.g. We get the bluetooth in order to connect with certain DJI models that require bluetooth to get telemetry and other data from the drone.) to short strings (e.g. We display the user's location on Mapview.)
All other questions I have seen claim the simple solution is to include the string, which I'm already doing! Does this have something to do with DJI's sdk? I would think just including this in MY info.plist would be enough. The main issue seems to be with the bluetooth permissions as another app I am trying to upload returns the same issue.
"Dear Developer,
We identified one or more issues with a recent delivery for your app,
"DJI Swift Demo". Please correct the following issues, then upload
again.
Missing Purpose String in Info.plist - Your app's code references one
or more APIs that access sensitive user data. The app's Info.plist
file should contain a NSBluetoothPeripheralUsageDescription key with a
user-facing purpose string explaining clearly and completely why your
app needs the data. Starting Spring 2019, all apps submitted to the
App Store that access user data will be required to include a purpose
string. If you're using external libraries or SDKs, they may reference
APIs that require a purpose string. While your app might not use these
APIs, a purpose string is still required. You can contact the
developer of the library or SDK and request they release a version of
their code that doesn't contain the APIs. Learn more
(https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).
Though you are not required to fix the following issues, we wanted to
make you aware of them:
Missing Purpose String in Info.plist - Your app's code references one
or more APIs that access sensitive user data. The app's Info.plist
file should contain a NSLocationWhenInUseUsageDescription key with a
user-facing purpose string explaining clearly and completely why your
app needs the data. Starting Spring 2019, all apps submitted to the
App Store that access user data will be required to include a purpose
string. If you're using external libraries or SDKs, they may reference
APIs that require a purpose string. While your app might not use these
APIs, a purpose string is still required. You can contact the
developer of the library or SDK and request they release a version of
their code that doesn't contain the APIs. Learn more
(https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy)."

Instead of verifying the plist information in XCode, please look into the plist inside ipa.
Please follow the below steps to verify plist inside ipa.
Let say, your ipa file is Demo.ipa
Copy the Demo.ipa to DemoBkup.ipa
Rename it to DemoBkup.zip
Extract the zip file. (Double click the zip file)
The Extracted file will contain "Payload" folder.Get into Payload folder.
You will find the Demo package. Right click and tap "Show Package contents"
Search for your Info.plist.
Validate all the information you gave in XCode is present in this plist.

Change your info.plist keys with the keys Privacy - Bluetooth Peripheral Usage Description, Privacy - Location When In Use Usage Description. Check the given screenshot for reference:

Do check the plist file referenced by the scheme you are building. I think the plist file you are making change is not the same referenced by the scheme from what you are building the ipa file to submit to App Store.

Related

ITMS-90683: Missing Purpose String in Info.plist NSMicrophoneUsageDescription, flutter

I don't use microphone but App Store rejected my app by this error:
ITMS-90683: Missing Purpose String in Info.plist - Your app‘s code references one or more APIs that access sensitive user data. The app‘s Info.plist file should contain a NSMicrophoneUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details,
And I added NSMicrophoneUsageDescription to Info.plist but when I upload it gives this error again.
Even though you are not using microphone some of the packages that you used might have accessed this feature. In info.plist you can add the same like this
<key>NSMicrophoneUsageDescription</key>
<string>The application does not use this feature</string>
The Kashik answer has one disadvantage. User will see permission dialog, if some library makes request for microphone.
If you want to find out what library can fire request for microphone, you can search Microphone phrase on every library in .pub-cache directory. And then you can replace such lib. See my answer for more details: https://stackoverflow.com/a/75309325/5985886

App Store Connect App rejected missing Purpose Strings but Strings exist in InfoPlist.strings

I am developing a Flutter app and submitting it to App Store Connect and instantly get an email that the App was rejected because of
ITMS-90683: Missing Purpose String in Info.plist
Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSContactsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).
Supposedly there are 5 purpose strings missing.
It's right that my App is using the APIs listed in the email but I have the keys in my Info.plist file and when running the app on my iPhone the purpose strings are shown when the app requests the corresponging permissions from the user. I even translated the strings using InfoPlist.strings files in the folders en.lproj etc. In the Info.plist I referenced the translated string like this
<key>NSContactsUsageDescription</key>
<string>$(NSContactsUsageDescription)</string>
I already tried unpacking the .xcarchive (in Mac Finder right click -> Show Package Contents) and the .ipa files. In those I found the Runner.app (I think Runner is a Flutter specific "name") and also showed package contents. I found the Info.plist and when I open it in a TextEditor or also XCode the Strings are gone but the InfoPlist.strings files are still there.
I think that something goes wrong when exporting so that the values are cleared?
I actually asked the question to answer it myself hoping that it might help somebody because it took me a hell lot of time to figure out the problem, even though the solution is so easy:
I don't know from which tutorial / Stackoverflow answer or wherever else I had the trick with referencing the translations as a variable as shown in the question.
<key>NSContactsUsageDescription</key>
<string>$(NSContactsUsageDescription)</string>
Just replace the variable with a real purpose string (your app's primary language maybe? I just copy pasted the values from the English string file.)
<key>NSContactsUsageDescription</key>
<string>The reason for access to contacts is…</string>
It seems that those variables are evaluated at build time and not (also) runtime. Because they don't exist, Xcode places an empty string in the Info.plist file. During runtime the InfoPlist.strings files are searched for values overwriting those in Info.plist and therefore the internationalisation did work even though it was actually implemented incorrectly. It seems that for submission to the AppStore it is not enough to have the values in .strings files but there must be a fallback purpose string in Info.plist
A reference from Apple about localising Info.plist can be found here.

IOS permissions in Info.plist ignored when uploading app

I am trying to build an ionic cordova app for IOS (we have only used android builds on this project until now), I have added the IOS platform from scratch, built in cordova, then opened the Xcode project, built, archived and uploaded. but then i get emailed an error regrading missing entries into my info.plist for "NSMicrophoneUsageDescription" and "NSSpeechRecognitionUsageDescription".
So i went and added the two records with an explanation for their use in my apps info.plist
<key>NSMicrophone​Usage​Description</key>
<string>The app uses speech to text input to capture notes, this requires microphone access</string>
<key>NSSpeech​Recognition​Usage​Description</key>
<string>The app uses speech to text input to capture notes, this requires speech recognition use</string>
I have verified that those records end up in the built files info.plist that i then try uploading, but i still get the rejection email.
I thought it may need to be in the info.plist file of the API that requires those permissions, but even after adding the same values there i still get the rejection emails.
I have tried uploading from Xcode after the archiving finished and taking the Xcode archive, browsing inside it, getting just my .app, adding to a folder called Payload, compressing and renaming it to .ipa and uploading that to apple, with the same response.
Is there some file naming or folder structure that i am missing when i upload my files, i have checked that they all have the records that apple is asking for in all info.plist files but i still get the exact same rejection email when uploading
EDIT: the rejection email from apple
"
Dear Developer,
We identified one or more issues with a recent delivery for your app, "XXXX" 7.XX (7.XX). Please correct the following issues, then upload again.
ITMS-90683: Missing Purpose String in Info.plist - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSMicrophoneUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).
ITMS-90683: Missing Purpose String in Info.plist - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSSpeechRecognitionUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).
The App Store Team
"
First, you need to clear your derived data.
set your deployment target to 9.0 or lesser maybe, when you change your target Xcode resets your info.plist.
prepare your Cordova application using the command : cordova prepare
once you prepared your application goto "-Info.plist" file and add the below description.
<key>NSMicrophone​Usage​Description</key>
<string>The app uses speech to text input to capture notes, this requires microphone access</string>
<key>NSSpeech​Recognition​Usage​Description</key>
<string>The app uses speech to text input to capture notes, this requires speech recognition use</string>
archive your application and uploadd to appstore. you will not get rejection.

Require purpose string for iOS "TestFlight"build

I am using "react-native-webview" to render html on Android and iOS. I have created the application and ready to create build, On Android I have successfully created the debug-build but on iOS, we can generate the ipa file and unable to upload into "TestFlight". As we can see this plugin using "geolocation" in background to fetch current location of web page on mobile web view (I have checked other 3rd party libraries and SDK but not found). But in my application, i'm not using any kind of permission related to location just render the html on available in JSON string format.
From App Store we are getting the Location related permission. The
following email we are getting:
Dear Developer, We identified one or more issues with a recent
delivery for your app, "app-name". Please correct the following issues,
then upload again. "Missing Purpose String in Info.plist File. Your
app's code references one or more APIs that access sensitive user
data. The app's Info.plist file should contain a
NSLocationAlwaysUsageDescription key with a user-facing purpose string
explaining clearly and completely why your app needs the data.
Starting spring 2019, all apps submitted to the App Store that access
user data will be required to include a purpose string.If you're using
external libraries or SDKs, they may reference APIs that require a
purpose string. While your app might not use these APIs, a purpose
string is still required. You can contact the developer of the library
or SDK and request they release a version of their code that doesn't
contain the APIs. Learn more
(https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy)."
"Missing Purpose String in Info.plist File. Your app's code references
one or more APIs that access sensitive user data. The app's Info.plist
file should contain a NSLocationWhenInUseUsageDescription key with a
user-facing purpose string explaining clearly and completely why your
app needs the data. Starting spring 2019, all apps submitted to the
App Store that access user data will be required to include a purpose
string .If you're using external libraries or SDKs, they may reference
APIs that require a purpose string. While your app might not use these
APIs, a purpose string is still required. You can contact the
developer of the library or SDK and request they release a version of
their code that doesn't contain the APIs. Learn more
(https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy)."
Best regards, The App Store Team
They require **Purpose String ** to publish our app in iOS "Info.plist".
If we use only this permission on Info.plist file:
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This app does not uses any location.</string>
Is it okay if this plugin using geolocation internally but my app not using any location related services?
Check for updates in the SDK documentation because he might have updated new version after removing this permissions or some other workaround.Most libraries i used recently has been updated due to this permission issue.
Secondly you can check the SDK code and try to remove the permissions yourself because your app is not using this permission so it wont be a problem for you.
To search for permissions to be removed you can use below command to search all the occurrence of permissions inside code .
grep -R "your Permission name" .
Hope it works for you !

Error Appstore connect : Missing Purpose String in Info.plist File (NSBluetoothPeripheralUsageDescription)

Dear Developer,
We identified one or more issues with a recent delivery for your app,
. Please correct the following issues, then upload again.
Missing Purpose String in Info.plist File - Your app's code references
one or more APIs that access sensitive user data. The app's Info.plist
file should contain a NSBluetoothPeripheralUsageDescription key with a
user-facing purpose string explaining clearly and completely why your
app needs the data. Starting Spring 2019, all apps submitted to the
App Store that access user data will be required to include a purpose
string.If you're using external libraries or SDKs, they may reference
APIs that require a purpose string. While your app might not use these
APIs, a purpose string is still required. You can contact the
developer of the library or SDK and request they release a version of
their code that doesn't contain the APIs. Learn more
(https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).
Best regards,
The App Store Team
Actually, I am not trying to use to access bluetooth. But somehow App Store reject my app like this.
If you added CoreBluetooth.framework in linked libraries and frameworks section in Build phases , remove it.
Also, check if any third party libraries that you are using in the project uses bluetooth. Check if any files import CoreBluetooth.framework
Are you using advertising frameworks ?
Ad frameworks sometime use bluetooth information.

Resources