“应用程序安装失败:无法检查应用程序包”

时间:2014-10-08 04:57:31

标签: ios xcode xcode6

做Build&从Xcode运行到我的iPhone,Xcode不断给我这个错误:

它给我错误后,没有控制台错误,我可以再次运行它;它很好并且可以毫无问题地部署到设备上。

我对如何解决这个问题感到很茫然。我在问题herehereherehere中尝试了解决方案。

我已经执行了Clean&一个Clean Build Folder。我已从工作区中删除所有文件,然后重新添加它们。我检查了捆绑标识符,甚至尝试更改它。我尝试重新安装Xcode,从设备中删除应用程序,重新启动iPhone并重新安装应用程序。

我在运行10.9.5的MacBook Pro上使用Xcode 6.0.1,运行iOS 8.0.2的iPhone 6。我也在使用CocoaPods版本0.34.1。

有没有人有任何想法?

以下是日志as suggested。第一个来自正常的构建,运行良好;第二个引发错误:

10/8/14 21:56:23.413 Xcode[89196]: AMDeviceSecureInstallApplicationBundle (thread 0x11954a000): ENTRY, options: {
    PackageType = Developer;
    ShadowParentKey = "file:///var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/";
}
10/8/14 21:56:23.416 Xcode[89196]: AMDeviceSecureInstallApplicationBundle (thread 0x11954a000): device os is at least 7.0
10/8/14 21:56:23.416 Xcode[89196]: createShadowPath (thread 0x11954a000): ENTRY bundle: /Users/matthewdavies/Library/Developer/Xcode/DerivedData/Le_Camera-bfqfzezscvpmaxdceudixqcuvokd/Build/Products/Debug-iphoneos/LeÃÅ Camera.app
10/8/14 21:56:23.416 Xcode[89196]: create_shadow_dir_path (thread 0x11954a000): bundle: /Users/matthewdavies/Library/Developer/Xcode/DerivedData/Le_Camera-bfqfzezscvpmaxdceudixqcuvokd/Build/Products/Debug-iphoneos/LeÃÅ Camera.app
10/8/14 21:56:23.416 Xcode[89196]: createShadowPath (thread 0x11954a000): returning: /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/a5d81d2c36f0db5ba32cf71be1cf7a86/ae8735d27401ee958a0e977fc19469991b1e08fe/LeÃÅ Camera.app
10/8/14 21:56:23.416 Xcode[89196]: createSiblingInPath (thread 0x11954a000): returning: /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/a5d81d2c36f0db5ba32cf71be1cf7a86/ae8735d27401ee958a0e977fc19469991b1e08fe/ManifestCache.plist
10/8/14 21:56:23.458 Xcode[89196]: createSiblingInPath (thread 0x11954a000): returning: /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/a5d81d2c36f0db5ba32cf71be1cf7a86/ae8735d27401ee958a0e977fc19469991b1e08fe/InstalledAppInfo
10/8/14 21:56:23.459 Xcode[89196]: AMDeviceSecureInstallApplicationBundle (thread 0x11954a000): no old package to delta against, falling back to old skool install
10/8/14 21:56:23.460 Xcode[89196]: AMDeviceSecureInstallApplicationBundle (thread 0x11954a000): Blasting the bundle over to the device in an old skool way
10/8/14 21:56:25.321 Xcode[89196]: _AMDeviceUpdateOldPackage (thread 0x11954a000): copy_new_to_shadow: TRUE
10/8/14 21:56:25.367 Xcode[89196]: _AMDeviceUpdateOldPackage (thread 0x11954a000): copying:
/Users/matthewdavies/Library/Developer/Xcode/DerivedData/Le_Camera-bfqfzezscvpmaxdceudixqcuvokd/Build/Products/Debug-iphoneos/LeÃÅ Camera.app
to
/var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/a5d81d2c36f0db5ba32cf71be1cf7a86/ae8735d27401ee958a0e977fc19469991b1e08fe
10/8/14 21:56:25.403 Xcode[89196]: createSiblingInPath (thread 0x11954a000): returning: /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/a5d81d2c36f0db5ba32cf71be1cf7a86/ae8735d27401ee958a0e977fc19469991b1e08fe/InstalledAppInfo
10/8/14 21:56:25.406 Xcode[89196]: writeDictToFile:1258 ==== Successfully wrote Manifest cache to /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/a5d81d2c36f0db5ba32cf71be1cf7a86/ae8735d27401ee958a0e977fc19469991b1e08fe/ManifestCache.plist
10/8/14 21:56:25.407 Xcode[89196]: AMDeviceSecureInstallApplicationBundle (thread 0x11954a000): returning 0x00000000
10/8/14 21:56:27.366 tccd[328]: Unable to verify code signing identity of com.apple.dt.Xcode:  code failed to satisfy specified code requirement(s)

当Xcode抛出错误时:

