Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 13 requires new usage string #700

Closed
aircable opened this issue Sep 19, 2019 · 7 comments
Closed

iOS 13 requires new usage string #700

aircable opened this issue Sep 19, 2019 · 7 comments

Comments

@aircable
Copy link

I'm using this plugin with Ionic 5 and the app got rejected:

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.

I added this to plugin.xml for a quick fix:

<preference name="BLUETOOTH_ALWAYS_USAGE_DESCRIPTION" default=" " />
        <config-file target="*-Info.plist" parent="NSBluetoothAlwaysUsageDescription">
            <string>$BLUETOOTH_ALWAYS_USAGE_DESCRIPTION</string>
        </config-file>
@sebj54
Copy link

sebj54 commented Oct 4, 2019

Thanks to the cordova-custom-config plugin, we don't need to edit anything but our config.xml file inside the <platform name="ios"> tag. Just add this:

<custom-config-file parent="NSBluetoothAlwaysUsageDescription" platform="ios" target="*-Info.plist">
    <string>This app would like to access Bluetooth.</string>
</custom-config-file>

@marioshtika
Copy link
Contributor

marioshtika commented Oct 16, 2019

Also NSBluetoothPeripheralUsageDescription is deprecated.
Is there a plan of merging a solution for this, on the next version?

@don
Copy link
Owner

don commented Oct 17, 2019

@marioshtika NSBluetoothPeripheralUsageDescription is deprecated but still needed for iOS 12. There's a pull request #704 to fix this, it should be in the next release.

@don
Copy link
Owner

don commented Oct 17, 2019

Fixed by #704 in version 1.2.3

@don don closed this as completed Oct 17, 2019
@sebj54
Copy link

sebj54 commented Oct 18, 2019

Thanks @don, it feels good to see the plugin updated! 👍

@jptheripper
Copy link

my app is continually being rejected by the appstore because of this. I have set

The application uses a serial bluetooth connection to connect to a bluetooth module on the Arduino Enoch Paintball Board for the purpose of changing configuration settings.

in my config.xml file, but Apple is reporting the it says " Would Like to Use Bluetooth" which seems like a default. What am i doing wrong?

@don
Copy link
Owner

don commented Jan 3, 2020

The default usage description is an empty string.

https://github.com/don/cordova-plugin-ble-central/blob/master/plugin.xml#L40-L47

You can specify the usage description when installing the plugin https://github.com/don/cordova-plugin-ble-central#ios

Look in appname-info.plist to see or edit the values for your app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants