diff --git a/Plugins/UtilityPlugin/ProjectDescriptionHelpers/PathExtension.swift b/Plugins/UtilityPlugin/ProjectDescriptionHelpers/PathExtension.swift index 39cd993..adb91bf 100644 --- a/Plugins/UtilityPlugin/ProjectDescriptionHelpers/PathExtension.swift +++ b/Plugins/UtilityPlugin/ProjectDescriptionHelpers/PathExtension.swift @@ -8,14 +8,10 @@ import Foundation import ProjectDescription -public extension ProjectDescription.Path { - static let pomonyangAppXCConfig: Path = .relativeToRoot("XCConfig/App/PomoNyang.xcconfig") +extension ProjectDescription.Path { + public static let pomonyangAppXCConfig: Path = .relativeToRoot("XCConfig/Project/PomoNyang.xcconfig") - static func targetXCConfig(type: Product) -> Self { + public static func targetXCConfig(type: Product) -> Self { return .relativeToRoot("XCConfig/Target/\(type.rawValue).xcconfig") } - - static func projectXCConfig(type: BuildConfiguration) -> Self { - return .relativeToRoot("XCConfig/Project/\(type.name).xcconfig") - } } diff --git a/Projects/App/Project.swift b/Projects/App/Project.swift index ea778b9..812bddf 100644 --- a/Projects/App/Project.swift +++ b/Projects/App/Project.swift @@ -43,7 +43,7 @@ let appTarget: Target = .target( .dependency(module: PomoNyang.Feature.AppFeature), .dependency(module: PomoNyang.Shared.DesignSystem) ], - settings: .appTargetSettings(xcconfig: .pomonyangAppXCConfig) + settings: .targetSettings(product: .app) ) // MARK: - Scheme @@ -60,7 +60,7 @@ let project: Project = .init( name: "App", organizationName: AppEnv.organizationName, options: .options(automaticSchemesOptions: .disabled, disableSynthesizedResourceAccessors: true), - settings: .projectSettings, + settings: .projectSettings(xcconfig: .pomonyangAppXCConfig), targets: [appTarget], schemes: [appScheme] ) diff --git a/Tuist/ProjectDescriptionHelpers/InfoPlist/InfoPlist+PomoNyang.swift b/Tuist/ProjectDescriptionHelpers/InfoPlist/InfoPlist+PomoNyang.swift index 0478ed2..70e5152 100644 --- a/Tuist/ProjectDescriptionHelpers/InfoPlist/InfoPlist+PomoNyang.swift +++ b/Tuist/ProjectDescriptionHelpers/InfoPlist/InfoPlist+PomoNyang.swift @@ -24,7 +24,7 @@ extension InfoPlist { // MARK: - Core Foundation "CFBundleDevelopmentRegion": "ko_KR", - "CFBundleDisplayName": "?", + "CFBundleDisplayName": "$(APP_NAME)", "CFBundleExecutable": "$(EXECUTABLE_NAME)", "CFBundleIdentifier": "$(PRODUCT_BUNDLE_IDENTIFIER)", "CFBundleInfoDictionaryVersion": "6.0", diff --git a/Tuist/ProjectDescriptionHelpers/Templates/Project+Extension.swift b/Tuist/ProjectDescriptionHelpers/Templates/Project+Extension.swift index 2d2322b..c16fb97 100644 --- a/Tuist/ProjectDescriptionHelpers/Templates/Project+Extension.swift +++ b/Tuist/ProjectDescriptionHelpers/Templates/Project+Extension.swift @@ -123,7 +123,7 @@ extension Project { organizationName: AppEnv.organizationName, options: options, packages: packages, - settings: .projectSettings, + settings: .projectSettings(), targets: projectTargets, schemes: schemes, fileHeaderTemplate: nil, diff --git a/Tuist/ProjectDescriptionHelpers/Templates/Settings+Extension.swift b/Tuist/ProjectDescriptionHelpers/Templates/Settings+Extension.swift index 0c3e2d3..268cbc2 100644 --- a/Tuist/ProjectDescriptionHelpers/Templates/Settings+Extension.swift +++ b/Tuist/ProjectDescriptionHelpers/Templates/Settings+Extension.swift @@ -9,9 +9,12 @@ import UtilityPlugin import ProjectDescription extension ProjectDescription.Settings { - public static func appTargetSettings(xcconfig: Path) -> Self { - let prodConfig = BuildConfiguration.prod + /// 프로젝트 설정 + public static func projectSettings( + xcconfig: Path? = nil + ) -> Self { let devConfig = BuildConfiguration.dev + let prodConfig = BuildConfiguration.prod return .settings( configurations: [ @@ -36,26 +39,10 @@ extension ProjectDescription.Settings { ) } - public static var projectSettings: Self { - let devConfig = BuildConfiguration.dev - let prodConfig = BuildConfiguration.prod - - return .settings( - configurations: [ - .debug( - name: devConfig.configurationName, - xcconfig: .projectXCConfig(type: devConfig) - ), - .release( - name: prodConfig.configurationName, - xcconfig: .projectXCConfig(type: prodConfig) - ) - ], - defaultSettings: .essential - ) - } - - public static func targetSettings(product: Product) -> Self { + /// 타겟 설정 + public static func targetSettings( + product: Product + ) -> Self { let devConfig = BuildConfiguration.dev let prodConfig = BuildConfiguration.prod @@ -63,18 +50,10 @@ extension ProjectDescription.Settings { configurations: [ .debug( name: devConfig.configurationName, - settings: [:] - .otherSwiftFlags(["$(inherited)", "-D\(devConfig.name)"]) - .swiftActiveCompilationConditions([devConfig.name, "DEBUG"]) - , xcconfig: .targetXCConfig(type: product) ), .release( name: prodConfig.configurationName, - settings: [:] - .otherSwiftFlags(["$(inherited)", "-D\(prodConfig.name)"]) - .swiftActiveCompilationConditions([prodConfig.name]) - , xcconfig: .targetXCConfig(type: product) ) ], @@ -82,6 +61,7 @@ extension ProjectDescription.Settings { ) } + /// 패키지 설정 public static var packageSettings: Self { let devConfig = BuildConfiguration.dev let prodConfig = BuildConfiguration.prod diff --git a/XCConfig/Project/DEV.xcconfig b/XCConfig/Project/DEV.xcconfig deleted file mode 100644 index 28b2166..0000000 --- a/XCConfig/Project/DEV.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "../Shared.xcconfig" diff --git a/XCConfig/Project/PROD.xcconfig b/XCConfig/Project/PROD.xcconfig deleted file mode 100644 index 28b2166..0000000 --- a/XCConfig/Project/PROD.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "../Shared.xcconfig" diff --git a/XCConfig/Project/PomoNyang.xcconfig b/XCConfig/Project/PomoNyang.xcconfig new file mode 100644 index 0000000..3f79beb --- /dev/null +++ b/XCConfig/Project/PomoNyang.xcconfig @@ -0,0 +1,7 @@ +#include "../Shared.xcconfig" + +APP_NAME = 뽀모냥 + +MARKETING_VERSION = 0.0.1 +CURRENT_PROJECT_VERSION = 1 +DEVELOPMENT_TEAM = diff --git a/XCConfig/App/PomoNyang.xcconfig b/XCConfig/Target/app.xcconfig similarity index 85% rename from XCConfig/App/PomoNyang.xcconfig rename to XCConfig/Target/app.xcconfig index 90090ee..551a8dc 100644 --- a/XCConfig/App/PomoNyang.xcconfig +++ b/XCConfig/Target/app.xcconfig @@ -4,14 +4,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon BUILD_LIBRARY_FOR_DISTRIBUTION = NO CODE_SIGN_IDENTITY = Apple Development CODE_SIGN_STYLE = Automatic -CURRENT_PROJECT_VERSION = 1 -DEVELOPMENT_TEAM = FRAMEWORK_SEARCH_PATHS = $(inherited) -MARKETING_VERSION = 0.0.1 PRODUCT_NAME = $(TARGET_NAME) PROVISIONING_PROFILE_SPECIFIER = SWIFT_VERSION = 5.0 -TARGETED_DEVICE_FAMILY = 1 // Firebase requires this diff --git a/XCConfig/Target/app_extension.xcconfig b/XCConfig/Target/app_extension.xcconfig index b970f04..577c0a0 100755 --- a/XCConfig/Target/app_extension.xcconfig +++ b/XCConfig/Target/app_extension.xcconfig @@ -6,8 +6,6 @@ #include "../Shared.xcconfig" -DEVELOPMENT_TEAM = - // Xcode needs this to find archived headers if SKIP_INSTALL is set HEADER_SEARCH_PATHS = $(inherited) $(OBJROOT)/UninstalledProducts/include @@ -15,9 +13,6 @@ HEADER_SEARCH_PATHS = $(inherited) $(OBJROOT)/UninstalledProducts/include // assumed) SDKROOT = iphoneos -// Supported device families (1 is iPhone, 2 is iPad) -TARGETED_DEVICE_FAMILY = 1,2 - // Sets the @rpath for the application such that it can include frameworks in // the application bundle two levels up, inside the "Frameworks" folder. // diff --git a/XCConfig/Target/unit_tests.xcconfig b/XCConfig/Target/unit_tests.xcconfig index 6b06770..64b1604 100755 --- a/XCConfig/Target/unit_tests.xcconfig +++ b/XCConfig/Target/unit_tests.xcconfig @@ -16,9 +16,6 @@ LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/ // assumed) SDKROOT = iphoneos -// Supported device families (1 is iPhone, 2 is iPad) -TARGETED_DEVICE_FAMILY = 1,2 - SWIFT_COMPILATION_MODE = wholemodule SWIFT_INCLUDE_PATHS = $(inherited)