That sample doesn't quite work out of the box. Here is how you can get it to work on macOS 26 with Xcode 26 (and earlier versions of both, but that's what I'm using).
Download the sample from https://developer.apple.com/documentation/driverkit/communicating-between-a-driverkit-extension-and-a-client-app?.
Follow only some of the directions under Configure the sample code project:
(turn off SIP) - skip this, it is no longer necessary
Set Automatically manage signing for both the driver and the app targets
Select a development team. Xcode will tell you that you cannot select an individual for this type of signing.
ignore the advice about "Sign to run locally" and AD_HOC_CODE_SIGNING_ALLOWED.
ignore all the other stuff. You don't need to make profiles, add capabilities, manually download profiles or add them to Xcode.
Now go the Build Settings for the driver and app target, and change the Product Bundle Identifier. The download project uses a disambiguation string that doesn't work, and you end up with very long bundle IDs which cause an error - see
https://developer.apple.com/forums/thread/785223
I used
com.shorty.dext-to-user-client-2-${DEVELOPMENT_TEAM}.driver
for the driver and
com.shorty.dext-to-user-client-2-${DEVELOPMENT_TEAM}
for the app
Then, to make running and debugging easier, you can alter the Scheme for the app.
In Xcode, at the top of the window, click on your app target and select Edit Scheme. In the dialog, expose the Build scheme and select the Post Actions. Add a new Run Script phase with this content:
ditto "${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}" "/Applications/${FULL_PRODUCT_NAME}"
That will put your app into /Applications every time you build it. Build the app.
Next, tell the debugger to run that copy and not the one in the Build Products folder. Expose the Run part of the scheme, click on the Run section, then in the Info tab you'll see a popup for the Executable: location. Click that, select other..., navigate to your app in /Applications.
Everything else should Just Work.
It is possible to develop dexts if you're not a member of a development team, but it is much more difficult.