iOS Entitlements via codesign
Entitlements are key-value pairs embedded in the app bundle that define the capabilities of the app. They are used to grant the app access to system resources and services. Entitlements are specified in the app’s provisioning profile and are embedded in the app bundle during the code signing process.
Exporting an app from Xcode is a 3 step process. Archive, Export, and Unzip. The entitlements are embedded in the app bundle during the signing process. Xcode will export the app as an .ipa file. The .ipa file is a zip file that contains the app bundle and the provisioning profile. The entitlements are embedded in the app bundle as a part of th binary within the .ipa file.
The entitlements can be viewed using the codesign command.
Here is is the command to view the entitlements of an app bundle in XML format.
codesign -d --entitlements - --xml /path/to/MyAppBundle