Last active
August 26, 2022 12:27
-
-
Save yoxisem544/55ed3770fc8ccf3a63ae042024ee9a78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct DependencyContainer: AuthServiceContainer, PhoneServiceContainer, NetworkingServiceContainer, | |
LocationServiceContainer, MapServiceContainer, HealthServiceContainer { | |
let authService: AuthServiceProtocol | |
let phoneService: PhoneService | |
let networkingService: NetworkingService | |
let locationService: LocationService | |
let mapService: MapService | |
let healthService: HealthService | |
static func make() -> DependencyContainer { | |
// Configure and make DependencyContainer here | |
} | |
} | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
var appFlowController: AppFlowController! | |
func application(_ application: UIApplication, | |
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
appFlowController = AppFlowController( | |
dependencyContainer: DependencyContainer.make() | |
) | |
window = UIWindow(frame: UIScreen.main.bounds) | |
window?.rootViewController = appFlowController | |
window?.makeKeyAndVisible() | |
appFlowController.start() | |
return true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment