Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top