14

I created a universal app. I'm trying to distribute the app using our Enterprise Developer License.

The problem is this: If I install the app on a device that has the UUID registered, the app installs fine. If I "TRY" to install the app on a device that DOES NOT have the UUID registered, the install fails to complete. I get the message "Unable to Download Application " "My App" could not be installed at this time.

Here is the log I'm getting:

Sep  5 10:47:07 my-iPad installd[54] <Error>: 0x2c3000 handle_install: Install of "/var/mobile/Media/PublicStaging/My App.app" requested by mobile_installation_proxy
Sep  5 10:47:08 my-iPad installd[54] <Error>: 0x2c3000 MobileInstallationInstall_Server: Installing app com.mysite.My-App
Sep  5 10:47:08 my-iPad installd[54] <Error>: profile not valid: 0xe8008012
Sep  5 10:47:08 my-iPad installd[54] <Error>: 0x2c3000 install_embedded_profile: Could not install embedded profile: 0xe8008012
Sep  5 10:47:08 my-iPad installd[54] <Error>: Sep  5 10:47:08  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
Sep  5 10:47:09 my-iPad installd[54] <Error>: 0x2c3000 verify_signer_identity: MISValidateSignatureAndCopyInfo failed for /var/tmp/install_staging.xjOLHU/My Appp.app/My App: 0xe8008015
Sep  5 10:47:09 my-iPad installd[54] <Error>: 0x2c3000 do_preflight_verification: Could not verify executable at /var/tmp/install_staging.xjOLHU/My App.app
Sep  5 10:47:09 my-iPad installd[54] <Error>: 0x2c3000 install_application: Could not preflight application install
Sep  5 10:47:09 my-iPad mobile_installation_proxy[907] <Error>: 0x3cadbb78 MobileInstallationInstall: failed with -1
Sep  5 10:47:09 my-iPad mobile_installation_proxy[907] <Error>: handle_install: Installation failed
Sep  5 10:47:10 mu-iPad installd[54] <Error>: 0x2c3000 handle_install: API failed

I've already done the usual troubleshooting:

  • Create new certs, making sure I had a cert for in-house distribution
  • Create new distribution profiles
  • Made sure the .ipa is using the distibution/adhoc profile for signing
  • Verified that my .plist is correct
  • Installed using a simple webpage (same problem)
  • Installed using iPhone Configuration Utility (same problem)
  • About a million other more esoteric build mods based on other peoples experience etc... etc... etc...

I'm pretty sure the problem is something to do the with distribution profile. The error log seems to point at a problem with the profile ("profile not valid: 0xe800812"). I've talked with Apple support and they say the certs and profiles seem to be right.

One of my support calls confused me. The Apple rep said that you still need to register the UUID of all devices EVEN when building the app for distribution using the Enterprise license. I don't think that this is accurate. From my research, the .ipa contains an embedded profile that is installed and you DON'T need to register all devices.

BUT, like I said earlier: If I run the install on a device that's included in the distribution/adhoc profile, it works. I'm totally confused and desperately need help.

Kara
  • 6,115
  • 16
  • 50
  • 57
JustLearningAgain
  • 2,227
  • 4
  • 34
  • 50

4 Answers4

38
  1. Take your IPA file, rename it to have a .zip extension.
  2. Unzip this file and open the Payload directory in Finder.
  3. Right click your application and click Show Package Contents.
  4. Find the file embedded.mobileprovision, and open this file in a text editor (like TextEdit).

Now, if inside this XML document you see a key for ProvisionedDevices, you are not signing with the correct provisioning profile. You need to create a In House provisioning profile instead. In the case that you've correctly signed your application with an In House profile, you will not see the ProvisionedDevices key in your embedded.mobileprovsion file, rather a key for ProvisionsAllDevices, which will be true.

