Apple platform
iOS
Framework version
net10.0-*
Affected platform version
dotnet workload ios --version 10.0.100.1
Description
I've a dotnet maui app published with NativeAOT on iOS. It makes use of the CoreBluetooth API.
I tried building with the iOS workload supporting XCode 26.1 this morning (10.0.100.1), but the app immediately crashes due to an NSInvalidArgumentException:
-[CoreBluetooth_CBCentralManager__CBCentralManagerDelegate centralManagerDidUpdateState:]: unrecognized selector sent to instance 0x1042895c0
Rolling back to the previous workload (10.0.100.0) - the exception is not thrown.
I wasn't aware of any breaking changes with the CoreBluetooth API in 26.1 - so I'm assuming something has changed in how this is being wrapped by dotnet.
I'm developing on Windows, and can't currently (easily) debug this further with Visual Studio as the Xcode 26.1 workload isn't supported.
Steps to Reproduce
- Create a CBCentralManager
- Add a handler for the UpdatedState event.
- I assume the PoweredOn event is triggering this crash - it happens instantly.
Did you find any workaround?
Revert to 10.0.100.0 iOS workload with xcode 26.0
Relevant log output
Last Exception Backtrace:
0 CoreFoundation 0x1a14d28c8 __exceptionPreprocess + 164 (NSException.m:249)
1 libobjc.A.dylib 0x19e4497c4 objc_exception_throw + 88 (objc-exception.mm:356)
2 CoreFoundation 0x1a156e838 -[NSObject(NSObject) doesNotRecognizeSelector:] + 364 (NSObject.m:168)
3 CoreFoundation 0x1a144f340 ___forwarding___ + 1032 (NSForwarding.m:3658)
4 CoreFoundation 0x1a14573a0 _CF_forwarding_prep_0 + 96 (:-1)
5 CoreBluetooth 0x1de105c78 -[CBCentralManager observeValueForKeyPath:ofObject:change:context:] + 264 (CBCentralManager.m:257)
6 Foundation 0x19eb13b88 NSKeyValueNotifyObserver + 252 (NSKeyValueObserving.m:428)
7 Foundation 0x19eb137f4 NSKeyValueDidChange + 384 (NSKeyValueObserving.m:573)
8 Foundation 0x19f4125f8 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 728 (NSKeyValueObserving.m:2669)
9 Foundation 0x19f4126a0 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 64 (NSKeyValueObserving.m:2684)
10 Foundation 0x19ec3e02c _NSSetLongLongValueAndNotify + 400 (NSKeyValueObserverNotifying.m:122)
11 CoreBluetooth 0x1de167c68 -[CBManager extractLocalDeviceStatesDictionary:] + 256 (CBManager.m:120)
12 CoreBluetooth 0x1de169184 -[CBManager xpcConnectionDidReceiveMsg:args:] + 76 (CBManager.m:583)
13 CoreBluetooth 0x1de1566d0 __30-[CBXpcConnection _handleMsg:]_block_invoke + 48 (CBXpcConnection.m:407)
14 libdispatch.dylib 0x1d8ddeadc _dispatch_call_block_and_release + 32 (init.c:1575)
15 libdispatch.dylib 0x1d8df87ec _dispatch_client_callout + 16 (client_callout.mm:85)
16 libdispatch.dylib 0x1d8de7468 _dispatch_lane_serial_drain + 740 (queue.c:3991)
17 libdispatch.dylib 0x1d8de7f78 _dispatch_lane_invoke + 440 (queue.c:4082)
18 libdispatch.dylib 0x1d8de72d0 _dispatch_lane_serial_drain + 332 (queue.c:3991)
19 libdispatch.dylib 0x1d8de7f78 _dispatch_lane_invoke + 440 (queue.c:4082)
20 libdispatch.dylib 0x1d8e15a48 _dispatch_main_queue_drain.cold.5 + 592 (queue.c:8181)
21 libdispatch.dylib 0x1d8dedec8 _dispatch_main_queue_drain + 180 (queue.c:8162)
22 libdispatch.dylib 0x1d8dede04 _dispatch_main_queue_callback_4CF + 44 (queue.c:8341)
23 CoreFoundation 0x1a1474520 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1820)
24 CoreFoundation 0x1a1426d14 __CFRunLoopRun + 1944 (CFRunLoop.c:3177)
25 CoreFoundation 0x1a1425c44 _CFRunLoopRunSpecificWithOptions + 532 (CFRunLoop.c:3462)
26 GraphicsServices 0x2407fa498 GSEventRunModal + 120 (GSEvent.c:2049)
27 UIKitCore 0x1a6da0ddc -[UIApplication _run] + 792 (UIApplication.m:3899)
28 UIKitCore 0x1a6d45b0c UIApplicationMain + 336 (UIApplication.m:5574)
Apple platform
iOS
Framework version
net10.0-*
Affected platform version
dotnet workload ios --version 10.0.100.1
Description
I've a dotnet maui app published with NativeAOT on iOS. It makes use of the CoreBluetooth API.
I tried building with the iOS workload supporting XCode 26.1 this morning (10.0.100.1), but the app immediately crashes due to an NSInvalidArgumentException:
Rolling back to the previous workload (10.0.100.0) - the exception is not thrown.
I wasn't aware of any breaking changes with the CoreBluetooth API in 26.1 - so I'm assuming something has changed in how this is being wrapped by dotnet.
I'm developing on Windows, and can't currently (easily) debug this further with Visual Studio as the Xcode 26.1 workload isn't supported.
Steps to Reproduce
Did you find any workaround?
Revert to 10.0.100.0 iOS workload with xcode 26.0
Relevant log output