I recently asked a question about how to sign manually without using xcode. I was provided a link about signing a Daemon with a Restricted Entitlement (https://developer.apple.com/documentation/xcode/signing-a-daemon-with-a-restricted-entitlement). This works, and I have manually signed everything in my DaemonInAppsClothing.app, and it runs. The problem, however, is that when I copy this to another mac running 10.15, it will not load. The output from the log stream is:
2022-03-02 10:53:50.370834-0700 0x910e Activity 0x38f 128 0 amfid: (Security) SecTrustEvaluateIfNecessary
2022-03-02 10:53:50.373382-0700 0x910e Activity 0xac80 128 0 amfid: (Security) SecTrustEvaluateIfNecessary
2022-03-02 10:53:50.375773-0700 0x910e Default 0x0 128 0 amfid: [com.apple.MobileFileIntegrity:amfid] Requirements for restricted entitlements failed to validate, error -67050, requirements: '<private>', error: (null)
2022-03-02 10:53:50.375806-0700 0x910e Default 0x0 128 0 amfid: [com.apple.MobileFileIntegrity:amfid] Restricted entitlements not validated, bailing out. Error: (null)
2022-03-02 10:53:50.375917-0700 0x910e Default 0x0 128 0 amfid: /Library/Application Support/DaemonInAppsClothing/DaemonInAppsClothing.app/Contents/MacOS/DaemonInAppsClothing signature not valid: -67050
2022-03-02 10:53:50.375989-0700 0x91de Default 0x0 0 0 kernel: (AppleMobileFileIntegrity) AMFI: code signature validation failed.
2022-03-02 10:53:50.375999-0700 0x91de Default 0x0 0 0 kernel: (AppleMobileFileIntegrity) AMFI: bailing out because of restricted entitlements.
2022-03-02 10:53:50.376023-0700 0x91de Default 0x0 0 0 kernel: mac_vnode_check_signature: /Library/Application Support/DaemonInAppsClothing/DaemonInAppsClothing.app/Contents/MacOS/DaemonInAppsClothing: code signature validation failed fatally: When validating /Library/Application Support/DaemonInAppsClothing/DaemonInAppsClothing.app/Contents/MacOS/DaemonInAppsClothing: Code has restricted entitlements, but the validation of its code signature failed.
Unsatisfied Entitlements:
2022-03-02 10:53:50.376053-0700 0x91de Default 0x0 0 0 kernel: proc 1674: load code signature error 4 for file "DaemonInAppsClothing"
2022-03-02 10:53:50.376528-0700 0x91df Default 0x0 0 0 kernel: (AppleSystemPolicy) ASP: Sleep interrupted, signal 0x100
2022-03-02 10:53:50.376541-0700 0x91df Default 0x0 0 0 kernel: (AppleSystemPolicy) ASP: Security policy would not allow process: 1674, /Library/Application Support/DaemonInAppsClothing/DaemonInAppsClothing.app/Contents/MacOS/DaemonInAppsClothing
2022-03-02 10:53:50.376611-0700 0x91df Default 0x0 0 0 kernel: DaemonInAppsClothing[1674] Corpse allowed 1 of 5
2022-03-02 10:53:50.379313-0700 0x9118 Activity 0x6dd4 135 0 syspolicyd: (Security) SecTrustEvaluateIfNecessary
2022-03-02 10:53:50.381449-0700 0x9118 Activity 0x6dd5 135 0 syspolicyd: (Security) SecTrustEvaluateIfNecessary
2022-03-02 10:53:50.385619-0700 0x9118 Default 0x0 135 0 syspolicyd: [com.apple.syspolicy.exec:default] GK evaluateScanResult: 2, PST: (vuid: 261312F5-D32F-4491-9E10-21D820BDAD32), (objid: 7500674), (team: AMLU8UA7F6), (id: (null)), (bundle_id: (null)), 0, 0, 1, 0, 8, 0
2022-03-02 10:53:50.385798-0700 0x8dd0 Error 0x0 135 0 syspolicyd: [com.apple.syspolicy.exec:default] failed to call driver: 0x3
2022-03-02 10:53:50.385783-0700 0x8dd0 Default 0x0 0 0 kernel: (AppleSystemPolicy) ASP: Could not find reference 17, process must have died
2022-03-02 10:53:50.387227-0700 0x8dd1 Default 0x0 213 0 ReportCrash: Parsing corpse data for pid 1674
2022-03-02 10:53:50.387466-0700 0x8dd1 Default 0x0 213 0 ReportCrash: Parsing corpse data for process DaemonInAppsClot [pid 1674]
2022-03-02 10:53:52.487053-0700 0x8dd1 Default 0x0 213 0 ReportCrash: _dyld_process_info_create failed
2022-03-02 10:53:54.987270-0700 0x8dd1 Default 0x0 213 0 ReportCrash: (CoreSymbolication) Failed to read dyld info for process 1674 (6)
2022-03-02 10:53:54.987969-0700 0x8dd1 Default 0x0 213 0 ReportCrash: Failed to create CSSymbolicatorRef for <private>[1674]
I have tried to verify the entitlements, but I get this output:
Executable=/Library/Application Support/DaemonInAppsClothing/DaemonInAppsClothing.app/Contents/MacOS/DaemonInAppsClothing
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.endpoint-security.client</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
</dict>
</plist>
sh-3.2# security cms -D -i DaemonInAppsClothing.app/Contents/embedded.provisionprofile
security: cert import failed: A default keychain could not be found.
security: problem decoding
Any help would be appreciated