how to call builtin-productPackagingUtility in command line
I would like to sign my app folder at the end of the build, not during the Xcode build.
IIRC recent versions of Xcode complain if you disable code signing for a device build.
The easiest way around this is to let Xcode sign it and then re-sign it later. Steps are approximately
- Dump the original entitlements with
codesign -d --entitlements=MyApp.xcent MyApp.app
- If you're changing provisioning profiles, copy the new one to
MyApp.app/embedded.mobileprovision
and modify the entitlements accordingly (IIRC the file format has a 4-byte magic and a 4-byte length; remember to update the length!). - Re-sign with your desired certificate.
Using the codesign utility does not require an xcent file. You can simply create a plist file and use that for entitlements. Make sure it is an XML plist, not binary.
The format of the .entitlements and the ${APPNAME}.xcent is the same so it can just be copied across.