Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable Dark Mode on the Simulator?

Tags:

I’m trying to figure out how to turn on the new dark mode on the Xcode simulator. As far as I know it turns on by itself on real devices when it’s dark. Is there a way to trigger this on the simulator?

like image 356
David Schmoecker Avatar asked Oct 02 '19 07:10

David Schmoecker


People also ask

How do I get dark simulator mode?

If using an Android Emulator, you can run adb shell "cmd uimode night yes" to enable dark mode, and adb shell "cmd uimode night no" to disable dark mode. If using a real device or an Android Emulator, you can toggle the system dark mode setting in the device's settings.

How do I change the dark theme on Iphone simulator?

iOS Simulator can toggle between light and dark mode with ⌘ - command + ⇧ - shift + a shortcut.

How do I open developer options in simulator?

Enable developer options and USB debugging To enable developer options, tap the Build Number option 7 times. You can find this option in one of the following locations, depending on your Android version: Android 9 (API level 28) and higher: Settings > About Phone > Build Number. Android 8.0.


1 Answers

There are two ways to activate the dark mode in Xcode 11. Both require you manual steps and are not automatic depending on the time.

1. Environment Overrides

The preferred one is to use the Environment Overrides inside Xcode. When running the App on the simulator in Xcode appears a button in the debugger controls next to 'Debug Memory Graph' and 'Simulate Location'. There you will find a menu for enabling dark mode, as well as choose text size and other accessibility settings.

Dark Mode Settings in Xcode11

2. Simulator Settings

Alternatively you can go inside the Settings App on the simulator:

Settings > Developer > Dark Appearance

like image 106
Drobs Avatar answered Sep 20 '22 17:09

Drobs