无法在 iOS8+ 上安装企业应用 ipa

Can't install enterprise app ipa on iOS8+

我有一个带有捆绑标识符 com.company.app 的应用程序,我已经存档并上传了该应用程序,现在当我尝试安装时出现此错误:

Sep 17 13:30:11 IPhone itunesstored[2199] <Error>: 0x102570000 __MobileInstallationInstallForLaunchServices_block_invoke240: Returned error Error Domain=MIInstallerErrorDomain Code=13 "Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.5aCjkh/extracted/Payload/MyApp.app identifier = com.company.app type = User App> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)" UserInfo=0x145ec8ed0 {LibMISErrorNumber=-402620394, LegacyErrorString=ApplicationVerificationFailed, SourceFileLine=192, FunctionName=-[MICodeSigningVerifier performValidationWithError:], NSLocalizedDescription=Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.5aCjkh/extracted/Payload/MyApp.app identifier = com.company.app type = User App> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)}

所以,我将我的包标识符更改为:AppIdPrefix.com.company.app 并再次存档应用程序,上传它,突然它工作得很好。

但是现在,我得到这个错误:

Sep 17 13:58:35 IPhone SpringBoard[2200] <Warning>: No valid 'aps-environment' entitlement string found for application 'MyApp': (null). Notifications will not be delivered.

另外,当我像这样手动设置配置文件和代码签名身份时:

然后我尝试存档并得到这个错误:

因此,一方面,当我尝试安装时未将 AppId 前缀添加到捆绑包中时,它无法安装,但另一方面,当我添加 AppId 前缀时,它会安装应用程序,但 aps 环境将无法运行。

我该如何解决?我真的到处搜索,找不到适合我的东西。

请为所有代码签名标识添加分发选项。确保您添加了正确的包标识符。清理代码并重试。它会起作用。

Sep 17 13:58:35 IPhone SpringBoard[2200] <Warning>: No valid 'aps-environment' entitlement string found for application 'MyApp': (null). Notifications will not be delivered.

此错误对应于您在应用程序中使用 Push Notification,但在开发者帐户中您尚未为您的 AppID

启用推送 notification.Enable

我通过执行后续步骤解决了问题:

  1. 使用 iPhone Configuration Utility 应用程序 (download from here) 从我的 mac 中删除所有配置文件。

  2. Keychain Access.

  3. 中删除与此应用相关的所有证书
  4. 打开 Xcode 并在 Product 菜单打开时按住 Alt 点击 CleanClean Build Folder

  5. 重启你的mac

希望对您有所帮助。享受吧。