Great article!
Cameron Moss
2

Thanks! If I understand correctly, you want to connect to the same peripheral using the same service UUID, but you want to be able to talk to this peripheral from two different view controllers, is that correct? In this case, I would recommend wrapping up the bluetooth code into a helper class (kind of like I did with my SimpleBluetoothIO class). You can then either create a single instance of this class and pass it to the second view controller from the first view controller (and re-assign the delegate), or you can create a brand new instance of this class in the second view controller (just remember to stop scanning for peripherals from the view that isn’t shown). I don’t use Storyboards, so I’m not much help when it comes to Segues. Good luck!

Show your support

Clapping shows how much you appreciated Nebs Petrovic’s story.