Skip to content

Commit

Permalink
Load application plugin early
Browse files Browse the repository at this point in the history
  • Loading branch information
basememara committed Oct 25, 2019
1 parent 82cdbdb commit 8263a3e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ open class ApplicationPluggableDelegate: UIResponder, UIApplicationDelegate {
/// List of application plugins for binding to `AppDelegate` events
public private(set) lazy var plugins: [ApplicationPlugin] = { application() }()

public override init() {
super.init()

// Load lazy property early
_ = plugins
}

/// List of application plugins for binding to `AppDelegate` events
open func application() -> [ApplicationPlugin] {[]} // Override
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ open class ExtensionPluggableDelegate: NSObject, WKExtensionDelegate {
/// List of application plugins for binding to `ExtensionDelegate` events
public private(set) lazy var plugins: [ExtensionPlugin] = { application() }()

public override init() {
super.init()

// Load lazy property early
_ = plugins
}

/// List of application plugins for binding to `ExtensionDelegate` events
open func application() -> [ExtensionPlugin] {[]} // Override
}
Expand Down

0 comments on commit 8263a3e

Please sign in to comment.