iosxamarincore-bluetoothcbperipheralcbperipheralmanager

Can any one help me to solve this error in iOS 13.5.1 devices for using CoreBluetooth for ble transmission


================================================================= Native Crash Reporting

Got a abrt while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application.

=================================================================

================================================================= Native stacktrace:

0x102be67e0 - /private/var/containers/Bundle/Application/632E2F9B-5F56-490A-84DB-57766748357A/AirLocation.app/AirLocation : 
0x102bdd47c - /private/var/containers/Bundle/Application/632E2F9B-5F56-490A-84DB-57766748357A/AirLocation.app/AirLocation : 
0x102be5d2c - /private/var/containers/Bundle/Application/632E2F9B-5F56-490A-84DB-57766748357A/AirLocation.app/AirLocation : 
0x1b7fb6894 - /usr/lib/system/libsystem_platform.dylib : <redacted>
0x1b80a5e58 - /usr/lib/system/libsystem_kernel.dylib : <redacted>
0x1b80a5e88 - /usr/lib/system/libsystem_kernel.dylib : <redacted>
0x1be503c8c - /System/Library/PrivateFrameworks/TCC.framework/TCC : <redacted>
0x1be503bcc - /System/Library/PrivateFrameworks/TCC.framework/TCC : <redacted>
0x1be507b00 - /System/Library/PrivateFrameworks/TCC.framework/TCC : <redacted>
0x1b7e80be4 - /usr/lib/system/libxpc.dylib : <redacted>
0x1b7e754b0 - /usr/lib/system/libxpc.dylib : <redacted>
0x1b7f735a4 - /usr/lib/system/libdispatch.dylib : <redacted>
0x1b7f314f0 - /usr/lib/system/libdispatch.dylib : <redacted>
0x1b7f290c8 - /usr/lib/system/libdispatch.dylib : <redacted>
0x1b7fc4bac - /usr/lib/system/libsystem_pthread.dylib : _pthread_wqthread
0x1b7fc7740 - /usr/lib/system/libsystem_pthread.dylib : start_wqthread

Solution

  • Adding the below keys to your app's Info.plist file should solve this issue.

    Privacy - Bluetooth Always Usage Description
    Privacy - Bluetooth Peripheral Usage Description
    

    The key NSBluetoothAlwaysUsageDescription is required from iOS 13 from Xcode 11. It looks like your application might be being killed by iOS for trying to use Bluetooth while it is not allowed to. Read more here