iOS模拟器安装应用失败

标签 ios objective-c xcode ios-simulator

我的Xcode工程开始报“iOS模拟器安装应用失败”

我使用的是 iOS 模拟器 7.1。模拟器运行任何其他项目。 我已经阅读了堆栈溢出中的其他条目并且 我试图从终端删除 ~/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

最佳答案

您是否有名为 Resource 或 Resources 的文件夹?将其重命名为不同的名称,然后重试。 (记得清理项目。)

编辑:如果这不能解决问题,请查看项目设置,在“构建阶段”下和“复制捆绑资源”下。也许一个陈旧的条目就在那里,需要手动删除。

编辑:同时清理项目。单击菜单项时按住选项键,使其显示“清理构建文件夹...”。如有必要,删除派生数据:打开管理器,选择您的项目:有一个条目“派生数据”显示 Xcode 生成的文件的路径。右侧还有一个删除按钮 - 单击该按钮可删除所有派生数据。 (Xcode 将不得不重建索引文件等,没什么重要的)

(我记得,当我有一个 Resource(s) 文件夹时,我看到了这样的错误,当我重命名它时,它再次工作。据我所知,Resource 用于 Mac OS X 应用程序。我认为它会不适用于 iOS,但至少在我的案例中造成了麻烦。)

关于iOS模拟器安装应用失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23449041/

相关文章:

iphone - 如何动态添加uibutton并让下面的元素向下移动以腾出空间

java - 读取返回 StreamingResponseBody 作为响应的 API

php - gif 文件从 php 到 iphone

iOS 7 自定义按钮损坏的 Action / socket

objective-c - 无法将 UIButton 与 XCode 中的文件所有者链接起来

ios - Swift - 单击按钮更改 UIPageViewController View

带有 watchkit 目标 : `The executable was signed with invalid entitlements` error for distribution profile 的 iOS 应用

ios - 无法使用来自 API 的数据在 UITableView 中插入单元格

iphone - 向 UILabel 添加背景图像

ios - 如何捕获 AVCaptureSession 的一部分?