How to add entitlements to a Xojo app using codesign

The answer is simple but complicated. I’m changing the title of this thread to be more generic.

	<string>MyApp can use images, movies, and metadata such as title and description when you drag &amp; drop items from the Photos app.</string>
  • However, the actual key/value pairs for Entitlements instead have to be added during the code-signing process, they do not belong in Info.plist at all
  • To do this, first Create an entitlements plist file (the name doesn’t matter, but I use myapp_entitlements.plist) which looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
[... followed by a list of entitlements that you need for your app ... ]
[... etc ...]
codesign --force --options runtime --deep --entitlements /path/to/myapp_entitlements.plist --sign  'Developer ID Application: my company' /path/to/
  • to see what entitlements an app has, use this command:
codesign -d --entitlements :- /path/to/