1

I was using Xcode 10. Did not have enough space to update to latest Xcode. So downloaded it from Apple's website and removed the old Xcode. To make more space I deleted all the cache, unavailable simulators, derived data and unwanted stuffs following this. After that installed the new Xcode 11.3.

My app is build successfully. But the emulator is showing only black screen.

I tried

"Erase All Content and Settings"

and also

defaults write com.apple.CoreSimulator.IndigoFramebufferServices FramebufferRendererHint 3

But still emulator is the same.

Sallu Salman
  • 359
  • 3
  • 20

1 Answers1

0

Switching from Xcode 10 to Xcode 11 enables the dark mode/Dynamic Colors on your project.

There are two possible scenarios for your problem,

  1. The Simulator may be on the dark mode and your first view controller background automatically changes to dark mode.
  2. The Simulator may be on Light mode, but you have set your first view controller to be in a dark colour

For the first scenario,

Go to Settings in Emulator -> scroll all the way down to Developer -> Switch off the dark appearance.

Developer Settings screen in emulator

If you want to avoid using the interface Styles/ Light mode or dark modes, add the following in your info.plist file if you're opening as XML,

<key>UIUserInterfaceStyle</key>
<string>Light</string>

if you're using the plist file,

use the key,

UIUserInterfaceStyle

and set the String value as Light.

If you think you're facing the second scenario,

Change the dynamic system background colour of your view to a hardcoded UIColor in Interface builder or your ViewDidLoad()

override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        yourView.backgroundColor = UIColor.white

    }
  • 1
    How will i go to the settings of emulator if all i see is black screen. even the apple logo that comes up when the emulator boots is not being shown. – Sallu Salman Jan 17 '20 at 13:04