1
votes

The following code compiles fine when compiling as Mac OSX 10.6 as the active SDK (linked with the 10.5 frameworks, 10.5 set as the base SDK)

IOBluetoothHostController *controller = [IOBluetoothHostController defaultController];

However, if I compile it with Mac OSX 10.5 as the active SDK, I get an error message saying that IOBluetoothHostController is undeclared. How can I resolve this?

2
I was able to get it to compile by specifying @class IOBluetoothHostController in the header file. This still doesn't explain why it would error out on compiling though. - Ryan

2 Answers

3
votes

The problem is that the IOBluetoothHostController.h header is wrapped in:

#if BLUETOOTH_VERSION_MAX_ALLOWED >= BLUETOOTH_VERSION_2_0

I'm not sure exactly what's going on there, but I was able to get the header included by specifying:

#define BLUETOOTH_VERSION_USE_CURRENT 

in my prefix header.

0
votes

This isn't an answer, but something for you to check.

Have you added the appropriate Bluetooth framework to your project? Has there been a change in 10.6 with regard to the framework that IOBluetoothHostController belongs to?