Skip to content

Commit

Permalink
Move registerBridgeComponents to AppDelegate.
Browse files Browse the repository at this point in the history
  • Loading branch information
svara committed Dec 6, 2024
1 parent 08bdabe commit 3d9f407
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 5 additions & 0 deletions Demo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Hotwire.config.backButtonDisplayMode = .minimal
Hotwire.config.showDoneButtonOnModals = true
Hotwire.registerBridgeComponents([
FormComponent.self,
MenuComponent.self,
OverflowMenuComponent.self,
])

#if DEBUG
Hotwire.config.debugLoggingEnabled = true
Expand Down
10 changes: 0 additions & 10 deletions Demo/SceneController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ final class SceneController: UIResponder {

// MARK: - Setup

private func configureBridge() {
Hotwire.registerBridgeComponents([
FormComponent.self,
MenuComponent.self,
OverflowMenuComponent.self,
])
}

private func configureRootViewController() {
guard let window = window else {
fatalError()
Expand Down Expand Up @@ -47,8 +39,6 @@ extension SceneController: UIWindowSceneDelegate {

window = UIWindow(windowScene: windowScene)
window?.makeKeyAndVisible()

configureBridge()
configureRootViewController()

navigator.route(rootURL)
Expand Down

0 comments on commit 3d9f407

Please sign in to comment.