2023-05-27 21:53:04 -07:00
|
|
|
//
|
|
|
|
|
// UnstableFeatures+SwiftUI.swift
|
|
|
|
|
// SideStore
|
|
|
|
|
//
|
|
|
|
|
// Created by naturecodevoid on 5/25/23.
|
|
|
|
|
// Copyright © 2023 SideStore. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
|
import UIKit
|
|
|
|
|
|
|
|
|
|
import AltStoreCore
|
|
|
|
|
|
|
|
|
|
extension UnstableFeatures {
|
|
|
|
|
class SwiftUI {
|
|
|
|
|
static func onEnable() {
|
|
|
|
|
let rootView = RootView()
|
|
|
|
|
.environment(\.managedObjectContext, DatabaseManager.shared.viewContext)
|
|
|
|
|
|
2023-06-02 22:06:05 -07:00
|
|
|
UIApplication.keyWindow?.rootViewController = UIHostingController(rootView: rootView)
|
2023-05-27 21:53:04 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static func onDisable() {
|
|
|
|
|
let storyboard = UIStoryboard(name: "Main", bundle: .main)
|
|
|
|
|
let rootVC = storyboard.instantiateViewController(withIdentifier: "tabBarController") as! TabBarController
|
|
|
|
|
|
2023-06-02 22:06:05 -07:00
|
|
|
UIApplication.keyWindow?.rootViewController = rootVC
|
2023-05-27 21:53:04 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|