How to sign mac application using HSM and Apple CryptoKit?

Mac application files with extension .app and .ipa will be signed using the key stored in HSM(Not in Secure Enclave).How will Apple cryptokit framework help in the signing process?