Xcode清理过程中误删文件导致无法在模拟器安装app

前几天清理了Xcode里面的文件,再次运行编译成功,模拟器安装app时出现报错:

Failed to create temporary staging dir
Failed to install

尝试用另外一个模拟器,提示:
Unable to boot device because it cannot be located on disk
Use the device manager in Xcode or the simctl command line tool to either delete the device properly or erase contents and settings

清理模拟器试试:

xcrun simctl list
找到对应模拟器的Identifier
xcrun simctl erase 6EB26FB3-F34B-42F3-8A6B-C5601C02D55A

再次运行就可以了。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容