How to Use Driver Kit

Hi all

For checking how the driver kit Works. I have downloaded the Sample Code from

https://github.com/knightsc/USBApp.git . After getting the Relevant entitlements from Apple.


The Code Gets compiled Successfully. But when I try to run the APP, it crashes.


when I looked into the crash Report the error was


Crashed Thread: 0



Exception Type: EXC_CRASH (Code Signature Invalid)

Exception Codes: 0x0000000000000000, 0x0000000000000000

Exception Note: EXC_CORPSE_NOTIFY



Termination Reason: Namespace CODESIGNING, Code 0x1


I am not sure why the app is crashing with Code Signature Invalid Error code. if there is some problem with the Signature or profiles, then it wouldn't have compiled.

Thanks in advance for your support.


Regards

Gunjan

Replies

Hi.

I had same problem. After signing App with "Developer Applicatoin ID", the app can launched.

But if i select activate button, activation request always failed with below error.


sysex didFailWithError Error Domain=OSSystemExtensionErrorDomain Code=8

"Invalid code signature or missing entitlements" UserInfo={NSLocalizedDescription=Invalid code signature or missing entitlements}


I edit system extension identifier on the code and driver's property.

Any idea to solve this?

Hi,


Just one clarafication..

For compiling and testing purpose, Entitlement is required or not.


As per Apple Documentations link given below..

Link: https://developer.apple.com/system-extensions/


Request an Entitlement

If you plan to deploy drivers built with DriverKit, allow other developers to use your system extensions, or use the EndpointSecurity API, you’ll need to request an entitlement from Apple.

While your request is in review, you can test system extensions on your Mac by temporarily turning off System Integrity Protection.


So as per my understanding, we just need to disable System Integrity Protection and deploy System Extension.


Nowhere it's mentioned that for compiling and building Sytem Extension, Entitlment is required.


Let me know whether my assumption is correct or not.


Thanks in advance.

have u got the entitlements. if you dont have the entitlements "sysextd" will not allow it load.

Excuse me!
So the entitlement approved by Apple is required? I signed my app and dext then tried to load my dext, it seems loaded successfully.
But in console I can't see any log printed by my dext, the only one log is in the crash report appears after I plug-in usb device, and the content is:


Can anyone help? Thanks!