简体   繁体   English

无法将Enterprise应用安装到未注册UUID的设备

[英]Can't install Enterprise app to devices with unregistered UUIDs

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. 问题是这样的:如果我在已注册UUID的设备上安装该应用程序,则该应用程序会正常安装。 If I "TRY" to install the app on a device that DOES NOT have the UUID registered, the install fails to complete. 如果我“尝试”在未注册UUID的设备上安装应用程序,则安装将无法完成。 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 确保.ipa使用分发/临时配置文件进行签名
  • Verified that my .plist is correct 验证我的.plist是正确的
  • Installed using a simple webpage (same problem) 使用简单的网页安装(相同的问题)
  • Installed using iPhone Configuration Utility (same problem) 使用iPhone配置实用程序安装(相同问题)
  • About a million other more esoteric build mods based on other peoples experience etc... etc... etc... 基于其他人的经验等大约一百万个其他更深奥的生成mod等等...等等...

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"). 错误日志似乎指向配置文件有问题(“配置文件无效:0xe800812”)。 I've talked with Apple support and they say the certs and profiles seem to be right. 我已经与Apple进行了交谈,他们说证书和配置文件似乎是正确的。

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. 苹果代表说,即使使用Enterprise许可证构建要分发的应用程序,您仍然需要注册所有设备的UUID。 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. 根据我的研究,.ipa包含已安装的嵌入式配置文件,您无需注册所有设备。

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. 我很困惑,非常需要帮助。

  1. Take your IPA file, rename it to have a .zip extension. 提取IPA文件,将其重命名为.zip扩展名。
  2. Unzip this file and open the Payload directory in Finder. 解压缩该文件,然后在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). 找到文件Embedded.mobileprovision,然后在文本编辑器(如TextEdit)中打开此文件。

Now, if inside this XML document you see a key for ProvisionedDevices , you are not signing with the correct provisioning profile. 现在,如果在此XML文档中看到用于ProvisionedDevices的密钥,则说明您未使用正确的配置文件进行签名。 You need to create a In House provisioning profile instead. 您需要创建一个In House配置文件。 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 . 在你已经正确地在房子轮廓签署您的应用程序的情况下,你不会看到ProvisionedDevices在embedded.mobileprovsion文件密钥,而一键ProvisionsAllDevices ,这将是true

The reason for this error is because in iOS 7.1 Beta, the link to the plist must be in https format. 发生此错误的原因是因为在iOS 7.1 Beta中,指向plist的链接必须为https格式。 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. 如果未以https格式提供URL,只需将http更改为https,如下所示:itms-services://?action = download-manifest&url = https://hostname.utest.com/OTA_App_Name.plist然后,复制整个链接(从itms-services开始)并将其粘贴到Safari,您将可以使用OTA下载并安装该应用。

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. 如果这对您有帮助,我会遇到同样的问题,并且确实在使用企业证书,但问题出在ipa本身。

You should NOT use xcodebuild to create the ipa : 不应该使用xcodebuild创建ipa

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

but instead use xcrun 但改用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. 因为否则在ipa创建期间会删除文件archived-expanded-entitlements.xcent ,这会导致相同的错误。

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? 您是否尝试在钥匙串访问中删除并重新安装证书?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM