-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProject.swift
More file actions
99 lines (96 loc) · 3.29 KB
/
Project.swift
File metadata and controls
99 lines (96 loc) · 3.29 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import Foundation
import ProjectDescription
let targetName = "LookInsideExample"
let localServerPath = Environment.lookinsideServerPath.getString(default: "")
.trimmingCharacters(in: .whitespacesAndNewlines)
let usesLocalServer = !localServerPath.isEmpty
let localServerPackagePath: ProjectDescription.Path = localServerPath.hasPrefix("/")
? .path(localServerPath)
: .relativeToManifest(localServerPath)
let serverPackage: Package = usesLocalServer
? .local(path: localServerPackagePath)
: .remote(
url: "https://github.com/LookInsideApp/LookInside-Release.git",
requirement: .upToNextMajor(from: "0.2.0")
)
let serverProduct = usesLocalServer ? "LookinServer" : "LookInsideServer"
let configurations: [Configuration] = [
.debug(name: "Debug", xcconfig: "Configuration/Development.xcconfig"),
.release(name: "Release", xcconfig: "Configuration/Release.xcconfig"),
]
let xcconfigManagedSettings: Set<String> = [
"CODE_SIGN_IDENTITY",
"CODE_SIGN_STYLE",
"CODE_SIGNING_ALLOWED",
"CODE_SIGNING_REQUIRED",
"CODE_SIGNING_SUPPORTED",
"DEBUG_INFORMATION_FORMAT",
"DEVELOPMENT_TEAM",
"ENABLE_NS_ASSERTIONS",
"ENABLE_TESTABILITY",
"ENABLE_USER_SCRIPT_SANDBOXING",
"IPHONEOS_DEPLOYMENT_TARGET",
"ONLY_ACTIVE_ARCH",
"PROVISIONING_PROFILE_SPECIFIER",
"SDKROOT",
"SUPPORTS_MACCATALYST",
"SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD",
"SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD",
"SWIFT_ACTIVE_COMPILATION_CONDITIONS",
"SWIFT_COMPILATION_MODE",
"SWIFT_OPTIMIZATION_LEVEL",
"SWIFT_VERSION",
"TARGETED_DEVICE_FAMILY",
]
let project = Project(
name: targetName,
organizationName: "LookInside",
packages: [
serverPackage,
],
settings: .settings(
configurations: configurations,
defaultSettings: .recommended(excluding: xcconfigManagedSettings),
defaultConfiguration: "Debug"
),
targets: [
.target(
name: targetName,
destinations: [.iPhone, .iPad, .mac],
product: .app,
productName: targetName,
bundleId: "$(LOOKINSIDE_EXAMPLE_BUNDLE_ID)",
deploymentTargets: .iOS("16.0"),
infoPlist: .file(path: "Sources/LookInsideExampleApp/Info.plist"),
sources: [
"Sources/LookInsideExampleApp/**/*.swift",
],
dependencies: [
.package(product: serverProduct),
],
settings: .settings(
base: [
"ASSETCATALOG_COMPILER_APPICON_NAME": "AppIcon",
"LD_RUNPATH_SEARCH_PATHS": [
"$(inherited)",
"@executable_path/Frameworks",
],
],
configurations: configurations,
defaultSettings: .recommended(excluding: xcconfigManagedSettings)
)
),
],
schemes: [
.scheme(
name: targetName,
shared: true,
buildAction: .buildAction(targets: [.target(targetName)]),
runAction: .runAction(configuration: "Debug", executable: .target(targetName)),
archiveAction: .archiveAction(configuration: "Release")
),
],
additionalFiles: [
"Configuration/Base.xcconfig",
]
)