| Summary: | A recent change requires Core Bluetooth framework on iOS | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Mark Callow <libsdl.org> |
| Component: | *don't know* | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sdl-bugzilla, spydog |
| Version: | HG 2.1 | ||
| Hardware: | x86 | ||
| OS: | Other | ||
|
Description
Mark Callow
2018-10-07 01:06:20 UTC
Actually it would be nice to start reducing the number of frameworks we need to link directly. We dynamically load shared libraries on other systems, is that something we can do with frameworks as well? Yes. You load them in exactly the same way as .dylibs. You need to use the frameworks's name in the form XXX.framework/Versions/YYY/XXX or XXX.framework/XXX, where XXX YYY are any name, rather thana .dylib name. Also dyld uses different search paths for frameworks and libraries. I may be wrong. I think on iOS that App Store policy does not allow dynamic loading of frameworks. SDL may have to create what is called an umbrella framework to wrap the dependencies and hide them from SDL apps. I think you are correct. The App Store policy does now allow bundling and linking with your own frameworks though, so I think I'm going to create a new iOS framework project post-2.0.9. I disabled the Bluetooth code by default since it's not needed by most applications. The Bluetooth Framework dependency is back with SDL 2.0.12. As a user this means: - you need to add the dependency on your SDL2 app - you need to add the neccessary info.plist information so your app doesn't get denied. For mercurial this means that the demo project file needs to add the dependency, too. And this change needs to be back in there, too https://hg.libsdl.org/SDL/rev/9bb50edccc46 Just ran into this, and from my testing, whatever re-added the dependency is a _major_ regression. Not only is your app forced to link with CoreBluetooth, but iOS has apparently tightened up security and won't even let you _test_ your app unless it specifies the NSBluetoothAlwaysUsageDescription in an Info.plist. It doesn't even pop up an error message, it just straight up crashes. Adding the permission isn't a good solution either, since I'd really, really rather not have my app request users' bluetooth to always be enabled, especially if the only apparent reason is for Steam Controller support. Fixed, thanks! https://hg.libsdl.org/SDL/rev/bd445097c0e5 Don't you have to take the BT framework out of the iOS Xcode project as well? Yep, this should be good now: https://hg.libsdl.org/SDL/rev/f6e164b9a64a https://hg.libsdl.org/SDL/rev/4b0fc4601e26 |