Just updated to Xcode 10 :( and nothing works anymore.
private func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
window = UIWindow()
window?.rootViewController = UIViewController()
window?.makeKeyAndVisible()
return true
}
App launches and turns black right away.
It doesn't even hot my breakpoints, I have a breakpoint on the first line of Appldegate and it's not getting hit
I have a breakpoint on the first line of Appldegate and it's not getting hit
Exactly so. The breakpoint is not being hit because your method is not being called. It's not being called because Cocoa can't see that it's there. Cocoa can't see that it's there because you have hidden it!
It's all about the relationship between Objective-C and Swift, and how Objective-C sees what's in your Swift code.
The problem is the keyword private
. This causes Cocoa (which is Objective-C) to be unable to see that you have implemented application:didFinishLaunchingWithOptions:
. It can't see it so it doesn't call it. Delete that keyword and you're good to go.