CoreBluetooth - which should be central/peripheral?

I'm developing a Mac application that monitors a piece of state on your computer and communicates it to a nearby iOS device. Both are using CoreBluetooth to communicate. You can think of the iOS device as a "status sign" for your Mac.

I started out by making the Mac the "central" and the iOS device the "peripheral". The Mac tries to keep a persistent BL connection to the iOS device to write a value whenever the state changes. However, I find that the the iOS device often disconnects.

I can also see an implementation where the iOS app is the central and subscribes to a characteristic of the Mac peripheral. Here's my question - for those of you with more Core Bluetooth experience, based on my use case, which should be the central and which should be the peripheral?
Answered by ForumsContributor in
Accepted Answer

Strictly speaking you could do it either way. The second option you mentioned—iOS central and Mac peripheral—is the most naturally aligned with Core Bluetooth. Imagine you have two or more iOS devices. All the Mac has to do is sit there and keep its characteristic up-to-date. iOS devices can come and go freely, and they will read and subscribe for as long as iOS allows them to do so.

The first way you mentioned, the Mac has to keep track of all connected devices, write to them in turn, and handle errors if the writes did not succeed.

Apart from that, being a peripheral means transmitting advertisements constantly. This uses more energy than passively receiving data. It would be kinder to your users' batteries to have the Mac perform the more energy-intensive role.

CoreBluetooth - which should be central/peripheral?
 
 
Q