diff --git a/Example/Podfile.lock b/Example/Podfile.lock
index ba03a19f..e70d9ae7 100644
--- a/Example/Podfile.lock
+++ b/Example/Podfile.lock
@@ -1,5 +1,5 @@
PODS:
- - RouteComposer (2.10.2)
+ - RouteComposer (2.10.3)
- SwiftFormat/CLI (0.43.5)
DEPENDENCIES:
@@ -15,7 +15,7 @@ EXTERNAL SOURCES:
:path: "../"
SPEC CHECKSUMS:
- RouteComposer: 37f0a7dfe42fd1200a857cd6bf8582f0b6113e4e
+ RouteComposer: f185d410da2c67bc90d93fc4618842fe47d92bca
SwiftFormat: 352ea545e3e13cfd7a449e621c1f3c2e244d4906
PODFILE CHECKSUM: fc9566202a2f646e3cbb198c10cf157d9dd60f4f
diff --git a/Example/Pods/Local Podspecs/RouteComposer.podspec.json b/Example/Pods/Local Podspecs/RouteComposer.podspec.json
index 29f28414..fb333779 100644
--- a/Example/Pods/Local Podspecs/RouteComposer.podspec.json
+++ b/Example/Pods/Local Podspecs/RouteComposer.podspec.json
@@ -1,6 +1,6 @@
{
"name": "RouteComposer",
- "version": "2.10.2",
+ "version": "2.10.3",
"summary": "Protocol oriented library that helps to handle view controllers composition, navigation and deep linking tasks.",
"swift_versions": "5.7",
"description": "RouteComposer is the protocol oriented, Cocoa UI abstractions based library that helps to handle view controllers composition, navigation\nand deep linking tasks in the iOS application. Can be used as the universal replacement for the Coordinator pattern.",
@@ -14,7 +14,7 @@
},
"source": {
"git": "https://github.com/ekazaev/route-composer.git",
- "tag": "2.10.2"
+ "tag": "2.10.3"
},
"platforms": {
"ios": "11.0"
diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock
index ba03a19f..e70d9ae7 100644
--- a/Example/Pods/Manifest.lock
+++ b/Example/Pods/Manifest.lock
@@ -1,5 +1,5 @@
PODS:
- - RouteComposer (2.10.2)
+ - RouteComposer (2.10.3)
- SwiftFormat/CLI (0.43.5)
DEPENDENCIES:
@@ -15,7 +15,7 @@ EXTERNAL SOURCES:
:path: "../"
SPEC CHECKSUMS:
- RouteComposer: 37f0a7dfe42fd1200a857cd6bf8582f0b6113e4e
+ RouteComposer: f185d410da2c67bc90d93fc4618842fe47d92bca
SwiftFormat: 352ea545e3e13cfd7a449e621c1f3c2e244d4906
PODFILE CHECKSUM: fc9566202a2f646e3cbb198c10cf157d9dd60f4f
diff --git a/Example/Pods/Target Support Files/RouteComposer/RouteComposer-Info.plist b/Example/Pods/Target Support Files/RouteComposer/RouteComposer-Info.plist
index 01a3b016..600aaa11 100644
--- a/Example/Pods/Target Support Files/RouteComposer/RouteComposer-Info.plist
+++ b/Example/Pods/Target Support Files/RouteComposer/RouteComposer-Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 2.10.2
+ 2.10.3
CFBundleSignature
????
CFBundleVersion
diff --git a/Example/RouteComposer/Configuration/ExampleConfiguration.swift b/Example/RouteComposer/Configuration/ExampleConfiguration.swift
index fa6d7b59..548027a6 100644
--- a/Example/RouteComposer/Configuration/ExampleConfiguration.swift
+++ b/Example/RouteComposer/Configuration/ExampleConfiguration.swift
@@ -81,9 +81,13 @@ extension ExampleScreenConfiguration {
StepAssembly(
finder: ColorViewControllerFinder(),
factory: ColorViewControllerFactory())
- .adding(DismissalMethodProvidingContextTask(dismissalBlock: { viewController, context, animated, completion in
+ .adding(DismissalMethodProvidingContextTask(dismissalBlock: { viewController, context, animated, completion in
// Demonstrates ability to provide a dismissal method in the configuration using `DismissalMethodProvidingContextTask`
- UIViewController.router.commitNavigation(to: GeneralStep.custom(using: PresentingFinder()), with: context, animated: animated, completion: completion)
+ UIViewController.router.commitNavigation(to: GeneralStep.custom(using: PresentingFinder(startingPoint: .custom(viewController))),
+ with: context,
+ animated: animated,
+ completion: completion)
+ // You can just call `viewController.dismiss(animated: true) if needed.`
}))
.adding(ExampleGenericContextTask())
.using(ExampleNavigationController.push())
diff --git a/Example/RouteComposer/View Controllers/SwiftUIContentView.swift b/Example/RouteComposer/View Controllers/SwiftUIContentView.swift
index b9369007..eda6e2ba 100644
--- a/Example/RouteComposer/View Controllers/SwiftUIContentView.swift
+++ b/Example/RouteComposer/View Controllers/SwiftUIContentView.swift
@@ -37,7 +37,7 @@ struct SwiftUIContentView: View, ContextInstantiatable, ContextChecking, Context
Text("Go to Square Tab")
}).accessibility(identifier: "SwiftUI+\(context)")
}.onAppear {
- self.context = self.currentContext
+ context = currentContext
}
}
diff --git a/Example/Tests/ActionTests.swift b/Example/Tests/ActionTests.swift
index 906912e9..be4e1aae 100644
--- a/Example/Tests/ActionTests.swift
+++ b/Example/Tests/ActionTests.swift
@@ -148,7 +148,7 @@ class ActionTests: XCTestCase {
}
wasInCompletion = false
- GeneralAction.presentModally(startingFrom: .custom(try testThrow())).perform(with: UIViewController(), on: UIViewController(), animated: true, completion: { result in
+ try GeneralAction.presentModally(startingFrom: .custom(testThrow())).perform(with: UIViewController(), on: UIViewController(), animated: true, completion: { result in
wasInCompletion = true
if result.isSuccessful {
XCTAssert(false)
diff --git a/Example/Tests/FinderTests.swift b/Example/Tests/FinderTests.swift
index b76fadbf..651e8ecb 100644
--- a/Example/Tests/FinderTests.swift
+++ b/Example/Tests/FinderTests.swift
@@ -136,7 +136,7 @@ class FinderTest: XCTestCase {
throw RoutingError.generic(.init("Test Error"))
}
- XCTAssertNotEqual(DefaultStackIterator.StartingPoint.custom(try throwsException()), DefaultStackIterator.StartingPoint.custom(currentViewController1))
+ XCTAssertNotEqual(try DefaultStackIterator.StartingPoint.custom(throwsException()), DefaultStackIterator.StartingPoint.custom(currentViewController1))
XCTAssertNotEqual(DefaultStackIterator.StartingPoint.topmost, DefaultStackIterator.StartingPoint.root)
XCTAssertNotEqual(DefaultStackIterator.StartingPoint.topmost, DefaultStackIterator.StartingPoint.custom(currentViewController))
}
diff --git a/RouteComposer/Classes/Extra/DispatchQueue+Action.swift b/RouteComposer/Classes/Extra/DispatchQueue+Action.swift
index ef3b81de..ac6c8a55 100644
--- a/RouteComposer/Classes/Extra/DispatchQueue+Action.swift
+++ b/RouteComposer/Classes/Extra/DispatchQueue+Action.swift
@@ -69,7 +69,7 @@ public struct DispatchQueueWrappedAction: Action {
completion(result)
return
}
- DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + self.timeInterval) {
+ DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + timeInterval) {
completion(result)
}
})
@@ -112,7 +112,7 @@ public struct DispatchQueueWrappedContainerAction: Container
completion(result)
return
}
- DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + self.timeInterval) {
+ DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + timeInterval) {
completion(result)
}
})
diff --git a/RouteComposer/Classes/Extra/NavigationDelayInterceptor.swift b/RouteComposer/Classes/Extra/NavigationDelayInterceptor.swift
index ed8fa5a1..03f777b8 100644
--- a/RouteComposer/Classes/Extra/NavigationDelayInterceptor.swift
+++ b/RouteComposer/Classes/Extra/NavigationDelayInterceptor.swift
@@ -81,7 +81,7 @@ public struct NavigationDelayingInterceptor: RoutingInterceptor {
logger?.log(.info("\(topmostViewController) is changing its state. Navigation has been postponed."))
let deadline = DispatchTime.now() + .milliseconds(100)
DispatchQueue.main.asyncAfter(deadline: deadline) {
- self.perform(with: context, completion: completion)
+ perform(with: context, completion: completion)
}
}
diff --git a/RouteComposer/Classes/Extra/SingleNavigationRouter.swift b/RouteComposer/Classes/Extra/SingleNavigationRouter.swift
index 42f36017..7a882f2b 100644
--- a/RouteComposer/Classes/Extra/SingleNavigationRouter.swift
+++ b/RouteComposer/Classes/Extra/SingleNavigationRouter.swift
@@ -71,7 +71,7 @@ public struct SingleNavigationRouter: Router where R: Router {
lock.startNavigation()
do {
try router.navigate(to: step, with: context, animated: animated, completion: { success in
- self.lock.stopNavigation()
+ lock.stopNavigation()
completion?(success)
})
} catch {
diff --git a/RouteComposer/Classes/Router/DefaultRouter.swift b/RouteComposer/Classes/Router/DefaultRouter.swift
index 2da5db18..1b4da1a9 100644
--- a/RouteComposer/Classes/Router/DefaultRouter.swift
+++ b/RouteComposer/Classes/Router/DefaultRouter.swift
@@ -182,7 +182,7 @@ public struct DefaultRouter: InterceptableRouter, MainThreadChecking {
// continue navigation process. This operation is async.
let initialControllerDescription = String(describing: viewController)
taskStack.performInterceptors { [weak viewController] result in
- self.assertIfNotMainThread(logger: logger)
+ assertIfNotMainThread(logger: logger)
if case let .failure(error) = result {
completion(.failure(error))
@@ -259,7 +259,7 @@ public struct DefaultRouter: InterceptableRouter, MainThreadChecking {
with: postponedIntegrationHandler,
nextAction: nextAction,
animated: animated) { result in
- self.assertIfNotMainThread(logger: logger)
+ assertIfNotMainThread(logger: logger)
guard result.isSuccessful else {
logger?.log(.info("\(String(describing: factory.factory.action)) has stopped the navigation process " +
"as it was not able to build a view controller into a stack."))
diff --git a/RouteComposer/Classes/Router/Helpers/DefaultStackPresentationHandler.swift b/RouteComposer/Classes/Router/Helpers/DefaultStackPresentationHandler.swift
index b8e92eb8..94c00885 100644
--- a/RouteComposer/Classes/Router/Helpers/DefaultStackPresentationHandler.swift
+++ b/RouteComposer/Classes/Router/Helpers/DefaultStackPresentationHandler.swift
@@ -41,7 +41,7 @@ public struct DefaultStackPresentationHandler: StackPresentationHandler, MainThr
if let presentedController = viewController.presentedViewController {
if !presentedController.isBeingDismissed {
viewController.dismiss(animated: animated) {
- self.logger?.log(.info("Dismissed all the view controllers presented from \(String(describing: viewController))"))
+ logger?.log(.info("Dismissed all the view controllers presented from \(String(describing: viewController))"))
completion(.success)
}
} else {
@@ -81,7 +81,7 @@ public struct DefaultStackPresentationHandler: StackPresentationHandler, MainThr
completion(result)
return
}
- self.logger?.log(.info("Made \(String(describing: viewController)) visible in \(String(describing: container))"))
+ logger?.log(.info("Made \(String(describing: viewController)) visible in \(String(describing: container))"))
makeVisible(viewController: parentViewController, completion: completion)
})
} else {
diff --git a/RouteComposer/Classes/Router/Multiplexers/InterceptorMultiplexer.swift b/RouteComposer/Classes/Router/Multiplexers/InterceptorMultiplexer.swift
index db510f90..f7e31954 100644
--- a/RouteComposer/Classes/Router/Multiplexers/InterceptorMultiplexer.swift
+++ b/RouteComposer/Classes/Router/Multiplexers/InterceptorMultiplexer.swift
@@ -39,7 +39,7 @@ struct InterceptorMultiplexer: AnyRoutingInterceptor, MainThreadChecking, Custom
func runInterceptor(interceptor: AnyRoutingInterceptor) {
assertIfNotMainThread()
interceptor.perform(with: context) { result in
- self.assertIfNotMainThread()
+ assertIfNotMainThread()
if case .failure = result {
completion(result)
} else if interceptors.isEmpty {
diff --git a/RouteComposer/Classes/Router/Type Erasure/Boxes/ActionBox.swift b/RouteComposer/Classes/Router/Type Erasure/Boxes/ActionBox.swift
index 45fdf994..b472dd74 100644
--- a/RouteComposer/Classes/Router/Type Erasure/Boxes/ActionBox.swift
+++ b/RouteComposer/Classes/Router/Type Erasure/Boxes/ActionBox.swift
@@ -39,8 +39,8 @@ struct ActionBox: AnyAction, AnyActionBox, CustomStringConvertible, M
completion(result)
return
}
- self.action.perform(with: viewController, on: typedExistingViewController, animated: animated) { result in
- self.assertIfNotMainThread()
+ action.perform(with: viewController, on: typedExistingViewController, animated: animated) { result in
+ assertIfNotMainThread()
completion(result)
}
})
diff --git a/RouteComposer/Classes/Router/Type Erasure/Boxes/ContainerActionBox.swift b/RouteComposer/Classes/Router/Type Erasure/Boxes/ContainerActionBox.swift
index e50cd532..48278816 100644
--- a/RouteComposer/Classes/Router/Type Erasure/Boxes/ContainerActionBox.swift
+++ b/RouteComposer/Classes/Router/Type Erasure/Boxes/ContainerActionBox.swift
@@ -35,12 +35,12 @@ struct ContainerActionBox: AnyAction, AnyActionBox, CustomSt
completion(result)
return
}
- self.perform(with: viewController,
- on: existingController,
- with: postponedIntegrationHandler,
- nextAction: nextAction,
- animated: animated,
- completion: completion)
+ perform(with: viewController,
+ on: existingController,
+ with: postponedIntegrationHandler,
+ nextAction: nextAction,
+ animated: animated,
+ completion: completion)
})
return
}
@@ -60,7 +60,7 @@ struct ContainerActionBox: AnyAction, AnyActionBox, CustomSt
completion(result)
return
}
- self.embed(viewController: viewController, with: postponedIntegrationHandler, completion: completion)
+ embed(viewController: viewController, with: postponedIntegrationHandler, completion: completion)
})
} else {
postponedIntegrationHandler.purge(animated: animated, completion: { result in
@@ -68,8 +68,8 @@ struct ContainerActionBox: AnyAction, AnyActionBox, CustomSt
completion(result)
return
}
- self.action.perform(with: viewController, on: containerController, animated: animated) { result in
- self.assertIfNotMainThread()
+ action.perform(with: viewController, on: containerController, animated: animated) { result in
+ assertIfNotMainThread()
completion(result)
}
})
diff --git a/RouteComposer/Classes/Router/Type Erasure/Boxes/RoutingInterceptorBox.swift b/RouteComposer/Classes/Router/Type Erasure/Boxes/RoutingInterceptorBox.swift
index c6f19792..029b5ca9 100644
--- a/RouteComposer/Classes/Router/Type Erasure/Boxes/RoutingInterceptorBox.swift
+++ b/RouteComposer/Classes/Router/Type Erasure/Boxes/RoutingInterceptorBox.swift
@@ -34,7 +34,7 @@ struct RoutingInterceptorBox: AnyRoutingInterceptor, Pre
assertIfNotPrepared()
assertIfNotMainThread()
routingInterceptor.perform(with: typedContext) { result in
- self.assertIfNotMainThread()
+ assertIfNotMainThread()
completion(result)
}
} catch {
diff --git a/RouteComposer/Classes/SearchOptions.swift b/RouteComposer/Classes/SearchOptions.swift
index 55c05b16..7a26a1fd 100644
--- a/RouteComposer/Classes/SearchOptions.swift
+++ b/RouteComposer/Classes/SearchOptions.swift
@@ -71,7 +71,7 @@ public struct SearchOptions: OptionSet, CaseIterable, CustomStringConvertible {
public var description: String {
SearchOptions.allCases.compactMap { option in
- guard self.contains(option) else {
+ guard contains(option) else {
return nil
}
switch option {
diff --git a/docs/Additional Assemblies.html b/docs/Additional Assemblies.html
index b30454f6..dab2a35f 100644
--- a/docs/Additional Assemblies.html
+++ b/docs/Additional Assemblies.html
@@ -21,7 +21,7 @@