Entitlements.plist not created properly

2019-02-03 07:06发布

reading the doc from apple I need to create an ad-hoc distribution app, and to do so I need the entitlements.plist. when i create a new entitlement, the value "get-task-allow" is not present, so I added by hand.. is right?? at the end the Entitlements.plist is this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>application-identifier</key>
    <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
    <key>keychain-access-groups</key>
    <array>
        <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
    </array>
    <key>get-task-allow</key>
    <true/>
</dict>
</plist>

5条回答
仙女界的扛把子
2楼-- · 2019-02-03 07:40

You can do so. Also you can select your Entitlements.plist in XCode and select in Main Menu: View / Property List Type / iPhone Entitlements plist. Then your key can be selected from dropdown list and will be called "Can be debugged" (as quite as I remember - it should be the only key avaliable in this list)

查看更多
Melony?
3楼-- · 2019-02-03 07:41

In XCode 4.2, the Entitlements file has been moved. It's now part of the project root's "Targets" section, at the bottom of the list of the "Summary" items.

查看更多
戒情不戒烟
4楼-- · 2019-02-03 07:42

I too had the same issue, with enterprise provisioning. After lots of googling I found this. Extracted the ipa, copy the Entitlements.plist to the Payload folder and codesigned with the method in this. didn't do anything else, it started installing properly.

查看更多
霸刀☆藐视天下
5楼-- · 2019-02-03 07:46

I had this same problem. I manually created a new row "get-task-allow", changed type to boolean and actually had to have it set to true to get the device token.

查看更多
ゆ 、 Hurt°
6楼-- · 2019-02-03 07:47

Try, in XCode, to go "new file" and in the wizard select "code signing". Select the "Entitlements" file type.

Just name it "Entitlements.plist". Make sure the task-allow is not checked for adhoc distrobution.

This is all you need to do, no need to "roll your own" :)

(Xcode 3.2.2)

UPDATE:

Since Xcode 4.2 the Entitlements.plist was removed from the "new file" menu. You now find it under: Project's Targets > Summary at the bottom of the page.

查看更多
登录 后发表回答