문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top