Unable to create a BluetoothLE peripheral from a service

Hello, I am trying to make a service listen for connections via BluetoothLE, by creating a peripheral using

     _peripheralManager = [[CBPeripheralManager alloc] initWithDelegate:self queue:nil];

from within a bundle running as a service under the root user. The Info.plist file has the "Privacy - Bluetooth Always Usage Description" and "Privacy - Bluetooth Peripheral Usage Description" entries.

However, the peripheralManagerDidUpdateState callback is invoked with the "Unauthorized" state, and the system log reports that TCC prohibited the action

tccd: [com.apple.TCC:access] register with resolver: binary:file:///Library/MySampleService.bundle/Contents/MacOS/MySampleService, bundle file:///Library/MySampleService.bundle/ -- failed: isApp: 0

My understanding is that only applications can be granted the right in the Privacy section of the System Preferences to access the BluetoothLE hardware, via MDM or by answering Allow to the dialog box issued by the system. I cannot find a way to give this right to a bundle: is this by design? And how could I make a service talk to the BluetoothLE hardware?

Thanks, Alberto

Unable to create a BluetoothLE peripheral from a service
 
 
Q