I realize that kexts have been deprecated with Catalina, and we are working towards replacing them, but after upgrading to Xcode 11, I am no longer able to build and load my kext at all. With the exact same code and project (only difference is building with Xcode 11), I get the following error when trying to load my built kext:
kxld[com.myorg.kext]: The super class vtable 'vtable for IOUserClient' for vtable 'vtable for com_myorg_kext_UserClient' is out of date. Make sure your kext has been built against the correct headers.
kxld[com.myorg.kext]: The super class vtable 'vtable for IOService' for vtable 'vtable for com_myorg_kext' is out of date. Make sure your kext has been built against the correct headers.
xld[com.myorg.kext]: The super class vtable 'vtable for IOService' for vtable 'vtable for com_myorg_kext' is out ofd
Is there some way to be able to build the kext in Xcode 11, or do I just keep Xcode 10.3 around for the express purpose of building kexts?
Thank you for the guidance - I actually was able to take this information and set up something that (I think) is a better solution all around.
Basically, I created an "External Build System" target in my Xcode 11 project that is set up to build my kext target (driver.kext) as follows:
- Build Tool: /Applications/Xcode-9.4.1.app/Contents/Developer/usr/bin/xcodebuild
- Arguments: -project "${PROJECT_FILE_PATH}" -target driver.kext -configuration ${CONFIGURATION} -quiet $(ACTION)
This allows me to have all my files in a single project, but build the kext using Xcode-9.4.1 (the latest to support 10.13).