How to reset iPhone simulator

前端 未结 8 1321
挽巷
挽巷 2020-12-01 07:21

My app uses the location service. To test what is happening when the user presses \'Don\'t allow\' when the simulator asks for the permission to access the location service

相关标签:
8条回答
  • 2020-12-01 07:33

    For iOS 14 and newer:

    Device > Erase All Contents and Settings...

    For iOS 11 and newer:

    Hardware > Erase All Contents and Settings...

    For previous versions:

    Simulator > Reset Content and Settings...

    (In earlier versions of the simulator the top menu entry label was "iOS Simulator"

    0 讨论(0)
  • 2020-12-01 07:34

    For Xcode 11.4

    Device -> Erase All Content and Settings...

    Image

    0 讨论(0)
  • 2020-12-01 07:34

    Nice and handy tool. The great Fastlane commandline tools (https://github.com/fastlane/snapshot)

    snapshot reset_simulators
    

    reset_simulators is removing all simulators and create new one only for the latest iOS version. If you want to recreate simulators for other versions you have to provide the list of the versions after the --ios argument, e.g.

    snapshot reset_simulators --ios 8.3,8.4,9.0,9.1
    
    0 讨论(0)
  • 2020-12-01 07:42

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

    "Hardware" > "Erase All Contents and Settings..."

    0 讨论(0)
  • 2020-12-01 07:45

    I tried "Erase All Content and Settings" in Simulator 10.0, but it didn't work. What worked for me is that in Simulator 10.0, the Settings app is built in. You can reset by:

    1. Clicking on the Settings app to start it.
    2. Click General.
    3. Click Reset.
    4. Click Reset Location & Privacy.
    5. Click Reset Warnings.

    Then your authorization status will be reset to .notDetermined.

    0 讨论(0)
  • 2020-12-01 07:52

    If you're using Snow Leopard:

    Go to your mac's System Preferences (not the simulator's), Select the Security section. Hit the "Reset Warnings" button in front of Location Services, you're all set.

    0 讨论(0)
提交回复
热议问题