iPhone Entitlements problem with XCode 4 for Ad Hoc distribution

前端 未结 7 1928
半阙折子戏
半阙折子戏 2021-02-01 06:26

I have reread all the documentation and postings on Ad Hoc distribution and still have a problem. If I try \'wireless\' distribution (with a .plist and .ipa file being downloade

相关标签:
7条回答
  • 2021-02-01 06:58

    Maybe they made a shorter version of Entitlements.plist in xcode4. The default Entitlements.plist does not contain the 'application-identifier' and the 'keychain-access-groups' keys, but if you change the value of the 'Can be debugged' key via the 'ASCII Property editor' it really changes the value of the 'get-task-allow' key in the background...

    0 讨论(0)
  • 2021-02-01 06:59

    I tried setting the entitlements parameter "on" or "off", re-download my ad-hoc provisional that had been used for as long as I can remember, and tried hundreds of other combinations. None worked for me until...I went to the provisional portal and recreate a new provisional.

    What really got me to stay up until 4:00AM and wasting hours of time that I did not have was how I created the ad hoc provisional. On Apple's iOS provisional Portal page, if you click on the "provisioning" on the left side bar, you will see 4 tabs: "development", "distribution", and the other two. I used to use my provisional created under the "development" tab and added all the test users' phone UUID. That had worked for me for years until the xCode 4 came along, and I was stupid enough to jump on board too fast. Apple engineers had always given me a surprise "mid-night" party every time xCode had an update. And they will wait long enough for me to forget this experience and release the next one.

    The solution that worked for me was to create a provisional under the distribution tab. When you create a new provisional here, you have the option of selecting "ad hoc" as the "Distribution Method." After used this provisional on xCode project and target build setting, and turned off "can be debugged" on the entitlements, I then could install via iTunes or via OTA. I hope this tip might help someone save a few gray hair.

    0 讨论(0)
  • 2021-02-01 07:06

    If you right click on the plist file in the project navigator, and select "Open As" then "Source Code", you can edit it as plain source.

    0 讨论(0)
  • 2021-02-01 07:10

    The entitlements file should be:

    <?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>get-task-allow</key>
               <false/>
             <key>application-identifier</key>
               <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
             <key>keychain-access-groups</key>
               <array>
                 <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
               </array>
    </dict>
    </plist>
    

    this works for wireless too.
    Why on earth the default one doesn't have all this in is something only Apple can answer. I can't see how to edit the raw text of a plist in Xcode so edited in TextEdit.

    0 讨论(0)
  • 2021-02-01 07:12

    I just wrote a blog post outlining all the steps to successful ad hoc distributions in Xcode 4 which may be helpful. http://www.musicalgeometry.com/?p=1237

    0 讨论(0)
  • 2021-02-01 07:16

    Entitlements.plist should be added in project and there should be only get-task-allow key inside it.

    When debugging on device using developer profile, It should be checked

    When building using Ad-Hoc or Distribution profile, It should be unchecked

    Regarding Q4: If you like you can increase it by just doing... but I don't recommend it.

    0 讨论(0)
提交回复
热议问题