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

[Setting] #126 - Inject 의존성 추가 #132

Merged
merged 1 commit into from
Mar 21, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public extension TargetDependency.SPM {
static let Moya = TargetDependency.external(name: "Moya")
static let CombineMoya = TargetDependency.external(name: "CombineMoya")
static let FLEX = TargetDependency.external(name: "FLEX")
static let Inject = TargetDependency.external(name: "Inject")
static let Nimble = TargetDependency.external(name: "Nimble")
static let Quick = TargetDependency.external(name: "Quick")
static let lottie = TargetDependency.external(name: "Lottie")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,19 @@ public extension Project {
"UILaunchStoryboardName": "LaunchScreen",
"LSSupportsOpeningDocumentsInPlace": true,
"UIFileSharingEnabled": true,
"UIApplicationSceneManifest": [
"UIApplicationSupportsMultipleScenes": false,
"UISceneConfigurations": [
"UIWindowSceneSessionRoleApplication": [
[
"UISceneConfigurationName": "Default Configuration",
"UISceneDelegateClassName": "$(PRODUCT_MODULE_NAME).SceneDelegate"
],
]
]
],
"NSPhotoLibraryUsageDescription": "미션과 관련된 사진을 업로드하기 위해 갤러리 권한이 필요합니다.",
"App Transport Security Settings": ["Allow Arbitrary Loads": true],
"NSAppTransportSecurity": ["NSAllowsArbitraryLoads": true],
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@
import ProjectDescription

public extension SettingsDictionary {
static let allLoadSettings: Self = [
"OTHER_LDFLAGS" : [
"$(inherited) -all_load",
"-Xlinker -interposable"
]
]

static let baseSettings: Self = [
"OTHER_LDFLAGS" : [
"-Xlinker -interposable"
]
]

func setProductBundleIdentifier(_ value: String = "com.iOS$(BUNDLE_ID_SUFFIX)") -> SettingsDictionary {
merging(["PRODUCT_BUNDLE_IDENTIFIER": SettingValue(stringLiteral: value)])
}
Expand Down Expand Up @@ -50,12 +63,6 @@ public extension SettingsDictionary {
.merging(["CODE_SIGN_IDENTITY": SettingValue(stringLiteral: "iPhone Developer")])
}

func setCodeSignManualForApp() -> SettingsDictionary {
merging(["CODE_SIGN_STYLE": SettingValue(stringLiteral: "Manual")])
.merging(["DEVELOPMENT_TEAM": SettingValue(stringLiteral: "9K86FQHDLU")])
.merging(["CODE_SIGN_IDENTITY": SettingValue(stringLiteral: "iPhone Developer")])
}

func setProvisioningDevelopment() -> SettingsDictionary {
merging(["PROVISIONING_PROFILE_SPECIFIER": SettingValue(stringLiteral: "SOPTAMP Debug")])
.merging(["PROVISIONING_PROFILE": SettingValue(stringLiteral: "SOPTAMP Debug")])
Expand Down
1 change: 1 addition & 0 deletions SOPT-Stamp-iOS/Tuist/Dependencies.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ let spm = SwiftPackageManagerDependencies([
.remote(url: "https://github.com/devxoul/Then", requirement: .upToNextMajor(from: "2")),
.remote(url: "https://github.com/onevcat/Kingfisher.git", requirement: .upToNextMajor(from: "7.0.0")),
.remote(url: "https://github.com/FLEXTool/FLEX.git", requirement: .upToNextMajor(from: "4.3.0")),
.remote(url: "https://github.com/krzysztofzablocki/Inject.git", requirement: .upToNextMajor(from: "1.0.5")),
.remote(url: "https://github.com/Quick/Quick.git", requirement: .upToNextMajor(from: "5.0.0")),
.remote(url: "https://github.com/Quick/Nimble.git", requirement: .upToNextMajor(from: "10.0.0")),
.remote(url: "https://github.com/airbnb/lottie-ios", requirement: .upToNextMajor(from: "3.0.0"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ public extension Project {
let deploymentTarget = Environment.deploymentTarget
let platform = Environment.platform

let baseSettings: SettingsDictionary = hasDynamicFramework
? .allLoadSettings
: .baseSettings

let settings: Settings = .settings(
base: name.contains(Environment.workspaceName)
? .init().setCodeSignManualForApp()
: .init().setCodeSignManual(),
base: baseSettings.setCodeSignManual(),
debug: .init()
.setProvisioningDevelopment(),
release: .init()
Expand All @@ -49,8 +51,12 @@ public extension Project {
resources: [.glob(pattern: "Resources/**", excluding: [])],
dependencies: [
internalDependencies,
externalDependencies
].flatMap { $0 }
externalDependencies,
[
.SPM.Inject
]
].flatMap { $0 },
settings: settings
)

projectTargets.append(target)
Expand All @@ -67,7 +73,8 @@ public extension Project {
deploymentTarget: deploymentTarget,
infoPlist: .default,
sources: ["Interface/Sources/**/*.swift"],
dependencies: interfaceDependencies
dependencies: interfaceDependencies,
settings: settings
)

projectTargets.append(target)
Expand All @@ -89,7 +96,8 @@ public extension Project {
infoPlist: .default,
sources: ["Sources/**/*.swift"],
resources: hasResources ? [.glob(pattern: "Resources/**", excluding: [])] : [],
dependencies: deps + internalDependencies + externalDependencies
dependencies: deps + internalDependencies + externalDependencies,
settings: settings
)

projectTargets.append(target)
Expand All @@ -112,9 +120,11 @@ public extension Project {
dependencies: [
deps,
[
.SPM.FLEX
.SPM.FLEX,
.SPM.Inject
]
].flatMap { $0 }
].flatMap { $0 },
settings: settings
)

projectTargets.append(target)
Expand Down