Skip to content

Timing issue with initialisation of WLXDeviceDiscoverer #47

@drdaz

Description

@drdaz

I'm seeing an issue with the order of things when trying to discover services. I've got the following code:

self.bluetoothDeviceManager = [WLXBluetoothDeviceManager deviceManager];
NSObject<WLXDeviceDiscoverer> *discoverer = self.bluetoothDeviceManager.discoverer;
discoverer.delegate = self;
[discoverer discoverDevicesNamed:@"MyServiceName" withServices:nil andTimeout:10];

The delegate callbacks are not happening; the discoverDevicesNamed:withServices:andTimeout call is returning NO since bluetoothOn is no at the time of the call. It gets set to YES shortly after the call (by WLXCentralManagerDelegate).

Is this not the recommended way of starting discovery?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions