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.