Is there a command to restart the Xcode iOS simulator from command line?
I'm using xcode 11.3 but this seems to work for me:
export UDID=$(xcrun simctl list devices | grep "(Booted)" | grep -E -o -i "([0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12})")
xcrun simctl shutdown $UDID
xcrun simctl boot $UDID
Might be worth giving it an update to the latest xcode.
How to reset iOS simulator?
It is under "Hardware" section.
Reset the contents and settings all iOS-simulators
I present,
The Definitive iOS Simulator Reset Script (link)
Based on Oded Regev's code from this SO question (which was based on Jacob Rus's fine "menu_click" code)
How to reset iPhone simulator
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"
Is there a way to close the iOS Simulator from the command line?
killall "iOS Simulator"
in the Terminal will close it.
Also, you can launch it with iphonesim to have more control over it, including modifying the source to your needs.
Reset iOS Simulator with Applescript
I present,
The Definitive iOS Simulator Reset Script (link)
Based on Oded Regev's code from this SO question (which was based on Jacob Rus's fine "menu_click" code)
Related Topics
How to Trap on Uiviewalertforunsatisfiableconstraints
Xcode 6 iPhone Simulator Application Support Location
What's the Best Way to Find the User's Documents Directory on an Iphone
Changing Vc Issue in Swift. How to Pass Data Between Views in Tab Bar Controller
Ios: Serialize/Deserialize Complex JSON Generically from Nsobject Class
Swift Apply .Uppercasestring to Only the First Letter of a String
Upload Image with Multipart Form-Data iOS in Swift
How to Format a Double into Currency - Swift 3
Disable iOS8 Quicktype Keyboard Programmatically on Uitextview
Automatic Preferred Max Layout Width Is Not Available on iOS Versions Prior to 8.0
How to Test If a String Is Empty in Objective-C
Setting Direction for Uiswipegesturerecognizer
Connect Objective-C Framework to Swift iOS 8 App (Parse Framework)
Update Restkit 'Lcl_Rk.H' File Not Found in Rklog.H
Replacement for C-Style Loop in Swift 2.2
How to Convert My Device Token (Nsdata) into an Nsstring