I need a bit more support. Per Apple’s guidance, our dext’s hosting app checks to see if the dext is installed, and if it is not installed, it will register the dext. I am going to refer to this as “auto registration.” I have also added a menu option to register the dext, which I am going to call “manual registration.”
The manual registration works. The user is prompted to “Allow” the dext to be loaded, and things proceed normally.
The auto-registration does not work. It produces an error response that is not helpful:
Request did fail with Error 1 (The operation couldn’t be completed. (OSSystemExtensionErrorDomain error 1.)) Registration failed, unknown error.
They execute the exact same code path – the auto registration calls the menu option’s function that executes from user selection.
When comparing the sysextd logs, they differ starting at “Advancing from validating to validating_by_category.” The manual registration has a trace that reads:
got reply from com.apple.system_extension.driver_extension...
The auto registration does not get this reply.
Attached are the two logs. This is Sonoma 14.7.6, the earliest OS we must support. Any suggestions on what is happening or how to fix it so that auto registration can work?
Per Apple’s guidance, our DEX’s hosting app checks to see if the DEX is installed, and if it is not installed, it will register the DEX. I am going to refer to this as “auto registration.”
This is a bit of a random "guess", but when are you actually running this check and attempting the install? If you run this code "early enough" (main or pre-main), it's possible that you're basically attempting to register before your app is "visible" to the larger system. What happens if you run this code in applicationDidFinishLaunching or, better yet, a few seconds AFTER that point?
Also, as a side note, if you're actually using "com.MyCompany" in any way (even testing), then I'd strongly recommend you stop. Early in iOS's history, that prefix ended up being used by a whole bunch of apps (basically out of ignorance), to the point that the App Store ended up blocking that prefix to stop the problem. Stay away from that mess and use a valid prefix.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware