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

Était-ce utile?

La 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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top