I just finished writing some code that checks if it is the first time the app is running then display a message, if it is not the first time then display another message..
How do you reset the simulator on Xcode so that I can test the app when it runs the first time?
I tried cleaning the build folder but it didn't work..
shift+command+H twice to simulate the double tap of home button. swipe your app's screenshot upward to close it.
Run and stop an emulator, and clear data To stop a running emulator, click Menu and select Stop. To clear the data for an emulator, select Wipe Data. Or click Menu and select Wipe Data.
Selecting Reload (or pressing ⌘ + r in the iOS simulator) will reload the JavaScript that powers your application.
type: ~/Library/Application Support/iPhone Simulator. The Directories are the iOS version of the different Simulators. The Sub Directories are the Apps install on the simulator.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With