It is very easy to sign application code outside of Xcode. Just create your rights in a separate plist file as follows:
<?xml version="1.0" encoding="utf-8"?> <plist version="1.0"> <dict> <key>com.apple.security.app-sandbox</key> <true/> </dict> </plist>
Once you do this, simply run this command to sign the code of your application package and enable the sandbox, making it part of the rights:
codesign -s - -f --entitlements /path/to/entitlement.plist /path/to/YourApp.app/
If you already signed the code with the certificate, simply replace the "-s" above with the "-s" of a third-party Macintosh developer ... "and use the developer certificate.
source share