If not, then try one of the following article about cleaning XCode cash and how-to reset the simulator:
There is also an app Xcode Cache Clean
You can Reset Content and Settings from top left . This may help you solve the problem.
I've recently had this same problem with a project I was migrating from Swift 3 to Swift 4.2. The problem was the method signatures on AppDelegate
, specifically the didFinishLaunchingWithOptions
, which I had to change from:
private func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
To:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
This solved the issue. The simulator (and device) showed a black screen because didFinishLaunchingWithOptions
was not executed. Consequently, the UIWindow.rootViewController
was not set.
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.