Jeff Lee
Jeff Lee

Reputation: 81

iOS Simulator: How to clear cache of an app instead of entire phone?

As the title already states, I want to clear the cache and all data of an app, but not everything on the actual iOS Simulator itself. All I can find on StackOverflow is posts like these:

Reset iOS Simulator application data to run app for first time

Where it tells me to reset the entire phone which takes quite a bit of time. I can clear the cache on the actual iPhone, I can't fathom why I wouldn't be able to on the simulator, it feels so basic.

Upvotes: 8

Views: 4652

Answers (1)

russbishop
russbishop

Reputation: 17249

Use xcrun simctl get_app_container <device> <bundleid> data to get the path to your app's data container.

You can navigate to that directory and delete whatever content you want to delete.

Upvotes: 5

Related Questions