I run the Xcode Simulator on its own for web development testing. When Simulator starts up, it always boots up the iPhone X (iOS 11.3) because it was running when I last quit the simulator, because I can't figure out how to shut down the phone.
I can't hit the (virtual) power and volume buttons at the same time in the simulator (as one would do on a real phone) and for some reason the Settings > General area doesn't have the option to "Shut Down." I can restart the device from the Simulator's "Hardware" menu but there does not seem to be an option for shutting down the phone (even with extra keyboard modifiers held).
Have I missed anything or is this just not possible?
Clarifications:
Workaround Found
When Simulator is launched on its own (not though an Xcode project) it will re-launch the last simulation that was activated from the Hardware menu if it's left running. So if I launch something new, and then leave both it and the iPhone X simulator running, When I quit Simulator it will relaunch with the next time with new hardware, not the iPhone X.
I'd still be interested in any method to just tell the iPhone X hardware to shut down (if such a thing exists) as I'm often having to flip between hardware simulations and it would good to be able to do that without having to relaunch to get rid of iPhone X.
Press Command + Q to quit the simulator. This will close all the apps running in the simulator. Pressing the home button only returns to the home screen without quitting the apps(ios 4 or later) because of multitasking.
To run your app in Simulator, choose an iOS simulator—for example, iPhone 6 Plus, iPad Air, or iPhone 6 + Apple Watch - 38mm—from the Xcode scheme pop-up menu and click Run. Xcode builds your project and then launches the most recent version of your app running in Simulator on your Mac screen, as shown in Figure 1-1.
shift+command+H twice to simulate the double tap of home button. swipe your app's screenshot upward to close it.
The problem is that you are using a @react-native/cli version that doesn't detect XCode 11 simulators. You can either downgrade your XCode or install a @react-native/cli that supports it.
Change your simulator to required version from Hardware -> Device -> That way you will have correct version loaded and of course there is no way of "Shutdown" a simulator but quit, as this is just an application not hardware. If you have multiple simulators open, you can close the not required ones by highlighting them and select File -> Close Window or CMD+W
Another good info from Colin :
I also just noticed that if I turn off "show device bezels" I get regular window controls for closing the window, too.
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