App rejected, NSBluetoothAlwaysUsageDescription required but not using bluetooth.
See original GitHub issueBug Report
Problem
What is expected to happen?
The app would get approved when uploading to appstore connect.
What does actually happen?
The app gets rejected with the following message:
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 NSBluetoothAlwaysUsageDescription 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).
Information
I have removed all my plugins and the app is still getting rejected. This answer shows a command that can be used on the generated iOS project folder: grep -r -a CoreBluetooth.framework platforms/ios/
.
In my case it does indeed show some references to bluetooth:
$ grep -r -a CoreBluetooth.framework platforms/ios/
platforms/ios//frameworks.json: "CoreBluetooth.framework": 1,
platforms/ios//Nugget Royale.xcodeproj/project.pbxproj: 5B76CFCDD02142E5BFA74142 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE37821F9FC94BD1896E55C2 /* CoreBluetooth.framework */; };
platforms/ios//Nugget Royale.xcodeproj/project.pbxproj: DE37821F9FC94BD1896E55C2 /* CoreBluetooth.framework */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = System/Library/Frameworks/CoreBluetooth.framework; sourceTree = SDKROOT; };
platforms/ios//Nugget Royale.xcodeproj/project.pbxproj: 5B76CFCDD02142E5BFA74142 /* CoreBluetooth.framework in Frameworks */,
platforms/ios//Nugget Royale.xcodeproj/project.pbxproj: DE37821F9FC94BD1896E55C2 /* CoreBluetooth.framework */,
My config.xml: (trimmed down some unnecessary info)
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="4" id="xxx" ios-CFBundleVersion="4" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>xxx</name>
<description>xxx</description>
<author email="xxx" href="xxx">
xxx
</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
<preference name="android-minSdkVersion" value="21" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<config-file parent="GADApplicationIdentifier" target="*-Info.plist">
<string>xxx</string>
</config-file>
<config-file parent="GADIsAdManagerApp" platform="ios" target="*-Info.plist">
<true />
</config-file>
</platform>
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="Orientation" value="landscape" />
<engine name="android" spec="^8.0.0" />
<engine name="ios" spec="^5.0.1" />
</widget>
Environment, Platform, Device
Running cordova 9.0.0 (cordova-lib@9.0.1) and cordova-ios 5.0.1 on MacOS Catalina 10.15 (19A583) Xcode 11.1 (11A1027)
Checklist
- I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- I included all the necessary information above
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
Alright I only deleted the plugins from config.xml but I wasn’t aware you have to remove the plugin entries from package.json as well. And as expected, cordova-plugin-admob-free was adding all the frameworks. So I’ll start bugging them instead.
A temprary workaround seems to be to remove CoreBluetooth.framework from the Xcode project in the general tab.