Frage

I put my peripheral delegate's methods in my 2 UIViewController but when I enter in the second I lose my connection and it connect again. What i want is simple, it is to keep the connection with the sames CBPeripheralManager and CBMUtableCharacteristic. There is any solution ?

Thank you

War es hilfreich?

Lösung

for simple app, for example, you can create CBPeripheralManager in appDelegate,

but right way is make dedicated object for entire app (singleton) that will be CBPeripheralManager delegate and provide data to all your interface controllers

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top