Hi, thanks a lot for your answer! I checked the entitlements in the application binary and during runtime and can confirm they are present
sebastian$ cat foo.entitlements
<?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.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>
sebastian$ codesign -d --entitlements - /Users/sebastian/Downloads/Foo.app
Executable=/Users/sebastian/Downloads/Downloads/Foo.app/Contents/MacOS/Foo
??qq<?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.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>
sebastian$ codesign -d --entitlements :- 36452
Executable=/Users/sebastian/Downloads/Foo.app/Contents/MacOS/Foo
<?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.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>
I still receive the same error in Xcode:
Could not attach to pid : “36452”
Just to double check, here are some information. I use macOS 10.14.5 with Xcode 11.0 beta (11M336w). I added the entry com.apple.security.get-task-allow manually to my foo.entitlements file and sign it through my manual build chain with:
codesign -o runtime --entitlements foo.entitlements --force --sign "..." Foo.app
1) Is there any difference between <key>com.apple.security.get-task-allow</key> and <key>get-task-allow</key>? I can find examples for both.
2) Is there any difference between the foo.entitlements and an entitlement plist file? In several documentations I find a reference that the get-task-allow flag must be added to the entitlement plist