iOS-BlueCap-Example icon indicating copy to clipboard operation
iOS-BlueCap-Example copied to clipboard

Cannot convert return expression of type 'FutureStream<Void>'(aka 'futureStream<()>') to return type 'FutureStream<Peripheral>'

Open jelmerbou opened this issue 7 years ago • 2 comments

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<Peripheral> 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) }

jelmerbou avatar Jul 12 '17 09:07 jelmerbou

Hey.. Have you found any solution for this...Every time I run my application without disconnecting the previous connection. It just hang their showing "trying to connect". Why does the timeout never called?...

ankit2002 avatar May 16 '18 13:05 ankit2002

Hey @ankit2002, It's a long time ago I worked on my bluecap project. I am going to search through my pc if I can find a solution for you.

jelmerbou avatar May 23 '18 09:05 jelmerbou