Skip to content

Commit c734b06

Browse files
committed
Revert RequirementsChecker.baseViewController visibility
1 parent b33da62 commit c734b06

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

WooCommerce/Classes/AppDelegate.swift

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
4040
///
4141
private var jetpackSetupCoordinator: JetpackSetupCoordinator?
4242

43-
private(set) var requirementsChecker = RequirementsChecker(baseViewController: nil)
43+
private(set) lazy var requirementsChecker = RequirementsChecker(baseViewController: tabBarController)
4444

4545
/// Handles events to background refresh the app.
4646
///
@@ -111,20 +111,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
111111
return true
112112
}
113113

114-
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
115-
guard let sceneDelegate = UIApplication.sceneDelegate,
116-
let rootViewController = sceneDelegate.window?.rootViewController else {
117-
fatalError()
118-
}
119-
120-
if let universalLinkRouter = sceneDelegate.universalLinkRouter, universalLinkRouter.canHandle(url: url) {
121-
universalLinkRouter.handle(url: url)
122-
return true
123-
}
124-
125-
return handleAuthenticationUrl(url, options: options, rootViewController: rootViewController)
126-
}
127-
128114
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
129115
guard let defaultStoreID = ServiceLocator.stores.sessionManager.defaultStoreID else {
130116
return
@@ -262,7 +248,6 @@ extension AppDelegate {
262248

263249
/// Push Notifications: Authorization + Registration!
264250
///
265-
/// periphery: ignore - Fails when build on simulator
266251
func setupPushNotificationsManagerIfPossible(_ pushNotesManager: PushNotesManager, stores: StoresManager) {
267252
#if targetEnvironment(simulator)
268253
DDLogVerbose("👀 Push Notifications are not supported in the Simulator!")

WooCommerce/Classes/SceneDelegate.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
3838
handle(shortcutItem: shortcut, completion: nil)
3939
}
4040

41-
// Update AppDelegate-scoped dependencies that rely on a base VC
42-
AppDelegate.shared.requirementsChecker.baseViewController = tabBarController
43-
4441
// Take advantage of a bug in UIAlertController to style all UIAlertControllers with WC color
4542
UIApplication.wooKeyWindow?.tintColor = .primary
4643
}

WooCommerce/Classes/Tools/RequirementsChecker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ enum RequirementCheckResult: Int, CaseIterable {
2525
final class RequirementsChecker {
2626

2727
private let stores: StoresManager
28-
var baseViewController: UIViewController?
28+
private let baseViewController: UIViewController?
2929

3030
init(stores: StoresManager = ServiceLocator.stores,
3131
baseViewController: UIViewController? = nil) {

0 commit comments

Comments
 (0)