Hello @Sanjay Kumar Jha ,
It works on simulator, but it doesn't work when I try to run the app on my iPhone, the Native Crash Reporting and Native stacktrace show that " /System/Library/PrivateFrameworks/TCC.framework/TCC : <redacted>
". This crash is related to protecting app access to user data.
As noted in Core Bluetooth | Apple Developer Documentation - Your app will crash if its Info.plist doesn’t include usage description keys for the types of data it needs to access. You could open the info.plist
file , then add the NSBluetoothAlwaysUsageDescription
key and NSBluetoothPeripheralUsageDescription
key. NSBluetoothPeripheralUsageDescription
is deprecate, you don't have to add it if the deployment target of your app is iOS 13 and later.
Privacy - Bluetooth Peripheral Usage Description
- A message that tells the user why the app is requesting the ability to connect to Bluetooth peripherals.
Privacy - Bluetooth Always Usage Description
- A message that tells the user why the app needs access to Bluetooth.
In addition, please try to delete the bin
/obj
folder, uninstall the app from your device and deploy again.
Best Regards,
Wenyan Zhang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.