From b8c12a1041795833d0ea808c8dd98a5ac548f63b Mon Sep 17 00:00:00 2001 From: naturecodevoid <44983869+naturecodevoid@users.noreply.github.com> Date: Fri, 2 Jun 2023 22:06:05 -0700 Subject: [PATCH] fix: compile error --- AltStore/Unstable Features/UnstableFeatures+SwiftUI.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AltStore/Unstable Features/UnstableFeatures+SwiftUI.swift b/AltStore/Unstable Features/UnstableFeatures+SwiftUI.swift index 3d4f48cb..d0cb91f0 100644 --- a/AltStore/Unstable Features/UnstableFeatures+SwiftUI.swift +++ b/AltStore/Unstable Features/UnstableFeatures+SwiftUI.swift @@ -17,14 +17,14 @@ extension UnstableFeatures { let rootView = RootView() .environment(\.managedObjectContext, DatabaseManager.shared.viewContext) - UIApplication.topController = UIHostingController(rootView: rootView) + UIApplication.keyWindow?.rootViewController = UIHostingController(rootView: rootView) } static func onDisable() { let storyboard = UIStoryboard(name: "Main", bundle: .main) let rootVC = storyboard.instantiateViewController(withIdentifier: "tabBarController") as! TabBarController - UIApplication.topController = rootVC + UIApplication.keyWindow?.rootViewController = rootVC } } }