mattyohe
  • 1,814
  • 12
  • 15
  • You nailed it. My question is how do I create the In House provisioning profile? Here's what I'm doing. I created the Distribution certificate using "Production - In-House and Ad Hoc. I already have an App ID. I then create a new distribution profile. The only choices I see are: Development- IOS App Development & Distribution - Ad Hoc. I don't see an "In-House" option. Am I missing something? – JustLearningAgain Sep 05 '13 at 21:38
  • 1
    First, verify you're using an enterprise account: Go here: https://developer.apple.com/membercenter/index.action#progSummary and if you don't see "iOS Developer Enterprise Program" you're using the wrong account. – mattyohe Sep 05 '13 at 22:03
  • If you do see you're using the correct account, then go to the Certificates, Identifiers & Profiles page: https://developer.apple.com/account/ios/profile/profileList.action Click the plus button, You should now be asked: "What type of provisioning profile do you need?" and you need to choose "In House" under the Distribution header. – mattyohe Sep 05 '13 at 22:04
  • 1
    I verified everything and finally called Apple after finding a post saying that Apple has a bug on their site and that In-House is NOT available at this point. I'm not sure if this bug is global or just some accounts but they FINALLY verified that this account was in fact affected. The bug has been around for over a month now. I'm not sure what's taking them SO long. If there was a work-around that would be one thing but I'm stuck until they fix it. I'll still be looking if you hadn't answered this question. THANKS!!! – JustLearningAgain Sep 07 '13 at 16:22
  • 1
    I had the same problem, but fixed it by regenerating the certificate and profile in the Apple dev portal. – ax123man Oct 02 '13 at 15:09
  • your answer brought me on the right track. I changed the Provisioning manualy since Xamarin used the wrong one. Here s the howto: http://stackoverflow.com/a/6921689/383658 – schmidiii Oct 10 '13 at 11:03
  • Please see my answer posted below. Hope, i understand you and provide u a good answer. Looking forward to hear from you. – Abdul Yasin Mar 12 '14 at 05:33
  • If you are having trouble viewing the embedded.mobileprovision file, then copy it to your Desktop, and run from the command line: security cms -D -i ~/Desktop/embedded.mobileprovision – Ethan B. Martin Dec 10 '18 at 16:10
3

The reason for this error is because in iOS 7.1 Beta, the link to the plist must be in https format. If the URL is not provided to you in https format, simply change the http to https, as follows: itms-services://?action=download-manifest&url=https://hostname.utest.com/OTA_App_Name.plist Then, copy and paste the entire link (starting at itms-services) into Safari, and you will be able to download and install the app using OTA.

Abdul Yasin
  • 3,480
  • 1
  • 28
  • 42
  • here 's' in http means the secure. So try it. – Abdul Yasin Mar 12 '14 at 05:32
  • The original question is unrelated to 7.1. It was asked last september. – mattyohe Mar 12 '14 at 18:03
  • do you have the source for this change? that's what's happening to my installers. Is there any way to use it without https? – Alberto M Mar 17 '14 at 14:40
  • @AlbertoM Nope. Apple is very much restrictive after the release of 7.1 . For enterprise build, u keep your files in your desired url. Only upload the manifest file to Drop box (For quick fix, its not the exact answer) and use the link of this url in your index file. Hope i am helpful to you. Thanks – Abdul Yasin Mar 18 '14 at 07:04
  • the thing that really annoys me is that I haven't heard of it at any stage of the beta testing. I fixed it using SSL eventually, but still very annoying. – Alberto M Mar 18 '14 at 10:13
  • SSL is the perfect solution as far Apple security is concerned. – Abdul Yasin Mar 18 '14 at 10:52
2

If this can be of any help, I had the same issue and was really using an enterprise certificate but the issue was coming from the ipa itself.

You should NOT use xcodebuild to create the ipa:

xcodebuild \
 -exportArchive \
 -exportFormat IPA \
 -exportPath "$BUILD_PATH/$PRODUCT_NAME.ipa" \
 -archivePath "$BUILD_PATH/$PRODUCT_NAME.xcarchive

but instead use xcrun

xcrun -sdk iphoneos PackageApplication \
  -v $BUILD_PATH/$PRODUCT_NAME.xcarchive/Products/Applications/$PROJECT_NAME.app \
  -o $BUILD_PATH/$PRODUCT_NAME.ipa

because otherwise the file archived-expanded-entitlements.xcent is stripped during the ipa creation which leads to same error.

Community
  • 1
  • 1
apouche
  • 9,703
  • 6
  • 40
  • 45
1

I agree with you, it is not necessary to register device for enterprise certificate. It seems that your profile is not "linked" to your enterprise certificate but a adhoc certificate, is it possible? (if you have several certificates). Have you try to delete and reinstall certificates in the keychain access?

Nico
  • 513
  • 7
  • 13