Skip to content

Commit 81b9650

Browse files
committed
Fix build pods
1 parent d1ece29 commit 81b9650

File tree

4 files changed

+30
-29
lines changed

4 files changed

+30
-29
lines changed

Source/Core/InputSource.swift

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -129,25 +129,6 @@ extension BuilderRouterReadySetup where FR: FactoryRouter, FR: FactorySupportInp
129129
}
130130
}
131131

132-
extension BuilderRouterReadyCreate where FR: CreatorFactoryRouter, FR: FactorySupportInputSource {
133-
/// Builder step: create and setup used InputSource
134-
public func createAndSetup(source: BaseFactoryInputSource, identifier: String? = nil, sender: Any? = nil) -> BuilderRouterReadyPresent<FR.VCCreateType> {
135-
return createAndSetup(sourceList: [source], identifier: identifier, sender: sender)
136-
}
137-
138-
/// Builder step: create and setup used array InputSource
139-
public func createAndSetup(sourceList: [BaseFactoryInputSource], identifier: String? = nil, sender: Any? = nil) -> BuilderRouterReadyPresent<FR.VCCreateType> {
140-
do {
141-
let factory = self.factory()
142-
let viewController = factory.createViewController()
143-
try factory.findAndSetup(viewController, sourceList: sourceList, identifier: identifier, sender: sender)
144-
return .init(viewController: viewController, default: factory.presentationAction())
145-
} catch {
146-
return .init(error: error)
147-
}
148-
}
149-
}
150-
151132
// MARK: Helpers
152133
/// Helper function: find ViewController with support InputSource setup and create factory for use next
153134
public func dependencyRouterFindSourceRouterViewController(_ viewController: UIViewController) -> (UIViewController & CoreSourceRouterViewController, FactorySupportInputSource)? {

Source/Core/PresentationRouter.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88

99
import UIKit
1010

11+
/// Assert if use - used as default when require always use own
12+
public struct NotPresentationAction: PresentationAction {
13+
public init() { }
14+
15+
public func present(_ viewController: UIViewController, on existingController: UIViewController, animated: Bool, completionHandler: @escaping (PresentationActionResult) -> Void) {
16+
assertionFailure("You need use valid PresentationAction, don't use NotPresentationAction.")
17+
completionHandler(.failure(DependencyRouterError.notReadyPresentingViewController("need use valid PresentationAction, don't use NotPresentationAction.")))
18+
}
19+
}
20+
1121
/// PresentationActions handler
1222
public struct PresentationRouter {
1323
/**

Source/General/BlankFactory.swift

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,26 @@ extension BuilderRouterReadyCreate where FR: CreatorFactoryRouter, FR: BlankFact
8282
}
8383
}
8484

85+
extension BuilderRouterReadyCreate where FR: CreatorFactoryRouter, FR: FactorySupportInputSource {
86+
/// Builder step: create and setup used InputSource
87+
public func createAndSetup(source: BaseFactoryInputSource, identifier: String? = nil, sender: Any? = nil) -> BuilderRouterReadyPresent<FR.VCCreateType> {
88+
return createAndSetup(sourceList: [source], identifier: identifier, sender: sender)
89+
}
90+
91+
/// Builder step: create and setup used array InputSource
92+
public func createAndSetup(sourceList: [BaseFactoryInputSource], identifier: String? = nil, sender: Any? = nil) -> BuilderRouterReadyPresent<FR.VCCreateType> {
93+
do {
94+
let factory = self.factory()
95+
let viewController = factory.createViewController()
96+
try factory.findAndSetup(viewController, sourceList: sourceList, identifier: identifier, sender: sender)
97+
return .init(viewController: viewController, default: factory.presentationAction())
98+
} catch {
99+
return .init(error: error)
100+
}
101+
}
102+
}
103+
104+
85105
//MARK: Support Present NavigationRouter
86106
extension SimplePresentNavigationRouter {
87107
public func simplePresent<FR: AutoCreatorFactoryRouter & BlankFactoryRouter>(_ routerType: FR.Type, action: PresentationAction? = nil, animated: Bool = true) {

Source/General/SimplePresentationActions.swift

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,6 @@ public class NoAdaptivePresentationStyleHelper: NSObject, UIAdaptivePresentation
2323
}
2424
}
2525

26-
/// Assert if use - used as default when require always use own
27-
public struct NotPresentationAction: PresentationAction {
28-
public init() { }
29-
30-
public func present(_ viewController: UIViewController, on existingController: UIViewController, animated: Bool, completionHandler: @escaping (PresentationActionResult) -> Void) {
31-
assertionFailure("You need use valid PresentationAction, don't use NotPresentationAction.")
32-
completionHandler(.failure(DependencyRouterError.notReadyPresentingViewController("need use valid PresentationAction, don't use NotPresentationAction.")))
33-
}
34-
}
35-
3626
/// Show used UIViewController.show(_ vc: UIViewController, sender: Any?), as default
3727
public struct ShowPresentationAction: PresentationAction {
3828
public var prepareHandler: ((UIViewController)->Void)? = nil

0 commit comments

Comments
 (0)