Is only the first time to discovery that can find all devices?
yuchin067 opened this issue · comments
I have Apple TV, Chromecast, Roku, Fire TV of these devices.
First time, I used startDiscovery method to discover the device above. It can find all devices by DiscoveryManagerDelegate method:
- (void) discoveryManager:(DiscoveryManager *)manager didFindDevice:(ConnectableDevice *)device
But the second time and more times, I used startDiscovery, the result only find the Roku TV.
Before I used startDiscovery, I called stopDiscovery. But the result is the same.
How can I find all devices?
Thanks.
@yuchin067, this works as designed. When a device is found for the first time, -[DevicePicker discoveryManager:didFindDevice:]
is called. However, even after restarting discovery, the device is still the same, so -[DevicePicker discoveryManager:didUpdateDevice:]
will be called afterwards. You can use both these methods and/or -[DiscoveryManager allDevices]
/-[DiscoveryManager compatibleDevices]
to get all devices.
So there is no method can discovery again?
I will use -[DiscoveryManager compatibleDevices] to get devices.
Thanks.