Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions CoordinatorExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = "Andrei Rychkov";
TargetAttributes = {
0C506E532097014500E67227 = {
Expand Down Expand Up @@ -679,13 +679,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -736,13 +738,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -778,7 +782,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = SNLH793PXA;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/CoordinatorExample/Supporting Files/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.rychkovdev.CoordEx;
Expand All @@ -794,7 +798,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = SNLH793PXA;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/CoordinatorExample/Supporting Files/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.rychkovdev.CoordEx;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ final class AppCoordinatorImpl: BaseCoordinator, AppCoordinator {
private func runMainFlow(with deepLink: DeepLinkOption?) {
let coordinator = assembler.resolver.resolve(MainCoordinator.self, argument: assembler)!
coordinator.onLogout = { [weak coordinator, weak self] in
self?.router.setRootModule(nil)
self?.removeDependency(coordinator)
self?.runAuthFlow()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ final class AppRouter: Routable {
}

func setRootModule(_ module: Presentable?, animated: Bool) {
guard let toController = module?.toPresent else { return }
guard let toController = module?.toPresent else {
(rootController as? UINavigationController)?.viewControllers = []
return
}
if let fromController = rootController, animated {
let snapshot = fromController.view.snapshotView(afterScreenUpdates: true)!
toController.view.addSubview(snapshot)
Expand Down
4 changes: 2 additions & 2 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ DEPENDENCIES:
- Swinject

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
https://github.com/cocoapods/specs.git:
- Swinject

SPEC CHECKSUMS:
Swinject: 4ca48bca7de5f398229a26abe1ac902b9f3ee541

PODFILE CHECKSUM: 0a17140135b32a780567b27bce6a15141b16489b

COCOAPODS: 1.5.0
COCOAPODS: 1.5.3