Enterprise app deployment doesn't install on iOS 8.1.3

前端 未结 8 1438
我在风中等你
我在风中等你 2020-11-30 18:53

After updating iOS 8.1.3, I tried to download, but getting error \"Unable to download app\" and \"could not be installed at this time\" mes

相关标签:
8条回答
  • 2020-11-30 19:03

    After a few hours wracking braincells, here's how I did it:

    NOTE: I haven't currently tested this against iOS 8.1.2 or lower (proceed with caution!)

    For apps that have ALREADY been signed with your OWN enterprise certificate, all you have to do (as mentioned by RAStudios in his edit) is to edit the manifest.plist:

    Before:

    <key>bundle-identifier</key>
    <string>uk.co.acme.AcmeApp</string>
    

    After:

    <key>bundle-identifier</key>
    <string>S836XXACME.uk.co.acme.AcmeApp</string>
    

    For apps that have been signed by a third party that you're resigning with your enterprise certificate (this walkthrough is assuming the ipa file is AcmeApp.ipa, your entitlements file is entitlements.plist and your provisioning profile is provProvile.mobileprovision; all files are in the Desktop folder (Mac OSX), and S836XXACME is your team identifier):

    Create a new entitlements.plist file:

    <?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>S836XXACME.uk.co.acme.AcmeApp</string>
    <key>get-task-allow</key>
    <false/>
    </dict>
    </plist>
    

    Unzip the ipa:

    cd ~/Desktop
    
    unzip AcmeApp.ipa 
    

    Remove the Code Signature:

    rm -r Payload/AcmeApp.app/_CodeSignature/ 
    

    Copy in the mobileprovision file:

    cp provProfile.mobileprovision Payload/AcmeApp.app/embedded.mobileprovision 
    

    Codesign:

    codesign -f -s "iPhone Distribution: ACME Corporation Limited" --entitlements entitlements.plist Payload/AcmeApp.app
    

    Zip it up as the resigned ipa:

    zip -qr AcmeApp_resigned.ipa Payload/
    

    You also need to amend the manifest.plist file as per the 'ALREADY' signed part earlier:

    <key>bundle-identifier</key>
    <string>S836XXACME.uk.co.acme.AcmeApp</string>
    
    0 讨论(0)
  • 2020-11-30 19:04

    After investigating..

    Edit: After further testing, I found that simply matching the bundle ID in the Info.plist and the bundle ID in the manifest.plist worked for installing apps over-the-air on iOS 8.1.3. If this solution does not work, try the solution below.


    Original Solution

    Fix to the problem:

    Your application must have a valid entitlements.plist, which includes correct the valid bundle identifier of an application.

    If you are distributing an application signed with a iOS development certificate, here is an example of a entitlements.plist you should include with your app.

    <?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>com.yourbundleidhere.mycoolapp</string>
        <key>com.apple.developer.team-identifier</key>
        <string>com.yourbundleidhere.mycoolapp</string>
        <key>get-task-allow</key>
        <true/>
        <key>keychain-access-groups</key>
        <array>
            <string>com.yourbundleidhere.mycoolapp</string>
        </array>
    </dict>
    </plist>
    

    If you are using a wildcard profile, replace com.yourbundleidhere.mycoolapp with yourwildcardappid.*. In both instances, you can use iResign to properly resign applications and include the now required, entitlements.plist.

    Explanation of the problem

    Due to security patches (see here under CVE-2014-4493), without the entitlements.plist, the application will not install. The security patch keeps applications from overriding existing apps and installing over the top of them/replacing them.

    0 讨论(0)
  • 2020-11-30 19:08

    I have answered this here, this worked for me without having to do anything else

    0 讨论(0)
  • 2020-11-30 19:09

    I have sovled this problem.

    1. Since Apple has changed provisioning profiles, please RENEW the provisioning profiles (File 1) and copy it into the "Payload/".
    2. Make sure there's a Entitlements.plist (File 2) in the "Payload/", and this plist file MUST be PLAIN TEXT which is created by a text editor.
    3. Make sure there's a Info.plist (File 3) in "Payload/", and this is created by XCode;
    4. Copy the Entitlements.plist (File 4) anywhere else except the "Payload/".
    5. Be sure "Bundle identifier" in File 1-4 should be the same.
    6. Use this Entitlements.plist (File 4) to Re-Sign the IPA file.

    You can resign it like this

    codesign -fs "iPhone Distribution: Your Company Name" --entitlements=/Users/SenTR/Downloads/codesign/Entitlements.plist /Users/SenTR/Downloads/codesign/Payload/Your_Project_name.app
    

    Entitlements.plist sample

    <?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>PREFIX.yourappBundleID</string>
            <key>aps-environment</key>
            <string>production</string>
            <key>get-task-allow</key>
            <false/>
            <key>keychain-access-groups</key>
            <array>
                <string>PREFIX.yourappBundleID</string>
            </array>
        </dict>
    </plist>
    

    If you know Chinese, this will be helpful.

    http://hennry.com/2015/03/fail-to-resign-ipa-since-ios8/

    0 讨论(0)
  • 2020-11-30 19:11

    I have the same issue and this happens for the applications that doesn't have any entitlements.

    Re-signing the app with entitlement solved the issue for me, but this is going to be pain as all the applications that are already deployed need to be re-signed and deployed.

    This is a weird issue because these apps which failed for me doesn't use anything like keychain sharing or push notifications and hence doesn't need an entitlement at all (as per my understanding). Now when I just add an entitlement with keychain-sharing it starts working.

    0 讨论(0)
  • 2020-11-30 19:16

    In addition to @Mark's and @RaStudio's answers, I have seen two more causes for the 'Unable to download application' message; one of which is new to iOS 8.1.3.

    New failure cause on iOS 8.1.3

    This error occurs when trying to install an application that has an expired provisioning profile. When signing an application, both the certificate and the provisioning profile must be valid and not expired. It seems as though an application with an expired provisioning profile and non-expired certificate can be installed on iOS 8.1.2 in some circumstances. Ensure that the provisining profile is not expired by going to Apple's developer center.

    Old failure cause

    This error occurs when trying to download an application signed with a development certificate and provisioning profile if the device has not been added to the development provisining profile on Apple's developer center.

    Ensure device is added to provisioning profile

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