Handling BLE Permissions for CBCentralManager and AccessorySetupKit to Support iOS 18 and Earlier Versions

I have an iOS app where I perform BLE scans using the scanForPeripherals() method in CBCentralManager, which requires the NSBluetoothAlwaysUsageDescription permission. Recently, I added BLE accessory scanning using AccessorySetupKit, which requires the NSAccessorySetupKitSupports permission. This is to support the app on devices running iOS 18 (where AccessorySetupKit is available) as well as on earlier iOS versions (where this framework is not available).

However, I am facing an issue where including both permissions in the app causes NSAccessorySetupKitSupports to override the NSBluetoothAlwaysUsageDescription permission. As a result, the scanForPeripherals() method in CBCentralManager no longer works on older versions.

Is it possible to use both scanning methods in the same app while ensuring the required permissions coexist? If so, how can this be achieved?

There should not be a conflict between these two Info.plist entries.

Why do you say one is overriding the other? What effect makes you believe that? Are you certain these strings are in the Info.plist correctly? Have you checked the built app to see if both entries are in the Info.plist file?

There could be a build configuration where you might be including a different Info.plist than you think you are perhaps?

Handling BLE Permissions for CBCentralManager and AccessorySetupKit to Support iOS 18 and Earlier Versions
 
 
Q