I am working on an iOS application written in Swift. I have a subclass of UITabBarController and then a nested subclass:
class HWTabBarController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() ... } } class MainTabBarController: HWTabBarController { override func viewDidLoad() { super.viewDidLoad() ... } }
This works fine in the iOS simulator, and even when I debug the application on my iPhone. But it crashes when I archive the application and send it to my phone using TestFlight.
My crash logs populate with this endless loop:
22 HDWR 0x00145e10 @objc HDWR.MainTabBarController.viewDidLoad (HDWR.MainTabBarController)() -> () (MainTabBarController.swift:16) 23 HDWR 0x00262867 NRMA__voidParamHandler 24 HDWR 0x0014ea00 HDWR.HWTabBarController.viewDidLoad (HDWR.HWTabBarController)() -> () (HWTabBarController.swift:24) 25 HDWR 0x00145e10 @objc HDWR.MainTabBarController.viewDidLoad (HDWR.MainTabBarController)() -> () (MainTabBarController.swift:16) 26 HDWR 0x00262867 NRMA__voidParamHandler 27 HDWR 0x0014ea00 HDWR.HWTabBarController.viewDidLoad (HDWR.HWTabBarController)() -> () (HWTabBarController.swift:24) 28 HDWR 0x00145e10 @objc HDWR.MainTabBarController.viewDidLoad (HDWR.MainTabBarController)() -> () (MainTabBarController.swift:16) 29 HDWR 0x00262867 NRMA__voidParamHandler 30 HDWR 0x0014ea00 HDWR.HWTabBarController.viewDidLoad (HDWR.HWTabBarController)() -> () (HWTabBarController.swift:24) 31 HDWR 0x00145e10 @objc HDWR.MainTabBarController.viewDidLoad (HDWR.MainTabBarController)() -> () (MainTabBarController.swift:16) 32 HDWR 0x00262867 NRMA__voidParamHandler 33 HDWR 0x0014ea00 HDWR.HWTabBarController.viewDidLoad (HDWR.HWTabBarController)() -> () (HWTabBarController.swift:24)
What is the voidParamHandler and why did it return to MainTabBarController.viewDidLoad ?
Am I doing something wrong here? Or is this a bug in Swift?
source share