How to enable dark mode in iOS simulator

Go to home screen of your simulator.

Click the Settings icon.

Click the Developer setting, it should be present at the last of the settings.

Turn on the Dark Appearance toggle.

The simulator will turn into dark mode now.