IOKit/usb/IOUSBBus.h file not found

develop kext on macos10.12,with Xcode7.2.1,

#include <IOKit/usb/IOUSBBus.h>

build the project, throw error, it says IOKit/usb/IOUSBBus.h file not found


but on 10.10, the project build is ok.

how to change this include?

and where i can get the osx changes between 10.10 and 10.12.


3ks

Replies

There have been big changes to the in-kernel USB implementation in recent releases of macOS (between 10.10 and 10.11 IIRC). It’s not my specialty, so I don’t have a lot of specific advice to give here. The general advice for KEXT development is that you should use the tools associated with the lowest macOS release you’re targeting (this is very different from user space development, where we recommend that you always use the latest tools). So, what’s your intended deployment target?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I am trying to build https://github.com/jwise/HoRNDIS

After 10.10 it was removed. That is why you receive that error in El Capitan and Sierra. It is no longer there.

Here is a link to see the differences between 10.10 and 10.11:


https://developer.apple.com/library/content/releasenotes/General/APIDiffsMacOSX10_11/Objective-C/Kernel.html

...and here is the difference between 10.11 and 10.12:


https://developer.apple.com/library/content/releasenotes/General/APIDiffsMacOS10_12/Objective-C/Kernel.html