title: CoreBluetooth: scanForPeripheralsWithServices not working with service array
body: <p>I'm developing a BLE application for IOS (SWIFT) and I've found a strange behaviour.. my test has 2 controllers, ONE with the CentralManager Role and the other with the PeripheralManager Role..</p>
  
  <p>Here's my code (summary):</p>
  
  <p><strong>Parameters.swift:</strong></p>
  
  <pre><code>...
  // a custome UUID created in console
  let TRANSFER_SERVICE_UUID = CBUUID(string: "FB694B90-F49E-....-....-171BBA78F846")
  ...
  </code></pre>
  
  <p><strong>Peripheral.swift</strong></p>
  
  <pre><code>...
  var pManager = CBPeripheralManager()
  var transferService = CBMutableService()
  
  override func viewDidLoad() {
      super.viewDidLoad()
      pManager = CBPeripheralManager(delegate: self, queue: nil)
  }
  
  func peripheralManagerDidUpdateState(peripheral: CBPeripheralManager!) {
      if(peripheral.state == CBPeripheralManagerState.PoweredOn) {
          transferService = CBMutableService(type: TRANSFER_SERVICE_UUID, primary: true)
          // add some characteristic
          pManager.addService(transferService)
          pManager.startAdvertising(nil)
      }
  }
  ...
  </code></pre>
  
  <p><strong>Central.swift</strong></p>
  
  <pre><code>...
  var cManager = CBCentralManager()
  
  override func viewDidLoad() {
      super.viewDidLoad()
      cManager = CBCentralManager(delegate: self, queue: nil)
  }
  
  func centralManagerDidUpdateState(central: CBCentralManager!) {
      if central.state == CBCentralManagerState.PoweredOn {
          cManager.scanForPeripheralsWithServices([TRANSFER_SERVICE_UUID], options: nil)
      }
  }
  ...
  </code></pre>
  
  <p>Now, if I take 2 device, one with the Central and the other with the Peripheral Role the 2 app can't find each other (<strong>but LightBlue app and similar will</strong> so the device is emitting)</p>
  
  <p>On the other hand, if I change the code to:</p>
  
  <pre><code>cManager.scanForPeripheralsWithServices(nil, options: nil)
  </code></pre>
  
  <p>my application works perfectly and the 2 devices can communicate each other.. but at the same time I can't filter only the devices that are emitting TRANSFER_SERVICE_UUID.. I don't want to connect to all peripheral finded in order to search for TRANSFER_SERVICE_UUID.. isn't this the right way to proceed ?? Did I miss something ??</p>