应用安装失败:未知错误Xcode 7

我的应用程序在模拟器中运行良好,但当我尝试在我的iPhone上安装它时它说

应用安装失败:发生了未知错误。

我打开了我的设备日志,得到了这个:

11月21日21:17:19 Isaacs-iPhone streaming_zip_conduit [5853]:LaunchServices:为现有占位符安装app Raritea.FSS-App <(null) 数据库中找不到 > 11月12日21:17:19 Isaacs-iPhone streaming_zip_conduit [5853] :LaunchServices:没有为Raritea.FSS-App创建进度<(null) 在数据库中找不到 >因为它不是占位符。 11月21日21:17:19 Isaacs-iPhone installd [4549]:0x16e1bb000 – [MIClientConnection installPath:withOptions:completion:]:安装“/ var / mobile / Media / PublicStaging / FSS App.app”类型Developer(LSInstallType =( null))由streaming_zip_conduit(pid 5853)11月12日21:17:19请求Isaacs-iPhone installd [4549]:0x16e12f000 – [MIInstaller performInstallationWithError:]:安装Nov 12 21:17:20 Isaacs-iPhone profiled [4644] :(注)MC:供应配置文件已更改11月12日21:17:20 Isaacs-iPhone配置文件[4644] :(注)MC:更新MIS信任… 11月12日21:17:20 Isaacs-iPhone安全[4588]:secTaskDiagnoseEntitlements MISSING钥匙串权利:没有存储的taskRef 11月12日21:17:20 Isaacs-iPhone securityd [4588]:secTaskDiagnoseEntitlements MISSING keychain entitlements:no stored taskRef found 11月12日21:17:20 Isaacs-iPhone installd [4549]:SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName] 11月12日21:17:20 Isaacs-iPhone profiled [4644] :(注)MC:供应资料陈 ged Nov 12 21:17:20 Isaacs-iPhone profiled [4644] :(注)MC:更新MIS信任… 11月12日21:17:20 Isaacs-iPhone installd [4549]:无法识别状态-67049来自codesigning library Nov 12 21:17:20 Isaacs-iPhone installd [4549]:0x16e12f000 + [MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]:142:无法validation/private/var/mobile/Library/Caches/com.apple.mobile的代码签名.installd.staging / temp.FvOJz0 / extracted / FSS App.app/PlugIns/QuickSched.appex:0xe8008001(发生未知错误。)11月12日21:17:20 Isaacs-iPhone installd [4549]:0x16e12f000 – [MIInstaller performInstallationWithError:]:validation阶段失败11月12日21:17:20 Isaacs-iPhone streaming_zip_conduit [5853]:0x16e087000 __MobileInstallationInstallForLaunchServices_block_invoke222:返回错误错误域= MIInstallerErrorDomain代码= 13“无法validation/ private / var / mobile / Library /的代码签名Caches / com.apple.mobile.installd.staging / temp.FvOJz0 / extracted / FSS App.app /PlugIns/QuickSched.appex:0xe8008001(发生了未知错误。)“UserInfo = {LibMISErrorNumber = -402620415,LegacyErrorString = ApplicationVerificationFailed,SourceFileLine = 142,FunctionName = + [MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:],NSLocalizedDescription = Failed tovalidation/private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.FvOJz0/extracted/FSS App.app/PlugIns/QuickSched.appex的代码签名:0xe8008001(发生了未知错误。 )} 11月12日21:17:20 Isaacs-iPhone streaming_zip_conduit [5853]:错误:MobileInstallationInstallForLaunchServices返回11月12日21:17:20 Isaacs-iPhone streaming_zip_conduit [5853]:__ dispatch_source_read_socket_block_invoke:274:无法在file://安装应用程序/var/mobile/Media/PublicStaging/FSS%20App.app/:Error Domain = LaunchServicesError Code = 0“(null)”UserInfo = {Error = ApplicationVerificationFailed,ErrorDetail = -402620415,ErrorDescription =无法validation代码签名 /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.FvOJz0/extracted/FSS App.app/PlugIns/QuickSched.appex:0xe8008001(发生未知错误。)}

设备日志中的这一行对我很有帮助,希望你也能看到它:

无法validation/private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.FvOJz0/extracted/FSS App.app/PlugIns/QuickSched.appex的代码签名

这就是说(尽管Xcode认为在构建时一切正常),您的设备拒绝了应用扩展程序的代码签名。

这里有一些解决方案,但根据我的个人经验,这个问题只能通过修改应用和应用扩展程序的代码签名设置来解决。 确保使用相同的证书对应用和应用扩展程序进行签名(尽管可能有不同的配置文件)。

正如其他人所推荐的那样,我也能够通过在Xcode中为项目运行Clean操作以及删除派生数据目录来解决这个问题。 但我并不总是这么成功。

这件事发生在我之前。 我不得不导航到派生数据并删除它。 重启Xcode。 为我解决了这个问题。 您可能还想重新启动计算机。

通过断开我的iPhone和Mac,然后分析(Shift + Command + B或产品 – >分析),我有幸运气。

之后我把我的iPhone重新插入并干净了(Command + k),然后跑了! 成功了!

尝试一下 :

Xcode-> Preferences-> Locations-> Derived Data->删除它……

它将清理您的项目,尝试重新启动您的设备。 然后在设备上构建应用程序。

我也有这个问题,在设备日志中它说我的应用扩展程序代码签名失败…. appex。 我去了我的App Target – > Build阶段 – > Embed App Extensions在安装时选中了Copy ,之后我可以在手机上安装应用程序。

这对我有用:

1)产品>存档(来自Xcode)

2)导出iPa

3)从iTunes或Diawi安装此iPa。