Just a heads up, to use SDL 2.0.9 you need to link against the CoreBluetooth framework. BUT this will cause your app submission on the Apple App Store to fail because you need to explain why you are using Bluetooth.
Explain the reasons for accessing…
to the Info.plist will fix this.
This won’t be needed in the final 2.0.9 release.
Thanks, I just saw the commit. Very handy and much appreciated.
IMO adding the information
Don’t build SDL_JOYSTICK_HIDAPI by default on iOS
If you enable this, you’ll need to link with CoreBluetooth.framework and add something like this to your Info.plist:
<string>MyApp would like to remain connected to nearby bluetooth Game Controllers and Game Pads even when you’re not using the app.</string>
only to the commit message is a bit flawed. It needs to be in the README-ios.md
@icculus and @slouken in 2.0.12 this is back so I guess it was either a mistake or the notes should need to go back into the README-ios
I just ran into this as well. I’d really rather not link with CoreBluetooth if I can avoid it.
EDIT: Turns out this is way worse than I thought. Apparently Apple has tightened up their security on iOS, and you can’t even test your app unless you have the
NSBluetoothAlwaysUsageDescription key in your Info.plist. It just straight up crashes. Yikes!
We are about to submit a new app, and would love to see this requirement removed if possible.
We pride ourselves in creating apps with minimal requirements and permissions, and Apple makes it really hard to add technical descriptions to the app store pages to explain these things to users.
It’s removed in hg. You can either use hg or backport these changes (yesterday) to SDL2 2.0.12
I am running into this bluetooth problem as well. What is HG?
sorry, for late reply, with hg, I mean mercurial, SDL’s version control system for their repository. When I said hg, I meant the current code, not their last release.
But their iOS Xcode project has some other problems for which I filed reports and patches:
So beware of those!