Implemented the AppCoordinator coordinator in the App target.
This commit is contained in:
parent
71d3fd60d4
commit
402a4933ca
40
App/Sources/Coordinators/AppCoordinator.swift
Normal file
40
App/Sources/Coordinators/AppCoordinator.swift
Normal file
@ -0,0 +1,40 @@
|
||||
//
|
||||
// AppCoordinator.swift
|
||||
// App
|
||||
//
|
||||
// Created by Javier Cicchelli on 21/03/2024.
|
||||
// Copyright © 2024 Röck+Cöde. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import ReviewsCoordinationKit
|
||||
import ReviewsFeed
|
||||
import UIKit
|
||||
|
||||
final class AppCoordinator: Coordinator {
|
||||
|
||||
// MARK: Constants
|
||||
let router: any Router
|
||||
|
||||
// MARK: Properties
|
||||
var children: [any Coordinator] = []
|
||||
|
||||
lazy var navigationController = UINavigationController()
|
||||
|
||||
// MARK: Initialisers
|
||||
init(router: any Router) {
|
||||
self.router = router
|
||||
}
|
||||
|
||||
// MARK: Functions
|
||||
func present(
|
||||
animated: Bool,
|
||||
onDismiss: Router.OnDismissClosure? = nil
|
||||
) {
|
||||
router.present(
|
||||
navigationController,
|
||||
animated: false
|
||||
)
|
||||
}
|
||||
|
||||
}
|
@ -14,6 +14,7 @@
|
||||
02909E7B2BAB6D2E00710E14 /* Bundle+Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02909E7A2BAB6D2E00710E14 /* Bundle+Constants.swift */; };
|
||||
02909E7D2BAB7FFE00710E14 /* Review+DTOs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02909E7C2BAB7FFE00710E14 /* Review+DTOs.swift */; };
|
||||
02C1B1972BAC9BFE001781DE /* FeedListCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02C1B1962BAC9BFE001781DE /* FeedListCoordinator.swift */; };
|
||||
02C1B1A92BACA722001781DE /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02C1B1A82BACA722001781DE /* AppCoordinator.swift */; };
|
||||
02DA924E2BAAE3FD00C47985 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 02DA924D2BAAE3FD00C47985 /* Localizable.xcstrings */; };
|
||||
02DC7F9F2BA51793000EEEBE /* ReviewsFeed.h in Headers */ = {isa = PBXBuildFile; fileRef = 02DC7F912BA51793000EEEBE /* ReviewsFeed.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
02DC7FA22BA51793000EEEBE /* ReviewsFeed.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02DC7F8F2BA51793000EEEBE /* ReviewsFeed.framework */; };
|
||||
@ -65,6 +66,7 @@
|
||||
02909E7A2BAB6D2E00710E14 /* Bundle+Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Bundle+Constants.swift"; sourceTree = "<group>"; };
|
||||
02909E7C2BAB7FFE00710E14 /* Review+DTOs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Review+DTOs.swift"; sourceTree = "<group>"; };
|
||||
02C1B1962BAC9BFE001781DE /* FeedListCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedListCoordinator.swift; sourceTree = "<group>"; };
|
||||
02C1B1A82BACA722001781DE /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = "<group>"; };
|
||||
02DA924D2BAAE3FD00C47985 /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; };
|
||||
02DC7F8F2BA51793000EEEBE /* ReviewsFeed.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReviewsFeed.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
02DC7F912BA51793000EEEBE /* ReviewsFeed.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReviewsFeed.h; sourceTree = "<group>"; };
|
||||
@ -205,6 +207,22 @@
|
||||
path = Coordinators;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
02C1B1A62BACA6FC001781DE /* App */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
345AD11B24C6EDD9004E2EE1 /* AppDelegate.swift */,
|
||||
);
|
||||
path = App;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
02C1B1A72BACA70B001781DE /* Coordinators */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
02C1B1A82BACA722001781DE /* AppCoordinator.swift */,
|
||||
);
|
||||
path = Coordinators;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
02DA924B2BAAE3E500C47985 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -242,7 +260,8 @@
|
||||
02DC7F742BA4F93B000EEEBE /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
345AD11B24C6EDD9004E2EE1 /* AppDelegate.swift */,
|
||||
02C1B1A62BACA6FC001781DE /* App */,
|
||||
02C1B1A72BACA70B001781DE /* Coordinators */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
@ -469,6 +488,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
02C1B1A92BACA722001781DE /* AppCoordinator.swift in Sources */,
|
||||
345AD11C24C6EDD9004E2EE1 /* AppDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user