skip to Main Content

I’m building my app with Xcode using Release configuration for production:

enter image description here

But then when I check the resulting binary for entitlements:

codesign -d --entitlements - --xml /Users/user/Library/Developer/Xcode/DerivedData/LABService-emdoarcsbzcuepbrkkkpbcckcaqx/Build/Products/Release/MyAppName

I’m getting:

Executable=/Users/user/Library/Developer/Xcode/DerivedData/LABService-emdoarcsbzcuepbrkkkpbcckcaqx/Build/Products/Release/MyAppName
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
   <dict>
      <key>com.apple.security.get-task-allow</key>
      <true/>
   </dict>
</plist>

How do I remove the com.apple.security.get-task-allow entitlement from the release build (but keep it for the debug config build)?

2

Answers


  1. Chosen as BEST ANSWER

    OK, answering my own question. The com.apple.security.get-task-allow entitlement will be automatically removed when you code-sign the binary. I'm not sure if it will be done with the codesign command line tool, but the Xcode does it from the UI.


  2. Xcode automatically adds the Get Task Allow entitlement to apps that you build for debugging, while removing the entitlement before App Store submission. This enables Xcode itself to attach to and debug your app during development.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search