Skip to content

Commit

Permalink
[Feat/#104] AppDIContainer 주입
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoe0929 committed Nov 27, 2024
1 parent 027a2e0 commit ed986c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions HMH_Tuist_iOS/Projects/App/Sources/AppView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import DSKit
import Core

struct AppView: View {
@EnvironmentObject var appDIContainer: AppDIContainer
@StateObject var coordinator = AppCoordinator(navigationPath: .init())

var body: some View {
Expand Down
2 changes: 2 additions & 0 deletions HMH_Tuist_iOS/Projects/App/Sources/HMH_iOSApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import KakaoSDKAuth
struct HMH_iOSApp: App {
let kakaoAPIKey = Bundle.main.infoDictionary?["KAKAO_API_KEY"] as! String
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
@StateObject private var appDIContainer = AppDIContainer()
@Environment(\.scenePhase) private var scenePhase

init() {
Expand All @@ -23,6 +24,7 @@ struct HMH_iOSApp: App {
var body: some Scene {
WindowGroup {
AppView()
.environmentObject(appDIContainer)
}
}
}

0 comments on commit ed986c4

Please sign in to comment.