From 9b63a1b6f3f5da6ca7a2caa073902d00445e99af Mon Sep 17 00:00:00 2001 From: Paul Kraft Date: Mon, 9 Dec 2019 10:28:22 +0100 Subject: [PATCH 1/3] Update to XCoordinator 2.0.6 --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XCoordinator-Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/XCoordinator-Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 2f97f0c..969bbdb 100644 --- a/XCoordinator-Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/XCoordinator-Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -24,8 +24,8 @@ "repositoryURL": "https://github.com/quickbirdstudios/XCoordinator.git", "state": { "branch": null, - "revision": "0c16cc7061f93d278279137277efb13385e960a6", - "version": "2.0.5" + "revision": "b549ad03a6b8134f625c7cf16ea51a980b4c3d03", + "version": "2.0.6" } } ] From 6df485f788384ae70db89aa73f6fb98938317050 Mon Sep 17 00:00:00 2001 From: Paul Kraft Date: Mon, 9 Dec 2019 10:28:53 +0100 Subject: [PATCH 2/3] Set DEAD_CODE_STRIPPING to NO --- XCoordinator-Example.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/XCoordinator-Example.xcodeproj/project.pbxproj b/XCoordinator-Example.xcodeproj/project.pbxproj index 10a4ee7..226a961 100644 --- a/XCoordinator-Example.xcodeproj/project.pbxproj +++ b/XCoordinator-Example.xcodeproj/project.pbxproj @@ -707,6 +707,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -767,6 +768,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; From 7df1179b377bee707f88144c530cb99ccd20ba88 Mon Sep 17 00:00:00 2001 From: Paul Kraft Date: Mon, 9 Dec 2019 10:29:33 +0100 Subject: [PATCH 3/3] Override viewController property of AboutCoordinator to fix memory leak --- XCoordinator-Example/Coordinators/AboutCoordinator.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/XCoordinator-Example/Coordinators/AboutCoordinator.swift b/XCoordinator-Example/Coordinators/AboutCoordinator.swift index 2a39280..1717e9e 100644 --- a/XCoordinator-Example/Coordinators/AboutCoordinator.swift +++ b/XCoordinator-Example/Coordinators/AboutCoordinator.swift @@ -15,6 +15,12 @@ enum AboutRoute: Route { } class AboutCoordinator: NavigationCoordinator { + + // MARK: Computed properties + + override var viewController: UIViewController! { + rootViewController.viewControllers.first { $0 is AboutViewController } + } // MARK: Initialization