Reputation: 2909
Our app works with a paired Bluetooth peripheral that uses ANCS, that is why I dug early into the brand new privacy setting "Share System Notifications" to make our app ready for iOS13... However there is an issue, the CBPeripheral property ancsAuthorized(Bool) is unreliable, so then it is impossible to know if the user granted the authorization or not. It is unreliable in 2 ways:
peripheral.ancsAuthorized
returns always false
at first, then after some reconnections it returns always true
, whatever is set the authorization switch before connecting to it.peripheral.ancsAuthorized
is always
true
, wether I switch the authorization on or off :(I posted a sysdiagnose file and complete description to the Apple Feedback Assistant, helped by a dedicated support ticket, but so far it remains open with no news at all…
Did anyone had a chance to play with this new privacy setting successfully?
Upvotes: 2
Views: 979
Reputation: 3085
add CBConnectPeripheralOptionRequiresANCS
to option when connect.
centralManager.connect(peripheral, options: [
CBConnectPeripheralOptionRequiresANCS: true
])
Upvotes: 0
Reputation: 2909
It looks like after installing iOS 13.1 beta 2 the problem numner 2 has been fixed by Apple. However the first issue, that is getting the status of that authorization once connected to a CBPeripheral, is still random, sometimes it returns always true, sometimes always false…
Upvotes: -1