3

在 iOS 应用程序中添加权利文件的目的是什么?这个 Get-task-allow 可以包含在任何其他方式中吗?为什么我必须在我的项目中包含这个键?

4

1 回答 1

7

According to Apple Docs

Entitlements confer specific capabilities or security permissions to your app. These file(s) define properties that provide your application access to iOS features (such as push notifications) and secure data (such as the user’s keychain).

Set entitlement values in order to enable iCloud, push notifications, and App Sandbox (App Sandbox is Mac OS X only). Each entitlement has a default value, which in most cases disables the capability associated with the entitlement. When you set an entitlement, you are overriding the default by providing an appropriate key-value pair

in essence, it confers app developers to have finer control.

Some points to remember though -

  1. Get-task-allow is now called "Can be debugged" in Xcode4.1 & above if you've used the modernisation tool.
  2. no need entitlements for simply ad-hoc , simply using ad-hoc profile to archive and share , then fine.
  3. There's no issue with leaving the Entitlements.plist file in the Distribution build, I've had several apps submitted with it. Actually, Entitlements.plist is also for other iOS features that your app may use.
于 2013-03-06T09:02:13.407 回答