title: iOS best way to connect and maintain connection to a BLE peripheral
body: <p>Im trying to understand which is the best way to maintain the connection across view controllers. </p>
  
  <p>Currently I have a NSObject class which implements CBCentralManagerDelegate and CBPeripheralDelegate methods.</p>
  
  <p>I have another class, BLEManager that uses a singleton to create an instance of the CBCentralManager class and an NSStream class that communicates with the peripheral. </p>
  
  <p>I am running into errors when scanning for and connecting to peripherals. When finding wrong devices with the same service UUIDs, the app tries to connect and alerts the user. However when I try to discover and connect again, it just tries to reconnect with the same device. </p>
  
  <p>Could this be due to the way i've set up my singleton? </p>
  
  <p>Also would it be better to make my NSObject class a singleton instead rather than having the BLEManager singleton?</p>