正如标题所示,我想清除应用程序的缓存和所有数据,但不是实际 iOS 模拟器本身上的所有数据。我在 StackOverflow 上能找到的就是这样的帖子:
Reset iOS Simulator application data to run app for first time
它告诉我重置整个手机,这需要相当长的时间。我可以在实际 iPhone 上清除缓存,我不明白为什么我不能在模拟器上清除缓存,感觉很简单。
最佳答案
使用xcrun simctl get_app_container <device> <bundleid> data
获取应用程序数据容器的路径。
您可以导航到该目录并删除您想要删除的任何内容。
关于iOS模拟器: How to clear cache of an app instead of entire phone?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56228470/