How to reset iPhone simulator

My application uses the location service. To check what happens when the user clicks "Do Not Allow", when the simulator asks for permission to access the location service (when the application starts for the first time), I need to reset the simulator. This is because the question was answered at the beginning of the development process with allow. Therefore, more questions are not asked.

Resetting the simulator using "Reset contents and settings" does not return the question at the beginning. What am I doing wrong?

+52
iphone ios-simulator
May 04 '10 at 8:08
source share
7 answers

For iOS 11 and later:

Hardware > Erase All Contents and Settings...

For previous versions:

Simulator > Reset Content and Settings...

(In earlier versions of the simulator, the inscription "iOS Simulator" was on the top menu bar

+99
Jan 31 2018-12-12T00:
source share

For iOS 11 and later, you need to go to the top system menu and select:

Hardware > Delete All Content And Settings ...

+79
Aug 28 '17 at 15:55
source share

If you are using Snow Leopard:

Go to the settings of your Mac-system (and not to the simulator), Select the "Security" section. Click the "Reset Warnings" button in front of the location of the Service, you are all set up.

+17
Sep 21 '10 at 12:57 on
source share

Apple says

To set up custom content and simulator settings in the factory, and uninstall the applications you installed, select iPhone Simulator> Reset Content and Settings.

http://support.apple.com/kb/ht2110

+6
Aug 08 2018-12-12T00:
source share

Nice and convenient tool. Great Fastlane Command Line Tools ( https://github.com/fastlane/snapshot )

 snapshot reset_simulators 

reset_simulators deletes all simulators and creates a new one only for the latest version of iOS. If you want to recreate simulators for other versions, you need to provide a list of versions after the -ios argument, for example.

 snapshot reset_simulators --ios 8.3,8.4,9.0,9.1 
+3
Feb 24 '16 at 19:43
source share

I tried "Delete All Content and Settings" in Simulator 10.0, but that did not work. What worked for me was that the Settings app was built into Simulator 10.0. You can reset:

  • Click on the Settings app to launch it.
  • Click "General."
  • Click Reset.
  • Click reset Location and Privacy.
  • Click reset Warnings.

Then your authorization status will be reset to .notDetermined.

+2
Nov 17 '17 at 20:58
source share

Or you can choose simctl to control the iOS simulator from the command line.

$ xcrun simctl erase all too erase all content in the entire simulator.

For more information, you can read this blog from XCBlog: https://medium.com/xcblog/simctl-control-ios-simulators-from-command-line-78b9006a20dc

+2
Aug 05 '19 at 6:44
source share



All Articles