10/8/14 21:56:58.065 Xcode[89196]: AMDeviceSecureInstallApplicationBundle (thread 0x112e35000): ENTRY, options: {
    PackageType = Developer;
    ShadowParentKey = "file:///var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/";
}
10/8/14 21:56:58.069 Xcode[89196]: AMDeviceSecureInstallApplicationBundle (thread 0x112e35000): device os is at least 7.0
10/8/14 21:56:58.069 Xcode[89196]: createShadowPath (thread 0x112e35000): ENTRY bundle: /Users/matthewdavies/Library/Developer/Xcode/DerivedData/Le_Camera-bfqfzezscvpmaxdceudixqcuvokd/Build/Products/Debug-iphoneos/LeÃÅ Camera.app
10/8/14 21:56:58.070 Xcode[89196]: create_shadow_dir_path (thread 0x112e35000): bundle: /Users/matthewdavies/Library/Developer/Xcode/DerivedData/Le_Camera-bfqfzezscvpmaxdceudixqcuvokd/Build/Products/Debug-iphoneos/LeÃÅ Camera.app
10/8/14 21:56:58.070 Xcode[89196]: createShadowPath (thread 0x112e35000): returning: /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/a5d81d2c36f0db5ba32cf71be1cf7a86/ae8735d27401ee958a0e977fc19469991b1e08fe/LeÃÅ Camera.app
10/8/14 21:56:58.070 Xcode[89196]: createSiblingInPath (thread 0x112e35000): returning: /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/a5d81d2c36f0db5ba32cf71be1cf7a86/ae8735d27401ee958a0e977fc19469991b1e08fe/ManifestCache.plist
10/8/14 21:56:58.197 Xcode[89196]: createSiblingInPath (thread 0x112e35000): returning: /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/a5d81d2c36f0db5ba32cf71be1cf7a86/ae8735d27401ee958a0e977fc19469991b1e08fe/InstalledAppInfo
10/8/14 21:56:58.198 Xcode[89196]: AMDeviceSecureInstallApplicationBundle (thread 0x112e35000): calling MDMCreateDeltaDirectoryForDevice with (
    "Info.plist",
    "ResourceRules.plist",
    CodeResources,
    "_CodeSignature/CodeResources"
)
10/8/14 21:56:58.198 Xcode[89196]: AMDeviceSecureInstallApplicationBundle (thread 0x112e35000): dst_ipa_container: /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/LeÃÅ Camera.app.KLv2tc
dst_ipa: /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/LeÃÅ Camera.app.KLv2tc/LeÃÅ Camera.app_sparse.ipa
10/8/14 21:56:58.198 Xcode[89196]: AMDeviceSecureInstallApplicationBundle (thread 0x112e35000): diffing /Users/matthewdavies/Library/Developer/Xcode/DerivedData/Le_Camera-bfqfzezscvpmaxdceudixqcuvokd/Build/Products/Debug-iphoneos/LeÃÅ Camera.app
10/8/14 21:56:58.198 Xcode[89196]: MDMCreateDeltaDirectory:1840 calling MDMDirectoryDiff with:
state->old_bundle: /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/a5d81d2c36f0db5ba32cf71be1cf7a86/ae8735d27401ee958a0e977fc19469991b1e08fe/LeÃÅ Camera.app
state->new_bundle: /Users/matthewdavies/Library/Developer/Xcode/DerivedData/Le_Camera-bfqfzezscvpmaxdceudixqcuvokd/Build/Products/Debug-iphoneos/LeÃÅ Camera.app
state->dst_bundle: /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/LeÃÅ Camera.app.KLv2tc/LeÃÅ Camera.app_sparse.ipa/Payload//LeÃÅ Camera.app, binaryDiff flag: FALSE
    dst_ipa: /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/LeÃÅ Camera.app.KLv2tc/LeÃÅ Camera.app_sparse.ipa
10/8/14 21:56:58.198 Xcode[89196]: createDictFromFile:1303 ==== Successfully read Manifest cache at /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/a5d81d2c36f0db5ba32cf71be1cf7a86/ae8735d27401ee958a0e977fc19469991b1e08fe/ManifestCache.plist
10/8/14 21:56:58.199 Xcode[89196]: __MDMDirectoryDiff_block_invoke29:1414 calling writeDictToFile with: /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/LeÃÅ Camera.app.KLv2tc/LeÃÅ Camera.app_sparse.ipa/ManifestCache.plist
10/8/14 21:56:58.199 Xcode[89196]: writeDictToFile:1258 ==== Successfully wrote Manifest cache to /var/folders/4_/c486ynzs79j339w5fkccjkv00000gn/C/com.apple.DeveloperTools/6.0.1/Xcode/LeÃÅ Camera.app.KLv2tc/LeÃÅ Camera.app_sparse.ipa/ManifestCache.plist
10/8/14 21:56:58.539 Xcode[89196]: AMDErrorForMobileInstallationCallbackDict (thread 0x10c8ce000): GOT AN ERROR 0xe8000051
10/8/14 21:56:58.549 Xcode[89196]: SZConduit: _MonitorResultDispatchFunction:140 (0x0x10c8ce000): Got error from service: InstallationFailed
10/8/14 21:56:58.549 Xcode[89196]: _AMDeviceTransferAndInstall (thread 0x10a081000): SZConduitSendPathWithPreflight failed: 0xe8000051
10/8/14 21:56:58.549 Xcode[89196]: AMDeviceSecureInstallApplicationBundle (thread 0x112e35000): Install failed on device: e8000051, removing shadow directory
10/8/14 21:56:58.556 Xcode[89196]: AMDeviceSecureInstallApplicationBundle (thread 0x112e35000): returning 0xe8000051

