Question

I have created a small app which I have not used any .entitlement file for running in both simulator and device. Its working fine too...But I don't know where this .entitlement file is used and how it can be created.Is it important for the app?

Was it helpful?

Solution

Entitlements are special rights with which an application can gain additional privileges and access to certain functions of the system, such as access to the keychain (keychain-access-groups entitlement), launching applications just like SpringBoard does (com.apple.springboard.launchapplications entitlement), and so on.

An Entitlements.xml file is used when codesigning an application, both by the official codesign_allocate tool that comes with Xcode and the developer tools, and by the ldid utility that can be used for fake codesigning on jailbroken devices. Essentially, it's a property list file which contains one or more of these entitlements and whose contents will be merged into the executable during the codesigning process. When the OS attempts to run the application, and it looks for the signature of the binary, it finds the now-hardcoded entitlements file, and instructs the sandbox daemon to lift certain bans of privileges accoring to the contents of that file.

Here are all documented entitlements for iOS, other undocumented ones can also be found by looking at some excutable files in iOS.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top