iOS模拟器无法安装应用程序。

3

我的Xcode项目开始出现“iOS模拟器无法安装应用程序”的问题。

我正在使用iOS模拟器7.1。模拟器可以运行其他项目。 我已经阅读了Stack Overflow中的其他条目,并尝试从终端中删除~/Library/Application Support/iPhone Simulator、从“iOS模拟器/重置内容和设置”菜单中重置,关闭并重新启动Maverick,但结果仍然相同。

请帮助!

更新: 当我尝试将我的应用程序上传到真实设备时,我收到以下错误:“无法检查应用程序包。”

我认为这个错误与上面的错误有关。

当我检查system.log条目时,我发现下面的行:

...

05/05/14 00:04:48,507 Xcode[1534]: AMDeviceSecureTransferPath (thread 0x10bd96000): disableDelta: FALSE
05/05/14 00:04:48,606 Xcode[1534]: AMDeviceSecureTransferPath (thread 0x10bd96000): Using delta for package at path    file:///Users/serkan/Library/Developer/Xcode/DerivedData/myapp-efvftyvllnqdibctwpfggqgjpfzk/Build/Products/Debug-iphoneos/myapp.app/ ID is myapp.myapp
05/05/14 00:04:48,640 Xcode[1534]: AMDeviceStartHouseArrestService (thread 0x10bd96000):  There was an error from the device: ApplicationLookupFailed
05/05/14 00:04:48,650 Xcode[1534]: AMDeviceSecureTransferPath (thread 0x10bd96000): AMDeviceSecureTransferPath:1589 starting delta_transfer_directory, ref_afc: 0x0
05/05/14 00:04:50,642 Xcode[1534]: AMDeviceSecureTransferPath (thread 0x10bd96000): AMDeviceSecureTransferPath:1592 finished delta_transfer_directory
05/05/14 00:04:50,716 Xcode[1534]: call_and_response (thread 0x10bd96000): GOT AN ERROR 0xe8000051
05/05/14 00:04:50,716 Xcode[1534]: perform_command (thread 0x10bd96000): There was an error communicating with the service agent: 0xe8000051
05/05/14 00:04:50,717 Xcode[1534]: AMDeviceSecureInstallApplication (thread 0x10bd96000): Old style install failed for (PublicStaging/myapp.app)
05/05/14 00:04:50,717 Xcode[1534]: AMDeviceSecureInstallApplication (thread 0x10bd96000): Could not install package on device: kAMDPackageInspectionFailedError
2个回答

4
你是否有一个名为Resource或Resources的文件夹?将其重命名为其他名称,然后再试一次。(记得清理项目。)
编辑:如果这样做没有解决问题,请查看项目设置,在“Build phases”下,在“Copy Bundle Resources”下。也许有一个过时的条目需要手动删除。
编辑:还要清理项目。在点击菜单项时按住option键,这样它就会显示“Clean Build Folder...”。如有必要,删除派生数据:打开Organizer,选择您的项目:有一个名为“Derived Data”的条目,显示Xcode生成的文件路径。右边还有一个Delete按钮-点击它以删除所有派生数据。(Xcode将不得不重新构建索引文件等,但没有什么关键性的东西)
(我记得当我有一个Resource(s)文件夹并将其重命名时,我看到了这样的错误,之后它又可以正常工作了。据我所知,Resource用于Mac OS X应用程序。我认为它不会用于iOS,但至少在我的情况下它会引起麻烦。)

1
你还使用哪些文件夹名称?(另外:你按住Option键以便显示“清理生成文件夹...”,而不仅仅是“清理”了吗?) - Rainer Schwarze
你应该前往构建文件:打开组织者,选择项目,然后选择你的项目。有一个名为“派生数据”的条目,路径右侧有一个小箭头按钮。点击它,会在该位置打开Finder。然后进入Build/Products/Debug-iphonesimulator/。这里就是你的应用程序。让Finder显示包内容。那里有什么? - Rainer Schwarze
是的,有Pod libraries和myapp.app。 - zontragon
我的一个Pod库(StarRatingControl)有一个资源文件夹。我移除了这个pod,问题解决了。谢谢Rainer。 - zontragon
谢谢 - 很高兴它能够正常工作。我会将构建阶段部分添加到答案中。 - Rainer Schwarze
显示剩余5条评论

0
问题已经通过删除以下文件夹并重新安装xcode解决:~/Library/Application Support/iPhoneSimulator

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接