Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create Entitlement.plist file in Xcode?

I have downloaded the latest version of Xcode. I want to create Entitlement.plist file in my project.

Please give me proper steps to create an Entitlement.plist file in Xcode.

like image 354
Dinesh Kaushik Avatar asked Oct 30 '13 05:10

Dinesh Kaushik


People also ask

How do I create a new plist in Xcode?

Right click on the folder you want to add it to and choose "New file…" This will bring up a blank file with columns for Key, Type and Value. Choose any of the presented options, you'll be overwriting it anyway. Now change the Key to "Apple".

What is entitlement file in Xcode?

An app stores its entitlements as key-value pairs embedded in the code signature of its binary executable. You configure entitlements for your app by declaring capabilities for a target in Xcode. Xcode records capabilities that you add in a property list file with the . entitlements extension.

What is entitlement file in iOS?

Entitlements are special app capabilities and security permissions granted to applications that are correctly configured to use them. In iOS, apps run in a sandbox, which provides a set of rules that limit access between the application and certain system resources or user data.


2 Answers

You can manage the Entitlements in the Capabilities tab of your target settings.

Any change there will automatically update either the Entitlements.plist or the Info.plist file.

That being said, an Entitlements.plist file is in the end just a plist. You can add as much plists as you like following the steps provided in this question.

like image 62
Gabriele Petronella Avatar answered Oct 02 '22 15:10

Gabriele Petronella


In Xcode 5, for common entitlements you no longer need to create an Entitlements.plist file manually. You use the new Capabilities pane instead. See https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AddingCapabilities/AddingCapabilities.html

If you still want to create one manually, here's how:

  1. File menu > New File...
  2. Select iOS > Resource > Property List
  3. Name the new file "foo.entitlements" (typically, "foo" is the target name)
  4. Click the (+) next to "Entitlements File" to add a top-level item (the property list editor will use the correct schema due to the file extension)

Don't forget to set your target's CODE_SIGN_ENTITLEMENTS build setting to be the path to entitlements file you just added.

like image 33
jrc Avatar answered Oct 02 '22 14:10

jrc