Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftUI + TCA 아키텍처 변경 #204

Merged
merged 9 commits into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
623 changes: 597 additions & 26 deletions attendance-ios.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion attendance-ios/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.

let providerFactory = YourAppCheckProviderFactory()
AppCheck.setAppCheckProviderFactory(providerFactory)

FirebaseApp.configure()
RxKakaoSDK.initSDK(appKey: "2f6bbf74b7c57d625551dc49ec0f669d")
RxKakaoSDK.initSDK(appKey: "867a06f8e2786f651c1802e821922b82")

return true
}
Expand All @@ -40,3 +43,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}

}

class YourAppCheckProviderFactory: NSObject, AppCheckProviderFactory {
func createProvider(with app: FirebaseApp) -> AppCheckProvider? {
return AppAttestProvider(app: app)
}
}
19 changes: 0 additions & 19 deletions attendance-ios/Application/AppFlowCoordinator.swift

This file was deleted.

10 changes: 0 additions & 10 deletions attendance-ios/Application/DIContainer/AppDIContainer.swift

This file was deleted.

41 changes: 38 additions & 3 deletions attendance-ios/Application/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import UIKit
import SwiftUI
import KakaoSDKAuth
import KakaoSDKUser

Expand All @@ -20,17 +21,51 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
guard let windowScene = scene as? UIWindowScene else { return }

window = UIWindow(windowScene: windowScene)

self.setNavigationStyle()

UserDefaultsWorker().setIsFirstSplash(isFirst: true)
let navigationController = UINavigationController()
let loginVC = LoginViewController()

navigationController.viewControllers = [loginVC]
let appVC = UIHostingController(rootView: AppView(store: .init(initialState: App.State(), reducer: App())))
navigationController.isNavigationBarHidden = true
navigationController.viewControllers = [appVC]

window?.backgroundColor = .background
window?.rootViewController = navigationController
window?.makeKeyAndVisible()
}

func setNavigationStyle() {
let backButtonAppearance = UIBarButtonItemAppearance(style: .plain)
backButtonAppearance.normal.titleTextAttributes = [.foregroundColor: UIColor.clear]

let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = UIColor.background
appearance.shadowColor = UIColor.background
appearance.shadowImage = UIImage(named: "tab-shadow")?.withRenderingMode(.alwaysTemplate)
appearance.backButtonAppearance = backButtonAppearance
appearance.backgroundEffect = UIBlurEffect(style: .light)

UINavigationBar.appearance().standardAppearance = appearance
UINavigationBar.appearance().scrollEdgeAppearance = appearance

UINavigationBar.appearance().tintColor = .gray_800
UINavigationBar.appearance().titleTextAttributes = [
NSAttributedString.Key.foregroundColor: UIColor.gray_1200,
NSAttributedString.Key.font: UIFont.systemFont(ofSize: 18, weight: .medium)
]

let tabBarappearance = UITabBarAppearance()

tabBarappearance.configureWithOpaqueBackground()

tabBarappearance.shadowColor = UIColor.gray_300
tabBarappearance.shadowImage = UIImage(named: "tab-shadow")?.withRenderingMode(.alwaysTemplate)
tabBarappearance.backgroundColor = UIColor.background

UITabBar.appearance().scrollEdgeAppearance = tabBarappearance
}

func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
if let url = URLContexts.first?.url {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "1.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Loading