This is an M1 issue only
Apple silicon has certain differences, like requiring that all code be signed, but I can’t think of anything that fundamentally changes this story.
Is the app built for both Apple silicon and Intel architectures?
After putting the app on the target Apple silicon machine, please do the following:
-
Check that no part of it is quarantined.
% find Test694784.app -print0 | xargs -0 xattr | grep com.apple.quarantine
-
Check that the signature verifies:
% codesign -v -vvv Test694784.app
-
Check that the device’s provisioning UUID is listened in the app’s profile:
% system_profiler SPHardwareDataType | grep "Provisioning UDID"
Provisioning UDID: UUUUUUUU-UUUUUUUUUUUUUUUU
% security cms -D -i Test694784.app/Contents/embedded.provisionprofile | grep UUUUUUUU-UUUUUUUUUUUUUUUU
<string>A545CA26-80D7-5B38-A98C-530A798BE342</string>
-
Check that the app’s signing certificate is also listed in the profile:
% codesign -d --extract-certificates Test694784.app
…
% xxd codesign0
00000000: 3082 05c4 3082 04ac a003 0201 0202 107e 0...0..........~
…
000005c0: 0038 7e82 b4e2 f290 .8~.....
% security cms -D -i Test694784.app/Contents/embedded.provisionprofile > embedded.plist
% /usr/libexec/PlistBuddy -c "Print :DeveloperCertificates:0" embedded.plist > profile0.cer
% xxd profile0.cer
00000000: 3082 05c4 3082 04ac a003 0201 0202 107e 0...0..........~
…
000005c0: 0038 7e82 b4e2 f290 0a .8~......
Note that PlistBuddy adds a new line at the end, which is surprisingly hard to remove with macOS’s built-in shell commands.
Also, if DeveloperCertificates has more than one certificate, you’ll want to iterate through them all until you find a match.
-
Check that every entitlement claimed by the code signature is authorised by the provisioning profile:
% codesign -d --entitlements :Test694784.entitlements Test694784.app
Executable=/Users/quinn/Library/Developer/Xcode/DerivedData/Test694784-acdsynfichrddecioqafdaimplsz/Build/Products/Debug/Test694784.app/Contents/MacOS/Test694784
% bbedit Test694784.entitlements
% plutil -p Test694784.entitlements
{
"com.apple.application-identifier" => "SKMME9E2Y8.com.example.apple-samplecode.Test694784"
"com.apple.developer.networking.custom-protocol" => 1
"com.apple.developer.team-identifier" => "SKMME9E2Y8"
"com.apple.security.get-task-allow" => 1
}
% /usr/libexec/PlistBuddy -c "Print :Entitlements" embedded.plist
Dict {
com.apple.developer.team-identifier = SKMME9E2Y8
com.apple.developer.networking.custom-protocol = true
com.apple.application-identifier = SKMME9E2Y8.com.example.apple-samplecode.Test694784
keychain-access-groups = Array {
SKMME9E2Y8.*
}
}
IMPORTANT On macOS, some entitlements don’t need to be authorised by a profile. For more on this,h see What exactly is a provisioning profile?.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"