diff --git a/DependencyGraph/graphMaker.sh b/DependencyGraph/graphMaker.sh index 0eb333f..2670476 100644 --- a/DependencyGraph/graphMaker.sh +++ b/DependencyGraph/graphMaker.sh @@ -1,12 +1,12 @@ -TUIST_BUILD_CONFIG=prod tuist graph PomoNyang -d -t -f dot +TUIST_BUILD_CONFIG=prod tuist graph Mohanyang -d -t -f dot sed -i '' '/ThirdParty_/d' graph.dot -dot -Tpng graph.dot -o DependencyGraph/pomonyang_prod_graph.png +dot -Tpng graph.dot -o DependencyGraph/mohanyang_prod_graph.png rm graph.dot TUIST_BUILD_CONFIG=dev tuist graph -d -f dot sed -i '' '/ThirdParty_/d' graph.dot -dot -Tpng graph.dot -o DependencyGraph/pomonyang_dev_graph.png +dot -Tpng graph.dot -o DependencyGraph/mohanyang_dev_graph.png rm graph.dot -open DependencyGraph/pomonyang_dev_graph.png -open DependencyGraph/pomonyang_prod_graph.png +open DependencyGraph/mohanyang_dev_graph.png +open DependencyGraph/mohanyang_prod_graph.png diff --git a/DependencyGraph/mohanyang_dev_graph.png b/DependencyGraph/mohanyang_dev_graph.png new file mode 100644 index 0000000..a5ca967 Binary files /dev/null and b/DependencyGraph/mohanyang_dev_graph.png differ diff --git a/DependencyGraph/mohanyang_prod_graph.png b/DependencyGraph/mohanyang_prod_graph.png new file mode 100644 index 0000000..61dd8a7 Binary files /dev/null and b/DependencyGraph/mohanyang_prod_graph.png differ diff --git a/DependencyGraph/pomonyang_dev_graph.png b/DependencyGraph/pomonyang_dev_graph.png deleted file mode 100644 index d726cc6..0000000 Binary files a/DependencyGraph/pomonyang_dev_graph.png and /dev/null differ diff --git a/DependencyGraph/pomonyang_prod_graph.png b/DependencyGraph/pomonyang_prod_graph.png deleted file mode 100644 index 129a48b..0000000 Binary files a/DependencyGraph/pomonyang_prod_graph.png and /dev/null differ diff --git a/Makefile b/Makefile index 01c3f48..ba34001 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ dev: .PHONY: prod prod: - make generate config=prod + make generate config=prod target=Mohanyang ### Script ### diff --git a/Package.swift b/Package.swift index 336f650..5e74e78 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,7 @@ let packageSettings: PackageSettings = .init( #endif let package: Package = .init( - name: "PomoNyang", + name: "Mohanyang", platforms: [.iOS(.v17)], dependencies: [ .package(url: "https://github.com/pointfreeco/swift-composable-architecture.git", exact: "1.11.2"), diff --git a/Plugins/DependencyPlugin/ProjectDescriptionHelpers/Module/Domain.swift b/Plugins/DependencyPlugin/ProjectDescriptionHelpers/Module/Domain.swift index 1decdde..f341b7c 100644 --- a/Plugins/DependencyPlugin/ProjectDescriptionHelpers/Module/Domain.swift +++ b/Plugins/DependencyPlugin/ProjectDescriptionHelpers/Module/Domain.swift @@ -10,4 +10,5 @@ import Foundation @_spi(Domain) public enum Domain: String, Modulable { case AppService + case PushService } diff --git a/Plugins/DependencyPlugin/ProjectDescriptionHelpers/Module/Feature.swift b/Plugins/DependencyPlugin/ProjectDescriptionHelpers/Module/Feature.swift index 57c5720..fc7a525 100644 --- a/Plugins/DependencyPlugin/ProjectDescriptionHelpers/Module/Feature.swift +++ b/Plugins/DependencyPlugin/ProjectDescriptionHelpers/Module/Feature.swift @@ -9,5 +9,6 @@ import Foundation @_spi(Feature) public enum Feature: String, Modulable { - case AppFeature + case HomeFeature + case OnboardingFeature } diff --git a/Plugins/UtilityPlugin/ProjectDescriptionHelpers/PathExtension.swift b/Plugins/UtilityPlugin/ProjectDescriptionHelpers/PathExtension.swift index adb91bf..036756c 100644 --- a/Plugins/UtilityPlugin/ProjectDescriptionHelpers/PathExtension.swift +++ b/Plugins/UtilityPlugin/ProjectDescriptionHelpers/PathExtension.swift @@ -9,7 +9,7 @@ import Foundation import ProjectDescription extension ProjectDescription.Path { - public static let pomonyangAppXCConfig: Path = .relativeToRoot("XCConfig/Project/PomoNyang.xcconfig") + public static let mohanyangAppXCConfig: Path = .relativeToRoot("XCConfig/Project/Mohanyang.xcconfig") public static func targetXCConfig(type: Product) -> Self { return .relativeToRoot("XCConfig/Target/\(type.rawValue).xcconfig") diff --git a/Projects/App/GoogleService-Info.plist b/Projects/App/GoogleService-Info.plist index a750f17..dac4e9e 100644 --- a/Projects/App/GoogleService-Info.plist +++ b/Projects/App/GoogleService-Info.plist @@ -9,7 +9,7 @@ PLIST_VERSION 1 BUNDLE_ID - com.pomonyang.ios + com.pomonyang.mohanyang PROJECT_ID pomonyang STORAGE_BUCKET @@ -25,6 +25,6 @@ IS_SIGNIN_ENABLED GOOGLE_APP_ID - 1:283667420790:ios:11049f2edb5fbb6d227157 + 1:283667420790:ios:2178e55c7b33f0e3227157 \ No newline at end of file diff --git a/Projects/App/Project.swift b/Projects/App/Project.swift index 1e2c33e..adce251 100644 --- a/Projects/App/Project.swift +++ b/Projects/App/Project.swift @@ -20,14 +20,14 @@ let scripts: [TargetScript] = if currentConfig == .dev { [.firebaseCrashlytics] } -let appTargetName = "PomoNyang" +let appTargetName = "Mohanyang" let appTarget: Target = .target( name: appTargetName, destinations: AppEnv.platform, product: .app, bundleId: AppEnv.bundleId, deploymentTargets: AppEnv.deploymentTarget, - infoPlist: InfoPlist.PomoNyang.app, + infoPlist: InfoPlist.Mohanyang.app, sources: [ "Sources/**" ], @@ -36,9 +36,9 @@ let appTarget: Target = .target( "GoogleService-Info.plist", "Resources/\(currentConfig.name)/**" ], - privacyManifest: .pomonyang + privacyManifest: .mohanyang ), - entitlements: Entitlements.PomoNyang.app, + entitlements: Entitlements.Mohanyang.app, scripts: scripts, dependencies: [ .dependency(rootModule: Feature.self) @@ -60,7 +60,7 @@ let project: Project = .init( name: "App", organizationName: AppEnv.organizationName, options: .options(automaticSchemesOptions: .disabled, disableSynthesizedResourceAccessors: true), - settings: .projectSettings(xcconfig: .pomonyangAppXCConfig), + settings: .projectSettings(xcconfig: .mohanyangAppXCConfig), targets: [appTarget], schemes: [appScheme] ) diff --git a/Projects/App/Sources/AppDelegate.swift b/Projects/App/Sources/AppDelegate.swift index 1a4186d..8c2837a 100644 --- a/Projects/App/Sources/AppDelegate.swift +++ b/Projects/App/Sources/AppDelegate.swift @@ -1,64 +1,64 @@ // // AppDelegate.swift -// kimcaddie +// Mohanyang // -// Created by MinseokKang on 2019/07/04. -// Copyright © 2022 Kimcaddie. All rights reserved. +// Created by devMinseok on 7/23/24. +// Copyright © 2024 PomoNyang. All rights reserved. // import SwiftUI import UserNotifications -import AppFeature +import Feature import DesignSystem -//import FirebaseMessaging +import ComposableArchitecture -//final class AppDelegate: UIResponder, UIApplicationDelegate { -// let store = Store( -// initialState: AppCore.State() -// ) { -// AppCore() -// } -// -// func application( -// _ application: UIApplication, -// didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? -// ) -> Bool { -// self.store.send(.appDelegate(.didFinishLaunching)) -// return true -// } -// -// func application( -// _ application: UIApplication, -// didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data -// ) { -// self.store.send(.appDelegate(.didRegisterForRemoteNotifications(.success(deviceToken)))) -// } -// -// func application( -// _ application: UIApplication, -// didFailToRegisterForRemoteNotificationsWithError error: Error -// ) { -// self.store.send(.appDelegate(.didRegisterForRemoteNotifications(.failure(error)))) -// } -//} -// -//@main -//struct KimcaddieOwnerApp: App { -// @UIApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate -// @Environment(\.scenePhase) private var scenePhase -// -// init() { -// DesignSystemFontFamily.registerAllCustomFonts() -// } -// -// var body: some Scene { -// WindowGroup { -// AppView(store: self.appDelegate.store) -// } -// .onChange(of: self.scenePhase) { value in -// self.appDelegate.store.send(.didChangeScenePhase(value)) -// } -// } -//} +final class AppDelegate: UIResponder, UIApplicationDelegate { + let store = Store( + initialState: AppCore.State() + ) { + AppCore() + } + + func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + self.store.send(.appDelegate(.didFinishLaunching)) + return true + } + + func application( + _ application: UIApplication, + didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data + ) { + self.store.send(.appDelegate(.didRegisterForRemoteNotifications(.success(deviceToken)))) + } + + func application( + _ application: UIApplication, + didFailToRegisterForRemoteNotificationsWithError error: Error + ) { + self.store.send(.appDelegate(.didRegisterForRemoteNotifications(.failure(error)))) + } +} + +@main +struct MohanyangApp: App { + @UIApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate + @Environment(\.scenePhase) private var scenePhase + + init() { + DesignSystemFontFamily.registerAllCustomFonts() + } + + var body: some Scene { + WindowGroup { + AppView(store: self.appDelegate.store) + } + .onChange(of: self.scenePhase) { _, newValue in + self.appDelegate.store.send(.didChangeScenePhase(newValue)) + } + } +} diff --git a/Projects/Core/Core/Project.swift b/Projects/Core/Core/Project.swift index b97882b..6317c5a 100644 --- a/Projects/Core/Core/Project.swift +++ b/Projects/Core/Core/Project.swift @@ -7,5 +7,5 @@ import DependencyPlugin let project: Project = .makeRootProject( rootModule: Core.self, scripts: [], - product: .framework + product: .staticLibrary ) diff --git a/Projects/Domain/Domain/Project.swift b/Projects/Domain/Domain/Project.swift index e5275e6..11f801e 100644 --- a/Projects/Domain/Domain/Project.swift +++ b/Projects/Domain/Domain/Project.swift @@ -7,5 +7,5 @@ import DependencyPlugin let project: Project = .makeRootProject( rootModule: Domain.self, scripts: [], - product: .framework + product: .staticLibrary ) diff --git a/Projects/Domain/PushService/Project.swift b/Projects/Domain/PushService/Project.swift new file mode 100644 index 0000000..7747a57 --- /dev/null +++ b/Projects/Domain/PushService/Project.swift @@ -0,0 +1,19 @@ +import ProjectDescription +import ProjectDescriptionHelpers + +@_spi(Domain) +@_spi(Core) +import DependencyPlugin + +let project: Project = .makeTMABasedProject( + module: Domain.PushService, + scripts: [], + targets: [ + .sources + ], + dependencies: [ + .sources: [ + .dependency(rootModule: Core.self) + ] + ] +) diff --git a/Projects/Domain/PushService/Sources/Model/PushNotificationContent.swift b/Projects/Domain/PushService/Sources/Model/PushNotificationContent.swift new file mode 100644 index 0000000..dea9329 --- /dev/null +++ b/Projects/Domain/PushService/Sources/Model/PushNotificationContent.swift @@ -0,0 +1,13 @@ +// +// PushNotificationContent.swift +// PushService +// +// Created by devMinseok on 7/22/24. +// Copyright © 2024 PomoNyang. All rights reserved. +// + +import Foundation + +public enum PushNotificationContent: Decodable { + case test +} diff --git a/Projects/Domain/PushService/Sources/PushServiceInterface.swift b/Projects/Domain/PushService/Sources/PushServiceInterface.swift new file mode 100644 index 0000000..6d05d14 --- /dev/null +++ b/Projects/Domain/PushService/Sources/PushServiceInterface.swift @@ -0,0 +1,17 @@ +// +// PushServiceInterface.swift +// PushService +// +// Created by devMinseok on 7/22/24. +// Copyright © 2024 PomoNyang. All rights reserved. +// + +import Foundation + +public func getPushNotificationContent(from userInfo: [AnyHashable: Any]) -> PushNotificationContent? { + guard let data = try? JSONSerialization.data(withJSONObject: userInfo) else { + return nil + } + let pushNotiContent = try? JSONDecoder().decode(PushNotificationContent.self, from: data) + return pushNotiContent +} diff --git a/Projects/Feature/AppFeature/Preview/Sources/AppFeature.swift b/Projects/Feature/AppFeature/Preview/Sources/AppFeature.swift deleted file mode 100644 index 6d6f60a..0000000 --- a/Projects/Feature/AppFeature/Preview/Sources/AppFeature.swift +++ /dev/null @@ -1,5 +0,0 @@ -import Foundation - -public struct AppFeature { - public init() {} -} diff --git a/Projects/Feature/AppFeature/Tests/AppFeatureTests.swift b/Projects/Feature/AppFeature/Tests/AppFeatureTests.swift deleted file mode 100644 index 8c7ac98..0000000 --- a/Projects/Feature/AppFeature/Tests/AppFeatureTests.swift +++ /dev/null @@ -1,5 +0,0 @@ -import Foundation - -public struct AppFeatureTests { - public init() {} -} diff --git a/Projects/Feature/Feature/Project.swift b/Projects/Feature/Feature/Project.swift index 8267176..9e8761e 100644 --- a/Projects/Feature/Feature/Project.swift +++ b/Projects/Feature/Feature/Project.swift @@ -7,5 +7,5 @@ import DependencyPlugin let project: Project = .makeRootProject( rootModule: Feature.self, scripts: [], - product: .framework + product: .staticLibrary ) diff --git a/Projects/Feature/Feature/Sources/AppCore.swift b/Projects/Feature/Feature/Sources/AppCore.swift new file mode 100644 index 0000000..6c7a24a --- /dev/null +++ b/Projects/Feature/Feature/Sources/AppCore.swift @@ -0,0 +1,91 @@ +// +// AppCore.swift +// AppServiceInterface +// +// Created by devMinseok on 7/22/24. +// Copyright © 2024 PomoNyang. All rights reserved. +// + +import SwiftUI + +import HomeFeature +import HomeFeatureInterface +import OnboardingFeature +import OnboardingFeatureInterface +import PushService + +import ComposableArchitecture + +@Reducer +public struct AppCore { + @ObservableState + public struct State: Equatable { + public var appDelegate: AppDelegateCore.State = .init() + var home: HomeCore.State? + var onboarding: OnboardingCore.State? + + public init() {} + } + + public enum Action { + case onAppear + case appDelegate(AppDelegateCore.Action) + case didChangeScenePhase(ScenePhase) + case home(HomeCore.Action) + case onboarding(OnboardingCore.Action) + } + + public init() {} + + public var body: some ReducerOf { + Scope(state: \.appDelegate, action: \.appDelegate) { + AppDelegateCore() + } + Reduce(self.core) + .ifLet(\.home, action: \.home) { + HomeCore() + } + .ifLet(\.onboarding, action: \.onboarding) { + OnboardingCore() + } + } + + private func core(_ state: inout State, _ action: Action) -> EffectOf { + switch action { + case .onAppear: + let isLoggedIn = false + if isLoggedIn { // 로그인 판단 + state.home = HomeCore.State() + } else { + state.onboarding = OnboardingCore.State() + } + return .none + + case let .appDelegate(.userNotifications(.didReceiveResponse(response, completionHandler))): + let userInfo = response.notification.request.content.userInfo + guard let pushNotiContent = getPushNotificationContent(from: userInfo) else { + completionHandler() + return .none + } + return .run { _ in + switch pushNotiContent { + case .test: + break + } + completionHandler() + } + + case .appDelegate: + return .none + + case .didChangeScenePhase: + return .none + + case .home: + return .none + + case .onboarding: + return .none + } + } +} diff --git a/Projects/Feature/Feature/Sources/AppDelegateCore.swift b/Projects/Feature/Feature/Sources/AppDelegateCore.swift new file mode 100644 index 0000000..40d739d --- /dev/null +++ b/Projects/Feature/Feature/Sources/AppDelegateCore.swift @@ -0,0 +1,92 @@ +// +// AppDelegateCore.swift +// AppServiceInterface +// +// Created by devMinseok on 7/22/24. +// Copyright © 2024 PomoNyang. All rights reserved. +// + +import UIKit +import Foundation + +import UserNotificationClientInterface +import KeychainClientInterface + +import ComposableArchitecture +import FirebaseCore +import FirebaseMessaging + +@Reducer +public struct AppDelegateCore { + @ObservableState + public struct State: Equatable { + public init() {} + } + + public enum Action { + case didFinishLaunching + case didRegisterForRemoteNotifications(Result) + case userNotifications(UserNotificationClient.DelegateEvent) + } + + @Dependency(\.keychainClient) var keychainClient + @Dependency(\.userNotificationClient) var userNotificationClient + + public init() {} + + public var body: some ReducerOf { + Reduce(self.core) + } + + private func core( + _ state: inout State, + _ action: Action + ) -> EffectOf { + switch action { + case .didFinishLaunching: + UIApplication.shared.applicationIconBadgeNumber = 0 + FirebaseApp.configure() + keychainClient.checkSubsequentRun() + let userNotificationEventStream = userNotificationClient.delegate() + + return .run { send in + await withThrowingTaskGroup(of: Void.self) { group in + group.addTask { + for await event in userNotificationEventStream { + await send(.userNotifications(event)) + } + } + + group.addTask { + let settings = await userNotificationClient.getNotificationSettings() + switch settings.authorizationStatus { + case .authorized: + guard try await userNotificationClient.requestAuthorization([.badge, .alert, .sound]) + else { return } + case .notDetermined, .provisional: + guard try await userNotificationClient.requestAuthorization(.provisional) + else { return } + default: + return + } + await UIApplication.shared.registerForRemoteNotifications() + } + } + } + + case let .didRegisterForRemoteNotifications(.success(tokenData)): + Messaging.messaging().apnsToken = tokenData + return .none + + case .didRegisterForRemoteNotifications(.failure): + return .none + + case let .userNotifications(.willPresentNotification(_, completionHandler)): + completionHandler([.banner, .list, .sound]) + return .none + + case .userNotifications: + return .none + } + } +} diff --git a/Projects/Feature/Feature/Sources/AppView.swift b/Projects/Feature/Feature/Sources/AppView.swift new file mode 100644 index 0000000..b0e5e2d --- /dev/null +++ b/Projects/Feature/Feature/Sources/AppView.swift @@ -0,0 +1,39 @@ +// +// AppServcieView.swift +// AppServiceInterface +// +// Created by devMinseok on 7/22/24. +// Copyright © 2024 PomoNyang. All rights reserved. +// + +import SwiftUI + +import HomeFeature +import HomeFeatureInterface +import OnboardingFeature +import OnboardingFeatureInterface + +import ComposableArchitecture + +public struct AppView: View { + let store: StoreOf + + public init(store: StoreOf) { + self.store = store + } + + public var body: some View { + Group { + if let homeStore = store.scope(state: \.home, action: \.home) { + HomeView(store: homeStore) + } else if let onboardingStore = store.scope(state: \.onboarding, action: \.onboarding) { + OnboardingView(store: onboardingStore) + } else { + Color.red + } + } + .onAppear { + store.send(.onAppear) + } + } +} diff --git a/Projects/Feature/Feature/Sources/Exports.swift b/Projects/Feature/Feature/Sources/Exports.swift deleted file mode 100644 index 5aa4893..0000000 --- a/Projects/Feature/Feature/Sources/Exports.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// Exports.swift -// Shared -// -// Created by devMinseok on 7/20/24. -// Copyright © 2024 PomoNyang. All rights reserved. -// - -@_exported import AppFeature -@_exported import AppFeatureInterface diff --git a/Projects/Feature/HomeFeature/Example/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Projects/Feature/HomeFeature/Example/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..f1cb98f --- /dev/null +++ b/Projects/Feature/HomeFeature/Example/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "ICON_DEMO.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/Feature/HomeFeature/Example/Resources/Assets.xcassets/contents.json b/Projects/Feature/HomeFeature/Example/Resources/Assets.xcassets/contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Projects/Feature/HomeFeature/Example/Resources/Assets.xcassets/contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/Feature/HomeFeature/Example/Resources/Font/Pretendard-Bold.otf b/Projects/Feature/HomeFeature/Example/Resources/Font/Pretendard-Bold.otf new file mode 100644 index 0000000..a52ef39 Binary files /dev/null and b/Projects/Feature/HomeFeature/Example/Resources/Font/Pretendard-Bold.otf differ diff --git a/Projects/Feature/HomeFeature/Example/Resources/Font/Pretendard-Medium.otf b/Projects/Feature/HomeFeature/Example/Resources/Font/Pretendard-Medium.otf new file mode 100644 index 0000000..a2dc009 Binary files /dev/null and b/Projects/Feature/HomeFeature/Example/Resources/Font/Pretendard-Medium.otf differ diff --git a/Projects/Feature/HomeFeature/Example/Resources/Font/Pretendard-Regular.otf b/Projects/Feature/HomeFeature/Example/Resources/Font/Pretendard-Regular.otf new file mode 100644 index 0000000..c940185 Binary files /dev/null and b/Projects/Feature/HomeFeature/Example/Resources/Font/Pretendard-Regular.otf differ diff --git a/Projects/Feature/HomeFeature/Example/Resources/Font/Pretendard-SemiBold.otf b/Projects/Feature/HomeFeature/Example/Resources/Font/Pretendard-SemiBold.otf new file mode 100644 index 0000000..c375b54 Binary files /dev/null and b/Projects/Feature/HomeFeature/Example/Resources/Font/Pretendard-SemiBold.otf differ diff --git a/Projects/Feature/HomeFeature/Example/Resources/LaunchScreen.storyboard b/Projects/Feature/HomeFeature/Example/Resources/LaunchScreen.storyboard new file mode 100644 index 0000000..be85df4 --- /dev/null +++ b/Projects/Feature/HomeFeature/Example/Resources/LaunchScreen.storyboard @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Projects/Feature/HomeFeature/Example/Sources/AppDelegate.swift b/Projects/Feature/HomeFeature/Example/Sources/AppDelegate.swift new file mode 100644 index 0000000..0d538be --- /dev/null +++ b/Projects/Feature/HomeFeature/Example/Sources/AppDelegate.swift @@ -0,0 +1,11 @@ +import UIKit + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil + ) -> Bool { + return true + } +} diff --git a/Projects/Feature/HomeFeature/Interface/HomeCoreInterface.swift b/Projects/Feature/HomeFeature/Interface/HomeCoreInterface.swift new file mode 100644 index 0000000..87e4b48 --- /dev/null +++ b/Projects/Feature/HomeFeature/Interface/HomeCoreInterface.swift @@ -0,0 +1,33 @@ +// +// HomeCoreInterface.swift +// HomeFeature +// +// Created by devMinseok on 7/22/24. +// Copyright © 2024 PomoNyang. All rights reserved. +// + +import Foundation + +import ComposableArchitecture + +@Reducer +public struct HomeCore { + private let reducer: Reduce + + public init(reducer: Reduce) { + self.reducer = reducer + } + + @ObservableState + public struct State: Equatable { + public init() {} + } + + public enum Action { + case onAppear + } + + public var body: some ReducerOf { + reducer + } +} diff --git a/Projects/Feature/HomeFeature/Interface/HomeView.swift b/Projects/Feature/HomeFeature/Interface/HomeView.swift new file mode 100644 index 0000000..cc78b40 --- /dev/null +++ b/Projects/Feature/HomeFeature/Interface/HomeView.swift @@ -0,0 +1,28 @@ +// +// HomeView.swift +// HomeFeatureInterface +// +// Created by devMinseok on 7/22/24. +// Copyright © 2024 PomoNyang. All rights reserved. +// + +import SwiftUI + +import ComposableArchitecture + +public struct HomeView: View { + let store: StoreOf + + public init(store: StoreOf) { + self.store = store + } + + public var body: some View { + VStack { + Text("Home") + .foregroundStyle(Color.black) + } + .frame(maxWidth: .infinity, maxHeight: .infinity) + .background(Color.white) + } +} diff --git a/Projects/Feature/AppFeature/Project.swift b/Projects/Feature/HomeFeature/Project.swift similarity index 84% rename from Projects/Feature/AppFeature/Project.swift rename to Projects/Feature/HomeFeature/Project.swift index 52b2aa5..6f25a9e 100644 --- a/Projects/Feature/AppFeature/Project.swift +++ b/Projects/Feature/HomeFeature/Project.swift @@ -1,18 +1,19 @@ import ProjectDescription import ProjectDescriptionHelpers -@_spi(Domain) @_spi(Feature) +@_spi(Domain) import DependencyPlugin let project: Project = .makeTMABasedProject( - module: Feature.AppFeature, + module: Feature.HomeFeature, scripts: [], targets: [ .sources, .interface, .tests, - .testing + .testing, + .example ], dependencies: [ .interface: [ diff --git a/Projects/Feature/AppFeature/Preview/Resources/dummy.txt b/Projects/Feature/HomeFeature/Resources/dummy.txt similarity index 100% rename from Projects/Feature/AppFeature/Preview/Resources/dummy.txt rename to Projects/Feature/HomeFeature/Resources/dummy.txt diff --git a/Projects/Feature/HomeFeature/Sources/HomeCore.swift b/Projects/Feature/HomeFeature/Sources/HomeCore.swift new file mode 100644 index 0000000..4a070c8 --- /dev/null +++ b/Projects/Feature/HomeFeature/Sources/HomeCore.swift @@ -0,0 +1,23 @@ +// +// HomeCore.swift +// HomeFeature +// +// Created by devMinseok on 7/22/24. +// Copyright © 2024 PomoNyang. All rights reserved. +// + +import HomeFeatureInterface + +import ComposableArchitecture + +extension HomeCore { + public init() { + let reducer = Reduce { _, action in + switch action { + case .onAppear: + return .none + } + } + self.init(reducer: reducer) + } +} diff --git a/Projects/Feature/AppFeature/Testing/AppFeatureTesting.swift b/Projects/Feature/HomeFeature/Testing/HomeFeatureTesting.swift similarity index 53% rename from Projects/Feature/AppFeature/Testing/AppFeatureTesting.swift rename to Projects/Feature/HomeFeature/Testing/HomeFeatureTesting.swift index 82a04dd..ca81c97 100644 --- a/Projects/Feature/AppFeature/Testing/AppFeatureTesting.swift +++ b/Projects/Feature/HomeFeature/Testing/HomeFeatureTesting.swift @@ -1,5 +1,5 @@ import Foundation -public struct AppFeatureTesting { +public struct HomeFeatureTesting { public init() {} } diff --git a/Projects/Feature/AppFeature/Sources/AppFeature.swift b/Projects/Feature/HomeFeature/Tests/HomeFeatureTests.swift similarity index 54% rename from Projects/Feature/AppFeature/Sources/AppFeature.swift rename to Projects/Feature/HomeFeature/Tests/HomeFeatureTests.swift index 6d6f60a..c050739 100644 --- a/Projects/Feature/AppFeature/Sources/AppFeature.swift +++ b/Projects/Feature/HomeFeature/Tests/HomeFeatureTests.swift @@ -1,5 +1,5 @@ import Foundation -public struct AppFeature { +public struct HomeFeatureTests { public init() {} } diff --git a/Projects/Feature/OnboardingFeature/Example/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Projects/Feature/OnboardingFeature/Example/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..f1cb98f --- /dev/null +++ b/Projects/Feature/OnboardingFeature/Example/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "ICON_DEMO.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/Feature/OnboardingFeature/Example/Resources/Assets.xcassets/contents.json b/Projects/Feature/OnboardingFeature/Example/Resources/Assets.xcassets/contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Projects/Feature/OnboardingFeature/Example/Resources/Assets.xcassets/contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/Feature/OnboardingFeature/Example/Resources/Font/Pretendard-Bold.otf b/Projects/Feature/OnboardingFeature/Example/Resources/Font/Pretendard-Bold.otf new file mode 100644 index 0000000..a52ef39 Binary files /dev/null and b/Projects/Feature/OnboardingFeature/Example/Resources/Font/Pretendard-Bold.otf differ diff --git a/Projects/Feature/OnboardingFeature/Example/Resources/Font/Pretendard-Medium.otf b/Projects/Feature/OnboardingFeature/Example/Resources/Font/Pretendard-Medium.otf new file mode 100644 index 0000000..a2dc009 Binary files /dev/null and b/Projects/Feature/OnboardingFeature/Example/Resources/Font/Pretendard-Medium.otf differ diff --git a/Projects/Feature/OnboardingFeature/Example/Resources/Font/Pretendard-Regular.otf b/Projects/Feature/OnboardingFeature/Example/Resources/Font/Pretendard-Regular.otf new file mode 100644 index 0000000..c940185 Binary files /dev/null and b/Projects/Feature/OnboardingFeature/Example/Resources/Font/Pretendard-Regular.otf differ diff --git a/Projects/Feature/OnboardingFeature/Example/Resources/Font/Pretendard-SemiBold.otf b/Projects/Feature/OnboardingFeature/Example/Resources/Font/Pretendard-SemiBold.otf new file mode 100644 index 0000000..c375b54 Binary files /dev/null and b/Projects/Feature/OnboardingFeature/Example/Resources/Font/Pretendard-SemiBold.otf differ diff --git a/Projects/Feature/OnboardingFeature/Example/Resources/LaunchScreen.storyboard b/Projects/Feature/OnboardingFeature/Example/Resources/LaunchScreen.storyboard new file mode 100644 index 0000000..a58716d --- /dev/null +++ b/Projects/Feature/OnboardingFeature/Example/Resources/LaunchScreen.storyboard @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Projects/Feature/OnboardingFeature/Example/Sources/AppDelegate.swift b/Projects/Feature/OnboardingFeature/Example/Sources/AppDelegate.swift new file mode 100644 index 0000000..0d538be --- /dev/null +++ b/Projects/Feature/OnboardingFeature/Example/Sources/AppDelegate.swift @@ -0,0 +1,11 @@ +import UIKit + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil + ) -> Bool { + return true + } +} diff --git a/Projects/Feature/OnboardingFeature/Interface/OnboardingCoreInterface.swift b/Projects/Feature/OnboardingFeature/Interface/OnboardingCoreInterface.swift new file mode 100644 index 0000000..72fd03e --- /dev/null +++ b/Projects/Feature/OnboardingFeature/Interface/OnboardingCoreInterface.swift @@ -0,0 +1,33 @@ +// +// OnboardingCoreInterface.swift +// OnboardingFeatureInterface +// +// Created by devMinseok on 7/22/24. +// Copyright © 2024 PomoNyang. All rights reserved. +// + +import Foundation + +import ComposableArchitecture + +@Reducer +public struct OnboardingCore { + private let reducer: Reduce + + public init(reducer: Reduce) { + self.reducer = reducer + } + + @ObservableState + public struct State: Equatable { + public init() {} + } + + public enum Action { + case onAppear + } + + public var body: some ReducerOf { + reducer + } +} diff --git a/Projects/Feature/OnboardingFeature/Interface/OnboardingView.swift b/Projects/Feature/OnboardingFeature/Interface/OnboardingView.swift new file mode 100644 index 0000000..6a32071 --- /dev/null +++ b/Projects/Feature/OnboardingFeature/Interface/OnboardingView.swift @@ -0,0 +1,28 @@ +// +// OnboardingView.swift +// OnboardingFeatureInterface +// +// Created by devMinseok on 7/22/24. +// Copyright © 2024 PomoNyang. All rights reserved. +// + +import SwiftUI + +import ComposableArchitecture + +public struct OnboardingView: View { + let store: StoreOf + + public init(store: StoreOf) { + self.store = store + } + + public var body: some View { + VStack { + Text("Onboarding") + .foregroundStyle(Color.black) + } + .frame(maxWidth: .infinity, maxHeight: .infinity) + .background(Color.white) + } +} diff --git a/Projects/Feature/OnboardingFeature/Project.swift b/Projects/Feature/OnboardingFeature/Project.swift new file mode 100644 index 0000000..8ab4340 --- /dev/null +++ b/Projects/Feature/OnboardingFeature/Project.swift @@ -0,0 +1,23 @@ +import ProjectDescription +import ProjectDescriptionHelpers + +@_spi(Feature) +@_spi(Domain) +import DependencyPlugin + +let project: Project = .makeTMABasedProject( + module: Feature.OnboardingFeature, + scripts: [], + targets: [ + .sources, + .interface, + .tests, + .testing, + .example + ], + dependencies: [ + .interface: [ + .dependency(rootModule: Domain.self) + ] + ] +) diff --git a/Projects/Feature/AppFeature/Resources/dummy.txt b/Projects/Feature/OnboardingFeature/Resources/dummy.txt similarity index 100% rename from Projects/Feature/AppFeature/Resources/dummy.txt rename to Projects/Feature/OnboardingFeature/Resources/dummy.txt diff --git a/Projects/Feature/OnboardingFeature/Sources/OnboardingCore.swift b/Projects/Feature/OnboardingFeature/Sources/OnboardingCore.swift new file mode 100644 index 0000000..9328ed0 --- /dev/null +++ b/Projects/Feature/OnboardingFeature/Sources/OnboardingCore.swift @@ -0,0 +1,23 @@ +// +// OnboardingCore.swift +// OnboardingFeature +// +// Created by devMinseok on 7/22/24. +// Copyright © 2024 PomoNyang. All rights reserved. +// + +import OnboardingFeatureInterface + +import ComposableArchitecture + +extension OnboardingCore { + public init() { + let reducer = Reduce { _, action in + switch action { + case .onAppear: + return .none + } + } + self.init(reducer: reducer) + } +} diff --git a/Projects/Feature/OnboardingFeature/Testing/OnboardingFeatureTesting.swift b/Projects/Feature/OnboardingFeature/Testing/OnboardingFeatureTesting.swift new file mode 100644 index 0000000..b799b32 --- /dev/null +++ b/Projects/Feature/OnboardingFeature/Testing/OnboardingFeatureTesting.swift @@ -0,0 +1,5 @@ +import Foundation + +public struct OnboardingFeatureTesting { + public init() {} +} diff --git a/Projects/Feature/AppFeature/Interface/AppFeatureInterface.swift b/Projects/Feature/OnboardingFeature/Tests/OnboardingFeatureTests.swift similarity index 50% rename from Projects/Feature/AppFeature/Interface/AppFeatureInterface.swift rename to Projects/Feature/OnboardingFeature/Tests/OnboardingFeatureTests.swift index d8776f5..f80e247 100644 --- a/Projects/Feature/AppFeature/Interface/AppFeatureInterface.swift +++ b/Projects/Feature/OnboardingFeature/Tests/OnboardingFeatureTests.swift @@ -1,5 +1,5 @@ import Foundation -public struct AppFeatureInterface { +public struct OnboardingFeatureTests { public init() {} } diff --git a/Projects/Shared/DesignSystem/Project.swift b/Projects/Shared/DesignSystem/Project.swift index 21cd84d..aa62f73 100644 --- a/Projects/Shared/DesignSystem/Project.swift +++ b/Projects/Shared/DesignSystem/Project.swift @@ -6,6 +6,9 @@ import DependencyPlugin let project: Project = .makeTMABasedProject( module: Shared.DesignSystem, + options: .options( + disableSynthesizedResourceAccessors: false + ), includeResource: true, scripts: [], targets: [ @@ -14,5 +17,10 @@ let project: Project = .makeTMABasedProject( .tests, .testing ], - dependencies: [:] + dependencies: [:], + resourceSynthesizers: [ + .fonts(), // for font + .assets(), // for .xcassets, + .files(extensions: ["mp4", "gif"]) + ] ) diff --git a/Projects/Shared/DesignSystem/Resources/Font/Pretendard/Pretendard-Bold.otf b/Projects/Shared/DesignSystem/Resources/Font/Pretendard/Pretendard-Bold.otf new file mode 100644 index 0000000..a52ef39 Binary files /dev/null and b/Projects/Shared/DesignSystem/Resources/Font/Pretendard/Pretendard-Bold.otf differ diff --git a/Projects/Shared/DesignSystem/Resources/Font/Pretendard/Pretendard-Medium.otf b/Projects/Shared/DesignSystem/Resources/Font/Pretendard/Pretendard-Medium.otf new file mode 100644 index 0000000..a2dc009 Binary files /dev/null and b/Projects/Shared/DesignSystem/Resources/Font/Pretendard/Pretendard-Medium.otf differ diff --git a/Projects/Shared/DesignSystem/Resources/Font/Pretendard/Pretendard-Regular.otf b/Projects/Shared/DesignSystem/Resources/Font/Pretendard/Pretendard-Regular.otf new file mode 100644 index 0000000..c940185 Binary files /dev/null and b/Projects/Shared/DesignSystem/Resources/Font/Pretendard/Pretendard-Regular.otf differ diff --git a/Projects/Shared/DesignSystem/Resources/Font/Pretendard/Pretendard-SemiBold.otf b/Projects/Shared/DesignSystem/Resources/Font/Pretendard/Pretendard-SemiBold.otf new file mode 100644 index 0000000..c375b54 Binary files /dev/null and b/Projects/Shared/DesignSystem/Resources/Font/Pretendard/Pretendard-SemiBold.otf differ diff --git a/Projects/Shared/DesignSystem/Resources/dummy.txt b/Projects/Shared/DesignSystem/Resources/dummy.txt deleted file mode 100644 index 3c546eb..0000000 --- a/Projects/Shared/DesignSystem/Resources/dummy.txt +++ /dev/null @@ -1 +0,0 @@ -dummy file \ No newline at end of file diff --git a/Projects/Shared/Logger/Sources/Logger.swift b/Projects/Shared/Logger/Sources/Logger.swift index 41e0656..ff0812a 100644 --- a/Projects/Shared/Logger/Sources/Logger.swift +++ b/Projects/Shared/Logger/Sources/Logger.swift @@ -27,7 +27,7 @@ public final class Logger { #if DEBUG private let appIdentifier = Bundle.main.bundleIdentifier ?? "???" - private let logsAccessQueue = DispatchQueue(label: "com.kimcaddie.logger.logsAccessQueue", attributes: .concurrent) + private let logsAccessQueue = DispatchQueue(label: "com.logger.logsAccessQueue", attributes: .concurrent) private func logger(category: LogCategory) -> os.Logger { return os.Logger(subsystem: appIdentifier, category: category.rawValue) diff --git a/Projects/Shared/Shared/Project.swift b/Projects/Shared/Shared/Project.swift index 0f00bcd..fbc5383 100644 --- a/Projects/Shared/Shared/Project.swift +++ b/Projects/Shared/Shared/Project.swift @@ -7,5 +7,5 @@ import DependencyPlugin let project: Project = .makeRootProject( rootModule: Shared.self, scripts: [], - product: .framework + product: .staticLibrary ) diff --git a/Projects/Shared/Shared/Sources/Exports.swift b/Projects/Shared/Shared/Sources/Exports.swift index 8c5e2aa..49b3a1a 100644 --- a/Projects/Shared/Shared/Sources/Exports.swift +++ b/Projects/Shared/Shared/Sources/Exports.swift @@ -11,3 +11,7 @@ @_exported import DesignSystemInterface @_exported import Utils @_exported import UtilsInterface + +@_exported import ThirdParty_SPM +@_exported import ThirdParty_Firebase +@_exported import ThirdParty_Realm diff --git a/Projects/Shared/ThirdParty_Firebase/Sources/Exports.swift b/Projects/Shared/ThirdParty_Firebase/Sources/Exports.swift index 73c913f..574998f 100644 --- a/Projects/Shared/ThirdParty_Firebase/Sources/Exports.swift +++ b/Projects/Shared/ThirdParty_Firebase/Sources/Exports.swift @@ -2,8 +2,8 @@ // Exports.swift // ThirdParty_Firebase // -// Created by MinseokKang on 2023/09/21. -// Copyright © 2023 Kimcaddie. All rights reserved. +// Created by devMinseok on 7/23/24. +// Copyright © 2024 PomoNyang. All rights reserved. // @_exported import FirebaseCore diff --git a/Projects/Shared/ThirdParty_Realm/Sources/Exports.swift b/Projects/Shared/ThirdParty_Realm/Sources/Exports.swift index c9584e1..1c2dc80 100644 --- a/Projects/Shared/ThirdParty_Realm/Sources/Exports.swift +++ b/Projects/Shared/ThirdParty_Realm/Sources/Exports.swift @@ -2,8 +2,8 @@ // Exports.swift // ThirdParty_Realm // -// Created by MinseokKang on 2023/09/26. -// Copyright © 2023 Kimcaddie. All rights reserved. +// Created by devMinseok on 7/23/24. +// Copyright © 2024 PomoNyang. All rights reserved. // @_exported import RealmSwift diff --git a/Projects/Shared/ThirdParty_SPM/Sources/Exports.swift b/Projects/Shared/ThirdParty_SPM/Sources/Exports.swift index 6d32aaa..1a02d8c 100644 --- a/Projects/Shared/ThirdParty_SPM/Sources/Exports.swift +++ b/Projects/Shared/ThirdParty_SPM/Sources/Exports.swift @@ -1,9 +1,9 @@ // // Exports.swift -// ThirdParty_ComposableArchitecture +// ThirdParty_SPM // -// Created by MinseokKang on 2023/09/20. -// Copyright © 2023 Kimcaddie. All rights reserved. +// Created by devMinseok on 7/23/24. +// Copyright © 2024 PomoNyang. All rights reserved. // @_exported import ComposableArchitecture diff --git a/README.md b/README.md index 3dedbaa..1bb9182 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# PomoNyang iOS 앱 +# 모하냥 iOS 앱 ### 환경 구성 - Carthage 설치 (XCFramework로 관리중인 외부 라이브러리 대응) @@ -37,11 +37,11 @@
운영 환경 -![PROD](DependencyGraph/pomonyang_prod_graph.png) +![PROD](DependencyGraph/mohanyang_prod_graph.png)
개발 환경 -![DEV](DependencyGraph/pomonyang_dev_graph.png) +![DEV](DependencyGraph/mohanyang_dev_graph.png)
\ No newline at end of file diff --git a/Tuist/ProjectDescriptionHelpers/AppEnv.swift b/Tuist/ProjectDescriptionHelpers/AppEnv.swift index ff1e4e5..67fca59 100644 --- a/Tuist/ProjectDescriptionHelpers/AppEnv.swift +++ b/Tuist/ProjectDescriptionHelpers/AppEnv.swift @@ -16,13 +16,12 @@ public enum AppEnv { var moduleName = name.lowercased() let validCharacters = CharacterSet(charactersIn: "abcdefghijklmnopqrstuvwxyz0123456789.") moduleName = moduleName.components(separatedBy: validCharacters.inverted).joined(separator: "") - return "com.pomonyang.module.\(moduleName)" + return "com.pomonyang.mohanyang.\(moduleName)" } public static let organizationName: String = "PomoNyang" public static let deploymentTarget: DeploymentTargets = .iOS("17.0") public static let platform: Destinations = [.iPhone] - public static let bundleId: String = "com.pomonyang.ios" - public static let testBundleId: String = "com.pomonyang.ios.test" + public static let bundleId: String = "com.pomonyang.mohanyang" } diff --git a/Tuist/ProjectDescriptionHelpers/Entitlements.swift b/Tuist/ProjectDescriptionHelpers/Entitlements.swift index 26ad316..10786d0 100644 --- a/Tuist/ProjectDescriptionHelpers/Entitlements.swift +++ b/Tuist/ProjectDescriptionHelpers/Entitlements.swift @@ -8,7 +8,7 @@ import ProjectDescription extension Entitlements { - public enum PomoNyang { + public enum Mohanyang { public static var app: Entitlements { return .dictionary([ "aps-environment": "development", diff --git a/Tuist/ProjectDescriptionHelpers/InfoPlist/InfoPlist+PomoNyang.swift b/Tuist/ProjectDescriptionHelpers/InfoPlist/InfoPlist+Mohanyang.swift similarity index 97% rename from Tuist/ProjectDescriptionHelpers/InfoPlist/InfoPlist+PomoNyang.swift rename to Tuist/ProjectDescriptionHelpers/InfoPlist/InfoPlist+Mohanyang.swift index 70e5152..121d75c 100644 --- a/Tuist/ProjectDescriptionHelpers/InfoPlist/InfoPlist+PomoNyang.swift +++ b/Tuist/ProjectDescriptionHelpers/InfoPlist/InfoPlist+Mohanyang.swift @@ -1,5 +1,5 @@ // -// InfoPlist+PomoNyang.swift +// InfoPlist+Mohanyang.swift // ProjectDescriptionHelpers // // Created by MinseokKang on 2024/07/15. @@ -8,7 +8,7 @@ import ProjectDescription extension InfoPlist { - public enum PomoNyang { + public enum Mohanyang { public static var app: InfoPlist { return .dictionary([ // MARK: - ThirdParty diff --git a/Tuist/ProjectDescriptionHelpers/PrivacyManifest.swift b/Tuist/ProjectDescriptionHelpers/PrivacyManifest.swift index 2fad5f3..4fd2832 100644 --- a/Tuist/ProjectDescriptionHelpers/PrivacyManifest.swift +++ b/Tuist/ProjectDescriptionHelpers/PrivacyManifest.swift @@ -8,7 +8,7 @@ import ProjectDescription extension PrivacyManifest { - public static var pomonyang: Self { + public static var mohanyang: Self { return .privacyManifest( tracking: true, trackingDomains: [], diff --git a/Tuist/ProjectDescriptionHelpers/Templates/Project+Extension.swift b/Tuist/ProjectDescriptionHelpers/Templates/Project+Extension.swift index 5118278..b7047bb 100644 --- a/Tuist/ProjectDescriptionHelpers/Templates/Project+Extension.swift +++ b/Tuist/ProjectDescriptionHelpers/Templates/Project+Extension.swift @@ -32,9 +32,9 @@ extension Project { switch targetType { case .sources: let product: Product = if includeResource { - currentConfig == .dev ? .framework : .staticFramework + .staticFramework // currentConfig == .dev ? .framework : .staticFramework } else { - currentConfig == .dev ? .framework : .staticLibrary + .staticLibrary // currentConfig == .dev ? .framework : .staticLibrary } let resources: ResourceFileElements? = includeResource ? ["Resources/**"] : nil let interfaceDependency: [TargetDependency] = targets.contains(.interface) ? [.target(name: "\(name)Interface")] : [] @@ -51,7 +51,7 @@ extension Project { projectTargets.append(target) case .interface: - let product: Product = currentConfig == .dev ? .framework : .staticLibrary + let product: Product = .staticLibrary //currentConfig == .dev ? .framework : .staticLibrary let target: Target = .target( name: targetName, product: product, @@ -79,11 +79,12 @@ extension Project { projectTargets.append(target) case .testing: + let product: Product = .staticFramework // currentConfig == .dev ? .framework : .staticFramework let interfaceDependency: [TargetDependency] = targets.contains(.interface) ? [.target(name: "\(name)Interface")] : [] let dependencies: [TargetDependency] = (interfaceDependency + currentDependencies).compactMap { $0 } let target: Target = .target( name: targetName, - product: .framework, + product: product, infoPlist: infoPlist, sources: ["Testing/**/*.swift"], resources: nil, diff --git a/Tuist/Templates/Framework/Stencil/Project.stencil b/Tuist/Templates/Framework/Stencil/Project.stencil index 9a9f8e0..5dffc13 100644 --- a/Tuist/Templates/Framework/Stencil/Project.stencil +++ b/Tuist/Templates/Framework/Stencil/Project.stencil @@ -14,5 +14,5 @@ let project: Project = .makeTMABasedProject( .testing, .example ], - dependencies: [] + dependencies: [:] ) diff --git a/Workspace.swift b/Workspace.swift index a720980..db0e7ec 100644 --- a/Workspace.swift +++ b/Workspace.swift @@ -7,7 +7,7 @@ import ProjectDescription import DependencyPlugin let workspace = Workspace( - name: "PomoNyang", + name: "Mohanyang", projects: { var projects: [Path] = [] diff --git a/XCConfig/Project/PomoNyang.xcconfig b/XCConfig/Project/Mohanyang.xcconfig similarity index 62% rename from XCConfig/Project/PomoNyang.xcconfig rename to XCConfig/Project/Mohanyang.xcconfig index 3f79beb..62f894e 100644 --- a/XCConfig/Project/PomoNyang.xcconfig +++ b/XCConfig/Project/Mohanyang.xcconfig @@ -1,7 +1,7 @@ #include "../Shared.xcconfig" -APP_NAME = 뽀모냥 +APP_NAME = 모하냥 MARKETING_VERSION = 0.0.1 CURRENT_PROJECT_VERSION = 1 -DEVELOPMENT_TEAM = +DEVELOPMENT_TEAM = 9KL4XS83LC