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.
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.
您还可以转到“设置”>“常规”,“关闭”应位于最底部
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.