What is the use of entitlements.plist file?

PJR picture PJR · Oct 27, 2014 · Viewed 18.5k times · Source

I have some questions regarding entitlement file.

1) what is the use of entitlements file.

2) what happen if i don't add it.

3) what the difference between myApp.entitlements and entitlements.plist ?

Answer

bluebamboo picture bluebamboo · Nov 4, 2014
  1. The entitlements file defines certain capabilities of your app. Usually, the file is automatically generated by Xcode when you enable a capability for your app.
  2. You only need the file if you enable certain capabilities, e.g. Healthkit integration. If you'd like to use these features, you have to add it. Otherwise, Apple will reject your app.
  3. You can name the file like you want. You can also rename it as long as the build settings point to the correct file name for it.