在 iOS 应用程序中添加权利文件的目的是什么?这个 Get-task-allow 可以包含在任何其他方式中吗?为什么我必须在我的项目中包含这个键?
1 回答
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 -
Get-task-allow
is now called "Can be debugged" in Xcode4.1 & above if you've used the modernisation tool.- no need entitlements for simply ad-hoc , simply using ad-hoc profile to archive and share , then fine.
- 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.