Skip to content

EXEC_BAD_ACCESS when trying to reference controllerServiceUUID #10

Description

@ds8k

I'm trying to implement this library using a custom CMakeLists file, and seemingly I got it built and added. However when I try to run [SteamControllerManager listen], I get a bad access error in scanForControllers:

- (void)scanForControllers {
if (centralManager.state == CBManagerStatePoweredOn) {
[centralManager scanForPeripheralsWithServices:@[controllerServiceUUID] options:nil];
NSArray *peripherals = [centralManager retrieveConnectedPeripheralsWithServices:@[controllerServiceUUID]];
for (CBPeripheral *peripheral in peripherals) {
if (peripheral.state == CBPeripheralStateDisconnected) {
[connectingPeripherals addObject:peripheral];
[centralManager connectPeripheral:peripheral options:nil];
} // TODO: something if it's disconnected?
}
}
}

The culprit appears to be controllerServiceUUID. Is this a known issue, or the result of a messed up cmake file?

(edited to show the source code from the latest commit at the time the issue was posted)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions