清理iPhone模拟器 [英] Cleaning up the iPhone simulator

查看:204
本文介绍了清理iPhone模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在构建iPhone模拟器时,是否有一种简单的方法来清理xcode部署应用程序的目录?我有一个sqlite数据库,如有必要,可以在启动时复制到Documents文件夹中。问题是我可能会更改我的架构,但新数据库不会被复制,因为已经存在。

Is there a straightforward way to clean up the directory where xcode deploys an app when building for the iPhone simulator? I have a sqlite database that gets copied into the Documents folder on startup if necessary. The problem is that I might change my schema, but the new database won't get copied, because one already exists.

理想情况下,每次构建时,它都会被核以前的内容。这是可能的,还是我必须手动执行?

Ideally, every time I build, it would nuke the previous contents. Is this possible, or do I have to manually do it?

推荐答案

模拟器将应用程序安装到:

The simulator installs apps into:

"$HOME/Library/Application Support/iPhone Simulator/User/Applications"

同时检查:

"$HOME/Library/Developer/CoreSimulator/Devices"

GUID文件和目录与模拟器安装的应用程序相匹配。

The GUID files and directories match up to the simulator's installed apps.

手动删除所有这些文件/目录以从模拟器中删除所有应用程序。

Manually delete all those files/directories to remove all applications from the simulator.

我知道有一些方法可以将脚本添加到在XCode中构建进程。

I know there is some way to add scripts to the build process in XCode.

此外,它看起来好像XCode更改了它使用每个构建的GUID(我的应用程序所在的目录在XCode中的构建之间发生了变化),所以试图一直删除同一目录将无法正常工作。如果您一次只处理一个应用程序,那么清除整个目录将是一个选项。

Also it looks as if XCode changes the GUID it uses each build (the directory where my app sits changes between builds in XCode), so trying to delete the same directory all the time won't work. If you are only working on one app at a time then clearing out the entire directory would be an option.

这篇关于清理iPhone模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