应用程序安装失败:未知错误 Xcode 7
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33684901/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
App installation failed: Unknown Error Xcode 7
提问by Isaac Wasserman
My app runs fine in the simulator, but when I try to install it on my iPhone it says
我的应用程序在模拟器中运行良好,但是当我尝试在我的 iPhone 上安装它时,它说
App installation failed: An unknown error has occurred.
应用安装失败:发生未知错误。
I opened my device logs and got this:
我打开了我的设备日志并得到了这个:
Nov 12 21:17:19 Isaacs-iPhone streaming_zip_conduit[5853] : LaunchServices: installing app for existing placeholder Raritea.FSS-App <(null) Not found in database> Nov 12 21:17:19 Isaacs-iPhone streaming_zip_conduit[5853] : LaunchServices: Not creating progress for Raritea.FSS-App <(null) Not found in database> since it is not a placeholder. Nov 12 21:17:19 Isaacs-iPhone installd[4549] : 0x16e1bb000 -[MIClientConnection installPath:withOptions:completion:]: Install of "/var/mobile/Media/PublicStaging/FSS App.app" type Developer (LSInstallType = (null)) requested by streaming_zip_conduit (pid 5853) Nov 12 21:17:19 Isaacs-iPhone installd[4549] : 0x16e12f000 -[MIInstaller performInstallationWithError:]: Installing Nov 12 21:17:20 Isaacs-iPhone profiled[4644] : (Note ) MC: Provisioning profiles changed Nov 12 21:17:20 Isaacs-iPhone profiled[4644] : (Note ) MC: Updating MIS trust... Nov 12 21:17:20 Isaacs-iPhone securityd[4588] : secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found Nov 12 21:17:20 Isaacs-iPhone securityd[4588] : secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found Nov 12 21:17:20 Isaacs-iPhone installd[4549] : SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName] Nov 12 21:17:20 Isaacs-iPhone profiled[4644] : (Note ) MC: Provisioning profiles changed Nov 12 21:17:20 Isaacs-iPhone profiled[4644] : (Note ) MC: Updating MIS trust... Nov 12 21:17:20 Isaacs-iPhone installd[4549] : unrecognized status -67049 from codesigning library Nov 12 21:17:20 Isaacs-iPhone installd[4549] : 0x16e12f000 +[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]: 142: Failed to verify code signature of /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.FvOJz0/extracted/FSS App.app/PlugIns/QuickSched.appex : 0xe8008001 (An unknown error has occurred.) Nov 12 21:17:20 Isaacs-iPhone installd[4549] : 0x16e12f000 -[MIInstaller performInstallationWithError:]: Verification stage failed Nov 12 21:17:20 Isaacs-iPhone streaming_zip_conduit[5853] : 0x16e087000 __MobileInstallationInstallForLaunchServices_block_invoke222: Returned error Error Domain=MIInstallerErrorDomain Code=13 "Failed to verify code signature of /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.FvOJz0/extracted/FSS App.app/PlugIns/QuickSched.appex : 0xe8008001 (An unknown error has occurred.)" UserInfo={LibMISErrorNumber=-402620415, LegacyErrorString=ApplicationVerificationFailed, SourceFileLine=142, FunctionName=+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:], NSLocalizedDescription=Failed to verify code signature of /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.FvOJz0/extracted/FSS App.app/PlugIns/QuickSched.appex : 0xe8008001 (An unknown error has occurred.)} Nov 12 21:17:20 Isaacs-iPhone streaming_zip_conduit[5853] : ERROR: MobileInstallationInstallForLaunchServices returned nil Nov 12 21:17:20 Isaacs-iPhone streaming_zip_conduit[5853] : __dispatch_source_read_socket_block_invoke:274: Failed to install application at file:///var/mobile/Media/PublicStaging/FSS%20App.app/ : Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=ApplicationVerificationFailed, ErrorDetail=-402620415, ErrorDescription=Failed to verify code signature of /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.FvOJz0/extracted/FSS App.app/PlugIns/QuickSched.appex : 0xe8008001 (An unknown error has occurred.)}
11 月 12 日 21:17:19 Isaacs-iPhone streaming_zip_conduit[5853]:LaunchServices:为现有占位符安装应用程序 Raritea.FSS-App <(null) Not found in database> Nov 12 21:17:19 Isaacs-iPhone streaming_zip_conduit[5853] :LaunchServices:未为 Raritea.FSS-App 创建进度 <(空)未在数据库中找到> 因为它不是占位符。11 月 12 日 21:17:19 Isaacs-iPhone 已安装 [4549]:0x16e1bb000 -[MIClientConnection installPath:withOptions:completion:]:安装“/var/mobile/Media/PublicStaging/FSS App.app”类型的开发人员 (LSInstallType = ( null)) 由streaming_zip_conduit (pid 5853) 请求的11 月12 日21:17:19 Isaacs-iPhone 已安装[4549]:0x16e12f000 -[MIInstaller performInstallationWithError:]:安装11 月12 日21:17:20 Isaacs-iPhone4 [4549]:注)MC:配置文件已于 11 月 12 日 21:17:20 Isaacs-iPhone profiled [4644] 更改:(注)MC:更新 MIS 信任... Nov 12 21:17:20 Isaacs-iPhone securityd[4588]:secTaskDiagnoseEntitlements MISSING钥匙串权利:未找到存储的 taskRef 11 月 12 日 21:17:20 Isaacs-iPhone securityd[4588]:secTaskDiagnoseEntitlements MISSING 钥匙串权利:
回答by Santa Claus
This line in the device logs stood out to me, and hopefully you saw it too:
设备日志中的这一行让我印象深刻,希望你也看到了:
Failed to verify code signature of /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.FvOJz0/extracted/FSS App.app/PlugIns/QuickSched.appex
无法验证 /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.FvOJz0/extracted/FSS App.app/PlugIns/QuickSched.appex 的代码签名
This is saying that (although Xcode thought everything was OK at build time), your device rejected the code signature of your app extension.
这是说(尽管 Xcode 在构建时认为一切正常),您的设备拒绝了您的应用程序扩展的代码签名。
There are a few solutions here, but in my personal experience, this issue can only be fixed by tinkering with the code signing settings for your app and app extension. Make sure that the app and app extension are being signed with the same certificate (although likely different provisioning profiles).
有几个解决方案,在这里,但在我个人的经验,这个问题只能通过与您的应用程序和应用程序扩展的代码签名设置修修补补固定。确保应用程序和应用程序扩展使用相同的证书进行签名(尽管可能不同的配置文件)。
As others have recommended, I've also been able to fix this by running the Clean
action in Xcode for the project, and also by deleting the derived data directories. But I have not always been successful with this.
正如其他人所建议的那样,我还能够通过Clean
在 Xcode 中为项目运行操作以及删除派生数据目录来解决此问题。但我在这方面并不总是成功。
回答by invertedfjord
This happened to me before. I had to navigate to derived data and delete it. Restart Xcode. Solved the issue for me. You may want to restart your computer as well.
这发生在我身上。我不得不导航到派生数据并将其删除。重新启动Xcode。为我解决了这个问题。您可能还想重新启动计算机。
回答by Jon Vogel
I have had luck by disconnecting my iPhone from my mac, and then Analyzing (Shift + Command + B or Product -> Analyze).
我很幸运,将 iPhone 与 Mac 断开连接,然后进行分析(Shift + Command + B 或产品 -> 分析)。
After that I plugged my iPhone back in and did a clean (Command + k) and then ran! Worked!
之后,我重新插入我的 iPhone 并进行了清理(Command + k)然后运行!工作了!
回答by user3005567
I had the same problem but with an app without app extension on XCode 10.2.1.
我有同样的问题,但在 XCode 10.2.1 上有一个没有应用程序扩展的应用程序。
None of the solutions worked for me, so I deleted the XCode target and recreated it with the same files and settings. This worked for me.
没有一个解决方案对我有用,所以我删除了 XCode 目标并使用相同的文件和设置重新创建它。这对我有用。
回答by Aks
try it :
尝试一下 :
Xcode-> Preferences->Locations->Derived Data-> Delete it...
Xcode-> Preferences->Locations->Derived Data-> Delete it...
It will clean your project, Try to restart your device. Then build the app on the device.
它将清理您的项目,尝试重新启动您的设备。然后在设备上构建应用程序。
回答by Marija Zivkovic
I also had this problem, in device log it said that code signing failed for my app extension ....appex. I went to my App Target -> Build phases -> Embed App Extensionsand checked Copy only when installing, after that I could install the app on the phone.
我也遇到了这个问题,在设备日志中它说我的应用程序扩展的代码签名失败....appex。我转到我的App Target -> Build Phases -> Embed App Extensions并在安装时选中Copy only,之后我可以在手机上安装该应用程序。
回答by Prashant Bhayani
This worked for me :
这对我有用:
1) Product > Archive (From Xcode)
1) 产品 > 存档(来自 Xcode)
2) Export iPa
2) 导出 iPa
3) Install this iPa from iTunes or Diawi.
3) 从 iTunes 或 Diawi 安装此 iPa。