Reset iOS Simulator application data to run app for first time

@Tim's answer is probably easier for interactive usage.

We use scripts for automated testing and delete the simulator's data directory to ensure it's clean. The simulator will re-create basic information when it restarts.

Delete the following:

~/Library/Application Support/iPhone Simulator/${simulator.version}


In the iOS Simulator, press iOS Simulator in the menu at the top of the screen, and press 'Reset Content and Settings...'. This will clear the entire simulator.

Or, on the home screen of the simulator, uninstall the app in the same way you would on a physical device, by pressing and holding on the application icon until an 'x' appears in the top left, and press the 'x', and select 'Delete' from the alert view. This will clear all data associated with a single app.

Then do a clean, build and run.

Edit:

As of Xcode 11+ Simulator, this is under Device > Erase All Content and Settings


The correct way to do this in XCode is: (Simulator must be shut down first)

xcrun simctl erase <device UDID> or xcrun simctl erase all

To find out the UDID use:

xcrun simctl list


Currently (Simulator Version 10.0), you can do it the following way:

Hardware > Erase All Content and Settings...

The screenshot of the way to reset Simulator