diff --git a/CoordinatorExample.xcodeproj/project.pbxproj b/CoordinatorExample.xcodeproj/project.pbxproj index b2debaa..16f788f 100644 --- a/CoordinatorExample.xcodeproj/project.pbxproj +++ b/CoordinatorExample.xcodeproj/project.pbxproj @@ -538,7 +538,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 0920; + LastUpgradeCheck = 1000; ORGANIZATIONNAME = "Andrei Rychkov"; TargetAttributes = { 0C506E532097014500E67227 = { @@ -679,6 +679,7 @@ 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; @@ -686,6 +687,7 @@ 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; @@ -736,6 +738,7 @@ 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; @@ -743,6 +746,7 @@ 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; @@ -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; @@ -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; diff --git a/CoordinatorExample/Classes/Presentation Layer/Flows/AppFlow/AppCoordinator.swift b/CoordinatorExample/Classes/Presentation Layer/Flows/AppFlow/AppCoordinator.swift index fae9be6..5ff517d 100644 --- a/CoordinatorExample/Classes/Presentation Layer/Flows/AppFlow/AppCoordinator.swift +++ b/CoordinatorExample/Classes/Presentation Layer/Flows/AppFlow/AppCoordinator.swift @@ -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() } diff --git a/CoordinatorExample/Classes/Presentation Layer/Flows/Routers/AppRouter.swift b/CoordinatorExample/Classes/Presentation Layer/Flows/Routers/AppRouter.swift index ed27e73..ecd6f22 100644 --- a/CoordinatorExample/Classes/Presentation Layer/Flows/Routers/AppRouter.swift +++ b/CoordinatorExample/Classes/Presentation Layer/Flows/Routers/AppRouter.swift @@ -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) diff --git a/Podfile.lock b/Podfile.lock index 185330b..714f873 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -5,7 +5,7 @@ DEPENDENCIES: - Swinject SPEC REPOS: - https://github.com/CocoaPods/Specs.git: + https://github.com/cocoapods/specs.git: - Swinject SPEC CHECKSUMS: @@ -13,4 +13,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 0a17140135b32a780567b27bce6a15141b16489b -COCOAPODS: 1.5.0 +COCOAPODS: 1.5.3