diff --git a/DuckDuckGo/CookieDebugViewController.swift b/DuckDuckGo/CookieDebugViewController.swift index 4efc382742..32bf086faa 100644 --- a/DuckDuckGo/CookieDebugViewController.swift +++ b/DuckDuckGo/CookieDebugViewController.swift @@ -41,9 +41,9 @@ class CookieDebugViewController: UITableViewController { var loaded = false let fireproofing: Fireproofing - init(fireproofing: Fireproofing = UserDefaultsFireproofing.shared) { + init?(coder: NSCoder, fireproofing: Fireproofing) { self.fireproofing = fireproofing - super.init() + super.init(coder: coder) } required init?(coder: NSCoder) { diff --git a/DuckDuckGo/Debug.storyboard b/DuckDuckGo/Debug.storyboard index ebc359a9e2..4f26190100 100644 --- a/DuckDuckGo/Debug.storyboard +++ b/DuckDuckGo/Debug.storyboard @@ -1,9 +1,9 @@ - + - + @@ -116,7 +116,7 @@ - + @@ -306,7 +306,7 @@ - + @@ -375,7 +375,7 @@ - + @@ -732,6 +732,7 @@ + @@ -1030,17 +1031,17 @@ - + - + - + - + diff --git a/DuckDuckGo/RootDebugViewController.swift b/DuckDuckGo/RootDebugViewController.swift index 58258a5a07..d056ebb057 100644 --- a/DuckDuckGo/RootDebugViewController.swift +++ b/DuckDuckGo/RootDebugViewController.swift @@ -123,6 +123,15 @@ class RootDebugViewController: UITableViewController { return controller } + @IBSegueAction func onCreateCookieDebugScreen(_ coder: NSCoder) -> CookieDebugViewController? { + guard let controller = CookieDebugViewController(coder: coder, fireproofing: UserDefaultsFireproofing.shared) else { + fatalError("Failed to create controller") + } + + return controller + } + + override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { if cell.tag == Row.toggleInspectableWebViews.rawValue { cell.accessoryType = AppUserDefaults().inspectableWebViewEnabled ? .checkmark : .none