-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProject+Settings.swift
More file actions
58 lines (53 loc) · 2.02 KB
/
Copy pathProject+Settings.swift
File metadata and controls
58 lines (53 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import ProjectDescription
public enum DevLogSigning {
public static let teamID: SettingValue = "4CPC6N38WA"
}
public extension Settings {
static func devlog(
versionXcconfigPath: Path? = nil,
base: SettingsDictionary = [:],
debug: SettingsDictionary = [:],
release: SettingsDictionary = [:],
defaultSettings: DefaultSettings = .recommended
) -> Settings {
var commonBase: SettingsDictionary = [
"CURRENT_PROJECT_VERSION": "1",
"INFOPLIST_KEY_CFBundleShortVersionString": "$(MARKETING_VERSION)",
"INFOPLIST_KEY_CFBundleVersion": "$(CURRENT_PROJECT_VERSION)",
"SWIFT_VERSION": "6.0",
"TARGETED_DEVICE_FAMILY": "1,2"
]
commonBase.merge(base) { _, new in new }
if let versionXcconfigPath {
return .settings(
base: commonBase,
configurations: [
.debug(name: "Debug", settings: debug, xcconfig: versionXcconfigPath),
.release(name: "Release", settings: release, xcconfig: versionXcconfigPath)
],
defaultSettings: defaultSettings
)
}
return .settings(
base: commonBase,
configurations: [
.debug(name: "Debug", settings: debug),
.release(name: "Release", settings: release)
],
defaultSettings: defaultSettings
)
}
static func devlogProject(
versionXcconfigPath: Path? = nil,
additionalBase: SettingsDictionary = [:]
) -> Settings {
var base: SettingsDictionary = [
"ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS": "YES",
"DEVELOPMENT_TEAM": DevLogSigning.teamID,
"ENABLE_USER_SCRIPT_SANDBOXING": "YES",
"STRING_CATALOG_GENERATE_SYMBOLS": "YES"
]
base.merge(additionalBase) { _, new in new }
return .devlog(versionXcconfigPath: versionXcconfigPath, base: base)
}
}