troystribling / BlueCap

iOS Bluetooth LE framework
MIT License
715 stars 115 forks source link

Disconnection when pushing new ViewController #60

Closed soonfay closed 7 years ago

soonfay commented 7 years ago

Hi Troy,

When I connected a device and passing the peripheral to new controller,it works fine but If I push another view controller, it will disconnect. So here is the scenario, from view A discovered and connected -> pass to B able to send command -> from B to C , the peripheral is being passed but it will disconnect right away.

Is there's something that was missing that I need to pass? Like the discovery future? It worked for the first pass , but always disconnect from B to C.

Thanks.

soonfay commented 7 years ago

Never mind, I found the issue, I had disconnection handler in viewWillDissapear. Sorry for confusion.