From 82d7dfa83a21693a9520fc7e8b38c5e047149d75 Mon Sep 17 00:00:00 2001 From: Wendy Liga Date: Thu, 21 Oct 2021 15:15:34 +0700 Subject: [PATCH 1/4] wip --- Docs/ProjectSpec.md | 1 + Package.resolved | 4 ++-- Package.swift | 2 +- Sources/ProjectSpec/TargetScheme.swift | 9 +++++++++ .../Commands/GenerateCommand.swift | 19 +++++++++++++++++++ Sources/XcodeGenCLI/GenerationError.swift | 3 +++ Sources/XcodeGenKit/ProjectGenerator.swift | 19 +++++++++++++++++++ 7 files changed, 54 insertions(+), 3 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index c99f1462..dfec5869 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -653,6 +653,7 @@ This is a convenience used to automatically generate schemes for a target based - [x] **configVariants**: **[String]** - This generates a scheme for each entry, using configs that contain the name with debug and release variants. This is useful for having different environment schemes. - [ ] **testTargets**: **[[Test Target](#test-target)]** - a list of test targets that should be included in the scheme. These will be added to the build targets and the test entries. Each entry can either be a simple string, or a [Test Target](#test-target) - [ ] **gatherCoverageData**: **Bool** - a boolean that indicates if this scheme should gather coverage data. This defaults to false +- [ ] **isShown**: **Bool** - a boolean that indicates to show or hide current scheme. This defaults to true - [ ] **disableMainThreadChecker**: **Bool** - a boolean that indicates if this scheme should disable the Main Thread Checker. This defaults to false - [ ] **stopOnEveryMainThreadCheckerIssue**: **Bool** - a boolean that indicates if this scheme should stop at every Main Thread Checker issue. This defaults to false - [ ] **buildImplicitDependencies**: **Bool** - Flag to determine if Xcode should build implicit dependencies of this scheme. By default this is `true` if not set. diff --git a/Package.resolved b/Package.resolved index 4d75c731..442c56f2 100644 --- a/Package.resolved +++ b/Package.resolved @@ -78,8 +78,8 @@ "repositoryURL": "https://github.com/tuist/XcodeProj.git", "state": { "branch": null, - "revision": "446f3a0db73e141c7f57e26fcdb043096b1db52c", - "version": "8.3.1" + "revision": "64c4b956c1095dbba7a07107005342a25f1c5d6b", + "version": "8.5.0" } }, { diff --git a/Package.swift b/Package.swift index d4cc5201..bdf51e13 100644 --- a/Package.swift +++ b/Package.swift @@ -16,7 +16,7 @@ let package = Package( .package(url: "https://github.com/yonaskolb/JSONUtilities.git", from: "4.2.0"), .package(url: "https://github.com/kylef/Spectre.git", from: "0.9.2"), .package(url: "https://github.com/onevcat/Rainbow.git", from: "3.0.0"), - .package(url: "https://github.com/tuist/XcodeProj.git", from: "8.3.1"), + .package(url: "https://github.com/tuist/XcodeProj.git", from: "8.5.0"), .package(url: "https://github.com/jakeheis/SwiftCLI.git", from: "6.0.3"), .package(url: "https://github.com/mxcl/Version", from: "2.0.0"), .package(url: "https://github.com/SwiftDocOrg/GraphViz.git", .exact("0.2.0")), diff --git a/Sources/ProjectSpec/TargetScheme.swift b/Sources/ProjectSpec/TargetScheme.swift index 1beedb6a..3238271c 100644 --- a/Sources/ProjectSpec/TargetScheme.swift +++ b/Sources/ProjectSpec/TargetScheme.swift @@ -4,6 +4,7 @@ import XcodeProj public struct TargetScheme: Equatable { public static let gatherCoverageDataDefault = false + public static let isShownDefault = true public static let disableMainThreadCheckerDefault = false public static let stopOnEveryMainThreadCheckerIssueDefault = false public static let buildImplicitDependenciesDefault = true @@ -11,6 +12,7 @@ public struct TargetScheme: Equatable { public var testTargets: [Scheme.Test.TestTarget] public var configVariants: [String] public var gatherCoverageData: Bool + public var isShown: Bool public var storeKitConfiguration: String? public var language: String? public var region: String? @@ -26,6 +28,7 @@ public struct TargetScheme: Equatable { testTargets: [Scheme.Test.TestTarget] = [], configVariants: [String] = [], gatherCoverageData: Bool = gatherCoverageDataDefault, + isShown: Bool = isShownDefault, storeKitConfiguration: String? = nil, language: String? = nil, region: String? = nil, @@ -40,6 +43,7 @@ public struct TargetScheme: Equatable { self.testTargets = testTargets self.configVariants = configVariants self.gatherCoverageData = gatherCoverageData + self.isShown = isShown self.storeKitConfiguration = storeKitConfiguration self.language = language self.region = region @@ -71,6 +75,7 @@ extension TargetScheme: JSONObjectConvertible { } configVariants = jsonDictionary.json(atKeyPath: "configVariants") ?? [] gatherCoverageData = jsonDictionary.json(atKeyPath: "gatherCoverageData") ?? TargetScheme.gatherCoverageDataDefault + isShown = jsonDictionary.json(atKeyPath: "isShown") ?? TargetScheme.isShownDefault storeKitConfiguration = jsonDictionary.json(atKeyPath: "storeKitConfiguration") language = jsonDictionary.json(atKeyPath: "language") region = jsonDictionary.json(atKeyPath: "region") @@ -98,6 +103,10 @@ extension TargetScheme: JSONEncodable { if gatherCoverageData != TargetScheme.gatherCoverageDataDefault { dict["gatherCoverageData"] = gatherCoverageData } + + if isShown != TargetScheme.isShownDefault { + dict["isShown"] = isShown + } if let storeKitConfiguration = storeKitConfiguration { dict["storeKitConfiguration"] = storeKitConfiguration diff --git a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift index bfea587e..aceae2fc 100644 --- a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift +++ b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift @@ -103,6 +103,25 @@ class GenerateCommand: ProjectCommand { do { let projectGenerator = ProjectGenerator(project: project) xcodeProject = try projectGenerator.generateXcodeProject(in: projectDirectory) + + } catch { + throw GenerationError.generationError(error) + } + + info("⚙️ Generating userdata...") + do { + guard let userName = ProcessInfo.processInfo.environment["LOGNAME"] else { + throw GenerationError.missingUsername + } + + let schemeManagement = ProjectGenerator(project: project).generateSchemeManagement() + // create directory + let schemeManagementDirectory = projectPath + "xcuserdata/\(userName).xcuserdatad/xcschemes" + if !schemeManagementDirectory.exists { + try schemeManagementDirectory.mkpath() + } + + try schemeManagement.write(path: schemeManagementDirectory + "xcschememanagement.plist") } catch { throw GenerationError.generationError(error) } diff --git a/Sources/XcodeGenCLI/GenerationError.swift b/Sources/XcodeGenCLI/GenerationError.swift index 985246bd..b9470a93 100644 --- a/Sources/XcodeGenCLI/GenerationError.swift +++ b/Sources/XcodeGenCLI/GenerationError.swift @@ -10,6 +10,7 @@ enum GenerationError: Error, CustomStringConvertible, ProcessError { case cacheGenerationError(Error) case validationError(SpecValidationError) case generationError(Error) + case missingUsername case writingError(Error) var description: String { @@ -24,6 +25,8 @@ enum GenerationError: Error, CustomStringConvertible, ProcessError { return error.description case let .generationError(error): return String(describing: error) + case .missingUsername: + return "Couldn't find current username" case let .writingError(error): return String(describing: error) } diff --git a/Sources/XcodeGenKit/ProjectGenerator.swift b/Sources/XcodeGenKit/ProjectGenerator.swift index 65f3216e..3a681aaf 100644 --- a/Sources/XcodeGenKit/ProjectGenerator.swift +++ b/Sources/XcodeGenKit/ProjectGenerator.swift @@ -30,6 +30,25 @@ public class ProjectGenerator { let sharedData = XCSharedData(schemes: schemes) return XcodeProj(workspace: workspace, pbxproj: pbxProj, sharedData: sharedData) } + + public func generateSchemeManagement() -> XCSchemeManagement { + let userStateSchemes = project.targets.map { target -> XCSchemeManagement.UserStateScheme in + XCSchemeManagement.UserStateScheme( + name: target.name + ".xcscheme", + shared: true, + orderHint: nil, + isShown: target.scheme?.isShown ?? TargetScheme.isShownDefault + ) + } + + let schemeManagement = XCSchemeManagement( + schemeUserState: userStateSchemes, + suppressBuildableAutocreation: nil + ) + + return schemeManagement + } + func generateWorkspace() throws -> XCWorkspace { let selfReference = XCWorkspaceDataFileRef(location: .`self`("")) From ac336f6746966d23a9699549d91a2197c96eca94 Mon Sep 17 00:00:00 2001 From: Tieme van Veen Date: Thu, 21 Oct 2021 13:42:08 +0200 Subject: [PATCH 2/4] Added scheme management metadata properties to TargetScheme --- Docs/ProjectSpec.md | 3 ++ Sources/ProjectSpec/TargetScheme.swift | 35 ++++++++++++++++++++++- Sources/XcodeGenKit/SchemeGenerator.swift | 3 +- Tests/PerformanceTests/TestProject.swift | 5 +++- 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index dfec5869..2e94d585 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -663,6 +663,9 @@ This is a convenience used to automatically generate schemes for a target based - [ ] **environmentVariables**: **[[Environment Variable](#environment-variable)]** or **[String:String]** - environment variables for Run, Test and Profile scheme actions. When passing a dictionary, every key-value entry maps to a corresponding variable that is enabled. - [ ] **preActions**: **[[Execution Action](#execution-action)]** - Scripts that are run *before* the build action - [ ] **postActions**: **[[Execution Action](#execution-action)]** - Scripts that are run *after* the build action +- [ ] **shared**: **Bool** - indicates whether the scheme is shared. This defaults to true +- [ ] **orderHint**: **Int** - used by Xcode to sort the schemes +- [ ] **isShown**: **Bool** ** - indicates whether the sheme is shown in the scheme list - [ ] **storeKitConfiguration**: **String** - specify storekit configuration to use during run. See [Options](#options). For example, the spec below would create 3 schemes called: diff --git a/Sources/ProjectSpec/TargetScheme.swift b/Sources/ProjectSpec/TargetScheme.swift index 3238271c..829c76d9 100644 --- a/Sources/ProjectSpec/TargetScheme.swift +++ b/Sources/ProjectSpec/TargetScheme.swift @@ -8,6 +8,7 @@ public struct TargetScheme: Equatable { public static let disableMainThreadCheckerDefault = false public static let stopOnEveryMainThreadCheckerIssueDefault = false public static let buildImplicitDependenciesDefault = true + public static let sharedDefault = true public var testTargets: [Scheme.Test.TestTarget] public var configVariants: [String] @@ -23,6 +24,9 @@ public struct TargetScheme: Equatable { public var environmentVariables: [XCScheme.EnvironmentVariable] public var preActions: [Scheme.ExecutionAction] public var postActions: [Scheme.ExecutionAction] + public var shared: Bool + public var orderHint: Int? + public var isShown: Bool? public init( testTargets: [Scheme.Test.TestTarget] = [], @@ -38,7 +42,10 @@ public struct TargetScheme: Equatable { commandLineArguments: [String: Bool] = [:], environmentVariables: [XCScheme.EnvironmentVariable] = [], preActions: [Scheme.ExecutionAction] = [], - postActions: [Scheme.ExecutionAction] = [] + postActions: [Scheme.ExecutionAction] = [], + shared: Bool = sharedDefault, + orderHint: Int? = nil, + isShown: Bool? = nil ) { self.testTargets = testTargets self.configVariants = configVariants @@ -49,11 +56,22 @@ public struct TargetScheme: Equatable { self.region = region self.disableMainThreadChecker = disableMainThreadChecker self.stopOnEveryMainThreadCheckerIssue = stopOnEveryMainThreadCheckerIssue + self.isShown = isShown self.buildImplicitDependencies = buildImplicitDependencies self.commandLineArguments = commandLineArguments self.environmentVariables = environmentVariables self.preActions = preActions self.postActions = postActions + self.shared = shared + self.orderHint = orderHint + self.postActions = postActions + } + + public var management: Scheme.Management? { + if shared != TargetScheme.sharedDefault || orderHint != nil || isShown != nil { + return Scheme.Management(shared: shared,orderHint: orderHint,isShown: isShown) + } + return nil } } @@ -86,6 +104,9 @@ extension TargetScheme: JSONObjectConvertible { environmentVariables = try XCScheme.EnvironmentVariable.parseAll(jsonDictionary: jsonDictionary) preActions = jsonDictionary.json(atKeyPath: "preActions") ?? [] postActions = jsonDictionary.json(atKeyPath: "postActions") ?? [] + shared = jsonDictionary.json(atKeyPath: "shared") ?? TargetScheme.sharedDefault + orderHint = jsonDictionary.json(atKeyPath: "orderHint") + isShown = jsonDictionary.json(atKeyPath: "isShown") } } @@ -132,6 +153,18 @@ extension TargetScheme: JSONEncodable { dict["region"] = region } + if shared != TargetScheme.sharedDefault { + dict["shared"] = shared + } + + if let orderHint = orderHint { + dict["orderHint"] = orderHint + } + + if let isShown = isShown { + dict["isShown"] = isShown + } + return dict } } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 67f68196..85aa9da3 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -414,7 +414,8 @@ extension Scheme { ), archive: .init( config: releaseConfig - ) + ), + management: targetScheme.management ) } diff --git a/Tests/PerformanceTests/TestProject.swift b/Tests/PerformanceTests/TestProject.swift index e1d8edc9..923f9702 100644 --- a/Tests/PerformanceTests/TestProject.swift +++ b/Tests/PerformanceTests/TestProject.swift @@ -30,7 +30,10 @@ extension Project { XCScheme.EnvironmentVariable(variable: "ENV2", value: "HELLO", enabled: false), ], preActions: [Scheme.ExecutionAction(name: "run", script: "script")], - postActions: [Scheme.ExecutionAction(name: "run", script: "script")] + postActions: [Scheme.ExecutionAction(name: "run", script: "script")], + shared: false, + orderHint: 1, + isShown: true ) for platform in Platform.allCases { let appTarget = Target( From c1006c8689ddbbf0edd0958242d05255da3ab90a Mon Sep 17 00:00:00 2001 From: Tieme van Veen Date: Thu, 21 Oct 2021 13:42:08 +0200 Subject: [PATCH 3/4] wip --- Docs/ProjectSpec.md | 1 - Sources/ProjectSpec/Scheme.swift | 54 +++++++++++++++++++++- Sources/ProjectSpec/TargetScheme.swift | 16 ++----- Sources/XcodeGenKit/ProjectGenerator.swift | 6 +-- 4 files changed, 60 insertions(+), 17 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 2e94d585..fc03708d 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -653,7 +653,6 @@ This is a convenience used to automatically generate schemes for a target based - [x] **configVariants**: **[String]** - This generates a scheme for each entry, using configs that contain the name with debug and release variants. This is useful for having different environment schemes. - [ ] **testTargets**: **[[Test Target](#test-target)]** - a list of test targets that should be included in the scheme. These will be added to the build targets and the test entries. Each entry can either be a simple string, or a [Test Target](#test-target) - [ ] **gatherCoverageData**: **Bool** - a boolean that indicates if this scheme should gather coverage data. This defaults to false -- [ ] **isShown**: **Bool** - a boolean that indicates to show or hide current scheme. This defaults to true - [ ] **disableMainThreadChecker**: **Bool** - a boolean that indicates if this scheme should disable the Main Thread Checker. This defaults to false - [ ] **stopOnEveryMainThreadCheckerIssue**: **Bool** - a boolean that indicates if this scheme should stop at every Main Thread Checker issue. This defaults to false - [ ] **buildImplicitDependencies**: **Bool** - Flag to determine if Xcode should build implicit dependencies of this scheme. By default this is `true` if not set. diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index ed921c89..aaf2f191 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -14,6 +14,7 @@ public struct Scheme: Equatable { public var analyze: Analyze? public var test: Test? public var profile: Profile? + public var management: Management? public init( name: String, @@ -22,7 +23,8 @@ public struct Scheme: Equatable { test: Test? = nil, profile: Profile? = nil, analyze: Analyze? = nil, - archive: Archive? = nil + archive: Archive? = nil, + management: Management? = nil ) { self.name = name self.build = build @@ -31,6 +33,25 @@ public struct Scheme: Equatable { self.profile = profile self.analyze = analyze self.archive = archive + self.management = management + } + + public struct Management: Equatable { + public static let sharedDefault = true + + public var shared: Bool + public var orderHint: Int? + public var isShown: Bool? + + public init( + shared: Bool = true, + orderHint: Int?, + isShown: Bool? + ) { + self.shared = shared + self.orderHint = orderHint + self.isShown = isShown + } } public struct SimulateLocation: Equatable { @@ -381,6 +402,35 @@ extension Scheme.SimulateLocation: JSONEncodable { } } +extension Scheme.Management: JSONObjectConvertible { + + public init(jsonDictionary: JSONDictionary) throws { + shared = jsonDictionary.json(atKeyPath: "shared") ?? Scheme.Management.sharedDefault + orderHint = jsonDictionary.json(atKeyPath: "orderHint") + isShown = jsonDictionary.json(atKeyPath: "isShown") + } +} + +extension Scheme.Management: JSONEncodable { + public func toJSONValue() -> Any { + var dict: [String: Any?] = [:] + + if shared != Scheme.Management.sharedDefault { + dict["shared"] = isShown + } + + if let isShown = isShown { + dict["isShown"] = isShown + } + + if let orderHint = orderHint { + dict["orderHint"] = orderHint + } + + return dict + } +} + extension Scheme.Run: JSONObjectConvertible { public init(jsonDictionary: JSONDictionary) throws { @@ -647,6 +697,7 @@ extension Scheme: NamedJSONDictionaryConvertible { analyze = jsonDictionary.json(atKeyPath: "analyze") profile = jsonDictionary.json(atKeyPath: "profile") archive = jsonDictionary.json(atKeyPath: "archive") + management = jsonDictionary.json(atKeyPath: "management") } } @@ -659,6 +710,7 @@ extension Scheme: JSONEncodable { "analyze": analyze?.toJSONValue(), "profile": profile?.toJSONValue(), "archive": archive?.toJSONValue(), + "management": management?.toJSONValue(), ] as [String: Any?] } } diff --git a/Sources/ProjectSpec/TargetScheme.swift b/Sources/ProjectSpec/TargetScheme.swift index 829c76d9..58166f41 100644 --- a/Sources/ProjectSpec/TargetScheme.swift +++ b/Sources/ProjectSpec/TargetScheme.swift @@ -4,7 +4,6 @@ import XcodeProj public struct TargetScheme: Equatable { public static let gatherCoverageDataDefault = false - public static let isShownDefault = true public static let disableMainThreadCheckerDefault = false public static let stopOnEveryMainThreadCheckerIssueDefault = false public static let buildImplicitDependenciesDefault = true @@ -13,7 +12,6 @@ public struct TargetScheme: Equatable { public var testTargets: [Scheme.Test.TestTarget] public var configVariants: [String] public var gatherCoverageData: Bool - public var isShown: Bool public var storeKitConfiguration: String? public var language: String? public var region: String? @@ -32,7 +30,6 @@ public struct TargetScheme: Equatable { testTargets: [Scheme.Test.TestTarget] = [], configVariants: [String] = [], gatherCoverageData: Bool = gatherCoverageDataDefault, - isShown: Bool = isShownDefault, storeKitConfiguration: String? = nil, language: String? = nil, region: String? = nil, @@ -50,7 +47,6 @@ public struct TargetScheme: Equatable { self.testTargets = testTargets self.configVariants = configVariants self.gatherCoverageData = gatherCoverageData - self.isShown = isShown self.storeKitConfiguration = storeKitConfiguration self.language = language self.region = region @@ -68,10 +64,11 @@ public struct TargetScheme: Equatable { } public var management: Scheme.Management? { - if shared != TargetScheme.sharedDefault || orderHint != nil || isShown != nil { - return Scheme.Management(shared: shared,orderHint: orderHint,isShown: isShown) + guard shared != TargetScheme.sharedDefault || orderHint != nil || isShown != nil else { + return nil } - return nil + + return Scheme.Management(shared: shared,orderHint: orderHint,isShown: isShown) } } @@ -93,7 +90,6 @@ extension TargetScheme: JSONObjectConvertible { } configVariants = jsonDictionary.json(atKeyPath: "configVariants") ?? [] gatherCoverageData = jsonDictionary.json(atKeyPath: "gatherCoverageData") ?? TargetScheme.gatherCoverageDataDefault - isShown = jsonDictionary.json(atKeyPath: "isShown") ?? TargetScheme.isShownDefault storeKitConfiguration = jsonDictionary.json(atKeyPath: "storeKitConfiguration") language = jsonDictionary.json(atKeyPath: "language") region = jsonDictionary.json(atKeyPath: "region") @@ -124,10 +120,6 @@ extension TargetScheme: JSONEncodable { if gatherCoverageData != TargetScheme.gatherCoverageDataDefault { dict["gatherCoverageData"] = gatherCoverageData } - - if isShown != TargetScheme.isShownDefault { - dict["isShown"] = isShown - } if let storeKitConfiguration = storeKitConfiguration { dict["storeKitConfiguration"] = storeKitConfiguration diff --git a/Sources/XcodeGenKit/ProjectGenerator.swift b/Sources/XcodeGenKit/ProjectGenerator.swift index 3a681aaf..2116d714 100644 --- a/Sources/XcodeGenKit/ProjectGenerator.swift +++ b/Sources/XcodeGenKit/ProjectGenerator.swift @@ -35,9 +35,9 @@ public class ProjectGenerator { let userStateSchemes = project.targets.map { target -> XCSchemeManagement.UserStateScheme in XCSchemeManagement.UserStateScheme( name: target.name + ".xcscheme", - shared: true, - orderHint: nil, - isShown: target.scheme?.isShown ?? TargetScheme.isShownDefault + shared: target.scheme?.shared ?? TargetScheme.sharedDefault, + orderHint: target.scheme?.orderHint, + isShown: target.scheme?.isShown ?? nil ) } From 0a25f257492cc933fb3031ad45028cacd487041b Mon Sep 17 00:00:00 2001 From: Tieme van Veen Date: Thu, 21 Oct 2021 13:41:25 +0200 Subject: [PATCH 4/4] Added Scheme.Management for metadata --- Docs/ProjectSpec.md | 5 +++++ Sources/ProjectSpec/Scheme.swift | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index fc03708d..b1359449 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -757,6 +757,7 @@ Schemes allows for more control than the convenience [Target Scheme](#target-sch - [ ] ***profile***: The profile action - [ ] ***analyze***: The analyze action - [ ] ***archive***: The archive action +- [ ] ***management***: **[Scheme Management](#scheme-management)]** - Scheme management metadata ### Build @@ -874,6 +875,10 @@ targets: Note that the path the gpx file will be prefixed according to the `schemePathPrefix` option in order to support both `.xcodeproj` and `.xcworkspace` setups. See [Options](#options). +### Scheme Management +- [x] **shared**: **Bool** - indicates whether the scheme is shared +- [x] **orderHint**: **Int** - used by Xcode to sort the schemes +- [x] **isShown**: **Bool** - indicates whether the sheme is shown in the scheme list ### Environment Variable diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index aaf2f191..120f2a06 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -35,14 +35,14 @@ public struct Scheme: Equatable { self.archive = archive self.management = management } - + public struct Management: Equatable { public static let sharedDefault = true - + public var shared: Bool public var orderHint: Int? public var isShown: Bool? - + public init( shared: Bool = true, orderHint: Int?,