IOS & Bluetooth

with lime 7.8.0 my ios app crashes at the start with:

his app has crashed because it attempted to access privacy-sensitive data without a usage description. The app’s Info.plist must contain an NSBluetoothAlwaysUsageDescription key with a string value explaining to the user how the app uses this data.

I’m not using bluetooth and i don’t want to use it :thinking:

Try something like this in your [APP]-Info.plist

<string>$(PRODUCT_NAME) Bluetooth use</string>

That helps to prevent the crash, but the user is still asked if the app is allowed to use bluetooh. Which should not be the case for a game app :confused:

Well, if it happens it’s because your app is actually using bluetooth. Most probably it’s a third party library you’re pulling in

I will have a look, but i did not change any lib, it was working before and stopped working after updating lime and haxelib

Looks like it came in here:

Possible a fix after the SDL update? @singmajesty could you give us a hint?

But am i the only one with this problem? :thinking:

I’m still with Lime 7.7.0, so can’t say, if I have this problem.
Can you just switch back?

I’ve run into this too. I’m not using Bluetooth, but the iOS build injects the dependency anyway. It’s causing me trouble in app review. I’m going to try building with lime 7.7.0 instead, but I’m still really curious as to why the dependency was added in 7.8.0, and if it’ll stick around in future versions.

FYI, Apple is going to reject anything built with Lime 7.8.0:

We found that your app uses GameKit public APIs to change Bluetooth device settings.

GameKit APIs are provided to assist in the creation of social games. Using these APIs for other purposes, such as changing Bluetooth settings on a device, is not prescribed by Apple and is therefore not in compliance with the Apple Developer Program License Agreement, as required by the App Store Review Guidelines.

In particular, section 3.3.1 of the Apple Developer Program License Agreement specifies:

“Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs.”

If there are no alternatives for providing the functionality your app requires, you can use Feedback Assistant to submit an enhancement request.

1 Like

Any updates with this issue or we should continue using lime 7.7.0?

This issue has also been reported on github, so you can follow it there to see when it’s resolved.

If you want to use Lime 7.8.0 today, you can fix this on your side pretty easily.

  1. Make sure you’re using Lime from git so you have all the native dependency sources.
  2. Change the SDL configuration to remove the feature that requires bluetooth.
  3. haxelib run lime rebuild ios -release
  4. Remove the line in Lime’s include.xml that adds CoreBluetooth.framework as a dependency.

Please test the latest version of Lime:

git pull
git submodule update
lime rebuild ios -clean