Google+

Monday, October 28, 2019

Compile and load kext

The problem is that I use MacOS 10.15, and the sdk is already installed in the folder:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/

So if I do "ls" to this folder, it shows:

DriverKit19.0.sdk MacOSX.sdk MacOSX10.15.sdk

Now I need to copy 10.14 sdk to this folder. The first thing I did is "svn export" the 10.14 sdk from

https://github.com/alexey-lysiuk/macos-sdk/tree/master/MacOSX10.14.sdk

I use this command, replace "tree/master" by "trunk":

svn export https://github.com/alexey-lysiuk/macos-sdk/trunk/MacOSX10.14.sdk

Then I "sudo cp -r" this folder to my SDKs folder. For compiling the project, I used:

xcodebuild -project "projectName.xcodeproj" -scheme "schemeName" -sdk macosx10.14 -derivedDataPath build clean build

Finally I changed the ownership of the kext:

sudo chown -R root:wheel yourKext.kext