Uninstall your method signature and have Xcode fill it in automatically
I also had a problem with my didFinishLaunchingWithOptions method in AppDelegate not being called. My function was also marked as private and looked like this
private func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool
The problem is that this is an old syntax! Obviously for me, when I converted my project from Swift 2.x to Swift 3, Xcode did not convert the methods to AppDelegate. The new syntax is as follows
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool
Swift 4.2:
func application( _ application: UIApplication,didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool
source share