0

We have developed an ANCS peripheral device that is connected to an iOS iPhone over BTLE.

When we first connect our device, we get a "Bluetooth Pairing Request" dialog on the iPhone. We click "Pair" on that, and immediately get a dialog asking "Allow MyAncsDevice to Receive Your iPhone Notifications?" If we click "Allow", everything works great.

If the user clicks "Don't Allow" the notifications don't come in, as expected. If the users later goes in to Settings > Bluetooth > MyAncsDevice, they can change this using the "Share System Notifications" toggle. When the user toggles this, we expect ANCS to start working. But it does not work until we turn one side off, or the other, and the peripheral and iPhone reconnect. I can toggle BT off on the iPhone, or I can restart my device. Both operations make ANCS messages come across fine.

We would like to get ANCS notifications right away after enabling this toggle; we don't want to restart things manually.

On our peripheral device, I believe we followed the recommendations of Apple Notification Center Service (ANCS) Specification. We listen to GATT service change messages, but none come in.

We also have an app running on the iPhone, and hoped we could use that to detect the condition when the user grants notification permission in the system Settings. But there is nothing that notifies an app that this has changed. We can query the condition when the user runs our app, such as described in a similar stackoverflow topic CBPeripheral.ancsAuthorized info is unreliable, but this does not help us when the user is in Settings.

I would expect iOS to allow the user to toggle the feature in settings, and have it take effect immediately. The user should not have to restart any device or reset anything.

Is there any way to make this happen without manually reconnecting? If there is a way for either the app on the iPhone to detect this, or for the BT peripheral device to detect this, we can force the reconnect and make it seamless for the user.

Brent K.
  • 927
  • 1
  • 11
  • 16

0 Answers0