更新:我在Window>中找到了Xcode日志。装置:

Oct 11 15:55:46 Matthews-iPhone installd[43] <Error>: 0x100524000 -[MIBundle _validateWithError:]: 28: Failed to load Info.plist from bundle at path /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.uhnTux/extracted/Payload/Lé Camera.app
Oct 11 15:55:46 Matthews-iPhone installd[43] <Error>: 0x100524000 +[MIInstallable installablesAtURL:packageFormat:userOptions:error:]: Failed to create bundle for file:///private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.uhnTux/extracted/Payload/Le%CC%81%20Camera.app/ : Error Domain=MIInstallerErrorDomain Code=35 "Failed to load Info.plist from bundle at path /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.uhnTux/extracted/Payload/Lé Camera.app" UserInfo=0x14fd07380 {LegacyErrorString=PackageInspectionFailed, FunctionName=-[MIBundle _validateWithError:], SourceFileLine=28, NSLocalizedDescription=Failed to load Info.plist from bundle at path /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.uhnTux/extracted/Payload/Lé Camera.app}
Oct 11 15:55:46 Matthews-iPhone streaming_zip_conduit[192] <Error>: 0x100384000 __MobileInstallationInstallForLaunchServices_block_invoke240: Returned error Error Domain=MIInstallerErrorDomain Code=35 "Failed to load Info.plist from bundle at path /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.uhnTux/extracted/Payload/Lé Camera.app" UserInfo=0x157614c30 {LegacyErrorString=PackageInspectionFailed, FunctionName=-[MIBundle _validateWithError:], SourceFileLine=28, NSLocalizedDescription=Failed to load Info.plist from bundle at path /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.uhnTux/extracted/Payload/Lé Camera.app}
Oct 11 15:55:46 Matthews-iPhone streaming_zip_conduit[192] <Warning>: ERROR: MobileInstallationInstallForLaunchServices returned nil
Oct 11 15:55:46 Matthews-iPhone streaming_zip_conduit[192] <Warning>: __dispatch_source_read_socket_block_invoke:203: Failed to install application at file:///var/mobile/Media/PublicStaging/Le%CC%81%20Camera.app_sparse.ipa/ : Error Domain=LaunchServicesError Code=0 "The operation couldn’t be completed. (LaunchServicesError error 0.)" UserInfo=0x157611d20 {Error=PackageInspectionFailed, ErrorDescription=Failed to load Info.plist from bundle at path /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.uhnTux/extracted/Payload/Lé Camera.app}
Oct 11 15:55:51 Matthews-iPhone locationd[58] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0

5 个答案:

答案 0 :(得分:11)

转到Window-&gt; Projects(xcode6.3.2)并查找您的项目并删除所有具有相同名称的项目的“派生数据”。

我遇到了同样的问题,对我有用。

如果上述方法无效,请尝试以下操作:

  1. Prodct =&gt;清洁
  2. 检查您的产品名称。如果有非拉丁字符或空格,请将其删除。
  3. 如果您已将名为资源或资源的文件夹移动或复制到项目中,请尝试重命名。然后执行清理。

答案 1 :(得分:1)

看起来问题是由应用名称中的“é”字符引起的。我更改了应用程序的名称,并修复了它。

答案 2 :(得分:0)

我刚遇到这个问题,对我来说,上面提到的设备日志显示了这个问题。问题是我以前有一个(伪).framework复制到我的应用程序包中,这是不必要的,并导致错误。干净并没有删除.framework。而是转到Windows-&gt; Organizer选择我的项目并单击Derived Data的Delete按钮修复了问题。

答案 3 :(得分:0)

我认为,问题在于错误地将文件复制到项目中。因为,当我将文件复制到项目并在导航菜单中显示文件旁边的问号时,运行app会显示此错误。但是当我正确复制文件并在复制文件旁边显示其他内容时,一切正常。但是当你在项目名称中仍然有{ě,š,č,ř,ž,ý,á,í,é,ú,......等字符时仍然存在问题时,请尝试在没有这些字符的情况下重命名,之后应该是错误的进行。

答案 4 :(得分:0)

遇到相同的问题,将项目更新为建议的设置即可解决此问题。