Operating into an odd challenge. CBConnectPeripheralOptionEnableAutoReconnect
key from CoreBluetooth is ready for use provided that iOS 17+ is offered, in any other case it could fall again. However the app crashes even earlier than executing that line.
I consider that is due to how symbols are packed or compiled, so to talk.
Do you’ve any thought about the right way to harness the state of affairs and preserve the app up and operating for iOS variations beneath 17.0?
Right here is a few code and the crash payload:
BluetoothConnectionManager
personal var connectionOptions: [String: Any] = {
if #accessible(iOS 17.0, *) {
[
CBConnectPeripheralOptionNotifyOnConnectionKey: true,
CBConnectPeripheralOptionEnableAutoReconnect: true,
CBConnectPeripheralOptionEnableTransportBridgingKey: NSNumber(value: true)
]
} else {
[
CBConnectPeripheralOptionNotifyOnConnectionKey: true,
CBConnectPeripheralOptionEnableTransportBridgingKey: true
]
}
}()
SplashView
personal func startExecutingInitialActions() {
...
DispatchQueue.fundamental.asyncAfter(deadline: .now() + 3) {
if isEULAAccepted {
BTCM.shared.tryToConnectToDevice()
...
}
}
}
Crash payload
dyld[21249]: Image not discovered: _CBConnectPeripheralOptionEnableAutoReconnect
Referenced from: <77426CD1-EAC3-3864-A447-07409815A9D0> [Redacted]/Library/Developer/CoreSimulator/Gadgets/21A2FBDC-949D-4C0B-8E18-A233595F24A4/knowledge/Containers/Bundle/Software/9449D6A8-C6E1-4E0C-8C02-407AEA73A61D/tusk-intercom-ios.app/tusk-intercom-ios.debug.dylib
Anticipated in: <26C5433B-A266-32EC-9650-652F44DA1057> /Library/Developer/CoreSimulator/Volumes/iOS_20E247/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 16.4.simruntime/Contents/Assets/RuntimeRoot/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth
I haven’t got CoreBluetooth.framework
embedded within the undertaking from undertaking settings.
Thanks!