In the file ViewController.swift this error appears on line 97 at return peripheral.connect(connectionTimeout: 10, capacity: 5):
//We will connect to the first scanned peripheral
let connectionFuture = scanFuture.flatMap { peripheral -> FutureStream in
//stop the scan as soon as we find the first peripheral
manager.stopScanning()
DispatchQueue.main.async {
self.connectionStatusLabel.text = "Found peripheral (peripheral.identifier.uuidString). Trying to connect"
print(self.connectionStatusLabel.text!)
}
//connect to the peripheral in order to trigger the connected mode
return peripheral.connect(connectionTimeout: 10, capacity: 5)
}
In the file ViewController.swift this error appears on line 97 at return peripheral.connect(connectionTimeout: 10, capacity: 5):
//We will connect to the first scanned peripheral
let connectionFuture = scanFuture.flatMap { peripheral -> FutureStream in
//stop the scan as soon as we find the first peripheral
manager.stopScanning()
DispatchQueue.main.async {
self.connectionStatusLabel.text = "Found peripheral (peripheral.identifier.uuidString). Trying to connect"
print(self.connectionStatusLabel.text!)
}
//connect to the peripheral in order to trigger the connected mode
return peripheral.connect(connectionTimeout: 10, capacity: 5)
}