From 20a99e50185e859d289eee156d78caeb20d98fd3 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 4 Aug 2020 09:14:32 +1000 Subject: [PATCH 001/284] Add FileTypes for cross project file options (#914) * move BuildPhase * add fileTypes * update changelog --- CHANGELOG.md | 3 +- Docs/ProjectSpec.md | 10 ++ Sources/ProjectSpec/BuildPhaseSpec.swift | 148 +++++++++++++++++ Sources/ProjectSpec/FileType.swift | 114 +++++++++++++ Sources/ProjectSpec/SourceType.swift | 14 ++ Sources/ProjectSpec/SpecOptions.swift | 9 + Sources/ProjectSpec/TargetSource.swift | 154 +----------------- Sources/XcodeGenKit/PBXProjGenerator.swift | 8 +- Sources/XcodeGenKit/SourceGenerator.swift | 107 ++++++------ .../Fixtures/TestProject/App_iOS/Resource.abc | 0 .../App_iOS/Resource.abcd/File.json | 0 .../Project.xcodeproj/project.pbxproj | 4 + Tests/Fixtures/TestProject/project.yml | 5 + Tests/ProjectSpecTests/SpecLoadingTests.swift | 13 ++ .../SourceGeneratorTests.swift | 81 +++++++-- 15 files changed, 448 insertions(+), 222 deletions(-) create mode 100644 Sources/ProjectSpec/BuildPhaseSpec.swift create mode 100644 Sources/ProjectSpec/FileType.swift create mode 100644 Sources/ProjectSpec/SourceType.swift create mode 100644 Tests/Fixtures/TestProject/App_iOS/Resource.abc create mode 100644 Tests/Fixtures/TestProject/App_iOS/Resource.abcd/File.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 14a06745d..1e8c39616 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ ## Next Version #### Added -- Add `onlyCopyFilesOnInstall` option to targets for the Embed Files build phase. [#912](https://github.com/yonaskolb/XcodeGen/pull/912) @jsorge +- Added `options.fileTypes` which lets you set cross project defaults for certain file extensions [#914](https://github.com/yonaskolb/XcodeGen/pull/914) @yonaskolb +- Added `onlyCopyFilesOnInstall` option to targets for the Embed Files build phase. [#912](https://github.com/yonaskolb/XcodeGen/pull/912) @jsorge #### Fixed - Treat all directories with known UTI as file wrapper. [#896](https://github.com/yonaskolb/XcodeGen/pull/896) @KhaosT diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index cfbe09878..9853d5cdb 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -123,6 +123,7 @@ Note that target names can also be changed by adding a `name` property to a targ - [ ] **generateEmptyDirectories**: **Bool** - If this is `true` then empty directories will be added to project too else will be missed. Defaults to `false`. - [ ] **findCarthageFrameworks**: **Bool** - When this is set to `true`, all the invididual frameworks for Carthage dependencies will automatically be found. This property can be overriden individually for each carthage dependency - for more details see See **findFrameworks** in the [Dependency](#dependency) section. Defaults to `false`. - [ ] **localPackagesGroup**: **String** - The group name that local packages are put into. This defaults to `Packages` +- [ ] **fileTypes**: **[String: [FileType](#filetype)]** - A list of default file options for specific file extensions across the project. Values in [Sources](#sources) will overwrite these settings. - [ ] **preGenCommand**: **String** - A bash command to run before the project has been generated. If the project isn't generated due to no changes when using the cache then this won't run. This is useful for running things like generating resources files before the project is regenerated. - [ ] **postGenCommand**: **String** - A bash command to run after the project has been generated. If the project isn't generated due to no changes when using the cache then this won't run. This is useful for running things like `pod install` only if the project is actually regenerated. @@ -151,6 +152,15 @@ options: In this example, we set up the order of two groups. First one is the main group, i.e. the project, note that in this case, we shouldn't set `pattern` option and the second group order is for groups whose names ends with `Screen`. +### FileType +Default settings for file extensions. See [Sources](#sources) for more documentation on properties. If you overwrite an extension that XcodeGen already provides by default, you will need to provide all the settings. + +- [ ] **file**: **Bool** - Whether this extension should be treated like a file. Defaults to true. +- [ ] **buildPhase**: **String** - The default build phase. +- [ ] **attributes**: **[String]** - Additional settings attributes that will be applied to any build files. +- [ ] **resourceTags**: **[String]** - On Demand Resource Tags that will be applied to any resources. This also adds to the project attribute's knownAssetTags. +- [ ] **compilerFlags**: **[String]** - A list of compiler flags to add. + ### Configs Each config maps to a build type of either `debug` or `release` which will then apply default build settings to the project. Any value other than `debug` or `release` (for example `none`), will mean no default build settings will be applied to the project. diff --git a/Sources/ProjectSpec/BuildPhaseSpec.swift b/Sources/ProjectSpec/BuildPhaseSpec.swift new file mode 100644 index 000000000..716e1bec8 --- /dev/null +++ b/Sources/ProjectSpec/BuildPhaseSpec.swift @@ -0,0 +1,148 @@ +// +// File.swift +// +// +// Created by Yonas Kolb on 1/5/20. +// + +import Foundation +import XcodeProj +import JSONUtilities + +public enum BuildPhaseSpec: Equatable { + case sources + case headers + case resources + case copyFiles(CopyFilesSettings) + case none + // Not currently exposed as selectable options, but used internally + case frameworks + case runScript + case carbonResources + + public struct CopyFilesSettings: Equatable, Hashable { + public static let xpcServices = CopyFilesSettings( + destination: .productsDirectory, + subpath: "$(CONTENTS_FOLDER_PATH)/XPCServices", + phaseOrder: .postCompile + ) + + public enum Destination: String { + case absolutePath + case productsDirectory + case wrapper + case executables + case resources + case javaResources + case frameworks + case sharedFrameworks + case sharedSupport + case plugins + + public var destination: PBXCopyFilesBuildPhase.SubFolder? { + switch self { + case .absolutePath: return .absolutePath + case .productsDirectory: return .productsDirectory + case .wrapper: return .wrapper + case .executables: return .executables + case .resources: return .resources + case .javaResources: return .javaResources + case .frameworks: return .frameworks + case .sharedFrameworks: return .sharedFrameworks + case .sharedSupport: return .sharedSupport + case .plugins: return .plugins + } + } + } + + public enum PhaseOrder: String { + /// Run before the Compile Sources phase + case preCompile + /// Run after the Compile Sources and post-compile Run Script phases + case postCompile + } + + public var destination: Destination + public var subpath: String + public var phaseOrder: PhaseOrder + + public init( + destination: Destination, + subpath: String, + phaseOrder: PhaseOrder + ) { + self.destination = destination + self.subpath = subpath + self.phaseOrder = phaseOrder + } + } + + public var buildPhase: BuildPhase? { + switch self { + case .sources: return .sources + case .headers: return .headers + case .resources: return .resources + case .copyFiles: return .copyFiles + case .frameworks: return .frameworks + case .runScript: return .runScript + case .carbonResources: return .carbonResources + case .none: return nil + } + } +} + +extension BuildPhaseSpec { + + public init(string: String) throws { + switch string { + case "sources": self = .sources + case "headers": self = .headers + case "resources": self = .resources + case "copyFiles": + throw SpecParsingError.invalidSourceBuildPhase("copyFiles must specify a \"destination\" and optional \"subpath\"") + case "none": self = .none + default: + throw SpecParsingError.invalidSourceBuildPhase(string.quoted) + } + } +} + +extension BuildPhaseSpec: JSONObjectConvertible { + + public init(jsonDictionary: JSONDictionary) throws { + self = .copyFiles(try jsonDictionary.json(atKeyPath: "copyFiles")) + } +} + +extension BuildPhaseSpec: JSONEncodable { + public func toJSONValue() -> Any { + switch self { + case .sources: return "sources" + case .headers: return "headers" + case .resources: return "resources" + case .copyFiles(let files): return ["copyFiles": files.toJSONValue()] + case .none: return "none" + case .frameworks: fatalError("invalid build phase") + case .runScript: fatalError("invalid build phase") + case .carbonResources: fatalError("invalid build phase") + } + } +} + +extension BuildPhaseSpec.CopyFilesSettings: JSONObjectConvertible { + + public init(jsonDictionary: JSONDictionary) throws { + destination = try jsonDictionary.json(atKeyPath: "destination") + subpath = jsonDictionary.json(atKeyPath: "subpath") ?? "" + phaseOrder = .postCompile + } +} + +extension BuildPhaseSpec.CopyFilesSettings: JSONEncodable { + public func toJSONValue() -> Any { + [ + "destination": destination.rawValue, + "subpath": subpath, + ] + } +} diff --git a/Sources/ProjectSpec/FileType.swift b/Sources/ProjectSpec/FileType.swift new file mode 100644 index 000000000..bc535a1d2 --- /dev/null +++ b/Sources/ProjectSpec/FileType.swift @@ -0,0 +1,114 @@ +// +// File.swift +// +// +// Created by Yonas Kolb on 1/5/20. +// + +import Foundation +import JSONUtilities +import enum XcodeProj.BuildPhase + +public struct FileType: Equatable { + + public enum Defaults { + public static let file = true + } + + public var file: Bool + public var buildPhase: BuildPhaseSpec? + public var attributes: [String] + public var resourceTags: [String] + public var compilerFlags: [String] + + public init( + file: Bool = Defaults.file, + buildPhase: BuildPhaseSpec? = nil, + attributes: [String] = [], + resourceTags: [String] = [], + compilerFlags: [String] = [] + ) { + self.file = file + self.buildPhase = buildPhase + self.attributes = attributes + self.resourceTags = resourceTags + self.compilerFlags = compilerFlags + } +} + +extension FileType: JSONObjectConvertible { + public init(jsonDictionary: JSONDictionary) throws { + if let string: String = jsonDictionary.json(atKeyPath: "buildPhase") { + buildPhase = try BuildPhaseSpec(string: string) + } else if let dict: JSONDictionary = jsonDictionary.json(atKeyPath: "buildPhase") { + buildPhase = try BuildPhaseSpec(jsonDictionary: dict) + } + file = jsonDictionary.json(atKeyPath: "file") ?? Defaults.file + attributes = jsonDictionary.json(atKeyPath: "attributes") ?? [] + resourceTags = jsonDictionary.json(atKeyPath: "resourceTags") ?? [] + compilerFlags = jsonDictionary.json(atKeyPath: "compilerFlags") ?? [] + } +} + +extension FileType: JSONEncodable { + public func toJSONValue() -> Any { + var dict: [String: Any?] = [ + "buildPhase": buildPhase?.toJSONValue(), + "attributes": attributes, + "resourceTags": resourceTags, + "compilerFlags": compilerFlags, + ] + if file != Defaults.file { + dict["file"] = file + } + return dict + } +} + +extension FileType { + + public static let defaultFileTypes: [String: FileType] = [ + // resources + "bundle": FileType(buildPhase: .resources), + "xcassets": FileType(buildPhase: .resources), + + // sources + "swift": FileType(buildPhase: .sources), + "m": FileType(buildPhase: .sources), + "mm": FileType(buildPhase: .sources), + "cpp": FileType(buildPhase: .sources), + "c": FileType(buildPhase: .sources), + "cc": FileType(buildPhase: .sources), + "S": FileType(buildPhase: .sources), + "xcdatamodeld": FileType(buildPhase: .sources), + "xcmappingmodel": FileType(buildPhase: .sources), + "intentdefinition": FileType(buildPhase: .sources), + "metal": FileType(buildPhase: .sources), + "mlmodel": FileType(buildPhase: .sources), + "rcproject": FileType(buildPhase: .sources), + + // headers + "h": FileType(buildPhase: .headers), + "hh": FileType(buildPhase: .headers), + "hpp": FileType(buildPhase: .headers), + "ipp": FileType(buildPhase: .headers), + "tpp": FileType(buildPhase: .headers), + "hxx": FileType(buildPhase: .headers), + "def": FileType(buildPhase: .headers), + + // frameworks + "framework": FileType(buildPhase: .frameworks), + + // copyfiles + "xpc": FileType(buildPhase: .copyFiles(.xpcServices)), + + // no build phase (not resources) + "xcconfig": FileType(buildPhase: BuildPhaseSpec.none), + "entitlements": FileType(buildPhase: BuildPhaseSpec.none), + "gpx": FileType(buildPhase: BuildPhaseSpec.none), + "lproj": FileType(buildPhase: BuildPhaseSpec.none), + "xcfilelist": FileType(buildPhase: BuildPhaseSpec.none), + "apns": FileType(buildPhase: BuildPhaseSpec.none), + "pch": FileType(buildPhase: BuildPhaseSpec.none), + ] +} diff --git a/Sources/ProjectSpec/SourceType.swift b/Sources/ProjectSpec/SourceType.swift new file mode 100644 index 000000000..77ce4ffe7 --- /dev/null +++ b/Sources/ProjectSpec/SourceType.swift @@ -0,0 +1,14 @@ +// +// File.swift +// +// +// Created by Yonas Kolb on 1/5/20. +// + +import Foundation + +public enum SourceType: String { + case group + case file + case folder +} diff --git a/Sources/ProjectSpec/SpecOptions.swift b/Sources/ProjectSpec/SpecOptions.swift index 237f2b56b..b2d35a9d7 100644 --- a/Sources/ProjectSpec/SpecOptions.swift +++ b/Sources/ProjectSpec/SpecOptions.swift @@ -27,6 +27,7 @@ public struct SpecOptions: Equatable { public var transitivelyLinkDependencies: Bool public var groupSortPosition: GroupSortPosition public var groupOrdering: [GroupOrdering] + public var fileTypes: [String: FileType] public var generateEmptyDirectories: Bool public var findCarthageFrameworks: Bool public var localPackagesGroup: String? @@ -87,6 +88,7 @@ public struct SpecOptions: Equatable { transitivelyLinkDependencies: Bool = transitivelyLinkDependenciesDefault, groupSortPosition: GroupSortPosition = groupSortPositionDefault, groupOrdering: [GroupOrdering] = [], + fileTypes: [String: FileType] = [:], generateEmptyDirectories: Bool = generateEmptyDirectoriesDefault, findCarthageFrameworks: Bool = findCarthageFrameworksDefault, localPackagesGroup: String? = nil, @@ -110,6 +112,7 @@ public struct SpecOptions: Equatable { self.transitivelyLinkDependencies = transitivelyLinkDependencies self.groupSortPosition = groupSortPosition self.groupOrdering = groupOrdering + self.fileTypes = fileTypes self.generateEmptyDirectories = generateEmptyDirectories self.findCarthageFrameworks = findCarthageFrameworks self.localPackagesGroup = localPackagesGroup @@ -146,6 +149,11 @@ extension SpecOptions: JSONObjectConvertible { localPackagesGroup = jsonDictionary.json(atKeyPath: "localPackagesGroup") preGenCommand = jsonDictionary.json(atKeyPath: "preGenCommand") postGenCommand = jsonDictionary.json(atKeyPath: "postGenCommand") + if jsonDictionary["fileTypes"] != nil { + fileTypes = try jsonDictionary.json(atKeyPath: "fileTypes") + } else { + fileTypes = [:] + } } } @@ -169,6 +177,7 @@ extension SpecOptions: JSONEncodable { "localPackagesGroup": localPackagesGroup, "preGenCommand": preGenCommand, "postGenCommand": postGenCommand, + "fileTypes": fileTypes ] if settingPresets != SpecOptions.settingPresetsDefault { diff --git a/Sources/ProjectSpec/TargetSource.swift b/Sources/ProjectSpec/TargetSource.swift index 8c55b7875..2a75f3bf4 100644 --- a/Sources/ProjectSpec/TargetSource.swift +++ b/Sources/ProjectSpec/TargetSource.swift @@ -1,8 +1,6 @@ import Foundation import JSONUtilities import PathKit -import enum XcodeProj.BuildPhase -import class XcodeProj.PBXCopyFilesBuildPhase public struct TargetSource: Equatable { public static let optionalDefault = false @@ -15,7 +13,7 @@ public struct TargetSource: Equatable { public var includes: [String] public var type: SourceType? public var optional: Bool - public var buildPhase: BuildPhase? + public var buildPhase: BuildPhaseSpec? public var headerVisibility: HeaderVisibility? public var createIntermediateGroups: Bool? public var attributes: [String] @@ -35,94 +33,6 @@ public struct TargetSource: Equatable { } } - public enum BuildPhase: Equatable { - case sources - case headers - case resources - case copyFiles(CopyFilesSettings) - case none - // Not currently exposed as selectable options, but used internally - case frameworks - case runScript - case carbonResources - - public struct CopyFilesSettings: Equatable, Hashable { - public static let xpcServices = CopyFilesSettings( - destination: .productsDirectory, - subpath: "$(CONTENTS_FOLDER_PATH)/XPCServices", - phaseOrder: .postCompile - ) - - public enum Destination: String { - case absolutePath - case productsDirectory - case wrapper - case executables - case resources - case javaResources - case frameworks - case sharedFrameworks - case sharedSupport - case plugins - - public var destination: PBXCopyFilesBuildPhase.SubFolder? { - switch self { - case .absolutePath: return .absolutePath - case .productsDirectory: return .productsDirectory - case .wrapper: return .wrapper - case .executables: return .executables - case .resources: return .resources - case .javaResources: return .javaResources - case .frameworks: return .frameworks - case .sharedFrameworks: return .sharedFrameworks - case .sharedSupport: return .sharedSupport - case .plugins: return .plugins - } - } - } - - public enum PhaseOrder: String { - /// Run before the Compile Sources phase - case preCompile - /// Run after the Compile Sources and post-compile Run Script phases - case postCompile - } - - public var destination: Destination - public var subpath: String - public var phaseOrder: PhaseOrder - - public init( - destination: Destination, - subpath: String, - phaseOrder: PhaseOrder - ) { - self.destination = destination - self.subpath = subpath - self.phaseOrder = phaseOrder - } - } - - public var buildPhase: XcodeProj.BuildPhase? { - switch self { - case .sources: return .sources - case .headers: return .headers - case .resources: return .resources - case .copyFiles: return .copyFiles - case .frameworks: return .frameworks - case .runScript: return .runScript - case .carbonResources: return .carbonResources - case .none: return nil - } - } - } - - public enum SourceType: String { - case group - case file - case folder - } - public init( path: String, name: String? = nil, @@ -132,7 +42,7 @@ public struct TargetSource: Equatable { includes: [String] = [], type: SourceType? = nil, optional: Bool = optionalDefault, - buildPhase: BuildPhase? = nil, + buildPhase: BuildPhaseSpec? = nil, headerVisibility: HeaderVisibility? = nil, createIntermediateGroups: Bool? = nil, attributes: [String] = [], @@ -188,9 +98,9 @@ extension TargetSource: JSONObjectConvertible { optional = jsonDictionary.json(atKeyPath: "optional") ?? TargetSource.optionalDefault if let string: String = jsonDictionary.json(atKeyPath: "buildPhase") { - buildPhase = try BuildPhase(string: string) + buildPhase = try BuildPhaseSpec(string: string) } else if let dict: JSONDictionary = jsonDictionary.json(atKeyPath: "buildPhase") { - buildPhase = try BuildPhase(jsonDictionary: dict) + buildPhase = try BuildPhaseSpec(jsonDictionary: dict) } createIntermediateGroups = jsonDictionary.json(atKeyPath: "createIntermediateGroups") @@ -228,62 +138,6 @@ extension TargetSource: JSONEncodable { } } -extension TargetSource.BuildPhase { - - public init(string: String) throws { - switch string { - case "sources": self = .sources - case "headers": self = .headers - case "resources": self = .resources - case "copyFiles": - throw SpecParsingError.invalidSourceBuildPhase("copyFiles must specify a \"destination\" and optional \"subpath\"") - case "none": self = .none - default: - throw SpecParsingError.invalidSourceBuildPhase(string.quoted) - } - } -} - -extension TargetSource.BuildPhase: JSONObjectConvertible { - - public init(jsonDictionary: JSONDictionary) throws { - self = .copyFiles(try jsonDictionary.json(atKeyPath: "copyFiles")) - } -} - -extension TargetSource.BuildPhase: JSONEncodable { - public func toJSONValue() -> Any { - switch self { - case .sources: return "sources" - case .headers: return "headers" - case .resources: return "resources" - case .copyFiles(let files): return ["copyFiles": files.toJSONValue()] - case .none: return "none" - case .frameworks: fatalError("invalid build phase") - case .runScript: fatalError("invalid build phase") - case .carbonResources: fatalError("invalid build phase") - } - } -} - -extension TargetSource.BuildPhase.CopyFilesSettings: JSONObjectConvertible { - - public init(jsonDictionary: JSONDictionary) throws { - destination = try jsonDictionary.json(atKeyPath: "destination") - subpath = jsonDictionary.json(atKeyPath: "subpath") ?? "" - phaseOrder = .postCompile - } -} - -extension TargetSource.BuildPhase.CopyFilesSettings: JSONEncodable { - public func toJSONValue() -> Any { - [ - "destination": destination.rawValue, - "subpath": subpath, - ] - } -} - extension TargetSource: PathContainer { static var pathProperties: [PathProperty] { diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 8049cdc1d..c0c61c74b 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -476,7 +476,7 @@ public class PBXProjGenerator { return addObject(shellScriptPhase) } - func generateCopyFiles(targetName: String, copyFiles: TargetSource.BuildPhase.CopyFilesSettings, buildPhaseFiles: [PBXBuildFile]) -> PBXCopyFilesBuildPhase { + func generateCopyFiles(targetName: String, copyFiles: BuildPhaseSpec.CopyFilesSettings, buildPhaseFiles: [PBXBuildFile]) -> PBXCopyFilesBuildPhase { let copyFilesBuildPhase = PBXCopyFilesBuildPhase( dstPath: copyFiles.subpath, dstSubfolderSpec: copyFiles.destination.destination, @@ -644,7 +644,7 @@ public class PBXProjGenerator { var dependencies: [PBXTargetDependency] = [] var targetFrameworkBuildFiles: [PBXBuildFile] = [] var frameworkBuildPaths = Set() - var copyFilesBuildPhasesFiles: [TargetSource.BuildPhase.CopyFilesSettings: [PBXBuildFile]] = [:] + var copyFilesBuildPhasesFiles: [BuildPhaseSpec.CopyFilesSettings: [PBXBuildFile]] = [:] var copyFrameworksReferences: [PBXBuildFile] = [] var copyResourcesReferences: [PBXBuildFile] = [] var copyBundlesReferences: [PBXBuildFile] = [] @@ -955,8 +955,8 @@ public class PBXProjGenerator { return getBuildFilesForSourceFiles(filteredSourceFiles) } - func getBuildFilesForCopyFilesPhases() -> [TargetSource.BuildPhase.CopyFilesSettings: [PBXBuildFile]] { - var sourceFilesByCopyFiles: [TargetSource.BuildPhase.CopyFilesSettings: [SourceFile]] = [:] + func getBuildFilesForCopyFilesPhases() -> [BuildPhaseSpec.CopyFilesSettings: [PBXBuildFile]] { + var sourceFilesByCopyFiles: [BuildPhaseSpec.CopyFilesSettings: [SourceFile]] = [:] for sourceFile in sourceFiles { guard case let .copyFiles(copyFilesSettings)? = sourceFile.buildPhase else { continue } sourceFilesByCopyFiles[copyFilesSettings, default: []].append(sourceFile) diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index 481ed3b9c..17255a904 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -8,7 +8,7 @@ struct SourceFile { let path: Path let fileReference: PBXFileElement let buildFile: PBXBuildFile - let buildPhase: TargetSource.BuildPhase? + let buildPhase: BuildPhaseSpec? } class SourceGenerator { @@ -87,11 +87,22 @@ class SourceGenerator { _ = try getSourceFiles(targetType: .none, targetSource: TargetSource(path: path), path: fullPath) } - func generateSourceFile(targetType: PBXProductType, targetSource: TargetSource, path: Path, buildPhase: TargetSource.BuildPhase? = nil, fileReference: PBXFileElement? = nil) -> SourceFile { + func getFileType(path: Path) -> FileType? { + if let fileExtension = path.extension { + return project.options.fileTypes[fileExtension] ?? FileType.defaultFileTypes[fileExtension] + } else { + return nil + } + } + + func generateSourceFile(targetType: PBXProductType, targetSource: TargetSource, path: Path, buildPhase: BuildPhaseSpec? = nil, fileReference: PBXFileElement? = nil) -> SourceFile { let fileReference = fileReference ?? fileReferencesByPath[path.string.lowercased()]! var settings: [String: Any] = [:] - var attributes: [String] = targetSource.attributes - var chosenBuildPhase: TargetSource.BuildPhase? + let fileType = getFileType(path: path) + var attributes: [String] = targetSource.attributes + (fileType?.attributes ?? []) + var chosenBuildPhase: BuildPhaseSpec? + var compilerFlags: String = "" + let assetTags: [String] = targetSource.resourceTags + (fileType?.resourceTags ?? []) let headerVisibility = targetSource.headerVisibility ?? .public @@ -107,7 +118,7 @@ class SourceGenerator { // Static libraries don't support the header build phase // For public headers they need to be copied if headerVisibility == .public { - chosenBuildPhase = .copyFiles(TargetSource.BuildPhase.CopyFilesSettings( + chosenBuildPhase = .copyFiles(BuildPhaseSpec.CopyFilesSettings( destination: .productsDirectory, subpath: "include/$(PRODUCT_NAME)", phaseOrder: .preCompile @@ -123,16 +134,28 @@ class SourceGenerator { attributes.append(headerVisibility.settingName) } } - if chosenBuildPhase == .sources && targetSource.compilerFlags.count > 0 { - settings["COMPILER_FLAGS"] = targetSource.compilerFlags.joined(separator: " ") + + if let flags = fileType?.compilerFlags { + compilerFlags += flags.joined(separator: " ") + } + + if !targetSource.compilerFlags.isEmpty { + if !compilerFlags.isEmpty { + compilerFlags += " " + } + compilerFlags += targetSource.compilerFlags.joined(separator: " ") + } + + if chosenBuildPhase == .sources && !compilerFlags.isEmpty { + settings["COMPILER_FLAGS"] = compilerFlags } if !attributes.isEmpty { settings["ATTRIBUTES"] = attributes } - - if chosenBuildPhase == .resources && !targetSource.resourceTags.isEmpty { - settings["ASSET_TAGS"] = targetSource.resourceTags + + if chosenBuildPhase == .resources && !assetTags.isEmpty { + settings["ASSET_TAGS"] = assetTags } let buildFile = PBXBuildFile(file: fileReference, settings: settings.isEmpty ? nil : settings) @@ -226,53 +249,22 @@ class SourceGenerator { } /// returns a default build phase for a given path. This is based off the filename - private func getDefaultBuildPhase(for path: Path, targetType: PBXProductType) -> TargetSource.BuildPhase? { + private func getDefaultBuildPhase(for path: Path, targetType: PBXProductType) -> BuildPhaseSpec? { if path.lastComponent == "Info.plist" { return nil } + if let buildPhase = getFileType(path: path)?.buildPhase { + return buildPhase + } if let fileExtension = path.extension { switch fileExtension { - case "swift", - "m", - "mm", - "cpp", - "c", - "cc", - "S", - "xcdatamodeld", - "xcmappingmodel", - "intentdefinition", - "metal", - "mlmodel", - "rcproject": - return .sources - case "h", - "hh", - "hpp", - "ipp", - "tpp", - "hxx", - "def": - return .headers case "modulemap": guard targetType == .staticLibrary else { return nil } - return .copyFiles(TargetSource.BuildPhase.CopyFilesSettings( + return .copyFiles(BuildPhaseSpec.CopyFilesSettings( destination: .productsDirectory, subpath: "include/$(PRODUCT_NAME)", phaseOrder: .preCompile )) - case "framework": - return .frameworks - case "xpc": - return .copyFiles(.xpcServices) - case "xcconfig", - "entitlements", - "gpx", - "lproj", - "xcfilelist", - "apns", - "pch": - return nil default: return .resources } @@ -414,13 +406,24 @@ class SourceGenerator { let children = try getSourceChildren(targetSource: targetSource, dirPath: path, excludePaths: excludePaths, includePaths: includePaths) let createIntermediateGroups = targetSource.createIntermediateGroups ?? project.options.createIntermediateGroups + let nonLocalizedChildren = children.filter { $0.extension != "lproj" } - let directories = children - .filter { $0.isDirectory && !Xcode.isDirectoryFileWrapper(path: $0) && $0.extension != "lproj" } + let directories = nonLocalizedChildren + .filter { + if let fileType = getFileType(path: $0) { + return !fileType.file + } else { + return $0.isDirectory && !Xcode.isDirectoryFileWrapper(path: $0) + } + } - let filePaths = children - .filter { $0.isFile || $0.isDirectory && $0.extension != "lproj" - && Xcode.isDirectoryFileWrapper(path: $0) + let filePaths = nonLocalizedChildren + .filter { + if let fileType = getFileType(path: $0) { + return fileType.file + } else { + return $0.isFile || $0.isDirectory && Xcode.isDirectoryFileWrapper(path: $0) + } } let localisedDirectories = children @@ -576,7 +579,7 @@ class SourceGenerator { rootGroups.insert(fileReference) } - let buildPhase: TargetSource.BuildPhase? + let buildPhase: BuildPhaseSpec? if let targetBuildPhase = targetSource.buildPhase { buildPhase = targetBuildPhase } else { diff --git a/Tests/Fixtures/TestProject/App_iOS/Resource.abc b/Tests/Fixtures/TestProject/App_iOS/Resource.abc new file mode 100644 index 000000000..e69de29bb diff --git a/Tests/Fixtures/TestProject/App_iOS/Resource.abcd/File.json b/Tests/Fixtures/TestProject/App_iOS/Resource.abcd/File.json new file mode 100644 index 000000000..e69de29bb diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 7fe07ec4b..96e72c628 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -467,6 +467,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 01E6934B571B91EAAFF0EDCB /* Resource.abc */ = {isa = PBXFileReference; path = Resource.abc; sourceTree = ""; }; 020E4DA91C9132845CAFDC5D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = ""; }; 039F208D1138598CE060F140 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 03D6D1E34022DA9524E5B38D /* Mintfile */ = {isa = PBXFileReference; path = Mintfile; sourceTree = ""; }; @@ -495,6 +496,7 @@ 2A5F527F2590C14956518174 /* FrameworkFile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrameworkFile.swift; sourceTree = ""; }; 2E1E747C7BC434ADB80CC269 /* Headers */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Headers; sourceTree = SOURCE_ROOT; }; 2F430AABE04B7499B458D9DB /* SwiftFileInDotPath.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftFileInDotPath.swift; sourceTree = ""; }; + 325F18855099386B08DD309B /* Resource.abcd */ = {isa = PBXFileReference; path = Resource.abcd; sourceTree = ""; }; 33F6DCDC37D2E66543D4965D /* App_macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App_macOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; 34F13B632328979093CE6056 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 3571E41E19A5AB8AAAB04109 /* StandaloneAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = StandaloneAssets.xcassets; sourceTree = ""; }; @@ -726,6 +728,8 @@ BF59AC868D227C92CA8B1B57 /* Model.xcmappingmodel */, C7809CE9FE9852C2AA87ACE5 /* module.modulemap */, 553D289724905857912C7A1D /* outputList.xcfilelist */, + 01E6934B571B91EAAFF0EDCB /* Resource.abc */, + 325F18855099386B08DD309B /* Resource.abcd */, 8AF20308873AEEEC4D8C45D1 /* Settings.bundle */, 0704B6CAFBB53E0EBB08F6B3 /* ViewController.swift */, ); diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index fe352a0c8..793b31718 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -11,6 +11,11 @@ options: groupSortPosition: top preGenCommand: echo "This is a pre-gen command" postGenCommand: scripts/script.sh + fileTypes: + abc: + buildPhase: none + abcd: + buildPhase: none fileGroups: - Configs - FileGroup diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 82e5a1826..26635e76c 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -1110,6 +1110,12 @@ class SpecLoadingTests: XCTestCase { watchOS: "3.0", macOS: "10.12.1" ), + fileTypes: ["abc": FileType( + file: false, + buildPhase: .sources, + attributes: ["a1", "a2"], + resourceTags: ["r1", "r2"], + compilerFlags: ["c1", "c2"])], findCarthageFrameworks: true, preGenCommand: "swiftgen", postGenCommand: "pod install" @@ -1125,6 +1131,13 @@ class SpecLoadingTests: XCTestCase { "findCarthageFrameworks": true, "preGenCommand": "swiftgen", "postGenCommand": "pod install", + "fileTypes": ["abc": [ + "file": false, + "buildPhase": "sources", + "attributes": ["a1", "a2"], + "resourceTags": ["r1", "r2"], + "compilerFlags": ["c1", "c2"], + ]] ]] let parsedSpec = try getProjectSpec(dictionary) try expect(parsedSpec) == expected diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index 162ac17cf..2a38a7f30 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -602,7 +602,7 @@ class SourceGeneratorTests: XCTestCase { let target = Target(name: "Test", type: .framework, platform: .iOS, sources: [ TargetSource(path: "A", buildPhase: .resources), - TargetSource(path: "B", buildPhase: TargetSource.BuildPhase.none), + TargetSource(path: "B", buildPhase: BuildPhaseSpec.none), TargetSource(path: "C", buildPhase: nil), ]) let project = Project(basePath: directoryPath, name: "Test", targets: [target]) @@ -614,11 +614,11 @@ class SourceGeneratorTests: XCTestCase { try pbxProj.expectFile(paths: ["A", "Info.plist"], buildPhase: .resources) try pbxProj.expectFile(paths: ["A", "file.xcconfig"], buildPhase: .resources) - try pbxProj.expectFile(paths: ["B", "file.swift"], buildPhase: TargetSource.BuildPhase.none) - try pbxProj.expectFile(paths: ["B", "file.xcassets"], buildPhase: TargetSource.BuildPhase.none) - try pbxProj.expectFile(paths: ["B", "file.h"], buildPhase: TargetSource.BuildPhase.none) - try pbxProj.expectFile(paths: ["B", "Info.plist"], buildPhase: TargetSource.BuildPhase.none) - try pbxProj.expectFile(paths: ["B", "file.xcconfig"], buildPhase: TargetSource.BuildPhase.none) + try pbxProj.expectFile(paths: ["B", "file.swift"], buildPhase: BuildPhaseSpec.none) + try pbxProj.expectFile(paths: ["B", "file.xcassets"], buildPhase: BuildPhaseSpec.none) + try pbxProj.expectFile(paths: ["B", "file.h"], buildPhase: BuildPhaseSpec.none) + try pbxProj.expectFile(paths: ["B", "Info.plist"], buildPhase: BuildPhaseSpec.none) + try pbxProj.expectFile(paths: ["B", "file.xcconfig"], buildPhase: BuildPhaseSpec.none) try pbxProj.expectFile(paths: ["C", "file.swift"], buildPhase: .sources) try pbxProj.expectFile(paths: ["C", "file.m"], buildPhase: .sources) @@ -633,16 +633,16 @@ class SourceGeneratorTests: XCTestCase { try pbxProj.expectFile(paths: ["C", "file.tpp"], buildPhase: .headers) try pbxProj.expectFile(paths: ["C", "file.hxx"], buildPhase: .headers) try pbxProj.expectFile(paths: ["C", "file.def"], buildPhase: .headers) - try pbxProj.expectFile(paths: ["C", "file.xcconfig"], buildPhase: TargetSource.BuildPhase.none) - try pbxProj.expectFile(paths: ["C", "file.entitlements"], buildPhase: TargetSource.BuildPhase.none) - try pbxProj.expectFile(paths: ["C", "file.gpx"], buildPhase: TargetSource.BuildPhase.none) - try pbxProj.expectFile(paths: ["C", "file.apns"], buildPhase: TargetSource.BuildPhase.none) - try pbxProj.expectFile(paths: ["C", "file.xcconfig"], buildPhase: TargetSource.BuildPhase.none) - try pbxProj.expectFile(paths: ["C", "file.xcconfig"], buildPhase: TargetSource.BuildPhase.none) - try pbxProj.expectFile(paths: ["C", "file.xcconfig"], buildPhase: TargetSource.BuildPhase.none) + try pbxProj.expectFile(paths: ["C", "file.xcconfig"], buildPhase: BuildPhaseSpec.none) + try pbxProj.expectFile(paths: ["C", "file.entitlements"], buildPhase: BuildPhaseSpec.none) + try pbxProj.expectFile(paths: ["C", "file.gpx"], buildPhase: BuildPhaseSpec.none) + try pbxProj.expectFile(paths: ["C", "file.apns"], buildPhase: BuildPhaseSpec.none) + try pbxProj.expectFile(paths: ["C", "file.xcconfig"], buildPhase: BuildPhaseSpec.none) + try pbxProj.expectFile(paths: ["C", "file.xcconfig"], buildPhase: BuildPhaseSpec.none) + try pbxProj.expectFile(paths: ["C", "file.xcconfig"], buildPhase: BuildPhaseSpec.none) try pbxProj.expectFile(paths: ["C", "file.xcassets"], buildPhase: .resources) try pbxProj.expectFile(paths: ["C", "file.123"], buildPhase: .resources) - try pbxProj.expectFile(paths: ["C", "Info.plist"], buildPhase: TargetSource.BuildPhase.none) + try pbxProj.expectFile(paths: ["C", "Info.plist"], buildPhase: BuildPhaseSpec.none) try pbxProj.expectFile(paths: ["C", "file.metal"], buildPhase: .sources) try pbxProj.expectFile(paths: ["C", "file.mlmodel"], buildPhase: .sources) try pbxProj.expectFile(paths: ["C", "Intent.intentdefinition"], buildPhase: .sources) @@ -654,6 +654,57 @@ class SourceGeneratorTests: XCTestCase { try pbxProj.expectFile(paths: ["C", "WithPeriod2.0", "file.swift"], buildPhase: .sources) } + $0.it("sets file type properties") { + let directories = """ + A: + - file.resource1 + - file.source1 + - file.abc: + - file.a + - file.exclude1 + - file.unphased1 + - ignored.swift + """ + try createDirectories(directories) + + let target = Target(name: "Test", type: .framework, platform: .iOS, sources: [ + TargetSource(path: "A"), + ]) + let project = Project(basePath: directoryPath, name: "Test", targets: [target], options: .init(fileTypes: [ + "abc": FileType(buildPhase: .sources), + "source1": FileType(buildPhase: .sources, attributes: ["a1", "a2"], resourceTags: ["r1", "r2"], compilerFlags: ["-c1", "-c2"]), + "resource1": FileType(buildPhase: .resources, attributes: ["a1", "a2"], resourceTags: ["r1", "r2"], compilerFlags: ["-c1", "-c2"]), + "unphased1": FileType(buildPhase: BuildPhaseSpec.none), + "swift": FileType(buildPhase: .resources), + ])) + + let pbxProj = try project.generatePbxProj() + try pbxProj.expectFile(paths: ["A", "file.abc"], buildPhase: .sources) + try pbxProj.expectFile(paths: ["A", "file.source1"], buildPhase: .sources) + try pbxProj.expectFile(paths: ["A", "file.resource1"], buildPhase: .resources) + try pbxProj.expectFile(paths: ["A", "file.unphased1"], buildPhase: BuildPhaseSpec.none) + try pbxProj.expectFile(paths: ["A", "ignored.swift"], buildPhase: .resources) + + do { + let fileReference = try unwrap(pbxProj.getFileReference(paths: ["A", "file.resource1"], names: ["A", "file.resource1"])) + let buildFile = try unwrap(pbxProj.buildFiles.first(where: { $0.file === fileReference })) + let settings = NSDictionary(dictionary: buildFile.settings ?? [:]) + try expect(settings) == [ + "ATTRIBUTES": ["a1", "a2"], + "ASSET_TAGS": ["r1", "r2"], + ] + } + do { + let fileReference = try unwrap(pbxProj.getFileReference(paths: ["A", "file.source1"], names: ["A", "file.source1"])) + let buildFile = try unwrap(pbxProj.buildFiles.first(where: { $0.file === fileReference })) + let settings = NSDictionary(dictionary: buildFile.settings ?? [:]) + try expect(settings) == [ + "ATTRIBUTES": ["a1", "a2"], + "COMPILER_FLAGS": "-c1 -c2", + ] + } + } + $0.it("duplicate TargetSource is included once in sources build phase") { let directories = """ Sources: @@ -1084,7 +1135,7 @@ class SourceGeneratorTests: XCTestCase { extension PBXProj { /// expect a file within groups of the paths, using optional different names - func expectFile(paths: [String], names: [String]? = nil, buildPhase: TargetSource.BuildPhase? = nil, file: String = #file, line: Int = #line) throws { + func expectFile(paths: [String], names: [String]? = nil, buildPhase: BuildPhaseSpec? = nil, file: String = #file, line: Int = #line) throws { guard let fileReference = getFileReference(paths: paths, names: names ?? paths) else { var error = "Could not find file at path \(paths.joined(separator: "/").quoted)" if let names = names, names != paths { From 142f84429d42fbd72fd8aa9d3410ac726fcdb214 Mon Sep 17 00:00:00 2001 From: Kiran Thorat Date: Tue, 4 Aug 2020 16:09:31 +1000 Subject: [PATCH 002/284] Fixed issue of optionally excluding swift package from target dependencies. (#920) fixed typo and updated changelog for fixes --- CHANGELOG.md | 3 ++- Sources/XcodeGenKit/PBXProjGenerator.swift | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e8c39616..16b63336f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,8 @@ #### Fixed - Treat all directories with known UTI as file wrapper. [#896](https://github.com/yonaskolb/XcodeGen/pull/896) @KhaosT -- Generated chemes for application extensions now contain `wasCreatedForAppExtension = YES`. [#898](https://github.com/yonaskolb/XcodeGen/issues/898) @muizidn +- Generated schemes for application extensions now contain `wasCreatedForAppExtension = YES`. [#898](https://github.com/yonaskolb/XcodeGen/issues/898) @muizidn +- Issue of excluding swift package from target dependencies. [#920](https://github.com/yonaskolb/XcodeGen/pull/920) @k-thorat #### Internal - Updated to XcodeProj 7.13.0 [#908](https://github.com/yonaskolb/XcodeGen/pull/908) @brentleyjones diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index c0c61c74b..aace13b26 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -865,7 +865,11 @@ public class PBXProjGenerator { let packageDependency = addObject( XCSwiftPackageProductDependency(productName: productName, package: packageReference) ) - packageDependencies.append(packageDependency) + + // Add package dependency if linking is true. + if dependency.link ?? true { + packageDependencies.append(packageDependency) + } let link = dependency.link ?? (target.type != .staticLibrary) if link { From 0bed4b835fd5629e46df4b17cfbd6325624a6116 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 4 Aug 2020 16:10:34 +1000 Subject: [PATCH 003/284] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16b63336f..cfc5b671b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ #### Fixed - Treat all directories with known UTI as file wrapper. [#896](https://github.com/yonaskolb/XcodeGen/pull/896) @KhaosT - Generated schemes for application extensions now contain `wasCreatedForAppExtension = YES`. [#898](https://github.com/yonaskolb/XcodeGen/issues/898) @muizidn -- Issue of excluding swift package from target dependencies. [#920](https://github.com/yonaskolb/XcodeGen/pull/920) @k-thorat +- Allow package dependencies to use `link: false` [#920](https://github.com/yonaskolb/XcodeGen/pull/920) @k-thorat #### Internal - Updated to XcodeProj 7.13.0 [#908](https://github.com/yonaskolb/XcodeGen/pull/908) @brentleyjones From f631b6427cde515a37e95d760bda88a4747b2505 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 4 Aug 2020 20:34:24 +1000 Subject: [PATCH 004/284] Update to 2.17.0 --- CHANGELOG.md | 4 ++++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfc5b671b..3014fbb0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.17.0 + #### Added - Added `options.fileTypes` which lets you set cross project defaults for certain file extensions [#914](https://github.com/yonaskolb/XcodeGen/pull/914) @yonaskolb - Added `onlyCopyFilesOnInstall` option to targets for the Embed Files build phase. [#912](https://github.com/yonaskolb/XcodeGen/pull/912) @jsorge @@ -14,6 +16,8 @@ #### Internal - Updated to XcodeProj 7.13.0 [#908](https://github.com/yonaskolb/XcodeGen/pull/908) @brentleyjones +[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.16.0...2.17.0) + ## 2.16.0 #### Added diff --git a/Makefile b/Makefile index bbf78afa5..904dd784e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.16.0 +VERSION = 2.17.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 0acf5a5d5..ca794af20 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.16.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.17.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index d060e649a..944091cdc 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.16.0") +let version = Version("2.17.0") let cli = XcodeGenCLI(version: version) cli.execute() From 9271d8acf50e79580e7183fc80af2aeef772d7eb Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Wed, 5 Aug 2020 12:04:15 +0200 Subject: [PATCH 005/284] Update Examples.md (#923) --- Docs/Examples.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Docs/Examples.md b/Docs/Examples.md index d10f8663d..07a9b04f0 100644 --- a/Docs/Examples.md +++ b/Docs/Examples.md @@ -8,3 +8,4 @@ These are a bunch of real world examples of XcodeGen project specs. Feel free to - [atelier-socle/AppRepositoryTemplate](https://github.com/atelier-socle/AppRepositoryTemplate/blob/master/project.yml) - [atelier-socle/FrameworkRepositoryTemplate](https://github.com/atelier-socle/FrameworkRepositoryTemplate/blob/master/project.yml) - [scelis/XcodeGen-TestStickers](https://github.com/scelis/XcodeGen-TestStickers/blob/master/project.yml) +- [minvws/nl-covid19-notification-app-ios](https://github.com/minvws/nl-covid19-notification-app-ios/blob/master/project.yml) From 727a648623fbfe0934caf1a58bc6d4807a8253bc Mon Sep 17 00:00:00 2001 From: Cody Vandermyn <721474+codeman9@users.noreply.github.com> Date: Wed, 5 Aug 2020 03:05:23 -0700 Subject: [PATCH 006/284] Add ability to skip the entire test target (#916) * add ability to skip the entire test target * when skipped is true, add it to the toJSONValue dictionary * Add changelog entry --- CHANGELOG.md | 2 ++ Docs/ProjectSpec.md | 1 + Sources/ProjectSpec/Scheme.swift | 8 ++++++++ Sources/XcodeGenKit/SchemeGenerator.swift | 2 +- Tests/ProjectSpecTests/SpecLoadingTests.swift | 2 ++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3014fbb0b..af809dba8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +- Add `Scheme.Test.TestTarget.skipped` to allow skipping of an entire test target. [#916](https://github.com/yonaskolb/XcodeGen/pull/916) @codeman9 + ## 2.17.0 #### Added diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 9853d5cdb..290adbc4f 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -793,6 +793,7 @@ A multiline script can be written using the various YAML multiline methods, for - [x] **name**: **String** - The name of the target - [ ] **parallelizable**: **Bool** - Whether to run tests in parallel. Defaults to false - [ ] **randomExecutionOrder**: **Bool** - Whether to run tests in a random order. Defaults to false +- [ ] **skipped**: **Bool** - Whether to skip all of the test target tests. Defaults to false - [ ] **skippedTests**: **[String]** - List of tests in the test target to skip. Defaults to empty. ### Archive Action diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index 986268aa8..1921fd3f1 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -172,17 +172,20 @@ public struct Scheme: Equatable { public let targetReference: TargetReference public var randomExecutionOrder: Bool public var parallelizable: Bool + public var skipped: Bool public var skippedTests: [String] public init( targetReference: TargetReference, randomExecutionOrder: Bool = randomExecutionOrderDefault, parallelizable: Bool = parallelizableDefault, + skipped: Bool = false, skippedTests: [String] = [] ) { self.targetReference = targetReference self.randomExecutionOrder = randomExecutionOrder self.parallelizable = parallelizable + self.skipped = skipped self.skippedTests = skippedTests } @@ -191,6 +194,7 @@ public struct Scheme: Equatable { targetReference = try TargetReference(value) randomExecutionOrder = false parallelizable = false + skipped = false skippedTests = [] } catch { fatalError(SpecParsingError.invalidTargetReference(value).description) @@ -474,6 +478,7 @@ extension Scheme.Test.TestTarget: JSONObjectConvertible { targetReference = try TargetReference(jsonDictionary.json(atKeyPath: "name")) randomExecutionOrder = jsonDictionary.json(atKeyPath: "randomExecutionOrder") ?? Scheme.Test.TestTarget.randomExecutionOrderDefault parallelizable = jsonDictionary.json(atKeyPath: "parallelizable") ?? Scheme.Test.TestTarget.parallelizableDefault + skipped = jsonDictionary.json(atKeyPath: "skipped") ?? false skippedTests = jsonDictionary.json(atKeyPath: "skippedTests") ?? [] } } @@ -495,6 +500,9 @@ extension Scheme.Test.TestTarget: JSONEncodable { if parallelizable != Scheme.Test.TestTarget.parallelizableDefault { dict["parallelizable"] = parallelizable } + if skipped { + dict["skipped"] = skipped + } return dict } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 3eacef4aa..f44bf4e9b 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -183,7 +183,7 @@ public class SchemeGenerator { let testables = zip(testTargets, testBuildTargetEntries).map { testTarget, testBuilEntries in XCScheme.TestableReference( - skipped: false, + skipped: testTarget.skipped, parallelizable: testTarget.parallelizable, randomExecutionOrdering: testTarget.randomExecutionOrder, buildableReference: testBuilEntries.buildableReference, diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 26635e76c..047789df2 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -782,6 +782,7 @@ class SpecLoadingTests: XCTestCase { [ "name": "ExternalProject/Target2", "parallelizable": true, + "skipped": true, "randomExecutionOrder": true, "skippedTests": ["Test/testExample()"], ], @@ -826,6 +827,7 @@ class SpecLoadingTests: XCTestCase { targetReference: "ExternalProject/Target2", randomExecutionOrder: true, parallelizable: true, + skipped: true, skippedTests: ["Test/testExample()"] ), ] From 691ca9367753bc71a141de90e641802f07566ddd Mon Sep 17 00:00:00 2001 From: Kiran Thorat Date: Thu, 6 Aug 2020 09:13:13 +1000 Subject: [PATCH 007/284] Fixes for embedding SDK dependencies. (#922) --- CHANGELOG.md | 3 +++ Sources/XcodeGenKit/PBXProjGenerator.swift | 7 +++++++ .../ProjectGeneratorTests.swift | 17 ++++++++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af809dba8..fe456e64b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ - Add `Scheme.Test.TestTarget.skipped` to allow skipping of an entire test target. [#916](https://github.com/yonaskolb/XcodeGen/pull/916) @codeman9 +#### Fixed +- Allow SDK dependencies to be embedded. [#922](https://github.com/yonaskolb/XcodeGen/pull/922) @k-thorat + ## 2.17.0 #### Added diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index aace13b26..0ac2909ef 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -827,6 +827,13 @@ public class PBXProjGenerator { ) targetFrameworkBuildFiles.append(buildFile) + if dependency.embed == true { + let embedFile = addObject( + PBXBuildFile(file: fileReference, settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) + ) + copyFrameworksReferences.append(embedFile) + } + case .carthage(let findFrameworks, let linkType): let findFrameworks = findFrameworks ?? project.options.findCarthageFrameworks let allDependencies = findFrameworks diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index b48e2b964..1f2e329ea 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -559,6 +559,9 @@ class ProjectGeneratorTests: XCTestCase { Dependency(type: .package(product: "RxCocoa"), reference: "RxSwift"), Dependency(type: .package(product: "RxRelay"), reference: "RxSwift"), + // Validate - Do not link package + Dependency(type: .package(product: "KeychainAccess"), reference: "KeychainAccess", link: false), + // Statically linked, so don't embed into test Dependency(type: .target, reference: staticLibrary.name), @@ -679,25 +682,37 @@ class ProjectGeneratorTests: XCTestCase { iosFrameworkB.filename, ]) + let XCTestPath = "Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework" + let GXToolsPath = "Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/GXTools.framework" + let XCTAutomationPath = "Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/XCTAutomationSupport.framework" let stickerPack = Target( name: "MyStickerApp", type: .stickerPack, platform: .iOS, dependencies: [ Dependency(type: .sdk(root: nil), reference: "NotificationCenter.framework"), - Dependency(type: .sdk(root: "DEVELOPER_DIR"), reference: "Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework"), + Dependency(type: .sdk(root: "DEVELOPER_DIR"), reference: XCTestPath), + Dependency(type: .sdk(root: "DEVELOPER_DIR"), reference: GXToolsPath, embed: true), + Dependency(type: .sdk(root: "DEVELOPER_DIR"), reference: XCTAutomationPath, embed: true, codeSign: true), ] ) expectedResourceFiles[stickerPack.name] = nil expectedLinkedFiles[stickerPack.name] = Set([ "XCTest.framework", "NotificationCenter.framework", + "GXTools.framework", + "XCTAutomationSupport.framework" + ]) + expectedEmbeddedFrameworks[stickerPack.name] = Set([ + "GXTools.framework", + "XCTAutomationSupport.framework" ]) let targets = [app, iosFrameworkZ, iosFrameworkX, staticLibrary, resourceBundle, iosFrameworkA, iosFrameworkB, appTest, appTestWithoutTransitive, stickerPack] let packages: [String: SwiftPackage] = [ "RxSwift": .remote(url: "https://github.com/ReactiveX/RxSwift", versionRequirement: .upToNextMajorVersion("5.1.1")), + "KeychainAccess": .remote(url: "https://github.com/kishikawakatsumi/KeychainAccess", versionRequirement: .upToNextMajorVersion("4.2.0")) ] let project = Project( From dddb0fc1290d2c07ce988bee00e4c5a20b6f8f81 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 6 Aug 2020 09:13:41 +1000 Subject: [PATCH 008/284] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe456e64b..e0cb51a24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Next Version +#### Added - Add `Scheme.Test.TestTarget.skipped` to allow skipping of an entire test target. [#916](https://github.com/yonaskolb/XcodeGen/pull/916) @codeman9 #### Fixed From 2d30bb1db51aba4e1ecebafb3b1f7abeceb13db6 Mon Sep 17 00:00:00 2001 From: tokizo <37968814+tokizuoh@users.noreply.github.com> Date: Sun, 9 Aug 2020 22:11:32 +0900 Subject: [PATCH 009/284] fix typo :) (#926) --- Docs/Usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/Usage.md b/Docs/Usage.md index 597bf8a4e..a746650f4 100644 --- a/Docs/Usage.md +++ b/Docs/Usage.md @@ -87,7 +87,7 @@ targets: ``` ### xcodebuild environment variables -You can also always overide any build settings on CI when building by passing specific build settings to xcodebuild like so: +You can also always override any build settings on CI when building by passing specific build settings to xcodebuild like so: ```sh DEVELOPMENT_TEAM=XXXXXXXXX xcodebuild ... From d4c9f6226db95d0ec7c71b66017cfeb9eefc9bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Here=C3=B1=C3=BA?= Date: Mon, 10 Aug 2020 20:38:11 -0300 Subject: [PATCH 010/284] Fix typos (#930) --- Docs/ProjectSpec.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 290adbc4f..b5c78adf5 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -45,7 +45,7 @@ You can also use environment variables in your configuration file, by using `${S - [ ] **settings**: **[Settings](#settings)** - Project specific settings. Default base and config type settings will be applied first before any settings defined here - [ ] **settingGroups**: **[Setting Groups](#setting-groups)** - Setting groups mapped by name - [ ] **targets**: **[String: [Target](#target)]** - The list of targets in the project mapped by name -- [ ] **fileGroups**: **[String]** - A list of paths to add to the root of the project. These aren't files that will be included in your targets, but that you'd like to include in the project hierachy anyway. For example a folder of xcconfig files that aren't already added by any target sources, or a Readme file. +- [ ] **fileGroups**: **[String]** - A list of paths to add to the root of the project. These aren't files that will be included in your targets, but that you'd like to include in the project hierarchy anyway. For example a folder of xcconfig files that aren't already added by any target sources, or a Readme file. - [ ] **schemes**: **[Scheme](#scheme)** - A list of schemes by name. This allows more control over what is found in [Target Scheme](#target-scheme) - [ ] **targetTemplates**: **[String: [Target Template](#target-template)]** - a list of targets that can be used as templates for actual targets which reference them via a `template` property. They can be used to extract common target settings. Works great in combination with `include`. - [ ] **packages**: **[String: [Swift Package](#swift-package)]** - a map of Swift packages by name. @@ -73,7 +73,7 @@ include: By default specs are merged additively. That is for every value: -- if existing value and new value are both dictionaries merge them and continue down the hierachy +- if existing value and new value are both dictionaries merge them and continue down the hierarchy - if existing value and new value are both an array then add the new value to the end of the array - otherwise replace the existing value with the new value From 410f644a2f643f14f79d397edc70b3430a624fbd Mon Sep 17 00:00:00 2001 From: tokizo <37968814+tokizuoh@users.noreply.github.com> Date: Tue, 11 Aug 2020 14:15:27 +0900 Subject: [PATCH 011/284] Delete unnecessary processes. (#927) (#928) * Delete unnecessary processes. * move value assignment up above --- Sources/ProjectSpec/TargetSource.swift | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Sources/ProjectSpec/TargetSource.swift b/Sources/ProjectSpec/TargetSource.swift index 2a75f3bf4..7ad5e4aa4 100644 --- a/Sources/ProjectSpec/TargetSource.swift +++ b/Sources/ProjectSpec/TargetSource.swift @@ -122,18 +122,13 @@ extension TargetSource: JSONEncodable { "buildPhase": buildPhase?.toJSONValue(), "createIntermediateGroups": createIntermediateGroups, "resourceTags": resourceTags, + "path": path, ] if optional != TargetSource.optionalDefault { dict["optional"] = optional } - if dict.count == 0 { - return path - } - - dict["path"] = path - return dict } } From 1d2a28490fe94e41d5ffd3a9827c4d3591faeeb8 Mon Sep 17 00:00:00 2001 From: Bartosz Polaczyk Date: Wed, 12 Aug 2020 08:13:47 +0200 Subject: [PATCH 012/284] Add custom lldinit for a scheme (#929) * Add customLLDBInit * Add changelog info to a valid bucket * Update PR number * Add fixture tests Co-authored-by: Bartosz Polaczyk --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 2 ++ Sources/ProjectSpec/Scheme.swift | 19 +++++++++++++++++-- Sources/XcodeGenKit/SchemeGenerator.swift | 6 ++++-- Tests/Fixtures/TestProject/.lldbinit | 0 .../xcschemes/App_Scheme.xcscheme | 6 ++++-- Tests/Fixtures/TestProject/project.yml | 2 ++ .../SchemeGeneratorTests.swift | 5 ++++- 8 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 Tests/Fixtures/TestProject/.lldbinit diff --git a/CHANGELOG.md b/CHANGELOG.md index e0cb51a24..0ca8ae315 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ #### Added - Add `Scheme.Test.TestTarget.skipped` to allow skipping of an entire test target. [#916](https://github.com/yonaskolb/XcodeGen/pull/916) @codeman9 +- Added ability to set custom LLDBInit scripts for launch and test schemes [#929](https://github.com/yonaskolb/XcodeGen/pull/929) @polac24 #### Fixed - Allow SDK dependencies to be embedded. [#922](https://github.com/yonaskolb/XcodeGen/pull/922) @k-thorat diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index b5c78adf5..322a4e2d1 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -782,12 +782,14 @@ A multiline script can be written using the various YAML multiline methods, for ### Run Action - [ ] **executable**: **String** - the name of the target to launch as an executable. Defaults to the first build target in the scheme +- [ ] **customLLDBInit**: **String** - the absolute path to the custom `.lldbinit` file ### Test Action - [ ] **gatherCoverageData**: **Bool** - a boolean that indicates if this scheme should gather coverage data. This defaults to false - [ ] **coverageTargets**: **[String]** - a list of targets to gather code coverage. Each entry can either be a simple string, or a string using [Project Reference](#project-reference) - [ ] **targets**: **[[Test Target](#test-target)]** - a list of targets to test. Each entry can either be a simple string, or a [Test Target](#test-target) +- [ ] **customLLDBInit**: **String** - the absolute path to the custom `.lldbinit` file #### Test Target - [x] **name**: **String** - The name of the target diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index 1921fd3f1..d872129d0 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -113,6 +113,7 @@ public struct Scheme: Equatable { public var debugEnabled: Bool public var simulateLocation: SimulateLocation? public var executable: String? + public var customLLDBInit: String? public init( config: String, @@ -128,7 +129,8 @@ public struct Scheme: Equatable { askForAppToLaunch: Bool? = nil, launchAutomaticallySubstyle: String? = nil, debugEnabled: Bool = debugEnabledDefault, - simulateLocation: SimulateLocation? = nil + simulateLocation: SimulateLocation? = nil, + customLLDBInit: String? = nil ) { self.config = config self.commandLineArguments = commandLineArguments @@ -143,6 +145,7 @@ public struct Scheme: Equatable { self.launchAutomaticallySubstyle = launchAutomaticallySubstyle self.debugEnabled = debugEnabled self.simulateLocation = simulateLocation + self.customLLDBInit = customLLDBInit } } @@ -163,6 +166,7 @@ public struct Scheme: Equatable { public var language: String? public var region: String? public var debugEnabled: Bool + public var customLLDBInit: String? public struct TestTarget: Equatable, ExpressibleByStringLiteral { public static let randomExecutionOrderDefault = false @@ -216,7 +220,8 @@ public struct Scheme: Equatable { environmentVariables: [XCScheme.EnvironmentVariable] = [], language: String? = nil, region: String? = nil, - debugEnabled: Bool = debugEnabledDefault + debugEnabled: Bool = debugEnabledDefault, + customLLDBInit: String? = nil ) { self.config = config self.gatherCoverageData = gatherCoverageData @@ -230,6 +235,7 @@ public struct Scheme: Equatable { self.language = language self.region = region self.debugEnabled = debugEnabled + self.customLLDBInit = customLLDBInit } public var shouldUseLaunchSchemeArgsEnv: Bool { @@ -375,6 +381,7 @@ extension Scheme.Run: JSONObjectConvertible { if let askLaunch: Bool = jsonDictionary.json(atKeyPath: "askForAppToLaunch") { askForAppToLaunch = askLaunch } + customLLDBInit = jsonDictionary.json(atKeyPath: "customLLDBInit") } } @@ -408,6 +415,9 @@ extension Scheme.Run: JSONEncodable { if let simulateLocation = simulateLocation { dict["simulateLocation"] = simulateLocation.toJSONValue() } + if let customLLDBInit = customLLDBInit { + dict["customLLDBInit"] = customLLDBInit + } return dict } } @@ -439,6 +449,7 @@ extension Scheme.Test: JSONObjectConvertible { language = jsonDictionary.json(atKeyPath: "language") region = jsonDictionary.json(atKeyPath: "region") debugEnabled = jsonDictionary.json(atKeyPath: "debugEnabled") ?? Scheme.Test.debugEnabledDefault + customLLDBInit = jsonDictionary.json(atKeyPath: "customLLDBInit") } } @@ -468,6 +479,10 @@ extension Scheme.Test: JSONEncodable { dict["debugEnabled"] = debugEnabled } + if let customLLDBInit = customLLDBInit { + dict["customLLDBInit"] = customLLDBInit + } + return dict } } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index f44bf4e9b..111043249 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -219,7 +219,8 @@ public class SchemeGenerator { commandlineArguments: testCommandLineArgs, environmentVariables: testVariables, language: scheme.test?.language, - region: scheme.test?.region + region: scheme.test?.region, + customLLDBInitFile: scheme.test?.customLLDBInit ) let allowLocationSimulation = scheme.run?.simulateLocation?.allow ?? true @@ -250,7 +251,8 @@ public class SchemeGenerator { environmentVariables: launchVariables, language: scheme.run?.language, region: scheme.run?.region, - launchAutomaticallySubstyle: scheme.run?.launchAutomaticallySubstyle + launchAutomaticallySubstyle: scheme.run?.launchAutomaticallySubstyle, + customLLDBInitFile: scheme.run?.customLLDBInit ) let profileAction = XCScheme.ProfileAction( diff --git a/Tests/Fixtures/TestProject/.lldbinit b/Tests/Fixtures/TestProject/.lldbinit new file mode 100644 index 000000000..e69de29bb diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme index 55f0c6c92..16b808cbe 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme @@ -28,7 +28,8 @@ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" codeCoverageEnabled = "YES" onlyGenerateCoverageForSpecifiedTargets = "NO" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + customLLDBInitFile = "${SRCROOT}/.lldbinit"> @@ -74,7 +75,8 @@ ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" - allowLocationSimulation = "YES"> + allowLocationSimulation = "YES" + customLLDBInitFile = "${SRCROOT}/.lldbinit"> Date: Thu, 13 Aug 2020 07:20:01 +0200 Subject: [PATCH 013/284] Update Examples.md (#931) --- Docs/Examples.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Docs/Examples.md b/Docs/Examples.md index 07a9b04f0..47ce369e1 100644 --- a/Docs/Examples.md +++ b/Docs/Examples.md @@ -9,3 +9,4 @@ These are a bunch of real world examples of XcodeGen project specs. Feel free to - [atelier-socle/FrameworkRepositoryTemplate](https://github.com/atelier-socle/FrameworkRepositoryTemplate/blob/master/project.yml) - [scelis/XcodeGen-TestStickers](https://github.com/scelis/XcodeGen-TestStickers/blob/master/project.yml) - [minvws/nl-covid19-notification-app-ios](https://github.com/minvws/nl-covid19-notification-app-ios/blob/master/project.yml) +- [pvinis/react-native-xcodegen](https://github.com/pvinis/react-native-xcodegen/blob/master/templates) From 80e5f095fbf62636acfa04946f3629025b2060e0 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Fri, 14 Aug 2020 00:28:28 +1000 Subject: [PATCH 014/284] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ca794af20..e4e094e2c 100644 --- a/README.md +++ b/README.md @@ -34,10 +34,12 @@ The project spec is a YAML or JSON file that defines your targets, configuration - ✅ Integrate **Carthage** frameworks without any work - ✅ Export **Dependency Diagrams** to view in [Graphviz](https://www.graphviz.org) -Given a very simple project spec file like this: +Given an example project spec: ```yaml name: MyProject +include: + - base_spec.yml options: bundleIdPrefix: com.myapp packages: From bc51191a3a16c809627f3dc4924ba9f6eddfc0b6 Mon Sep 17 00:00:00 2001 From: Brentley Jones Date: Sun, 16 Aug 2020 05:02:56 -0500 Subject: [PATCH 015/284] Add support for App Clips (#909) * Add support for App Clips Embeds App Clips into the containing app when they are a dependency. * Patch #909 to not fail CI (#917) Co-authored-by: Dan Fleming --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 11 +- Sources/XcodeGenKit/PBXProjGenerator.swift | 18 + .../TestProject/App_Clip/AppDelegate.swift | 14 + .../AppIcon.appiconset/Contents.json | 98 + .../Base.lproj/LaunchScreen.storyboard | 27 + .../App_Clip/Base.lproj/Main.storyboard | 42 + .../TestProject/App_Clip/Clip.entitlements | 12 + .../Fixtures/TestProject/App_Clip/Info.plist | 45 + .../TestProject/App_Clip/ViewController.swift | 15 + .../TestProject/App_Clip_Tests/Info.plist | 22 + .../App_Clip_Tests/TestProjectTests.swift | 26 + .../TestProject/App_Clip_UITests/Info.plist | 22 + .../App_Clip_UITests/TestProjectUITests.swift | 26 + .../ProjectXcode12.xcodeproj/project.pbxproj | 7483 +++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/xcschemes/App_Clip.xcscheme | 114 + .../xcschemes/App_Scheme.xcscheme | 121 + .../xcschemes/App_iOS Production.xcscheme | 142 + .../xcschemes/App_iOS Staging.xcscheme | 142 + .../xcschemes/App_iOS Test.xcscheme | 142 + .../App_iOS_With_Clip Production.xcscheme | 94 + .../App_iOS_With_Clip Staging.xcscheme | 94 + .../xcschemes/App_iOS_With_Clip Test.xcscheme | 94 + .../xcshareddata/xcschemes/App_macOS.xcscheme | 94 + .../xcschemes/App_watchOS.xcscheme | 109 + .../xcshareddata/xcschemes/Framework.xcscheme | 120 + .../xcshareddata/xcschemes/Tool.xcscheme | 94 + .../xcschemes/iMessageApp.xcscheme | 94 + .../xcschemes/iMessageExtension.xcscheme | 95 + Tests/Fixtures/TestProject/build.sh | 9 + .../Fixtures/TestProject/project-xcode-12.yml | 72 + Tests/Fixtures/TestProject/project.yml | 6 +- scripts/gen-fixtures.sh | 1 + 34 files changed, 9498 insertions(+), 8 deletions(-) create mode 100644 Tests/Fixtures/TestProject/App_Clip/AppDelegate.swift create mode 100644 Tests/Fixtures/TestProject/App_Clip/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Tests/Fixtures/TestProject/App_Clip/Base.lproj/LaunchScreen.storyboard create mode 100644 Tests/Fixtures/TestProject/App_Clip/Base.lproj/Main.storyboard create mode 100644 Tests/Fixtures/TestProject/App_Clip/Clip.entitlements create mode 100644 Tests/Fixtures/TestProject/App_Clip/Info.plist create mode 100644 Tests/Fixtures/TestProject/App_Clip/ViewController.swift create mode 100644 Tests/Fixtures/TestProject/App_Clip_Tests/Info.plist create mode 100644 Tests/Fixtures/TestProject/App_Clip_Tests/TestProjectTests.swift create mode 100644 Tests/Fixtures/TestProject/App_Clip_UITests/Info.plist create mode 100644 Tests/Fixtures/TestProject/App_Clip_UITests/TestProjectUITests.swift create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/project.pbxproj create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Staging.xcscheme create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Test.xcscheme create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Production.xcscheme create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Staging.xcscheme create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Test.xcscheme create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_macOS.xcscheme create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_watchOS.xcscheme create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageApp.xcscheme create mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme create mode 100644 Tests/Fixtures/TestProject/project-xcode-12.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ca8ae315..bc2bc2291 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ #### Added - Add `Scheme.Test.TestTarget.skipped` to allow skipping of an entire test target. [#916](https://github.com/yonaskolb/XcodeGen/pull/916) @codeman9 - Added ability to set custom LLDBInit scripts for launch and test schemes [#929](https://github.com/yonaskolb/XcodeGen/pull/929) @polac24 +- Adds App Clip support. [#909](https://github.com/yonaskolb/XcodeGen/pull/909) @brentleyjones @dflems #### Fixed - Allow SDK dependencies to be embedded. [#922](https://github.com/yonaskolb/XcodeGen/pull/922) @k-thorat diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 322a4e2d1..50bf35ba0 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -266,17 +266,18 @@ Settings are merged in the following order: groups, base, configs. This will provide default build settings for a certain product type. It can be any of the following: - `application` +- `application.on-demand-install-capable` - `application.messages` - `application.watchapp` - `application.watchapp2` - `app-extension` +- `app-extension.intents-service` - `app-extension.messages` - `app-extension.messages-sticker-pack` -- `app-extension.intents-service` - `bundle` -- `bundle.unit-test` -- `bundle.ui-testing` - `bundle.ocunit-test` +- `bundle.ui-testing` +- `bundle.unit-test` - `framework` - `instruments-package` - `library.dynamic` @@ -284,9 +285,9 @@ This will provide default build settings for a certain product type. It can be a - `framework.static` - `tool` - `tv-app-extension` +- `watchapp2-container` - `watchkit-extension` - `watchkit2-extension` -- `watchapp2-container` - `xcode-extension` - `xpc-service` - ``""`` (used for legacy targets) @@ -296,8 +297,8 @@ This will provide default build settings for a certain product type. It can be a This will provide default build settings for a certain platform. It can be any of the following: - `iOS` -- `tvOS` - `macOS` +- `tvOS` - `watchOS` **Multi Platform targets** diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 0ac2909ef..886cd70cc 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -651,6 +651,7 @@ public class PBXProjGenerator { var copyWatchReferences: [PBXBuildFile] = [] var packageDependencies: [XCSwiftPackageProductDependency] = [] var extensions: [PBXBuildFile] = [] + var appClips: [PBXBuildFile] = [] var carthageFrameworksToEmbed: [String] = [] let localPackageReferences: [String] = project.packages.compactMap { $0.value.isLocal ? $0.key : nil } @@ -710,6 +711,9 @@ public class PBXProjGenerator { if dependencyTarget.type.isExtension { // embed app extension extensions.append(embedFile) + } else if dependencyTarget.type == .onDemandInstallCapableApplication { + // embed app clip + appClips.append(embedFile) } else if dependencyTarget.type.isFramework { copyFrameworksReferences.append(embedFile) } else if dependencyTarget.type.isApp && dependencyTarget.platform == .watchOS { @@ -1084,6 +1088,20 @@ public class PBXProjGenerator { buildPhases.append(copyFilesPhase) } + if !appClips.isEmpty { + + let copyFilesPhase = addObject( + PBXCopyFilesBuildPhase( + dstPath: "$(CONTENTS_FOLDER_PATH)/AppClips", + dstSubfolderSpec: .productsDirectory, + name: "Embed App Clips", + files: appClips + ) + ) + + buildPhases.append(copyFilesPhase) + } + copyFrameworksReferences += getBuildFilesForPhase(.frameworks) if !copyFrameworksReferences.isEmpty { diff --git a/Tests/Fixtures/TestProject/App_Clip/AppDelegate.swift b/Tests/Fixtures/TestProject/App_Clip/AppDelegate.swift new file mode 100644 index 000000000..cbe822167 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_Clip/AppDelegate.swift @@ -0,0 +1,14 @@ +import Framework +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + _ = FrameworkStruct() + return true + } +} diff --git a/Tests/Fixtures/TestProject/App_Clip/Assets.xcassets/AppIcon.appiconset/Contents.json b/Tests/Fixtures/TestProject/App_Clip/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d8db8d65f --- /dev/null +++ b/Tests/Fixtures/TestProject/App_Clip/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Tests/Fixtures/TestProject/App_Clip/Base.lproj/LaunchScreen.storyboard b/Tests/Fixtures/TestProject/App_Clip/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..fdf3f97d1 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_Clip/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/App_Clip/Base.lproj/Main.storyboard b/Tests/Fixtures/TestProject/App_Clip/Base.lproj/Main.storyboard new file mode 100644 index 000000000..42545a50d --- /dev/null +++ b/Tests/Fixtures/TestProject/App_Clip/Base.lproj/Main.storyboard @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/App_Clip/Clip.entitlements b/Tests/Fixtures/TestProject/App_Clip/Clip.entitlements new file mode 100644 index 000000000..92112b0ee --- /dev/null +++ b/Tests/Fixtures/TestProject/App_Clip/Clip.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.developer.parent-application-identifiers + + $(AppIdentifierPrefix)com.project.appwithclip + + com.apple.security.application-groups + group.com.app + + diff --git a/Tests/Fixtures/TestProject/App_Clip/Info.plist b/Tests/Fixtures/TestProject/App_Clip/Info.plist new file mode 100644 index 000000000..2989640a8 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_Clip/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 42.1 + CFBundleVersion + 2 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Tests/Fixtures/TestProject/App_Clip/ViewController.swift b/Tests/Fixtures/TestProject/App_Clip/ViewController.swift new file mode 100644 index 000000000..a44b02a48 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_Clip/ViewController.swift @@ -0,0 +1,15 @@ +import Contacts +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + _ = CNContact() + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } +} diff --git a/Tests/Fixtures/TestProject/App_Clip_Tests/Info.plist b/Tests/Fixtures/TestProject/App_Clip_Tests/Info.plist new file mode 100644 index 000000000..6c6c23c43 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_Clip_Tests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Tests/Fixtures/TestProject/App_Clip_Tests/TestProjectTests.swift b/Tests/Fixtures/TestProject/App_Clip_Tests/TestProjectTests.swift new file mode 100644 index 000000000..f5c77a544 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_Clip_Tests/TestProjectTests.swift @@ -0,0 +1,26 @@ +import XCTest + +class TestProjectTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + measure { + // Put the code you want to measure the time of here. + } + } +} diff --git a/Tests/Fixtures/TestProject/App_Clip_UITests/Info.plist b/Tests/Fixtures/TestProject/App_Clip_UITests/Info.plist new file mode 100644 index 000000000..6c6c23c43 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_Clip_UITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Tests/Fixtures/TestProject/App_Clip_UITests/TestProjectUITests.swift b/Tests/Fixtures/TestProject/App_Clip_UITests/TestProjectUITests.swift new file mode 100644 index 000000000..357046659 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_Clip_UITests/TestProjectUITests.swift @@ -0,0 +1,26 @@ +import XCTest + +class TestProjectUITests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + measure { + // Put the code you want to measure the time of here. + } + } +} diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/project.pbxproj new file mode 100644 index 000000000..509316aae --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/project.pbxproj @@ -0,0 +1,7483 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXAggregateTarget section */ + 9C27C8C394ADD16FDCF6E624 /* SuperTarget */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 70FED818DB797FCDC7929DBC /* Build configuration list for PBXAggregateTarget "SuperTarget" */; + buildPhases = ( + D4BA2D61D3DC727DA6E90F7E /* MyScript */, + ); + dependencies = ( + 8DF064FE23E39B733B75994D /* PBXTargetDependency */, + 53E5D1FE14ECF98F9F9729CF /* PBXTargetDependency */, + ); + name = SuperTarget; + productName = SuperTarget; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 0035E2ED473E71B573FA73CF /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 021F11A2B76A01ED4113286B /* ViewController.swift */; }; + 00412000C589181F73BB9C88 /* StaticLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1342A225B1FB5CCDE2D8C511 /* StaticLibrary.swift */; }; + 0060461B613150BA7D9CAF95 /* MyBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = F24135F7E2026D8D80F8B919 /* MyBundle.bundle */; }; + 04141410CA15B3FBC091FFEE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE31326E32ED51CB02C58E9D /* AppDelegate.swift */; }; + 064BCA54DD18E6F5EAFE5C1C /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7E1427FBA94B073C3FD2830A /* Interface.storyboard */; }; + 068A307AAD3FDB71E245CF4B /* App_Clip.app in Embed App Clips */ = {isa = PBXBuildFile; fileRef = C22BEDE0B2217312642FADA2 /* App_Clip.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 078DC5844DEA2DB6F020D455 /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0F698427B31A67B1541925E /* FrameworkFile.swift */; }; + 092201CC0E7C18615C0B212A /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EC670E53BFAA6F61C02BE82 /* main.swift */; }; + 0A14BD0F9B22C84677FD7D6F /* XPC Service.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 51E2D479CB960CB44EB545C6 /* XPC Service.xpc */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 0A6862249B5F9D544A774770 /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = 98B17D464B46DAC8911014D5 /* module.modulemap */; }; + 0C7A6D06465E72F6D4DDA65B /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 574D072C770BAE53531249CF /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; + 0CD02F062979E2FD36D8D524 /* StaticLibrary_ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BE447BCB0528DE1776DE2F0 /* StaticLibrary_ObjC.m */; }; + 0DC0E4339EBAB04754837F50 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EC10D740EAC35BF970A7327A /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 0EDE93FD1B8EEA5E757A3EE1 /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0F698427B31A67B1541925E /* FrameworkFile.swift */; }; + 1081606EF3D131248CC46BD6 /* libStaticLibrary_ObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BAFC2D775612C35F4F1897F /* libStaticLibrary_ObjC.a */; }; + 11B2B5EF7172B6B837D951AA /* StandaloneAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 68D8757F885CE1C02514845C /* StandaloneAssets.xcassets */; }; + 129640F84D0905CE479FF083 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 329A12107D19B52E1F8554B4 /* Assets.xcassets */; }; + 16B6081EBDCE7DDBC89DDFEE /* Standalone.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA405DFE01301A4B8BA9027 /* Standalone.swift */; }; + 16BD7E732A3294D973E79337 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 95933688FAC17B9E7752CB4F /* MainInterface.storyboard */; }; + 18666A1E5DE5F5B2D48ED872 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 4711AC75927A510DEB4FCC31 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1870224DAA5300F2EEB5C728 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 55DF3F01BB8698E8226D05A0 /* Assets.xcassets */; }; + 1F0ED24C994FE9945337388B /* Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B4D9FADD8956DC163813272 /* Framework.framework */; }; + 22E1EE394E24667C942CAFC4 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EC10D740EAC35BF970A7327A /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 24FD80AC771EAD5DEA2FB43F /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 4711AC75927A510DEB4FCC31 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2514149FFB3E6498D579DBBB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80F3EA429799FBBE247A2D82 /* AppDelegate.swift */; }; + 26170D4BBCBE25B7ADB6C3C9 /* libStaticLibrary_ObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BAFC2D775612C35F4F1897F /* libStaticLibrary_ObjC.a */; }; + 2778626BA6AC7257203DFA47 /* StaticLibrary_ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BE447BCB0528DE1776DE2F0 /* StaticLibrary_ObjC.m */; }; + 29C5F4E429F4826AC299988F /* StaticLibrary_ObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F853E823D826B2DCA407AEA1 /* StaticLibrary_ObjC.h */; }; + 2A39623B596284EC9DCDAE1D /* TestProjectTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68F16F683711ECD7CC9C43EC /* TestProjectTests.swift */; }; + 2B74F88A338EE674477351B1 /* TestFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0838859105FF7ECEE5F2B6E5 /* TestFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 2CBE0DC8AC249AD1E42DC593 /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 574D072C770BAE53531249CF /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; + 2F0E1973A958FCDE8CE09F5E /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 4711AC75927A510DEB4FCC31 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2FB0D86C27098550FAFB4164 /* Framework2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C6EA871817E3A864FDE5DA1 /* Framework2.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 30E0C7F5317477917CFFCE52 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 21AA0A827D6C74A605DEE03E /* Localizable.strings */; }; + 329F958FE3152A51D6DBDC4F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 917AA3E4306C1A12FCC17994 /* Main.storyboard */; }; + 35AA463863F88CB6290C264D /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC10D740EAC35BF970A7327A /* Result.framework */; }; + 35E3C0F60528783F7A6BFF9A /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0F698427B31A67B1541925E /* FrameworkFile.swift */; }; + 36FEB01A03A566B43A2C2434 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B2986C19C8498CDE44CFDAD /* ViewController.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; + 37556609B05600FC511F540B /* SwiftFileInDotPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9327B50C4B0BDF4A252CB2A /* SwiftFileInDotPath.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; + 37EDF33D6B4105F07070FB56 /* Standalone.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA405DFE01301A4B8BA9027 /* Standalone.swift */; }; + 38C639CCE01DB1DC4C2A7101 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F6813B4F70D433054D0C8FB8 /* Assets.xcassets */; }; + 3A0A1B20E2149C6B53848EAC /* LocalizedStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EE817D9DBEBA01EC4FFCED25 /* LocalizedStoryboard.storyboard */; }; + 3D8580B33361272D45C61A85 /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 431156B967A9DF0995682D7C /* Model.xcdatamodeld */; settings = {COMPILER_FLAGS = "-Werror"; }; }; + 3EC2758239D6659E4D35DFD9 /* Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B4D9FADD8956DC163813272 /* Framework.framework */; }; + 40906CFD3662304ACD172B5C /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 4AE9A9C885258BF807598F5E /* Localizable.stringsdict */; }; + 448A2FB5230855C2A68C8960 /* App_watchOS.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = BB4C1F0CB031F894B46533E0 /* App_watchOS.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 48B822DF3314CCF76EE74D6D /* File2.swift in Sources */ = {isa = PBXBuildFile; fileRef = D358C9F4D4F2D97C148913CF /* File2.swift */; }; + 4A1F587B61D4D2EE6833C281 /* App_watchOS Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 02C5C670B0624A007BCB341D /* App_watchOS Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 4BC91284F91B188CBBEBA38C /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0F698427B31A67B1541925E /* FrameworkFile.swift */; }; + 4D67F7E55015EFBDA73E307F /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 4711AC75927A510DEB4FCC31 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4FE6138F5867CA1D93C6EA04 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 556DA72EFDDD94E4E49C0754 /* Main.storyboard */; }; + 50E29FF7B2936111F9189780 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6C287801C7F7F97451C89F23 /* Settings.bundle */; }; + 53AC4E3D64CC954A74A6BF51 /* iMessageExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 6C14AF20FB1E07BF9D32937E /* iMessageExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 557415FFAD88A691DF87B917 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 4711AC75927A510DEB4FCC31 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5986EF99D2CDEE9EBC4B2AF1 /* TestFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0838859105FF7ECEE5F2B6E5 /* TestFramework.framework */; }; + 5B6902E1019616CCCC8C84D7 /* TestProjectUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13B7C799370862813D8FE163 /* TestProjectUITests.swift */; }; + 5F3CD9C98D6FCF78A371850F /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 431156B967A9DF0995682D7C /* Model.xcdatamodeld */; settings = {COMPILER_FLAGS = "-Werror"; }; }; + 5F930EEC8C575CB59EC11435 /* Framework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1B4D9FADD8956DC163813272 /* Framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 60B0A79EF778752B7F574D8A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5A391BB5F85ECBA78F808646 /* LaunchScreen.storyboard */; }; + 618C6FCD590D09819BF3CA2B /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7601CC56C42BD6A1D4A75AEA /* Result.framework */; }; + 6236A088DDF97D457194A2FD /* ExternalTarget.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = FF10A8919F65E6609784780A /* ExternalTarget.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 66ED5AE47EDD03A3DBBDF552 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 4711AC75927A510DEB4FCC31 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6A779DFBEA9BC9A301F7B410 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E9E5D8F0132EBAFE6703730 /* libz.dylib */; }; + 6B0FF0DA562C828135741257 /* Contacts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24562B158AF232E893E63362 /* Contacts.framework */; }; + 6CA40F7223581AF6628DB4DE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4402963B58134A6066B9E943 /* Assets.xcassets */; }; + 6F988879F73866310CE43F37 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0B18235C78A3D3E84F2508B /* AppDelegate.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; + 712E73B032F6905D77A9AF29 /* Framework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 775BF5CB0D9F73D43A7A617A /* Framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 74E1D133AB01AA3424C6C540 /* TestProjectTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1DB5DD67A1E835227FE0397 /* TestProjectTests.swift */; }; + 751D7A8B90209DDAAB9EB73E /* File1.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFC3D1BD85132F4625B4B231 /* File1.swift */; }; + 76EFFFE1C3073348E70FAD17 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB002AF7692C5A6F71304272 /* Result.framework */; }; + 793BD03EDB3A072945B82C27 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 201AC416366CB5F5B305E883 /* Assets.xcassets */; }; + 7A218049DED8B2CD3D8AD8B6 /* StaticLibrary_ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BE447BCB0528DE1776DE2F0 /* StaticLibrary_ObjC.m */; }; + 7AD5DA085B8A8182D006BF97 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 4711AC75927A510DEB4FCC31 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7CB6A442EEFD3DAA5298FA6C /* TestFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0838859105FF7ECEE5F2B6E5 /* TestFramework.framework */; }; + 81724CEEA748160B950C85B5 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6C287801C7F7F97451C89F23 /* Settings.bundle */; }; + 820158D082BDA00E14BD61E2 /* MessagesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6027424389D202122B079A42 /* MessagesViewController.swift */; }; + 83A04F08119B1A648940B631 /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0F698427B31A67B1541925E /* FrameworkFile.swift */; }; + 84A839AF00AB269416E54CD4 /* Empty.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 241982105A45A78DDE5AE195 /* Empty.h */; }; + 85332C85D63B652CAB836FB9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 78B81AD14AB1A48CFA916FB2 /* Assets.xcassets */; }; + 866974B9FCB26B1FEB2B66AF /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC10D740EAC35BF970A7327A /* Result.framework */; }; + 89D00F3D1A87503F10AE7432 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 917AA3E4306C1A12FCC17994 /* Main.storyboard */; }; + 8B078640745463EC45519361 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 4711AC75927A510DEB4FCC31 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8F2C2446CC90D71637CA98DE /* Model.xcmappingmodel in Sources */ = {isa = PBXBuildFile; fileRef = C68273268C686B59A290EEF3 /* Model.xcmappingmodel */; }; + 8F64F92EA2ADCED7258DFB50 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7601CC56C42BD6A1D4A75AEA /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 922FA3335972E2600AD9C68D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5304167A195992C7D3D8F373 /* main.m */; }; + 966364F9A5B152ED9292B335 /* LocalizedStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EE817D9DBEBA01EC4FFCED25 /* LocalizedStoryboard.storyboard */; }; + 981AB81EA8094B072BAE125F /* SwiftyJSON.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB9233C31FD59CF515FC7414 /* SwiftyJSON.framework */; }; + 99FD6FC149E2753DD75BA792 /* StaticLibrary_ObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F853E823D826B2DCA407AEA1 /* StaticLibrary_ObjC.h */; }; + 9A61DB3A89D0636D62F6134C /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 026CED83F810BD91A053B98A /* ExtensionDelegate.swift */; }; + 9A8AB7DE8957C82A8807559F /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 4AE9A9C885258BF807598F5E /* Localizable.stringsdict */; }; + 9ABB0EF3A6513E47AF06FA56 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC10D740EAC35BF970A7327A /* Result.framework */; }; + 9BE414C2C4CE2BA52F20E38D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E835E43770D77649C766CD28 /* Assets.xcassets */; }; + 9E605FE85BFDA54EDB3AC0F0 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7A79640DB3BA2B340CCEAF0 /* Result.framework */; }; + A4F2F9AC7C204B67DFDE0991 /* swift-tagged.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8905BD70AC0E549E6C5E267A /* swift-tagged.framework */; }; + A5850DA4EB6491F7B3588832 /* SceneKitCatalog.scnassets in Resources */ = {isa = PBXBuildFile; fileRef = A2CBBF04CBB716C4BF958A99 /* SceneKitCatalog.scnassets */; }; + A795886DF55D0AF370692AAB /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = 98B17D464B46DAC8911014D5 /* module.modulemap */; }; + AC800EB90200F927CE8ADC17 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 21AA0A827D6C74A605DEE03E /* Localizable.strings */; }; + AF734D3BF6BA8808A2F1916C /* StaticLibrary_ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BE447BCB0528DE1776DE2F0 /* StaticLibrary_ObjC.m */; }; + B04F45480A1578BF58E692C6 /* libStaticLibrary_ObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 376BA5774B91C2D6DA8F6C39 /* libStaticLibrary_ObjC.a */; }; + B07763BBA6FC4AB9D65BE390 /* StaticLibrary_ObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F853E823D826B2DCA407AEA1 /* StaticLibrary_ObjC.h */; }; + B09EE60448F8EBD4546D3C41 /* TestProjectTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1DB5DD67A1E835227FE0397 /* TestProjectTests.swift */; }; + B3863DD3BC5038A7987B495F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0B18235C78A3D3E84F2508B /* AppDelegate.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; + B5B0D4EAB3B78D5CE452E100 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E889D8B5524C64ED5CF252D0 /* InterfaceController.swift */; }; + B5BD65590F7EE7C3963B5122 /* MoreUnder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7EC60A15CCEC05897CEFC34 /* MoreUnder.swift */; }; + BDEE0F3F67B9EA52B04CC2C6 /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = 98B17D464B46DAC8911014D5 /* module.modulemap */; }; + BE8E9F3E79C62F56F889E7A6 /* libStaticLibrary_ObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BAFC2D775612C35F4F1897F /* libStaticLibrary_ObjC.a */; }; + BF1837BBD7E8DA1998C80F7A /* NotificationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A8F914F7847A9FB2BDBA73C /* NotificationController.swift */; }; + BF7D701BA63380CE76046BDB /* Standalone.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA405DFE01301A4B8BA9027 /* Standalone.swift */; }; + BFD9082EF681F00F1EB86044 /* Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B4D9FADD8956DC163813272 /* Framework.framework */; }; + C42838B5395A013CF38EA48E /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0F698427B31A67B1541925E /* FrameworkFile.swift */; }; + C57A966770059A0014B3326D /* example.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 149F3970E2BE9F35231FC34D /* example.mp4 */; settings = {ASSET_TAGS = (tag1, tag2, ); }; }; + C6F8661462BC2CADFBF59851 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7601CC56C42BD6A1D4A75AEA /* Result.framework */; }; + C715C98D479D3832005E622B /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = 98B17D464B46DAC8911014D5 /* module.modulemap */; }; + C875EA6DE9F7090BDB27D6B9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 28193039398EB7872CD19490 /* LaunchScreen.storyboard */; }; + C8A63AB7A95D10D5430D3AD2 /* Contacts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24562B158AF232E893E63362 /* Contacts.framework */; }; + C9EE684BC0637F26CCB5DB98 /* SomeXPCService.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = BB1FE6F7B1E431337B051320 /* SomeXPCService.xpc */; }; + CC3D560B3E97CAAAC8B6076E /* iMessageApp.app in Resources */ = {isa = PBXBuildFile; fileRef = 239041E1C2665F9EB8AEB019 /* iMessageApp.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + CD55F1F95D9B020253935924 /* BundleX.bundle in Copy Bundle Resources */ = {isa = PBXBuildFile; fileRef = C2669AB60DB45D52E58D5A6D /* BundleX.bundle */; }; + D584474E14DF674265501DA7 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 4711AC75927A510DEB4FCC31 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D6A9F9FE464839B860307F97 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B274B43FDC5E8E1FEF7E9FA /* ViewController.swift */; }; + D6E1725E31FE9D8D8B0075AD /* XPC_Service.m in Sources */ = {isa = PBXBuildFile; fileRef = A2D7192D099F88F92AC33C9A /* XPC_Service.m */; }; + D6F1CE68BD0D773AF8FB5166 /* Framework2.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C6EA871817E3A864FDE5DA1 /* Framework2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + D94D5D2D9EF9B359DEE438F6 /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 574D072C770BAE53531249CF /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; + DCFAD099E6E129BDE43E1B79 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F6813B4F70D433054D0C8FB8 /* Assets.xcassets */; }; + E013E10B776DC6DD0956F20E /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EC10D740EAC35BF970A7327A /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + E0976466478FACCA962CD09F /* Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 775BF5CB0D9F73D43A7A617A /* Framework.framework */; }; + E1B953AB2F713D5D6AAF5A72 /* ExternalTarget.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF10A8919F65E6609784780A /* ExternalTarget.framework */; }; + E267E405615EF1727C3D49C7 /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0F698427B31A67B1541925E /* FrameworkFile.swift */; }; + E347C6740A9E3D8C9BF87A26 /* Framework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1B4D9FADD8956DC163813272 /* Framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + E4D57896F90E7AEC6FED0634 /* ResourceFolder in Resources */ = {isa = PBXBuildFile; fileRef = B787DC6505E0F15C5C4975E3 /* ResourceFolder */; }; + E9AB59E760C7776384AC7E32 /* SwiftFileInDotPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9327B50C4B0BDF4A252CB2A /* SwiftFileInDotPath.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; + EC9566B5691051C716BCF88D /* swift-tagged.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8905BD70AC0E549E6C5E267A /* swift-tagged.framework */; }; + ED7050A16D1A986B9F47AC43 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C552EC308B5274F2B6AC53B5 /* Assets.xcassets */; }; + F01287B5AA79506789A98FBF /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = F7692A9E8CAA5A4B12FE633B /* libc++.tbd */; }; + F0610A6808224739266D81D6 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7601CC56C42BD6A1D4A75AEA /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + F189C2A0350D2BF0DE9861E7 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EC10D740EAC35BF970A7327A /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + F316B77453C5A4A9692166AF /* TestProjectUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED4A6FE2AF37CDDD3A0D1D6B /* TestProjectUITests.swift */; }; + F415FFDA9CCF0237B5C0D7A5 /* Contacts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24562B158AF232E893E63362 /* Contacts.framework */; }; + F6BD1D30F6F6E5809B4CF709 /* TestFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0838859105FF7ECEE5F2B6E5 /* TestFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + F7A0142071C8301E99C11E3A /* Framework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1B4D9FADD8956DC163813272 /* Framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + F94B7016C76FC0A6B74111B3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 214F642E7193A3E608845F4B /* Main.storyboard */; }; + FA39577CB6231B24C47E828D /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC10D740EAC35BF970A7327A /* Result.framework */; }; + FA7F5B42ACAEA016400A195A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 28193039398EB7872CD19490 /* LaunchScreen.storyboard */; }; + FAD05AB024D2E3CB4EDBFAF4 /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0F698427B31A67B1541925E /* FrameworkFile.swift */; }; + FB753FD180515AE293B2485C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B2986C19C8498CDE44CFDAD /* ViewController.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; + FE6A3F3C7247CD2294753909 /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0F698427B31A67B1541925E /* FrameworkFile.swift */; }; + FECBF2C1DD2D1B8BBD7DA7DF /* StaticLibrary_ObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F853E823D826B2DCA407AEA1 /* StaticLibrary_ObjC.h */; }; + FFFAEFA20D72082E2888D56D /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 574D072C770BAE53531249CF /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 0FA2870744F254DD5E3D8374 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 991BCE8E861305DE596EACFE; + remoteInfo = App_iOS; + }; + 12A939B349AFA0D4B2A270EA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8507B864DA27764F1EA6962C; + remoteInfo = StaticLibrary_ObjC_tvOS; + }; + 193DD9683611F943D58ADCC6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 242476187403208F30D3219F; + remoteInfo = Framework_iOS; + }; + 1BC468AB18D1F023019F1FBA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = D8592DE6C0BC77BE0D4A2FAB; + remoteInfo = "XPC Service"; + }; + 2EAC3D4B05A43768279E03B7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 242476187403208F30D3219F; + remoteInfo = Framework_iOS; + }; + 2F6AB4DC84D6D8156D9743ED /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5C6E1548456BE821C90E23F0; + remoteInfo = Framework2_iOS; + }; + 3BFFB177BC0E51F54F902AE2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = E8BDC848AB4F8D5927ADB55B; + remoteInfo = App_macOS; + }; + 4CA2280DE705720E8B851B8E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 242476187403208F30D3219F; + remoteInfo = Framework_iOS; + }; + 4DB3B584A41D1D19DE1B39E1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 974B3EC2FF4FBAA1513A2950; + remoteInfo = Framework_macOS; + }; + 5A3133C260AB0B2EE767880A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3DBB411AF8D365588E21D8CA; + remoteInfo = StaticLibrary_ObjC_iOS; + }; + 5CFE6D622751CA41654F4B00 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5239298BB84B4FDDFD84469E; + remoteInfo = StaticLibrary_ObjC_watchOS; + }; + 6D2993924DD47F80ACB3567E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 559F6E334A370096461729A9; + remoteInfo = App_Clip; + }; + 6DEB235CE85E75F90EC6175D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 559F6E334A370096461729A9; + remoteInfo = App_Clip; + }; + 8C53BD3BF1B5227C831355F9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 43EA7AFC9AC8E9116A228613 /* AnotherProject */; + proxyType = 1; + remoteGlobalIDString = E76A5F5E363E470416D3B487; + remoteInfo = ExternalTarget; + }; + 913CC94BAD23FF3E3636E8E5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 991BCE8E861305DE596EACFE; + remoteInfo = App_iOS; + }; + 98E077CD4918FF68662C4337 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 63EAAEAE0535C975295781D4; + remoteInfo = TestFramework; + }; + 9C7FA5CABE5A0EC3D5C4055B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3DBB411AF8D365588E21D8CA; + remoteInfo = StaticLibrary_ObjC_iOS; + }; + 9D69D471B06AE37AEA2D84E3 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 991BCE8E861305DE596EACFE; + remoteInfo = App_iOS; + }; + 9F4AAED22329F820EA5DB2F7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3FCF5A083151C7E22B24E807; + remoteInfo = StaticLibrary_ObjC_macOS; + }; + BB3B4DE7EE8CEE505BBC6DF4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 63EAAEAE0535C975295781D4; + remoteInfo = TestFramework; + }; + C0408FA85DFD7E9F59541D2E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3FCF5A083151C7E22B24E807; + remoteInfo = StaticLibrary_ObjC_macOS; + }; + C68FFE66E063CA163CE1D68B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = DAF9935ECEC17AA561D28998; + remoteInfo = "App_watchOS Extension"; + }; + D51CBCA8454A129B3F1C0629 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 242476187403208F30D3219F; + remoteInfo = Framework_iOS; + }; + D65DFD803579AB5662714F99 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 43EA7AFC9AC8E9116A228613 /* AnotherProject */; + proxyType = 2; + remoteGlobalIDString = D6340FC7DEBC81E0127BAFD6; + remoteInfo = ExternalTarget; + }; + D7FD49F1E9A4B29D528D18A5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = FF3DC3DF2AA3AE02377647C9; + remoteInfo = iMessageApp; + }; + F2FCFF0F2338D8316F9D8D47 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = EDE7907E34D077B346FC4CF1; + remoteInfo = iMessageExtension; + }; + F52878EB4A2F3E2E1F89036F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 559F6E334A370096461729A9; + remoteInfo = App_Clip; + }; + F7BDEB5E84BA34C6E32E8C1F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3DBB411AF8D365588E21D8CA; + remoteInfo = StaticLibrary_ObjC_iOS; + }; + F8D2CC44BE471C9C41F5B1E6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3DBB411AF8D365588E21D8CA; + remoteInfo = StaticLibrary_ObjC_iOS; + }; + FF4780B89575C7C171A9B401 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7467FBF059DC784B5601CA7E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 15A12B9A8B7A477CF2D4ABEF; + remoteInfo = App_watchOS; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 108FC2F1B37B100230F6C0C5 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + E347C6740A9E3D8C9BF87A26 /* Framework.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 1C41E253B853711670514ECC /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + 29C5F4E429F4826AC299988F /* StaticLibrary_ObjC.h in CopyFiles */, + BDEE0F3F67B9EA52B04CC2C6 /* module.modulemap in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 29EAAC76E47D07B8D8F50262 /* Embed App Clips */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(CONTENTS_FOLDER_PATH)/AppClips"; + dstSubfolderSpec = 16; + files = ( + 068A307AAD3FDB71E245CF4B /* App_Clip.app in Embed App Clips */, + ); + name = "Embed App Clips"; + runOnlyForDeploymentPostprocessing = 0; + }; + 39EF6E709D5336CB216DC2FB /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + 99FD6FC149E2753DD75BA792 /* StaticLibrary_ObjC.h in CopyFiles */, + 0A6862249B5F9D544A774770 /* module.modulemap in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3FE33BF71F952904B55B2C67 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 22E1EE394E24667C942CAFC4 /* Result.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 456284554D1A6C53EB39BA4B /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + F6BD1D30F6F6E5809B4CF709 /* TestFramework.framework in Embed Frameworks */, + E013E10B776DC6DD0956F20E /* Result.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 5FF5F332311FF39E3B020BD9 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 8; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 6236A088DDF97D457194A2FD /* ExternalTarget.framework in Embed Frameworks */, + D6F1CE68BD0D773AF8FB5166 /* Framework2.framework in Embed Frameworks */, + 5F930EEC8C575CB59EC11435 /* Framework.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 1; + }; + 779219E7849466ABE0506B3A /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + F189C2A0350D2BF0DE9861E7 /* Result.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 807E1CB99AAD2470DC373BC0 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 2B74F88A338EE674477351B1 /* TestFramework.framework in Embed Frameworks */, + 0DC0E4339EBAB04754837F50 /* Result.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 883C11C8EE5A3B03232F4D48 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + B07763BBA6FC4AB9D65BE390 /* StaticLibrary_ObjC.h in CopyFiles */, + A795886DF55D0AF370692AAB /* module.modulemap in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 89F3F9E096C5559317B37165 /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 4A1F587B61D4D2EE6833C281 /* App_watchOS Extension.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; + 93EF9E66AA5ED7DE1C6A6FAD /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 53AC4E3D64CC954A74A6BF51 /* iMessageExtension.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; + 9830A88A58F9591CFE7662C9 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(CONTENTS_FOLDER_PATH)/XPCServices"; + dstSubfolderSpec = 16; + files = ( + 0A14BD0F9B22C84677FD7D6F /* XPC Service.xpc in CopyFiles */, + C9EE684BC0637F26CCB5DB98 /* SomeXPCService.xpc in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9DEE5A10D294FF2BD9A5233C /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 8F64F92EA2ADCED7258DFB50 /* Result.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + A603A9260F95BC8B6B945B34 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + 84A839AF00AB269416E54CD4 /* Empty.h in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B4F76A1390264F5E325C3C1E /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 712E73B032F6905D77A9AF29 /* Framework.framework in Embed Frameworks */, + F0610A6808224739266D81D6 /* Result.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + D1B97A1B112643A756935FA5 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + F7A0142071C8301E99C11E3A /* Framework.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + E0B58B04AD09D3B4B1486315 /* Copy Bundle Resources */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstSubfolderSpec = 7; + files = ( + CD55F1F95D9B020253935924 /* BundleX.bundle in Copy Bundle Resources */, + ); + name = "Copy Bundle Resources"; + runOnlyForDeploymentPostprocessing = 0; + }; + EC033AB632FAAA03F670D215 /* Embed Watch Content */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(CONTENTS_FOLDER_PATH)/Watch"; + dstSubfolderSpec = 16; + files = ( + 448A2FB5230855C2A68C8960 /* App_watchOS.app in Embed Watch Content */, + ); + name = "Embed Watch Content"; + runOnlyForDeploymentPostprocessing = 0; + }; + F0CE57DCC7A58AFEA0EB1EF5 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + FECBF2C1DD2D1B8BBD7DA7DF /* StaticLibrary_ObjC.h in CopyFiles */, + C715C98D479D3832005E622B /* module.modulemap in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 021F11A2B76A01ED4113286B /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 026CED83F810BD91A053B98A /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = ""; }; + 02C5C670B0624A007BCB341D /* App_watchOS Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "App_watchOS Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; + 0751ACA46EF394AF3E358E48 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 0838859105FF7ECEE5F2B6E5 /* TestFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TestFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0B2986C19C8498CDE44CFDAD /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 0C6EA871817E3A864FDE5DA1 /* Framework2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0E9E5D8F0132EBAFE6703730 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + 115047E35C1A4697DEC6D83F /* App_iOS.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = App_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1342A225B1FB5CCDE2D8C511 /* StaticLibrary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StaticLibrary.swift; sourceTree = ""; }; + 13B7C799370862813D8FE163 /* TestProjectUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectUITests.swift; sourceTree = ""; }; + 149F3970E2BE9F35231FC34D /* example.mp4 */ = {isa = PBXFileReference; path = example.mp4; sourceTree = ""; }; + 160628D3BF533455BA779575 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 18232E5A7F3528FA1193CC79 /* XPC_Service.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPC_Service.h; sourceTree = ""; }; + 1B4D9FADD8956DC163813272 /* Framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 201AC416366CB5F5B305E883 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 20B4D4D4A77434FA5593E35D /* Framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 239041E1C2665F9EB8AEB019 /* iMessageApp.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = iMessageApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 241982105A45A78DDE5AE195 /* Empty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Empty.h; sourceTree = ""; }; + 24562B158AF232E893E63362 /* Contacts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Contacts.framework; path = System/Library/Frameworks/Contacts.framework; sourceTree = SDKROOT; }; + 26A55238739205BF9ECD6A0B /* XPC_ServiceProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPC_ServiceProtocol.h; sourceTree = ""; }; + 28B6600F3CDA6F15633D2134 /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = config.xcconfig; sourceTree = ""; }; + 2D3BE7580CC3D623991914A4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 31BC9A6E8D133DF950755A82 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 329A12107D19B52E1F8554B4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 334F263B3704264D929F4414 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 3469B706C364CC07AAEF298A /* App.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = App.entitlements; sourceTree = ""; }; + 34E069C383E5121BD428C2D7 /* Clip.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Clip.entitlements; sourceTree = ""; }; + 35F22C6354CC35E2CF72A165 /* Resource.abcd */ = {isa = PBXFileReference; path = Resource.abcd; sourceTree = ""; }; + 376BA5774B91C2D6DA8F6C39 /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 377DF5A1EB742CEF829A9A75 /* SomeFile */ = {isa = PBXFileReference; path = SomeFile; sourceTree = ""; }; + 3B4590226C49347F4BC18782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 3BAAEBEC8B795DCF1C9C5ADE /* Tool */ = {isa = PBXFileReference; includeInIndex = 0; path = Tool; sourceTree = BUILT_PRODUCTS_DIR; }; + 3BE447BCB0528DE1776DE2F0 /* StaticLibrary_ObjC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StaticLibrary_ObjC.m; sourceTree = ""; }; + 43EA7AFC9AC8E9116A228613 /* AnotherProject */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AnotherProject; path = AnotherProject/AnotherProject.xcodeproj; sourceTree = ""; }; + 4402963B58134A6066B9E943 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 4590EBD0480830F80EDC182E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 4711AC75927A510DEB4FCC31 /* MyFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyFramework.h; sourceTree = ""; }; + 4A8F914F7847A9FB2BDBA73C /* NotificationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationController.swift; sourceTree = ""; }; + 4D770C47456D076025DD7A51 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 4EC670E53BFAA6F61C02BE82 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + 4FFF3A7EBB86F6500589ABDD /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 51E2D479CB960CB44EB545C6 /* XPC Service.xpc */ = {isa = PBXFileReference; explicitFileType = "wrapper.xpc-service"; includeInIndex = 0; path = "XPC Service.xpc"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5249EE07991C4370C3F2ED16 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 5304167A195992C7D3D8F373 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 55DF3F01BB8698E8226D05A0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 574D072C770BAE53531249CF /* Headers */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Headers; sourceTree = SOURCE_ROOT; }; + 5C383DB670761F227610EDB0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 5DB17246AF97AF5311C1CB7B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 5FF83941D764AEB361249B72 /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = ""; }; + 6027424389D202122B079A42 /* MessagesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagesViewController.swift; sourceTree = ""; }; + 610AD86B5088E07993870579 /* Model 3.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Model 3.xcdatamodel"; sourceTree = ""; }; + 6170A2CAD1ABE59888B1F95E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/LocalizedStoryboard.strings; sourceTree = ""; }; + 618546FAE1D216BFFA06DE35 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 63FC1CBFB0F9A0C43B5A58DE /* MyPlayground.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = MyPlayground.playground; sourceTree = ""; }; + 68D8757F885CE1C02514845C /* StandaloneAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = StandaloneAssets.xcassets; sourceTree = ""; }; + 68F16F683711ECD7CC9C43EC /* TestProjectTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectTests.swift; sourceTree = ""; }; + 6BAFC2D775612C35F4F1897F /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 6C14AF20FB1E07BF9D32937E /* iMessageExtension.appex */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "wrapper.app-extension"; path = iMessageExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + 6C287801C7F7F97451C89F23 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; + 6F98C5891F0CE8C0DEF57B40 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; }; + 70AF281B672F71A33256F70E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 7601CC56C42BD6A1D4A75AEA /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; + 76A87BB63618846E0E0F363F /* PushNotificationPayload.apns */ = {isa = PBXFileReference; lastKnownFileType = text; path = PushNotificationPayload.apns; sourceTree = ""; }; + 775BF5CB0D9F73D43A7A617A /* Framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 78B81AD14AB1A48CFA916FB2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 797FC015E4199F24EE43C159 /* base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = base.xcconfig; sourceTree = ""; }; + 7ACB8439596DD7A77FD11AFD /* App_iOS_Tests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = App_iOS_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 7B274B43FDC5E8E1FEF7E9FA /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 7CBC1BDF40FEDAC0DB9ACFFD /* iMessageStickersExtension.appex */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "wrapper.app-extension"; path = iMessageStickersExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + 7E6075D44DFAA43C62CED79D /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; }; + 80490871D5D4676E77EA80E9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 80F3EA429799FBBE247A2D82 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 81EEE090725ECD1354287E74 /* Framework2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8905BD70AC0E549E6C5E267A /* swift-tagged.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = "swift-tagged.framework"; sourceTree = ""; }; + 8D1E74E40BA947CAF2DA087F /* Mintfile */ = {isa = PBXFileReference; path = Mintfile; sourceTree = ""; }; + 948E174040217FD36F14BCF6 /* outputList.xcfilelist */ = {isa = PBXFileReference; lastKnownFileType = text.xcfilelist; path = outputList.xcfilelist; sourceTree = ""; }; + 9759A19BAD2C50FCECF7D3C1 /* App_Clip_UITests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = App_Clip_UITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 98B17D464B46DAC8911014D5 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; }; + A2CBBF04CBB716C4BF958A99 /* SceneKitCatalog.scnassets */ = {isa = PBXFileReference; lastKnownFileType = wrapper.scnassets; path = SceneKitCatalog.scnassets; sourceTree = ""; }; + A2D7192D099F88F92AC33C9A /* XPC_Service.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPC_Service.m; sourceTree = ""; }; + A74AC60A5F465A6542431675 /* libStaticLibrary_Swift.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary_Swift.a; sourceTree = BUILT_PRODUCTS_DIR; }; + A89D9F16591C365D568A0BA4 /* Framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A9327B50C4B0BDF4A252CB2A /* SwiftFileInDotPath.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftFileInDotPath.swift; sourceTree = ""; }; + AB002AF7692C5A6F71304272 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; + AE98EBB8C701BCA1BF478547 /* inputList.xcfilelist */ = {isa = PBXFileReference; lastKnownFileType = text.xcfilelist; path = inputList.xcfilelist; sourceTree = ""; }; + B787DC6505E0F15C5C4975E3 /* ResourceFolder */ = {isa = PBXFileReference; lastKnownFileType = folder; name = ResourceFolder; path = Resources/ResourceFolder; sourceTree = SOURCE_ROOT; }; + B945C628ACCF26FC51594160 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + BB1FE6F7B1E431337B051320 /* SomeXPCService.xpc */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.xpc-service"; path = SomeXPCService.xpc; sourceTree = ""; }; + BB4C1F0CB031F894B46533E0 /* App_watchOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App_watchOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + BE9FDD096DC947BCB58D7B08 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + C0ACDDAF456079BA0099BFCE /* App_macOS_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = App_macOS_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + C0B18235C78A3D3E84F2508B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + C0F698427B31A67B1541925E /* FrameworkFile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrameworkFile.swift; sourceTree = ""; }; + C16F953828BFF71DEB579075 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + C22BEDE0B2217312642FADA2 /* App_Clip.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = App_Clip.app; sourceTree = BUILT_PRODUCTS_DIR; }; + C2669AB60DB45D52E58D5A6D /* BundleX.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = BundleX.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + C4AF74FB9AB607DFA9E07A4E /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = Base; path = Base.lproj/Localizable.stringsdict; sourceTree = ""; }; + C552EC308B5274F2B6AC53B5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + C68273268C686B59A290EEF3 /* Model.xcmappingmodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcmappingmodel; path = Model.xcmappingmodel; sourceTree = ""; }; + C782AA5939417FFD3CF8EB52 /* App_iOS_UITests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = App_iOS_UITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + CFC3D1BD85132F4625B4B231 /* File1.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = File1.swift; path = Group/File1.swift; sourceTree = ""; }; + D358C9F4D4F2D97C148913CF /* File2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = File2.swift; path = Group2/File2.swift; sourceTree = ""; }; + D7FDE08353EF6730CA4E6F32 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + D80E621293876A18B051299F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = ""; }; + D88BF5054CA820ED443AC1F9 /* EntitledApp.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = EntitledApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + D998E6204320A2092F9327FA /* Model 2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Model 2.xcdatamodel"; sourceTree = ""; }; + D9F19321D54BD8E80E6EBC08 /* Resource.abc */ = {isa = PBXFileReference; path = Resource.abc; sourceTree = ""; }; + DAC130416836C31B7A63DD0C /* Folder */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Folder; sourceTree = SOURCE_ROOT; }; + DB9233C31FD59CF515FC7414 /* SwiftyJSON.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = SwiftyJSON.framework; sourceTree = ""; }; + DEC53DADDC767F9AE310B83E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; + DF3C1E903F8399E193F3B4BA /* App_macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App_macOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + DF5EEB3171D1A7722CD9413A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + E2A15F2C8142988473574022 /* Framework2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E4FBD31453FD26F4C7ABD5F9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; + E7A79640DB3BA2B340CCEAF0 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; + E7EC60A15CCEC05897CEFC34 /* MoreUnder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoreUnder.swift; sourceTree = ""; }; + E835E43770D77649C766CD28 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + E83A520CAE8A4BCF6578C2A9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + E889D8B5524C64ED5CF252D0 /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = ""; }; + E94FA789791614CFD0F98C26 /* App_iOS_With_Clip.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = App_iOS_With_Clip.app; sourceTree = BUILT_PRODUCTS_DIR; }; + EADBB714A4B3D4F89D79419E /* Framework2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EC10D740EAC35BF970A7327A /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; + ED4A6FE2AF37CDDD3A0D1D6B /* TestProjectUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectUITests.swift; sourceTree = ""; }; + EE31326E32ED51CB02C58E9D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + F1188E378718785171F293B6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LocalizedStoryboard.storyboard; sourceTree = ""; }; + F18408A818972A0675B115E4 /* App_Clip_Tests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = App_Clip_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + F1DB5DD67A1E835227FE0397 /* TestProjectTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectTests.swift; sourceTree = ""; }; + F24135F7E2026D8D80F8B919 /* MyBundle.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = MyBundle.bundle; sourceTree = ""; }; + F55FFC5DC497CF889F859496 /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; + F6813B4F70D433054D0C8FB8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + F7692A9E8CAA5A4B12FE633B /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; + F853E823D826B2DCA407AEA1 /* StaticLibrary_ObjC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StaticLibrary_ObjC.h; sourceTree = ""; }; + FFA405DFE01301A4B8BA9027 /* Standalone.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Standalone.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 286A764EB49712A6BE938CD9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C6F8661462BC2CADFBF59851 /* Result.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 43C5260C6E5332D5E733D85E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7CB6A442EEFD3DAA5298FA6C /* TestFramework.framework in Frameworks */, + EC9566B5691051C716BCF88D /* swift-tagged.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 57AAA51FE44B9280D0F3C9F6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6B0FF0DA562C828135741257 /* Contacts.framework in Frameworks */, + 3EC2758239D6659E4D35DFD9 /* Framework.framework in Frameworks */, + 9ABB0EF3A6513E47AF06FA56 /* Result.framework in Frameworks */, + 1081606EF3D131248CC46BD6 /* libStaticLibrary_ObjC.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5A2BDC62A00DF008470998CA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C8A63AB7A95D10D5430D3AD2 /* Contacts.framework in Frameworks */, + E0976466478FACCA962CD09F /* Framework.framework in Frameworks */, + 618C6FCD590D09819BF3CA2B /* Result.framework in Frameworks */, + B04F45480A1578BF58E692C6 /* libStaticLibrary_ObjC.a in Frameworks */, + F01287B5AA79506789A98FBF /* libc++.tbd in Frameworks */, + 6A779DFBEA9BC9A301F7B410 /* libz.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6DE5ACEB01740726A5F7FE20 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 76EFFFE1C3073348E70FAD17 /* Result.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 817E815A267F7A93B27C28C1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E1B953AB2F713D5D6AAF5A72 /* ExternalTarget.framework in Frameworks */, + F415FFDA9CCF0237B5C0D7A5 /* Contacts.framework in Frameworks */, + 2FB0D86C27098550FAFB4164 /* Framework2.framework in Frameworks */, + BFD9082EF681F00F1EB86044 /* Framework.framework in Frameworks */, + 866974B9FCB26B1FEB2B66AF /* Result.framework in Frameworks */, + 26170D4BBCBE25B7ADB6C3C9 /* libStaticLibrary_ObjC.a in Frameworks */, + 981AB81EA8094B072BAE125F /* SwiftyJSON.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8425BF17AF010D7E10061AB3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FA39577CB6231B24C47E828D /* Result.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 93C6B66FB2295D9FE2D068F0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5986EF99D2CDEE9EBC4B2AF1 /* TestFramework.framework in Frameworks */, + A4F2F9AC7C204B67DFDE0991 /* swift-tagged.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 941526D5A3C922259CA39CB6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1F0ED24C994FE9945337388B /* Framework.framework in Frameworks */, + 35AA463863F88CB6290C264D /* Result.framework in Frameworks */, + BE8E9F3E79C62F56F889E7A6 /* libStaticLibrary_ObjC.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F3D411695D4C043FEF3265B7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9E605FE85BFDA54EDB3AC0F0 /* Result.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 02BC5C3C2EFC35F602940195 /* FolderWithDot2.0 */ = { + isa = PBXGroup; + children = ( + A9327B50C4B0BDF4A252CB2A /* SwiftFileInDotPath.swift */, + ); + path = FolderWithDot2.0; + sourceTree = ""; + }; + 032B95A6C88F143883A20612 /* iOS */ = { + isa = PBXGroup; + children = ( + EC10D740EAC35BF970A7327A /* Result.framework */, + 8905BD70AC0E549E6C5E267A /* swift-tagged.framework */, + DB9233C31FD59CF515FC7414 /* SwiftyJSON.framework */, + ); + path = iOS; + sourceTree = ""; + }; + 06D66F6012249ADB6930674D /* StaticLibrary_Swift */ = { + isa = PBXGroup; + children = ( + 1342A225B1FB5CCDE2D8C511 /* StaticLibrary.swift */, + ); + path = StaticLibrary_Swift; + sourceTree = ""; + }; + 0B61C4DD7507DBE79AB464C1 /* App_watchOS Extension */ = { + isa = PBXGroup; + children = ( + E835E43770D77649C766CD28 /* Assets.xcassets */, + 026CED83F810BD91A053B98A /* ExtensionDelegate.swift */, + 70AF281B672F71A33256F70E /* Info.plist */, + E889D8B5524C64ED5CF252D0 /* InterfaceController.swift */, + 4A8F914F7847A9FB2BDBA73C /* NotificationController.swift */, + 76A87BB63618846E0E0F363F /* PushNotificationPayload.apns */, + ); + path = "App_watchOS Extension"; + sourceTree = ""; + }; + 3A1FEE49143420BD1A65448C /* iMessageApp */ = { + isa = PBXGroup; + children = ( + C552EC308B5274F2B6AC53B5 /* Assets.xcassets */, + BE9FDD096DC947BCB58D7B08 /* Info.plist */, + ); + path = iMessageApp; + sourceTree = ""; + }; + 3E1C0D21208BF097D3194956 /* CustomGroup */ = { + isa = PBXGroup; + children = ( + CFC3D1BD85132F4625B4B231 /* File1.swift */, + D358C9F4D4F2D97C148913CF /* File2.swift */, + DAC130416836C31B7A63DD0C /* Folder */, + 8D1E74E40BA947CAF2DA087F /* Mintfile */, + ); + name = CustomGroup; + sourceTree = ""; + }; + 43472DDB7FC544B77A4B9308 /* Carthage */ = { + isa = PBXGroup; + children = ( + 032B95A6C88F143883A20612 /* iOS */, + D42109390CD998BAF417FEF7 /* Mac */, + C134B9E65FCA5003ADEE5928 /* tvOS */, + 460758AB62AF78ABF609D4BE /* watchOS */, + ); + name = Carthage; + path = Carthage/Build; + sourceTree = ""; + }; + 460758AB62AF78ABF609D4BE /* watchOS */ = { + isa = PBXGroup; + children = ( + E7A79640DB3BA2B340CCEAF0 /* Result.framework */, + ); + path = watchOS; + sourceTree = ""; + }; + 4692C54657FAA38490642A5A /* CopyFiles */ = { + isa = PBXGroup; + children = ( + 241982105A45A78DDE5AE195 /* Empty.h */, + ); + path = CopyFiles; + sourceTree = ""; + }; + 4E9E62860C6D8F33A5D1A476 /* App_watchOS */ = { + isa = PBXGroup; + children = ( + 55DF3F01BB8698E8226D05A0 /* Assets.xcassets */, + 4590EBD0480830F80EDC182E /* Info.plist */, + 7E1427FBA94B073C3FD2830A /* Interface.storyboard */, + ); + path = App_watchOS; + sourceTree = ""; + }; + 5017C17F6AC357F6128D719C /* App_Clip_UITests */ = { + isa = PBXGroup; + children = ( + 2D3BE7580CC3D623991914A4 /* Info.plist */, + ED4A6FE2AF37CDDD3A0D1D6B /* TestProjectUITests.swift */, + ); + path = App_Clip_UITests; + sourceTree = ""; + }; + 504A23A54D051DF5E8D1C9D5 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 43472DDB7FC544B77A4B9308 /* Carthage */, + 24562B158AF232E893E63362 /* Contacts.framework */, + F7692A9E8CAA5A4B12FE633B /* libc++.tbd */, + 0E9E5D8F0132EBAFE6703730 /* libz.dylib */, + ); + name = Frameworks; + sourceTree = ""; + }; + 53FBB4268BA34C04D5E32FB1 /* Module */ = { + isa = PBXGroup; + children = ( + 98B17D464B46DAC8911014D5 /* module.modulemap */, + ); + path = Module; + sourceTree = ""; + }; + 54E9E53007DE91CA40153A40 = { + isa = PBXGroup; + children = ( + A62B59FAE6F412F87AA9802C /* App */, + 57879A6554A581D1AB431C97 /* App_Clip */, + 5017C17F6AC357F6128D719C /* App_Clip_UITests */, + 89D980E845C2940109EB1A0E /* App_iOS_Tests */, + 6690EF741BA765F2C6812BA8 /* App_iOS_UITests */, + B95B6603AA3915022CEA4E81 /* App_macOS */, + E983D6835D9460CCFC7E53C2 /* App_macOS_Tests */, + 4E9E62860C6D8F33A5D1A476 /* App_watchOS */, + 0B61C4DD7507DBE79AB464C1 /* App_watchOS Extension */, + D5532FE12C5B6CC1A7F3E3D1 /* Configs */, + 4692C54657FAA38490642A5A /* CopyFiles */, + 3E1C0D21208BF097D3194956 /* CustomGroup */, + 8851333DB3B77DCB07BEBA8A /* FileGroup */, + 77F94B3D3772A24BC26FCE1A /* Framework */, + 3A1FEE49143420BD1A65448C /* iMessageApp */, + 8D3D464FADE45CD5CFD0CD2D /* iMessageExtension */, + EFF9DC82C1B9EA1B47804816 /* iMessageStickers */, + D297C054132559DEEE78A28D /* Resources */, + C6B85E6F88CE3EE3727FF514 /* StandaloneFiles */, + D313CB5937567576F546F007 /* StaticLibrary_ObjC */, + 06D66F6012249ADB6930674D /* StaticLibrary_Swift */, + 5BE9DC0E1ACDDD73F7409C8B /* Tool */, + 9E4CAECCD14E742E6E6F8700 /* Utilities */, + 83B6B878B045BA77C258A0A2 /* Vendor */, + 7A40E7C16A3AB0A95669A2A8 /* XPC Service */, + DAC130416836C31B7A63DD0C /* Folder */, + 574D072C770BAE53531249CF /* Headers */, + B787DC6505E0F15C5C4975E3 /* ResourceFolder */, + 377DF5A1EB742CEF829A9A75 /* SomeFile */, + C4DD1C7F5C7097CA81DB3FE8 /* Bundles */, + 504A23A54D051DF5E8D1C9D5 /* Frameworks */, + E8A7C596497AB5EFE54C4C67 /* Products */, + C0F6DA034785945B03CC8273 /* Projects */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + usesTabs = 0; + }; + 57879A6554A581D1AB431C97 /* App_Clip */ = { + isa = PBXGroup; + children = ( + EE31326E32ED51CB02C58E9D /* AppDelegate.swift */, + 329A12107D19B52E1F8554B4 /* Assets.xcassets */, + 34E069C383E5121BD428C2D7 /* Clip.entitlements */, + 80490871D5D4676E77EA80E9 /* Info.plist */, + 5A391BB5F85ECBA78F808646 /* LaunchScreen.storyboard */, + 556DA72EFDDD94E4E49C0754 /* Main.storyboard */, + 7B274B43FDC5E8E1FEF7E9FA /* ViewController.swift */, + ); + path = App_Clip; + sourceTree = ""; + }; + 5BE9DC0E1ACDDD73F7409C8B /* Tool */ = { + isa = PBXGroup; + children = ( + 4EC670E53BFAA6F61C02BE82 /* main.swift */, + ); + path = Tool; + sourceTree = ""; + }; + 63CA1B81E0D9E4D5F1683D64 /* Products */ = { + isa = PBXGroup; + children = ( + FF10A8919F65E6609784780A /* ExternalTarget.framework */, + ); + name = Products; + sourceTree = ""; + }; + 6690EF741BA765F2C6812BA8 /* App_iOS_UITests */ = { + isa = PBXGroup; + children = ( + 31BC9A6E8D133DF950755A82 /* Info.plist */, + 13B7C799370862813D8FE163 /* TestProjectUITests.swift */, + ); + path = App_iOS_UITests; + sourceTree = ""; + }; + 77F94B3D3772A24BC26FCE1A /* Framework */ = { + isa = PBXGroup; + children = ( + C0F698427B31A67B1541925E /* FrameworkFile.swift */, + 4D770C47456D076025DD7A51 /* Info.plist */, + 4711AC75927A510DEB4FCC31 /* MyFramework.h */, + ); + path = Framework; + sourceTree = ""; + }; + 7A40E7C16A3AB0A95669A2A8 /* XPC Service */ = { + isa = PBXGroup; + children = ( + 5C383DB670761F227610EDB0 /* Info.plist */, + 5304167A195992C7D3D8F373 /* main.m */, + 18232E5A7F3528FA1193CC79 /* XPC_Service.h */, + A2D7192D099F88F92AC33C9A /* XPC_Service.m */, + 26A55238739205BF9ECD6A0B /* XPC_ServiceProtocol.h */, + ); + path = "XPC Service"; + sourceTree = ""; + }; + 83B6B878B045BA77C258A0A2 /* Vendor */ = { + isa = PBXGroup; + children = ( + BB1FE6F7B1E431337B051320 /* SomeXPCService.xpc */, + ); + path = Vendor; + sourceTree = ""; + }; + 8851333DB3B77DCB07BEBA8A /* FileGroup */ = { + isa = PBXGroup; + children = ( + AE521ABD892103D1D989D151 /* UnderFileGroup */, + ); + path = FileGroup; + sourceTree = ""; + }; + 89D980E845C2940109EB1A0E /* App_iOS_Tests */ = { + isa = PBXGroup; + children = ( + 0751ACA46EF394AF3E358E48 /* Info.plist */, + F1DB5DD67A1E835227FE0397 /* TestProjectTests.swift */, + ); + path = App_iOS_Tests; + sourceTree = ""; + }; + 8D3D464FADE45CD5CFD0CD2D /* iMessageExtension */ = { + isa = PBXGroup; + children = ( + 78B81AD14AB1A48CFA916FB2 /* Assets.xcassets */, + D7FDE08353EF6730CA4E6F32 /* Info.plist */, + 95933688FAC17B9E7752CB4F /* MainInterface.storyboard */, + 6027424389D202122B079A42 /* MessagesViewController.swift */, + ); + path = iMessageExtension; + sourceTree = ""; + }; + 9E4CAECCD14E742E6E6F8700 /* Utilities */ = { + isa = PBXGroup; + children = ( + 63FC1CBFB0F9A0C43B5A58DE /* MyPlayground.playground */, + ); + path = Utilities; + sourceTree = ""; + }; + A62B59FAE6F412F87AA9802C /* App */ = { + isa = PBXGroup; + children = ( + 02BC5C3C2EFC35F602940195 /* FolderWithDot2.0 */, + 3469B706C364CC07AAEF298A /* App.entitlements */, + C0B18235C78A3D3E84F2508B /* AppDelegate.swift */, + F6813B4F70D433054D0C8FB8 /* Assets.xcassets */, + 160628D3BF533455BA779575 /* Info.plist */, + AE98EBB8C701BCA1BF478547 /* inputList.xcfilelist */, + 28193039398EB7872CD19490 /* LaunchScreen.storyboard */, + 21AA0A827D6C74A605DEE03E /* Localizable.strings */, + 4AE9A9C885258BF807598F5E /* Localizable.stringsdict */, + EE817D9DBEBA01EC4FFCED25 /* LocalizedStoryboard.storyboard */, + 917AA3E4306C1A12FCC17994 /* Main.storyboard */, + 431156B967A9DF0995682D7C /* Model.xcdatamodeld */, + C68273268C686B59A290EEF3 /* Model.xcmappingmodel */, + 7E6075D44DFAA43C62CED79D /* module.modulemap */, + 948E174040217FD36F14BCF6 /* outputList.xcfilelist */, + D9F19321D54BD8E80E6EBC08 /* Resource.abc */, + 35F22C6354CC35E2CF72A165 /* Resource.abcd */, + 6C287801C7F7F97451C89F23 /* Settings.bundle */, + 0B2986C19C8498CDE44CFDAD /* ViewController.swift */, + ); + name = App; + path = App_iOS; + sourceTree = ""; + }; + AE521ABD892103D1D989D151 /* UnderFileGroup */ = { + isa = PBXGroup; + children = ( + E7EC60A15CCEC05897CEFC34 /* MoreUnder.swift */, + ); + path = UnderFileGroup; + sourceTree = ""; + }; + B95B6603AA3915022CEA4E81 /* App_macOS */ = { + isa = PBXGroup; + children = ( + 80F3EA429799FBBE247A2D82 /* AppDelegate.swift */, + 201AC416366CB5F5B305E883 /* Assets.xcassets */, + 5249EE07991C4370C3F2ED16 /* Info.plist */, + 214F642E7193A3E608845F4B /* Main.storyboard */, + 021F11A2B76A01ED4113286B /* ViewController.swift */, + ); + path = App_macOS; + sourceTree = ""; + }; + C0F6DA034785945B03CC8273 /* Projects */ = { + isa = PBXGroup; + children = ( + 43EA7AFC9AC8E9116A228613 /* AnotherProject */, + ); + name = Projects; + sourceTree = ""; + }; + C134B9E65FCA5003ADEE5928 /* tvOS */ = { + isa = PBXGroup; + children = ( + AB002AF7692C5A6F71304272 /* Result.framework */, + ); + path = tvOS; + sourceTree = ""; + }; + C4DD1C7F5C7097CA81DB3FE8 /* Bundles */ = { + isa = PBXGroup; + children = ( + C2669AB60DB45D52E58D5A6D /* BundleX.bundle */, + ); + name = Bundles; + sourceTree = ""; + }; + C6B85E6F88CE3EE3727FF514 /* StandaloneFiles */ = { + isa = PBXGroup; + children = ( + FFA405DFE01301A4B8BA9027 /* Standalone.swift */, + 68D8757F885CE1C02514845C /* StandaloneAssets.xcassets */, + ); + path = StandaloneFiles; + sourceTree = ""; + }; + D297C054132559DEEE78A28D /* Resources */ = { + isa = PBXGroup; + children = ( + 149F3970E2BE9F35231FC34D /* example.mp4 */, + F24135F7E2026D8D80F8B919 /* MyBundle.bundle */, + A2CBBF04CBB716C4BF958A99 /* SceneKitCatalog.scnassets */, + ); + path = Resources; + sourceTree = ""; + }; + D313CB5937567576F546F007 /* StaticLibrary_ObjC */ = { + isa = PBXGroup; + children = ( + 53FBB4268BA34C04D5E32FB1 /* Module */, + F853E823D826B2DCA407AEA1 /* StaticLibrary_ObjC.h */, + 3BE447BCB0528DE1776DE2F0 /* StaticLibrary_ObjC.m */, + ); + path = StaticLibrary_ObjC; + sourceTree = ""; + }; + D42109390CD998BAF417FEF7 /* Mac */ = { + isa = PBXGroup; + children = ( + 7601CC56C42BD6A1D4A75AEA /* Result.framework */, + ); + path = Mac; + sourceTree = ""; + }; + D5532FE12C5B6CC1A7F3E3D1 /* Configs */ = { + isa = PBXGroup; + children = ( + 797FC015E4199F24EE43C159 /* base.xcconfig */, + 28B6600F3CDA6F15633D2134 /* config.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + E8A7C596497AB5EFE54C4C67 /* Products */ = { + isa = PBXGroup; + children = ( + F18408A818972A0675B115E4 /* App_Clip_Tests.xctest */, + 9759A19BAD2C50FCECF7D3C1 /* App_Clip_UITests.xctest */, + C22BEDE0B2217312642FADA2 /* App_Clip.app */, + 7ACB8439596DD7A77FD11AFD /* App_iOS_Tests.xctest */, + C782AA5939417FFD3CF8EB52 /* App_iOS_UITests.xctest */, + E94FA789791614CFD0F98C26 /* App_iOS_With_Clip.app */, + 115047E35C1A4697DEC6D83F /* App_iOS.app */, + C0ACDDAF456079BA0099BFCE /* App_macOS_Tests.xctest */, + DF3C1E903F8399E193F3B4BA /* App_macOS.app */, + 02C5C670B0624A007BCB341D /* App_watchOS Extension.appex */, + BB4C1F0CB031F894B46533E0 /* App_watchOS.app */, + D88BF5054CA820ED443AC1F9 /* EntitledApp.app */, + 1B4D9FADD8956DC163813272 /* Framework.framework */, + 775BF5CB0D9F73D43A7A617A /* Framework.framework */, + 20B4D4D4A77434FA5593E35D /* Framework.framework */, + A89D9F16591C365D568A0BA4 /* Framework.framework */, + 0C6EA871817E3A864FDE5DA1 /* Framework2.framework */, + 81EEE090725ECD1354287E74 /* Framework2.framework */, + E2A15F2C8142988473574022 /* Framework2.framework */, + EADBB714A4B3D4F89D79419E /* Framework2.framework */, + 239041E1C2665F9EB8AEB019 /* iMessageApp.app */, + 6C14AF20FB1E07BF9D32937E /* iMessageExtension.appex */, + 7CBC1BDF40FEDAC0DB9ACFFD /* iMessageStickersExtension.appex */, + 6BAFC2D775612C35F4F1897F /* libStaticLibrary_ObjC.a */, + 376BA5774B91C2D6DA8F6C39 /* libStaticLibrary_ObjC.a */, + F55FFC5DC497CF889F859496 /* libStaticLibrary_ObjC.a */, + 4FFF3A7EBB86F6500589ABDD /* libStaticLibrary_ObjC.a */, + A74AC60A5F465A6542431675 /* libStaticLibrary_Swift.a */, + 0838859105FF7ECEE5F2B6E5 /* TestFramework.framework */, + 3BAAEBEC8B795DCF1C9C5ADE /* Tool */, + 51E2D479CB960CB44EB545C6 /* XPC Service.xpc */, + ); + name = Products; + sourceTree = ""; + }; + E983D6835D9460CCFC7E53C2 /* App_macOS_Tests */ = { + isa = PBXGroup; + children = ( + 618546FAE1D216BFFA06DE35 /* Info.plist */, + 68F16F683711ECD7CC9C43EC /* TestProjectTests.swift */, + ); + path = App_macOS_Tests; + sourceTree = ""; + }; + EFF9DC82C1B9EA1B47804816 /* iMessageStickers */ = { + isa = PBXGroup; + children = ( + 4402963B58134A6066B9E943 /* Assets.xcassets */, + 334F263B3704264D929F4414 /* Info.plist */, + ); + path = iMessageStickers; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 2F621E72C41C6F0E359F1CA5 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 7AD5DA085B8A8182D006BF97 /* MyFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 35F48F6942C6603620B5272D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D584474E14DF674265501DA7 /* MyFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 42B63956FC51459D9C131348 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C7A6D06465E72F6D4DDA65B /* Headers in Headers */, + 66ED5AE47EDD03A3DBBDF552 /* MyFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 55057164007640AC701A07CE /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 2F0E1973A958FCDE8CE09F5E /* MyFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5A1839273A285D74BB199B27 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 2CBE0DC8AC249AD1E42DC593 /* Headers in Headers */, + 18666A1E5DE5F5B2D48ED872 /* MyFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5E8065203C5738ACE91D4D4C /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 557415FFAD88A691DF87B917 /* MyFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D8324BF10D443128242BFBF1 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D94D5D2D9EF9B359DEE438F6 /* Headers in Headers */, + 24FD80AC771EAD5DEA2FB43F /* MyFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DA5B84262385E32108A96880 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + FFFAEFA20D72082E2888D56D /* Headers in Headers */, + 8B078640745463EC45519361 /* MyFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F065DD45D12B8EB011254C45 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 4D67F7E55015EFBDA73E307F /* MyFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXLegacyTarget section */ + 1765579FCB7609C001BB1488 /* Legacy */ = { + isa = PBXLegacyTarget; + buildConfigurationList = 12219412F67F790403913F07 /* Build configuration list for PBXLegacyTarget "Legacy" */; + buildPhases = ( + CDD0499E6DAD48E8BC32C503 /* Sources */, + ); + buildToolPath = /usr/bin/true; + dependencies = ( + ); + name = Legacy; + passBuildSettingsInEnvironment = 1; + productName = Legacy; + }; +/* End PBXLegacyTarget section */ + +/* Begin PBXNativeTarget section */ + 15A12B9A8B7A477CF2D4ABEF /* App_watchOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = D8F179BDF8E4EF8A9DF9D8B7 /* Build configuration list for PBXNativeTarget "App_watchOS" */; + buildPhases = ( + B771A52C53992E86CC375F81 /* Sources */, + 541E93B3FAC6738328D848A9 /* Resources */, + 89F3F9E096C5559317B37165 /* Embed App Extensions */, + ); + buildRules = ( + ); + dependencies = ( + 6F2B0CFA463F069B3F4857EF /* PBXTargetDependency */, + ); + name = App_watchOS; + productName = App_watchOS; + productReference = BB4C1F0CB031F894B46533E0 /* App_watchOS.app */; + productType = "com.apple.product-type.application.watchapp2"; + }; + 1DD1EB52ED39F468AF836C80 /* Framework2_tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6BB95AFCC887A7C884112DCD /* Build configuration list for PBXNativeTarget "Framework2_tvOS" */; + buildPhases = ( + 2F621E72C41C6F0E359F1CA5 /* Headers */, + F35CD0E35C79019C8412A011 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Framework2_tvOS; + productName = Framework2_tvOS; + productReference = E2A15F2C8142988473574022 /* Framework2.framework */; + productType = "com.apple.product-type.framework"; + }; + 21D7F6A04EF6BA1329685C17 /* App_iOS_With_Clip */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1245739E28D036CED2FF55C1 /* Build configuration list for PBXNativeTarget "App_iOS_With_Clip" */; + buildPhases = ( + 3153BE680CE6A42770AA895C /* Sources */, + BBAF3F5A94735C7DE2A6A827 /* Resources */, + 1C42D5F7BAE0F2979CC08ED8 /* Carthage */, + 57AAA51FE44B9280D0F3C9F6 /* Frameworks */, + 29EAAC76E47D07B8D8F50262 /* Embed App Clips */, + 108FC2F1B37B100230F6C0C5 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + D8B398F93CADCBB7ACF6CD9B /* PBXTargetDependency */, + A9BCB911887308296B1CA4F7 /* PBXTargetDependency */, + 63AA55FB95FBE6655AF2BC44 /* PBXTargetDependency */, + ); + name = App_iOS_With_Clip; + productName = App_iOS_With_Clip; + productReference = E94FA789791614CFD0F98C26 /* App_iOS_With_Clip.app */; + productType = "com.apple.product-type.application"; + }; + 242476187403208F30D3219F /* Framework_iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6107B10D2E2D953A15120917 /* Build configuration list for PBXNativeTarget "Framework_iOS" */; + buildPhases = ( + DA5B84262385E32108A96880 /* Headers */, + F26C0DA46E6368299CB30667 /* Sources */, + 8425BF17AF010D7E10061AB3 /* Frameworks */, + 5EC541AC97EEFAF38B3C1C17 /* MyScript */, + ); + buildRules = ( + ); + dependencies = ( + 4772363EE5B936288A33F247 /* PBXTargetDependency */, + ); + name = Framework_iOS; + productName = Framework_iOS; + productReference = 1B4D9FADD8956DC163813272 /* Framework.framework */; + productType = "com.apple.product-type.framework"; + }; + 34EF687C75C46BA8E8701BAB /* App_macOS_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = C7E8A05AB55B088CE727B579 /* Build configuration list for PBXNativeTarget "App_macOS_Tests" */; + buildPhases = ( + 65BD1A9FF4490B11C263E501 /* Sources */, + 9DEE5A10D294FF2BD9A5233C /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + CFA15A6B9BBC6ABEA148E61B /* PBXTargetDependency */, + ); + name = App_macOS_Tests; + productName = App_macOS_Tests; + productReference = C0ACDDAF456079BA0099BFCE /* App_macOS_Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 3DBB411AF8D365588E21D8CA /* StaticLibrary_ObjC_iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = BCC8658A349BEF8B35DCEE45 /* Build configuration list for PBXNativeTarget "StaticLibrary_ObjC_iOS" */; + buildPhases = ( + 1C41E253B853711670514ECC /* CopyFiles */, + 07D5C6D7C8F6A3942C2254AB /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = StaticLibrary_ObjC_iOS; + productName = StaticLibrary_ObjC_iOS; + productReference = 6BAFC2D775612C35F4F1897F /* libStaticLibrary_ObjC.a */; + productType = "com.apple.product-type.library.static"; + }; + 3FCF5A083151C7E22B24E807 /* StaticLibrary_ObjC_macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8ABE44BA99ABFD6518573B75 /* Build configuration list for PBXNativeTarget "StaticLibrary_ObjC_macOS" */; + buildPhases = ( + 883C11C8EE5A3B03232F4D48 /* CopyFiles */, + B41D9338CACB491A234DE462 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = StaticLibrary_ObjC_macOS; + productName = StaticLibrary_ObjC_macOS; + productReference = 376BA5774B91C2D6DA8F6C39 /* libStaticLibrary_ObjC.a */; + productType = "com.apple.product-type.library.static"; + }; + 4D1BB58561A59EB6850A2D6D /* EntitledApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = FBA5F15A7524F82764D43342 /* Build configuration list for PBXNativeTarget "EntitledApp" */; + buildPhases = ( + 50E46638726052318507CD67 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = EntitledApp; + productName = EntitledApp; + productReference = D88BF5054CA820ED443AC1F9 /* EntitledApp.app */; + productType = "com.apple.product-type.application"; + }; + 5239298BB84B4FDDFD84469E /* StaticLibrary_ObjC_watchOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = BDE5A3172EAD9560272E40D5 /* Build configuration list for PBXNativeTarget "StaticLibrary_ObjC_watchOS" */; + buildPhases = ( + 39EF6E709D5336CB216DC2FB /* CopyFiles */, + F1AE193E80AAC8D74BB27FBD /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = StaticLibrary_ObjC_watchOS; + productName = StaticLibrary_ObjC_watchOS; + productReference = 4FFF3A7EBB86F6500589ABDD /* libStaticLibrary_ObjC.a */; + productType = "com.apple.product-type.library.static"; + }; + 559F6E334A370096461729A9 /* App_Clip */ = { + isa = PBXNativeTarget; + buildConfigurationList = 29ED792F76D3712D856082B4 /* Build configuration list for PBXNativeTarget "App_Clip" */; + buildPhases = ( + B6030D15F063E956298EFD4C /* Sources */, + 56A55A3C072A3ABD19F022C6 /* Resources */, + AC27EC6D44E51A1CB441A72E /* Carthage */, + 941526D5A3C922259CA39CB6 /* Frameworks */, + D1B97A1B112643A756935FA5 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 418D7F4A4C25F618DBC96B1A /* PBXTargetDependency */, + 8186C6B9309CD38A38413754 /* PBXTargetDependency */, + ); + name = App_Clip; + productName = App_Clip; + productReference = C22BEDE0B2217312642FADA2 /* App_Clip.app */; + productType = "com.apple.product-type.application.on-demand-install-capable"; + }; + 5BE879342590E136B31C840B /* Framework2_watchOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = B19E185DEA8C29F4234D14B9 /* Build configuration list for PBXNativeTarget "Framework2_watchOS" */; + buildPhases = ( + 55057164007640AC701A07CE /* Headers */, + C0EBE6EF18E598977615610E /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Framework2_watchOS; + productName = Framework2_watchOS; + productReference = EADBB714A4B3D4F89D79419E /* Framework2.framework */; + productType = "com.apple.product-type.framework"; + }; + 5C6E1548456BE821C90E23F0 /* Framework2_iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = C7C54B832F1638EA1C8C506D /* Build configuration list for PBXNativeTarget "Framework2_iOS" */; + buildPhases = ( + 35F48F6942C6603620B5272D /* Headers */, + 8F62F8852A468CE268D0D9F7 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Framework2_iOS; + productName = Framework2_iOS; + productReference = 0C6EA871817E3A864FDE5DA1 /* Framework2.framework */; + productType = "com.apple.product-type.framework"; + }; + 6122E4E48939B4937E588B23 /* App_iOS_UITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = EA0D28F9C2ACF4146025F574 /* Build configuration list for PBXNativeTarget "App_iOS_UITests" */; + buildPhases = ( + 9D3F0641DC33C8222ACC3D00 /* Sources */, + 779219E7849466ABE0506B3A /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 118733A7DC1EE1870914EA4D /* PBXTargetDependency */, + ); + name = App_iOS_UITests; + productName = App_iOS_UITests; + productReference = C782AA5939417FFD3CF8EB52 /* App_iOS_UITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; + 63EAAEAE0535C975295781D4 /* TestFramework */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2FB1406136BDEE50410D00FE /* Build configuration list for PBXNativeTarget "TestFramework" */; + buildPhases = ( + F065DD45D12B8EB011254C45 /* Headers */, + 29C8264BCBD504223E822F37 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TestFramework; + productName = TestFramework; + productReference = 0838859105FF7ECEE5F2B6E5 /* TestFramework.framework */; + productType = "com.apple.product-type.framework"; + }; + 672091195E5FD01EDDFB6714 /* App_Clip_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 25A6BD812166D38412B7D296 /* Build configuration list for PBXNativeTarget "App_Clip_Tests" */; + buildPhases = ( + 10E58CDB673A71DD896DE793 /* Sources */, + 43C5260C6E5332D5E733D85E /* Frameworks */, + 456284554D1A6C53EB39BA4B /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + B0BF35FE3796D451CA095789 /* PBXTargetDependency */, + 1A8C378E7A510A6E0772386F /* PBXTargetDependency */, + ); + name = App_Clip_Tests; + productName = App_Clip_Tests; + productReference = F18408A818972A0675B115E4 /* App_Clip_Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 6BBA6FB48BEE245ED177B75E /* App_Clip_UITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 154811E763287E0982E4010C /* Build configuration list for PBXNativeTarget "App_Clip_UITests" */; + buildPhases = ( + C7C8DBC92C9E0658B7D9EE40 /* Sources */, + 3FE33BF71F952904B55B2C67 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 789CE321F7B8ECC624741135 /* PBXTargetDependency */, + ); + name = App_Clip_UITests; + productName = App_Clip_UITests; + productReference = 9759A19BAD2C50FCECF7D3C1 /* App_Clip_UITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; + 786AB2F08EC86516E5EA092F /* Framework_watchOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = DA4742F9D7A73F3DB2B4AC87 /* Build configuration list for PBXNativeTarget "Framework_watchOS" */; + buildPhases = ( + 42B63956FC51459D9C131348 /* Headers */, + 2C73503B473B56249F74023D /* Sources */, + F3D411695D4C043FEF3265B7 /* Frameworks */, + 3C88C9760FFCFF5C729DD22C /* MyScript */, + ); + buildRules = ( + ); + dependencies = ( + B2F2BF8FB4CBBFE658694D3E /* PBXTargetDependency */, + ); + name = Framework_watchOS; + productName = Framework_watchOS; + productReference = A89D9F16591C365D568A0BA4 /* Framework.framework */; + productType = "com.apple.product-type.framework"; + }; + 8507B864DA27764F1EA6962C /* StaticLibrary_ObjC_tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = A664263A7E39D94679AD5F74 /* Build configuration list for PBXNativeTarget "StaticLibrary_ObjC_tvOS" */; + buildPhases = ( + F0CE57DCC7A58AFEA0EB1EF5 /* CopyFiles */, + 5AC22827901924EE4C7D2EE4 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = StaticLibrary_ObjC_tvOS; + productName = StaticLibrary_ObjC_tvOS; + productReference = F55FFC5DC497CF889F859496 /* libStaticLibrary_ObjC.a */; + productType = "com.apple.product-type.library.static"; + }; + 87194DCB93BF1A83EE181FBF /* iMessageStickersExtension */ = { + isa = PBXNativeTarget; + buildConfigurationList = DD8DBB7F2CADB523598B1D3A /* Build configuration list for PBXNativeTarget "iMessageStickersExtension" */; + buildPhases = ( + 44D2699A7F63415B1C76D682 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = iMessageStickersExtension; + productName = iMessageStickersExtension; + productReference = 7CBC1BDF40FEDAC0DB9ACFFD /* iMessageStickersExtension.appex */; + productType = "com.apple.product-type.app-extension.messages-sticker-pack"; + }; + 974B3EC2FF4FBAA1513A2950 /* Framework_macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = FECC727EC6A1CBB859258849 /* Build configuration list for PBXNativeTarget "Framework_macOS" */; + buildPhases = ( + 5A1839273A285D74BB199B27 /* Headers */, + 220AD6BBDDF25CEF7C6FB356 /* Sources */, + 286A764EB49712A6BE938CD9 /* Frameworks */, + A2C7EEAF062CD944C219DD8F /* MyScript */, + ); + buildRules = ( + ); + dependencies = ( + 219E518662CD7D0BA64246D9 /* PBXTargetDependency */, + ); + name = Framework_macOS; + productName = Framework_macOS; + productReference = 775BF5CB0D9F73D43A7A617A /* Framework.framework */; + productType = "com.apple.product-type.framework"; + }; + 991BCE8E861305DE596EACFE /* App_iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9EDED21A0C3AD1691C58401D /* Build configuration list for PBXNativeTarget "App_iOS" */; + buildPhases = ( + F6445A97D8E8467AFCE9F0B6 /* Sources */, + 21BCDA8027E0DED5FD1F46B2 /* Resources */, + A603A9260F95BC8B6B945B34 /* CopyFiles */, + 4620AC2C57607DEDA627907C /* Carthage */, + 817E815A267F7A93B27C28C1 /* Frameworks */, + E0B58B04AD09D3B4B1486315 /* Copy Bundle Resources */, + 5FF5F332311FF39E3B020BD9 /* Embed Frameworks */, + EC033AB632FAAA03F670D215 /* Embed Watch Content */, + 70145FE98044319FDDC0BB29 /* Strip Unused Architectures from Frameworks */, + 6300B083DBBB177437172F25 /* MyScript */, + ); + buildRules = ( + ); + dependencies = ( + B17852290DB066C640ABDC2F /* PBXTargetDependency */, + BE366BE8CC8B292A296FDAAD /* PBXTargetDependency */, + 578F376EB1922ADCB9482DE3 /* PBXTargetDependency */, + F637B36CED5B903A9B1EEAE4 /* PBXTargetDependency */, + C1F2B62314C8601132D452FE /* PBXTargetDependency */, + E14514F1BEE89DF60E569CC5 /* PBXTargetDependency */, + ); + name = App_iOS; + productName = App_iOS; + productReference = 115047E35C1A4697DEC6D83F /* App_iOS.app */; + productType = "com.apple.product-type.application"; + }; + 9E7BCAAA9E855251D33C5730 /* App_iOS_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8B6F763B758ED180046D3908 /* Build configuration list for PBXNativeTarget "App_iOS_Tests" */; + buildPhases = ( + A4664FD3828FBEF2CD8380C4 /* Sources */, + 93C6B66FB2295D9FE2D068F0 /* Frameworks */, + 807E1CB99AAD2470DC373BC0 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 222B62D87784D9E40353D4F9 /* PBXTargetDependency */, + DBBCD483619808FD913E8199 /* PBXTargetDependency */, + ); + name = App_iOS_Tests; + productName = App_iOS_Tests; + productReference = 7ACB8439596DD7A77FD11AFD /* App_iOS_Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + C0A9408F6C298624A7E2A024 /* Framework2_macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = DD2C419331E24B123E0CBC9E /* Build configuration list for PBXNativeTarget "Framework2_macOS" */; + buildPhases = ( + 5E8065203C5738ACE91D4D4C /* Headers */, + 308A0B0D609D0E21A320A468 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Framework2_macOS; + productName = Framework2_macOS; + productReference = 81EEE090725ECD1354287E74 /* Framework2.framework */; + productType = "com.apple.product-type.framework"; + }; + D691B96B3888D27A6050EF10 /* Framework_tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = D5A2344247FF33D62704E2C2 /* Build configuration list for PBXNativeTarget "Framework_tvOS" */; + buildPhases = ( + D8324BF10D443128242BFBF1 /* Headers */, + BEE11A37E1AD9A0DFE7376FA /* Sources */, + 6DE5ACEB01740726A5F7FE20 /* Frameworks */, + 1B8F5C5B489BAFF4289F6CE5 /* MyScript */, + ); + buildRules = ( + ); + dependencies = ( + F70C9C12AA4664B4AA83B89D /* PBXTargetDependency */, + ); + name = Framework_tvOS; + productName = Framework_tvOS; + productReference = 20B4D4D4A77434FA5593E35D /* Framework.framework */; + productType = "com.apple.product-type.framework"; + }; + D816F64720D160B9FE1F5AB1 /* StaticLibrary_Swift */ = { + isa = PBXNativeTarget; + buildConfigurationList = 51ECBDC8632467DA3ADA886F /* Build configuration list for PBXNativeTarget "StaticLibrary_Swift" */; + buildPhases = ( + 7B234BC963946F3563B71335 /* Sources */, + 694D2893BD4C5D54ABAA71C3 /* Copy Swift Objective-C Interface Header */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = StaticLibrary_Swift; + productName = StaticLibrary_Swift; + productReference = A74AC60A5F465A6542431675 /* libStaticLibrary_Swift.a */; + productType = "com.apple.product-type.library.static"; + }; + D8592DE6C0BC77BE0D4A2FAB /* XPC Service */ = { + isa = PBXNativeTarget; + buildConfigurationList = F5B278C2B6590DD1F0CBDE04 /* Build configuration list for PBXNativeTarget "XPC Service" */; + buildPhases = ( + C3B2824FCF15AA1C94661F47 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "XPC Service"; + productName = "XPC Service"; + productReference = 51E2D479CB960CB44EB545C6 /* XPC Service.xpc */; + productType = "com.apple.product-type.xpc-service"; + }; + DAF9935ECEC17AA561D28998 /* App_watchOS Extension */ = { + isa = PBXNativeTarget; + buildConfigurationList = E7F77B0DBCCD253D8A6B2645 /* Build configuration list for PBXNativeTarget "App_watchOS Extension" */; + buildPhases = ( + DA3B1A921C17686292F054E9 /* Sources */, + B14B691D85C703DE27160E6C /* Resources */, + 6A403DD09160A25A14C4D7E3 /* Carthage */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "App_watchOS Extension"; + productName = "App_watchOS Extension"; + productReference = 02C5C670B0624A007BCB341D /* App_watchOS Extension.appex */; + productType = "com.apple.product-type.watchkit2-extension"; + }; + E8BDC848AB4F8D5927ADB55B /* App_macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7FCE6665950846F21D6BA7F1 /* Build configuration list for PBXNativeTarget "App_macOS" */; + buildPhases = ( + 8C41B2F647E4DFC95A653712 /* Sources */, + A904A902001656E96B24C7A9 /* Resources */, + 9830A88A58F9591CFE7662C9 /* CopyFiles */, + 5A2BDC62A00DF008470998CA /* Frameworks */, + B4F76A1390264F5E325C3C1E /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 579118B5FDFABB980065C769 /* PBXTargetDependency */, + EAF163F407A28ED197A7BC3E /* PBXTargetDependency */, + 0ACA28EFA6CBFE1E8FA8FBDA /* PBXTargetDependency */, + ); + name = App_macOS; + productName = App_macOS; + productReference = DF3C1E903F8399E193F3B4BA /* App_macOS.app */; + productType = "com.apple.product-type.application"; + }; + EDE7907E34D077B346FC4CF1 /* iMessageExtension */ = { + isa = PBXNativeTarget; + buildConfigurationList = 04F7DFEC84B28DEF04F71F0A /* Build configuration list for PBXNativeTarget "iMessageExtension" */; + buildPhases = ( + DF1ADFADCFCF58DB93E22F75 /* Sources */, + 0F3DD10DE4BA9F1995F576A8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = iMessageExtension; + productName = iMessageExtension; + productReference = 6C14AF20FB1E07BF9D32937E /* iMessageExtension.appex */; + productType = "com.apple.product-type.app-extension.messages"; + }; + FF3DC3DF2AA3AE02377647C9 /* iMessageApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 65393391FA3D521A2D096C75 /* Build configuration list for PBXNativeTarget "iMessageApp" */; + buildPhases = ( + 6D95B3C6406DCAD3794FBFCD /* Resources */, + 93EF9E66AA5ED7DE1C6A6FAD /* Embed App Extensions */, + ); + buildRules = ( + ); + dependencies = ( + 39A6FEDAF7A2B3D517ED1E80 /* PBXTargetDependency */, + ); + name = iMessageApp; + productName = iMessageApp; + productReference = 239041E1C2665F9EB8AEB019 /* iMessageApp.app */; + productType = "com.apple.product-type.application.messages"; + }; + FF646CE49D21E77229B5316B /* Tool */ = { + isa = PBXNativeTarget; + buildConfigurationList = FB9AF55D22482CDEE8E9AC49 /* Build configuration list for PBXNativeTarget "Tool" */; + buildPhases = ( + AC7B03CED863AF9296A0A7DF /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Tool; + productName = Tool; + productReference = 3BAAEBEC8B795DCF1C9C5ADE /* Tool */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7467FBF059DC784B5601CA7E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + TargetAttributes = { + 21D7F6A04EF6BA1329685C17 = { + ProvisioningStyle = Automatic; + }; + 6122E4E48939B4937E588B23 = { + TestTargetID = 991BCE8E861305DE596EACFE; + }; + 6BBA6FB48BEE245ED177B75E = { + TestTargetID = 559F6E334A370096461729A9; + }; + 991BCE8E861305DE596EACFE = { + ProvisioningStyle = Automatic; + }; + 9C27C8C394ADD16FDCF6E624 = { + CUSTOM = value; + }; + E8BDC848AB4F8D5927ADB55B = { + ProvisioningStyle = Automatic; + }; + }; + knownAssetTags = ( + tag1, + tag2, + ); + }; + buildConfigurationList = 2961C7042EE5F08A22AAF183 /* Build configuration list for PBXProject "ProjectXcode12" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = 54E9E53007DE91CA40153A40; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 63CA1B81E0D9E4D5F1683D64 /* Products */; + ProjectRef = 43EA7AFC9AC8E9116A228613 /* AnotherProject */; + }, + ); + projectRoot = ""; + targets = ( + 559F6E334A370096461729A9 /* App_Clip */, + 672091195E5FD01EDDFB6714 /* App_Clip_Tests */, + 6BBA6FB48BEE245ED177B75E /* App_Clip_UITests */, + 991BCE8E861305DE596EACFE /* App_iOS */, + 9E7BCAAA9E855251D33C5730 /* App_iOS_Tests */, + 6122E4E48939B4937E588B23 /* App_iOS_UITests */, + 21D7F6A04EF6BA1329685C17 /* App_iOS_With_Clip */, + E8BDC848AB4F8D5927ADB55B /* App_macOS */, + 34EF687C75C46BA8E8701BAB /* App_macOS_Tests */, + 15A12B9A8B7A477CF2D4ABEF /* App_watchOS */, + DAF9935ECEC17AA561D28998 /* App_watchOS Extension */, + 4D1BB58561A59EB6850A2D6D /* EntitledApp */, + 5C6E1548456BE821C90E23F0 /* Framework2_iOS */, + C0A9408F6C298624A7E2A024 /* Framework2_macOS */, + 1DD1EB52ED39F468AF836C80 /* Framework2_tvOS */, + 5BE879342590E136B31C840B /* Framework2_watchOS */, + 242476187403208F30D3219F /* Framework_iOS */, + 974B3EC2FF4FBAA1513A2950 /* Framework_macOS */, + D691B96B3888D27A6050EF10 /* Framework_tvOS */, + 786AB2F08EC86516E5EA092F /* Framework_watchOS */, + 1765579FCB7609C001BB1488 /* Legacy */, + 3DBB411AF8D365588E21D8CA /* StaticLibrary_ObjC_iOS */, + 3FCF5A083151C7E22B24E807 /* StaticLibrary_ObjC_macOS */, + 8507B864DA27764F1EA6962C /* StaticLibrary_ObjC_tvOS */, + 5239298BB84B4FDDFD84469E /* StaticLibrary_ObjC_watchOS */, + D816F64720D160B9FE1F5AB1 /* StaticLibrary_Swift */, + 9C27C8C394ADD16FDCF6E624 /* SuperTarget */, + 63EAAEAE0535C975295781D4 /* TestFramework */, + FF646CE49D21E77229B5316B /* Tool */, + D8592DE6C0BC77BE0D4A2FAB /* XPC Service */, + FF3DC3DF2AA3AE02377647C9 /* iMessageApp */, + EDE7907E34D077B346FC4CF1 /* iMessageExtension */, + 87194DCB93BF1A83EE181FBF /* iMessageStickersExtension */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + FF10A8919F65E6609784780A /* ExternalTarget.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = ExternalTarget.framework; + remoteRef = D65DFD803579AB5662714F99 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 0F3DD10DE4BA9F1995F576A8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 85332C85D63B652CAB836FB9 /* Assets.xcassets in Resources */, + 16BD7E732A3294D973E79337 /* MainInterface.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 21BCDA8027E0DED5FD1F46B2 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 38C639CCE01DB1DC4C2A7101 /* Assets.xcassets in Resources */, + FA7F5B42ACAEA016400A195A /* LaunchScreen.storyboard in Resources */, + AC800EB90200F927CE8ADC17 /* Localizable.strings in Resources */, + 9A8AB7DE8957C82A8807559F /* Localizable.stringsdict in Resources */, + 966364F9A5B152ED9292B335 /* LocalizedStoryboard.storyboard in Resources */, + 89D00F3D1A87503F10AE7432 /* Main.storyboard in Resources */, + 0060461B613150BA7D9CAF95 /* MyBundle.bundle in Resources */, + E4D57896F90E7AEC6FED0634 /* ResourceFolder in Resources */, + A5850DA4EB6491F7B3588832 /* SceneKitCatalog.scnassets in Resources */, + 81724CEEA748160B950C85B5 /* Settings.bundle in Resources */, + 11B2B5EF7172B6B837D951AA /* StandaloneAssets.xcassets in Resources */, + C57A966770059A0014B3326D /* example.mp4 in Resources */, + CC3D560B3E97CAAAC8B6076E /* iMessageApp.app in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 44D2699A7F63415B1C76D682 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6CA40F7223581AF6628DB4DE /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 541E93B3FAC6738328D848A9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1870224DAA5300F2EEB5C728 /* Assets.xcassets in Resources */, + 064BCA54DD18E6F5EAFE5C1C /* Interface.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56A55A3C072A3ABD19F022C6 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 129640F84D0905CE479FF083 /* Assets.xcassets in Resources */, + 60B0A79EF778752B7F574D8A /* LaunchScreen.storyboard in Resources */, + 4FE6138F5867CA1D93C6EA04 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D95B3C6406DCAD3794FBFCD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ED7050A16D1A986B9F47AC43 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A904A902001656E96B24C7A9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 793BD03EDB3A072945B82C27 /* Assets.xcassets in Resources */, + F94B7016C76FC0A6B74111B3 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B14B691D85C703DE27160E6C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9BE414C2C4CE2BA52F20E38D /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BBAF3F5A94735C7DE2A6A827 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DCFAD099E6E129BDE43E1B79 /* Assets.xcassets in Resources */, + C875EA6DE9F7090BDB27D6B9 /* LaunchScreen.storyboard in Resources */, + 30E0C7F5317477917CFFCE52 /* Localizable.strings in Resources */, + 40906CFD3662304ACD172B5C /* Localizable.stringsdict in Resources */, + 3A0A1B20E2149C6B53848EAC /* LocalizedStoryboard.storyboard in Resources */, + 329F958FE3152A51D6DBDC4F /* Main.storyboard in Resources */, + 50E29FF7B2936111F9189780 /* Settings.bundle in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 1B8F5C5B489BAFF4289F6CE5 /* MyScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = MyScript; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"You ran a script\"\n"; + }; + 1C42D5F7BAE0F2979CC08ED8 /* Carthage */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/Carthage/Build/iOS/Result.framework", + ); + name = Carthage; + outputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Result.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "carthage copy-frameworks\n"; + }; + 3C88C9760FFCFF5C729DD22C /* MyScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = MyScript; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"You ran a script\"\n"; + }; + 4620AC2C57607DEDA627907C /* Carthage */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/Carthage/Build/iOS/Result.framework", + ); + name = Carthage; + outputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Result.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "carthage copy-frameworks\n"; + }; + 5EC541AC97EEFAF38B3C1C17 /* MyScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = MyScript; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"You ran a script\"\n"; + }; + 6300B083DBBB177437172F25 /* MyScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + App_iOS/inputList.xcfilelist, + ); + inputPaths = ( + ); + name = MyScript; + outputFileListPaths = ( + App_iOS/outputList.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"You ran a script!\"\n"; + }; + 694D2893BD4C5D54ABAA71C3 /* Copy Swift Objective-C Interface Header */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(DERIVED_SOURCES_DIR)/$(SWIFT_OBJC_INTERFACE_HEADER_NAME)", + ); + name = "Copy Swift Objective-C Interface Header"; + outputPaths = ( + "$(BUILT_PRODUCTS_DIR)/include/$(PRODUCT_MODULE_NAME)/$(SWIFT_OBJC_INTERFACE_HEADER_NAME)", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "ditto \"${SCRIPT_INPUT_FILE_0}\" \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + }; + 6A403DD09160A25A14C4D7E3 /* Carthage */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/Carthage/Build/watchOS/Result.framework", + ); + name = Carthage; + outputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Result.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "carthage copy-frameworks\n"; + }; + 70145FE98044319FDDC0BB29 /* Strip Unused Architectures from Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Strip Unused Architectures from Frameworks"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + shellScript = "################################################################################\n#\n# Copyright 2015 Realm Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n################################################################################\n\n# This script strips all non-valid architectures from dynamic libraries in\n# the application's `Frameworks` directory.\n#\n# The following environment variables are required:\n#\n# BUILT_PRODUCTS_DIR\n# FRAMEWORKS_FOLDER_PATH\n# VALID_ARCHS\n# EXPANDED_CODE_SIGN_IDENTITY\n\n\n# Signs a framework with the provided identity\ncode_sign() {\n # Use the current code_sign_identitiy\n echo \"Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}\"\n echo \"/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1\"\n /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"\n}\n\n# Set working directory to product’s embedded frameworks\ncd \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n\nif [ \"$ACTION\" = \"install\" ]; then\n echo \"Copy .bcsymbolmap files to .xcarchive\"\n find . -name '*.bcsymbolmap' -type f -exec mv {} \"${CONFIGURATION_BUILD_DIR}\" \\;\nelse\n # Delete *.bcsymbolmap files from framework bundle unless archiving\n find . -name '*.bcsymbolmap' -type f -exec rm -rf \"{}\" +\\;\nfi\n\necho \"Stripping frameworks\"\n\nfor file in $(find . -type f -perm +111); do\n # Skip non-dynamic libraries\n if ! [[ \"$(file \"$file\")\" == *\"dynamically linked shared library\"* ]]; then\n continue\n fi\n # Get architectures for current file\n archs=\"$(lipo -info \"${file}\" | rev | cut -d ':' -f1 | rev)\"\n stripped=\"\"\n for arch in $archs; do\n if ! [[ \"${VALID_ARCHS}\" == *\"$arch\"* ]]; then\n # Strip non-valid architectures in-place\n lipo -remove \"$arch\" -output \"$file\" \"$file\" || exit 1\n stripped=\"$stripped $arch\"\n fi\n done\n if [[ \"$stripped\" != \"\" ]]; then\n echo \"Stripped $file of architectures:$stripped\"\n if [ \"${CODE_SIGNING_REQUIRED}\" == \"YES\" ]; then\n code_sign \"${file}\"\n fi\n fi\ndone\n"; + }; + A2C7EEAF062CD944C219DD8F /* MyScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = MyScript; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"You ran a script\"\n"; + }; + AC27EC6D44E51A1CB441A72E /* Carthage */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/Carthage/Build/iOS/Result.framework", + ); + name = Carthage; + outputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Result.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "carthage copy-frameworks\n"; + }; + D4BA2D61D3DC727DA6E90F7E /* MyScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = MyScript; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"do the thing\""; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 07D5C6D7C8F6A3942C2254AB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0CD02F062979E2FD36D8D524 /* StaticLibrary_ObjC.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 10E58CDB673A71DD896DE793 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74E1D133AB01AA3424C6C540 /* TestProjectTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 220AD6BBDDF25CEF7C6FB356 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 83A04F08119B1A648940B631 /* FrameworkFile.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 29C8264BCBD504223E822F37 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 35E3C0F60528783F7A6BFF9A /* FrameworkFile.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2C73503B473B56249F74023D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E267E405615EF1727C3D49C7 /* FrameworkFile.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 308A0B0D609D0E21A320A468 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0EDE93FD1B8EEA5E757A3EE1 /* FrameworkFile.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3153BE680CE6A42770AA895C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B3863DD3BC5038A7987B495F /* AppDelegate.swift in Sources */, + 5F3CD9C98D6FCF78A371850F /* Model.xcdatamodeld in Sources */, + 16B6081EBDCE7DDBC89DDFEE /* Standalone.swift in Sources */, + 37556609B05600FC511F540B /* SwiftFileInDotPath.swift in Sources */, + FB753FD180515AE293B2485C /* ViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 50E46638726052318507CD67 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5AC22827901924EE4C7D2EE4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2778626BA6AC7257203DFA47 /* StaticLibrary_ObjC.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 65BD1A9FF4490B11C263E501 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2A39623B596284EC9DCDAE1D /* TestProjectTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7B234BC963946F3563B71335 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00412000C589181F73BB9C88 /* StaticLibrary.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8C41B2F647E4DFC95A653712 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2514149FFB3E6498D579DBBB /* AppDelegate.swift in Sources */, + BF7D701BA63380CE76046BDB /* Standalone.swift in Sources */, + 0035E2ED473E71B573FA73CF /* ViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8F62F8852A468CE268D0D9F7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 078DC5844DEA2DB6F020D455 /* FrameworkFile.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9D3F0641DC33C8222ACC3D00 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5B6902E1019616CCCC8C84D7 /* TestProjectUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A4664FD3828FBEF2CD8380C4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B09EE60448F8EBD4546D3C41 /* TestProjectTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + AC7B03CED863AF9296A0A7DF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 092201CC0E7C18615C0B212A /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B41D9338CACB491A234DE462 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AF734D3BF6BA8808A2F1916C /* StaticLibrary_ObjC.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B6030D15F063E956298EFD4C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 04141410CA15B3FBC091FFEE /* AppDelegate.swift in Sources */, + D6A9F9FE464839B860307F97 /* ViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B771A52C53992E86CC375F81 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BEE11A37E1AD9A0DFE7376FA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FAD05AB024D2E3CB4EDBFAF4 /* FrameworkFile.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C0EBE6EF18E598977615610E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4BC91284F91B188CBBEBA38C /* FrameworkFile.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C3B2824FCF15AA1C94661F47 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D6E1725E31FE9D8D8B0075AD /* XPC_Service.m in Sources */, + 922FA3335972E2600AD9C68D /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C7C8DBC92C9E0658B7D9EE40 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F316B77453C5A4A9692166AF /* TestProjectUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CDD0499E6DAD48E8BC32C503 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DA3B1A921C17686292F054E9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9A61DB3A89D0636D62F6134C /* ExtensionDelegate.swift in Sources */, + B5B0D4EAB3B78D5CE452E100 /* InterfaceController.swift in Sources */, + BF1837BBD7E8DA1998C80F7A /* NotificationController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DF1ADFADCFCF58DB93E22F75 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 820158D082BDA00E14BD61E2 /* MessagesViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F1AE193E80AAC8D74BB27FBD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7A218049DED8B2CD3D8AD8B6 /* StaticLibrary_ObjC.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F26C0DA46E6368299CB30667 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FE6A3F3C7247CD2294753909 /* FrameworkFile.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F35CD0E35C79019C8412A011 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C42838B5395A013CF38EA48E /* FrameworkFile.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F6445A97D8E8467AFCE9F0B6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6F988879F73866310CE43F37 /* AppDelegate.swift in Sources */, + 751D7A8B90209DDAAB9EB73E /* File1.swift in Sources */, + 48B822DF3314CCF76EE74D6D /* File2.swift in Sources */, + 3D8580B33361272D45C61A85 /* Model.xcdatamodeld in Sources */, + 8F2C2446CC90D71637CA98DE /* Model.xcmappingmodel in Sources */, + B5BD65590F7EE7C3963B5122 /* MoreUnder.swift in Sources */, + 37EDF33D6B4105F07070FB56 /* Standalone.swift in Sources */, + E9AB59E760C7776384AC7E32 /* SwiftFileInDotPath.swift in Sources */, + 36FEB01A03A566B43A2C2434 /* ViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 0ACA28EFA6CBFE1E8FA8FBDA /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D8592DE6C0BC77BE0D4A2FAB /* XPC Service */; + targetProxy = 1BC468AB18D1F023019F1FBA /* PBXContainerItemProxy */; + }; + 118733A7DC1EE1870914EA4D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 991BCE8E861305DE596EACFE /* App_iOS */; + targetProxy = 9D69D471B06AE37AEA2D84E3 /* PBXContainerItemProxy */; + }; + 1A8C378E7A510A6E0772386F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 63EAAEAE0535C975295781D4 /* TestFramework */; + targetProxy = 98E077CD4918FF68662C4337 /* PBXContainerItemProxy */; + }; + 219E518662CD7D0BA64246D9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3FCF5A083151C7E22B24E807 /* StaticLibrary_ObjC_macOS */; + targetProxy = C0408FA85DFD7E9F59541D2E /* PBXContainerItemProxy */; + }; + 222B62D87784D9E40353D4F9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 991BCE8E861305DE596EACFE /* App_iOS */; + targetProxy = 913CC94BAD23FF3E3636E8E5 /* PBXContainerItemProxy */; + }; + 39A6FEDAF7A2B3D517ED1E80 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EDE7907E34D077B346FC4CF1 /* iMessageExtension */; + targetProxy = F2FCFF0F2338D8316F9D8D47 /* PBXContainerItemProxy */; + }; + 418D7F4A4C25F618DBC96B1A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 242476187403208F30D3219F /* Framework_iOS */; + targetProxy = D51CBCA8454A129B3F1C0629 /* PBXContainerItemProxy */; + }; + 4772363EE5B936288A33F247 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3DBB411AF8D365588E21D8CA /* StaticLibrary_ObjC_iOS */; + targetProxy = F8D2CC44BE471C9C41F5B1E6 /* PBXContainerItemProxy */; + }; + 53E5D1FE14ECF98F9F9729CF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 242476187403208F30D3219F /* Framework_iOS */; + targetProxy = 4CA2280DE705720E8B851B8E /* PBXContainerItemProxy */; + }; + 578F376EB1922ADCB9482DE3 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 5C6E1548456BE821C90E23F0 /* Framework2_iOS */; + targetProxy = 2F6AB4DC84D6D8156D9743ED /* PBXContainerItemProxy */; + }; + 579118B5FDFABB980065C769 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 974B3EC2FF4FBAA1513A2950 /* Framework_macOS */; + targetProxy = 4DB3B584A41D1D19DE1B39E1 /* PBXContainerItemProxy */; + }; + 63AA55FB95FBE6655AF2BC44 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3DBB411AF8D365588E21D8CA /* StaticLibrary_ObjC_iOS */; + targetProxy = 5A3133C260AB0B2EE767880A /* PBXContainerItemProxy */; + }; + 6F2B0CFA463F069B3F4857EF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DAF9935ECEC17AA561D28998 /* App_watchOS Extension */; + targetProxy = C68FFE66E063CA163CE1D68B /* PBXContainerItemProxy */; + }; + 789CE321F7B8ECC624741135 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 559F6E334A370096461729A9 /* App_Clip */; + targetProxy = 6DEB235CE85E75F90EC6175D /* PBXContainerItemProxy */; + }; + 8186C6B9309CD38A38413754 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3DBB411AF8D365588E21D8CA /* StaticLibrary_ObjC_iOS */; + targetProxy = 9C7FA5CABE5A0EC3D5C4055B /* PBXContainerItemProxy */; + }; + 8DF064FE23E39B733B75994D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 991BCE8E861305DE596EACFE /* App_iOS */; + targetProxy = 0FA2870744F254DD5E3D8374 /* PBXContainerItemProxy */; + }; + A9BCB911887308296B1CA4F7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 242476187403208F30D3219F /* Framework_iOS */; + targetProxy = 193DD9683611F943D58ADCC6 /* PBXContainerItemProxy */; + }; + B0BF35FE3796D451CA095789 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 559F6E334A370096461729A9 /* App_Clip */; + targetProxy = 6D2993924DD47F80ACB3567E /* PBXContainerItemProxy */; + }; + B17852290DB066C640ABDC2F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = ExternalTarget; + targetProxy = 8C53BD3BF1B5227C831355F9 /* PBXContainerItemProxy */; + }; + B2F2BF8FB4CBBFE658694D3E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 5239298BB84B4FDDFD84469E /* StaticLibrary_ObjC_watchOS */; + targetProxy = 5CFE6D622751CA41654F4B00 /* PBXContainerItemProxy */; + }; + BE366BE8CC8B292A296FDAAD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 15A12B9A8B7A477CF2D4ABEF /* App_watchOS */; + targetProxy = FF4780B89575C7C171A9B401 /* PBXContainerItemProxy */; + }; + C1F2B62314C8601132D452FE /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3DBB411AF8D365588E21D8CA /* StaticLibrary_ObjC_iOS */; + targetProxy = F7BDEB5E84BA34C6E32E8C1F /* PBXContainerItemProxy */; + }; + CFA15A6B9BBC6ABEA148E61B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = E8BDC848AB4F8D5927ADB55B /* App_macOS */; + targetProxy = 3BFFB177BC0E51F54F902AE2 /* PBXContainerItemProxy */; + }; + D8B398F93CADCBB7ACF6CD9B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 559F6E334A370096461729A9 /* App_Clip */; + targetProxy = F52878EB4A2F3E2E1F89036F /* PBXContainerItemProxy */; + }; + DBBCD483619808FD913E8199 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 63EAAEAE0535C975295781D4 /* TestFramework */; + targetProxy = BB3B4DE7EE8CEE505BBC6DF4 /* PBXContainerItemProxy */; + }; + E14514F1BEE89DF60E569CC5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = FF3DC3DF2AA3AE02377647C9 /* iMessageApp */; + targetProxy = D7FD49F1E9A4B29D528D18A5 /* PBXContainerItemProxy */; + }; + EAF163F407A28ED197A7BC3E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3FCF5A083151C7E22B24E807 /* StaticLibrary_ObjC_macOS */; + targetProxy = 9F4AAED22329F820EA5DB2F7 /* PBXContainerItemProxy */; + }; + F637B36CED5B903A9B1EEAE4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 242476187403208F30D3219F /* Framework_iOS */; + targetProxy = 2EAC3D4B05A43768279E03B7 /* PBXContainerItemProxy */; + }; + F70C9C12AA4664B4AA83B89D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 8507B864DA27764F1EA6962C /* StaticLibrary_ObjC_tvOS */; + targetProxy = 12A939B349AFA0D4B2A270EA /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 214F642E7193A3E608845F4B /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + DF5EEB3171D1A7722CD9413A /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 21AA0A827D6C74A605DEE03E /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + E4FBD31453FD26F4C7ABD5F9 /* Base */, + C16F953828BFF71DEB579075 /* en */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 28193039398EB7872CD19490 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 3B4590226C49347F4BC18782 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; + 4AE9A9C885258BF807598F5E /* Localizable.stringsdict */ = { + isa = PBXVariantGroup; + children = ( + C4AF74FB9AB607DFA9E07A4E /* Base */, + D80E621293876A18B051299F /* en */, + ); + name = Localizable.stringsdict; + sourceTree = ""; + }; + 556DA72EFDDD94E4E49C0754 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B945C628ACCF26FC51594160 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 5A391BB5F85ECBA78F808646 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + E83A520CAE8A4BCF6578C2A9 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; + 7E1427FBA94B073C3FD2830A /* Interface.storyboard */ = { + isa = PBXVariantGroup; + children = ( + DEC53DADDC767F9AE310B83E /* Base */, + ); + name = Interface.storyboard; + sourceTree = ""; + }; + 917AA3E4306C1A12FCC17994 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 5DB17246AF97AF5311C1CB7B /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 95933688FAC17B9E7752CB4F /* MainInterface.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 6F98C5891F0CE8C0DEF57B40 /* Base */, + ); + name = MainInterface.storyboard; + sourceTree = ""; + }; + EE817D9DBEBA01EC4FFCED25 /* LocalizedStoryboard.storyboard */ = { + isa = PBXVariantGroup; + children = ( + F1188E378718785171F293B6 /* Base */, + 6170A2CAD1ABE59888B1F95E /* en */, + ); + name = LocalizedStoryboard.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 02EA7A15EF79E850F9399B41 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.Tool; + SDKROOT = macosx; + }; + name = "Staging Debug"; + }; + 0359995ADD0BFA44E9905752 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-tvOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + }; + name = "Production Release"; + }; + 03A06B8262F1B39589A3B310 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-Swift"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; + 04A44577D412ADA4AF40B0CF /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.TestFramework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Debug"; + }; + 053EAED64FF4B9A3B4F86991 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-macOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = "Production Debug"; + }; + 09AF4A26FD4A80AFB95F39CD /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-tvOS"; + PRODUCT_NAME = Framework2; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Debug"; + }; + 0C7B61BCB19F18E1CAFA9B02 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-Clip-Tests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_Clip.app/App_Clip"; + }; + name = "Staging Debug"; + }; + 0D47838E4B33810EB0F412F9 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.Legacy; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; + 0E9BABB47957C3D52D4A7E4F /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-Swift"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; + 114E824F1D0EAA35886DEF0D /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-iOS-Tests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_iOS.app/App_iOS"; + }; + name = "Staging Release"; + }; + 115D9C7C569E8D6887075F9D /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "XPC Service/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.XPCService; + SDKROOT = macosx; + }; + name = "Test Release"; + }; + 15A1BFD9417590DDD02F6216 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon"; + INFOPLIST_FILE = iMessageExtension/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageApp.extension; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; + 15BF441D2B0ED86F6B90EF49 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-tvOS"; + PRODUCT_NAME = Framework2; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Release"; + }; + 15DA3659204C3AFA53F64ED5 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.Tool; + SDKROOT = macosx; + }; + name = "Test Release"; + }; + 167CE7ABBB81B98E243004BF /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_Clip_UITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-Clip-UITests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = App_Clip; + }; + name = "Staging Debug"; + }; + 16C3E5AA32E607CF8AE94952 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-watchOS"; + PRODUCT_NAME = Framework; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Release"; + }; + 172635BE151671235582D608 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = App_Clip/Clip.entitlements; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_Clip/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.appwithclip.clip; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; + 17DF05C2E3715A65EA214144 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/tvOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-tvOS"; + PRODUCT_NAME = Framework; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Release"; + }; + 1978017BCE4AD3F7E426F0F5 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = iMessageApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageApp; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; + 198A1841A62FDD2285BE1DEC /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + WATCHOS_DEPLOYMENT_TARGET = 4.0; + }; + name = "Production Release"; + }; + 1B0C38D8839436D77EA16EF1 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-iOS-Tests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_iOS.app/App_iOS"; + }; + name = "Production Debug"; + }; + 1B2F2C5941E877806806E44C /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-watchOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = "Test Release"; + }; + 1D26D189CE20775E78D4CCD8 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_UITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-iOS-UITests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = App_iOS; + }; + name = "Staging Release"; + }; + 1D9C86CF49283D1F266E73A9 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/tvOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-tvOS"; + PRODUCT_NAME = Framework; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Release"; + }; + 1ECD0F546386B34DBFE6C17F /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.Legacy; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; + 212617C380F45FC243973AA9 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "XPC Service/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.XPCService; + SDKROOT = macosx; + }; + name = "Production Debug"; + }; + 2155EF66022A1C8A143AFA7D /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = iMessageStickers/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageStickersExtension; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; + 21F40CDB7C206A6F9BFD7E33 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = App_macOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS"; + SDKROOT = macosx; + }; + name = "Staging Debug"; + }; + 23235B1E6CC12E9F18293EC7 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-macOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = "Test Debug"; + }; + 23B260C8D36C1C7B2EBAE948 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_UITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-iOS-UITests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = App_iOS; + }; + name = "Test Debug"; + }; + 255923867BD8E40496573826 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-iOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; + 2D4302BB2BDA1637648EE400 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-iOS-Tests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_iOS.app/App_iOS"; + }; + name = "Test Release"; + }; + 31C024516D94D042748F457B /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.TestFramework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Release"; + }; + 32AC37B65B0AD18D0BF30034 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + MY_SETTING = hello; + }; + name = "Staging Release"; + }; + 352CFDDF22878B21B74F23E7 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon"; + INFOPLIST_FILE = iMessageExtension/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageApp.extension; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; + 35AC2E0FB7F982F87319A38C /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-iOS-Tests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_iOS.app/App_iOS"; + }; + name = "Test Debug"; + }; + 35EF59B0A6F4215250FC8B6D /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = App_iOS/App.entitlements; + CODE_SIGN_IDENTITY = "iPhone Developer"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.EntitledApp; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; + 3AAD22CDEC8A1FDDB8A2708D /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-watchOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = "Staging Release"; + }; + 3AECB926A8AE276B2019557F /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_iOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.appwithclip; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; + 3AFAF82F6BD13C63D55A8308 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "XPC Service/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.XPCService; + SDKROOT = macosx; + }; + name = "Staging Debug"; + }; + 3CD4C8467FE69F1D2092CE66 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-macOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = "Production Release"; + }; + 3E1E6EF943CEAE3F81929C96 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/tvOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-tvOS"; + PRODUCT_NAME = Framework; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Release"; + }; + 423A0373D51B89C5AF9344BF /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = App_macOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS-Tests"; + SDKROOT = macosx; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_macOS.app/Contents/MacOS/App_macOS"; + }; + name = "Staging Release"; + }; + 485C71D2CEF34712CE8813C8 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-iOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; + 487F219E0C5B4852D4240AE3 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-Swift"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; + 48EFEA0B3CA6F5271B373A92 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-Swift"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; + 48FC7D687BB13EE23518E1FC /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + WATCHOS_DEPLOYMENT_TARGET = 4.0; + }; + name = "Production Debug"; + }; + 49E2ACC01AEF00C167607E25 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = App_macOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS"; + SDKROOT = macosx; + }; + name = "Production Debug"; + }; + 4B4702B2F362DA39717BC0CC /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-macOS"; + PRODUCT_NAME = Framework; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Debug"; + }; + 4C04971715A77E238CBE8A94 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_UITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-iOS-UITests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = App_iOS; + }; + name = "Production Release"; + }; + 4D7EF24F4501941FCCD063BD /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_UITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-iOS-UITests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = App_iOS; + }; + name = "Test Release"; + }; + 4FA21CDBD95C8B64FED4FD1F /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-tvOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + }; + name = "Production Debug"; + }; + 501FA5E165A41A6BD1F9045A /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.Tool; + SDKROOT = macosx; + }; + name = "Test Debug"; + }; + 50D70A3741393712CD35C80C /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "XPC Service/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.XPCService; + SDKROOT = macosx; + }; + name = "Staging Release"; + }; + 53F9B1C928C6DFEEDA0AF698 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = iMessageStickers/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageStickersExtension; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; + 541AF6B4C6B5311D339FF3ED /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-tvOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + }; + name = "Test Release"; + }; + 55ED3060EF856102ED57B470 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = App_macOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS"; + SDKROOT = macosx; + }; + name = "Test Debug"; + }; + 5728D851D92C8BA0550695BA /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + BUNDLE_ID_SUFFIX = .staging; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + WATCHOS_DEPLOYMENT_TARGET = 4.0; + }; + name = "Staging Debug"; + }; + 5804A4BD222650F5C32F6825 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-Clip-Tests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_Clip.app/App_Clip"; + }; + name = "Test Debug"; + }; + 589C74C57B978EEE60A84A5D /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-macOS"; + PRODUCT_NAME = Framework2; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Release"; + }; + 5924F68913C8A193D4081E97 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-watchOS"; + PRODUCT_NAME = Framework; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Release"; + }; + 5A63CA9A024A7C2091BC8A65 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.app; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; + 5D1AA3424F6EE7831AC065C9 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-watchOS"; + PRODUCT_NAME = Framework2; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Debug"; + }; + 5D37F8F1E8C7B174E2BCDBAF /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-iOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; + 5D7368280048BFE21CA52364 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-macOS"; + PRODUCT_NAME = Framework2; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Debug"; + }; + 5FDFD00BB647A99AA957DC2D /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-watchOS"; + PRODUCT_NAME = Framework2; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Release"; + }; + 61401F625B86180823D74815 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.TestFramework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Release"; + }; + 624FDC440AC60A1426188430 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-watchOS"; + PRODUCT_NAME = Framework; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Debug"; + }; + 6286DF5CB32608C929F71F73 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = App_macOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS"; + SDKROOT = macosx; + }; + name = "Test Release"; + }; + 63B8C37C32DB75550B534E3F /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.TestFramework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Debug"; + }; + 6745735B601E00712C6449B5 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-watchOS"; + PRODUCT_NAME = Framework2; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Debug"; + }; + 674DF9FC12EEAD2B65EDABF3 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = App_macOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS"; + SDKROOT = macosx; + }; + name = "Staging Release"; + }; + 67878061E7FE44186F01A87F /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "XPC Service/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.XPCService; + SDKROOT = macosx; + }; + name = "Test Debug"; + }; + 67DEEE053A621B66857F9803 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_Clip_UITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-Clip-UITests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = App_Clip; + }; + name = "Test Debug"; + }; + 68C41F11EC3A5F2AD63A9561 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_UITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-iOS-UITests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = App_iOS; + }; + name = "Production Debug"; + }; + 6A0FBBF697209EA1BF1B8341 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = iMessageStickers/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageStickersExtension; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; + 6A0FCE5AE89BD83A6554BB0D /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "XPC Service/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.XPCService; + SDKROOT = macosx; + }; + name = "Production Release"; + }; + 6E5F7AD78B7D395020B2206E /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = iMessageApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageApp; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; + 6F20523C3582CFAD67FF337B /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = App_Clip/Clip.entitlements; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_Clip/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.appwithclip.clip; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; + 6FE62E88CE8995B6B09EA0C8 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-macOS"; + PRODUCT_NAME = Framework; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Debug"; + }; + 70AC839150951CD4A4A30F96 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.Legacy; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; + 71A3AC6722DE3CBD99092E8C /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-macOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = "Staging Release"; + }; + 721DE2AAC1D8788D496342D5 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = App_Clip/Clip.entitlements; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_Clip/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.appwithclip.clip; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; + 73A4D390B3E40C79BD6411FF /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.Tool; + SDKROOT = macosx; + }; + name = "Staging Release"; + }; + 73F0DB076A5FCED1A4D04930 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + BUNDLE_ID_SUFFIX = .staging; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + WATCHOS_DEPLOYMENT_TARGET = 4.0; + }; + name = "Staging Release"; + }; + 74ED626BC2054224876550EE /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-watchOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = "Test Debug"; + }; + 751BB7D52B5275C48FA8561B /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-iOS"; + PRODUCT_NAME = Framework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Release"; + }; + 7715B294A5F1C088685F4C82 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = App_watchOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 4.0; + }; + name = "Staging Release"; + }; + 77FF85B1482FA6B1F5C7464D /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/tvOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-tvOS"; + PRODUCT_NAME = Framework; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Debug"; + }; + 797B3A734448D220FC75A683 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.app; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; + 798CA37D8B725F91A13557B6 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-iOS-Tests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_iOS.app/App_iOS"; + }; + name = "Staging Debug"; + }; + 7A0E151513EC4860871B3533 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-iOS"; + PRODUCT_NAME = Framework2; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Debug"; + }; + 7CBE3B17DB26AE387A5182D9 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.TestFramework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Release"; + }; + 7FB7D3D5582FEBF67168A7FE /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-iOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; + 821EB3E3E2FE9AA073D17D12 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.Legacy; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; + 83369794BD5F599701ECCCAB /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-macOS"; + PRODUCT_NAME = Framework; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Debug"; + }; + 838050FA296DBA072BFBDAC6 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + MY_SETTING = hello; + }; + name = "Test Release"; + }; + 8480F258F8BB72C9E64251D2 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/tvOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-tvOS"; + PRODUCT_NAME = Framework; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Debug"; + }; + 851A57DE0FE85BF757688ED2 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_Clip_UITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-Clip-UITests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = App_Clip; + }; + name = "Staging Release"; + }; + 85832F389D795BA2E92FCB58 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-macOS"; + PRODUCT_NAME = Framework2; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Debug"; + }; + 86A9639B679041971A10A4A5 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = App_macOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS"; + SDKROOT = macosx; + }; + name = "Production Release"; + }; + 894820264A634C140A7FB375 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.Tool; + SDKROOT = macosx; + }; + name = "Production Release"; + }; + 89AF7A6AD1A97A3595BE385D /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-iOS"; + PRODUCT_NAME = Framework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Debug"; + }; + 8ADCC8ACD4DB8DE8A806C3AF /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon"; + INFOPLIST_FILE = iMessageExtension/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageApp.extension; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; + 8DF455FCCB15089A12904A09 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = iMessageStickers/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageStickersExtension; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; + 8E57FECDCAC83BC80F2950B1 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-macOS"; + PRODUCT_NAME = Framework; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Release"; + }; + 8E88FBD6519BC82A07713AEA /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.app; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; + 8E96D4EBF49E14AF234B6211 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-watchOS"; + PRODUCT_NAME = Framework; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Release"; + }; + 8F50C33D75184956D99FA6FB /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = App_iOS/App.entitlements; + CODE_SIGN_IDENTITY = "iPhone Developer"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.EntitledApp; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; + 904C4C86D542B6372931CF17 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-watchOS"; + PRODUCT_NAME = Framework2; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Release"; + }; + 90B900384791067500B135B7 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = App_Clip/Clip.entitlements; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_Clip/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.appwithclip.clip; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; + 90C4F3586ECA83132F0DE7B9 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-iOS"; + PRODUCT_NAME = Framework2; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Debug"; + }; + 942D2844B060AD5CF5605E6D /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_iOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.appwithclip; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; + 9432DC33411B23B8E85E4497 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = "App_watchOS Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch.extension; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = "Test Release"; + }; + 96EBFB5B0E95829CA24B888F /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + BUNDLE_ID_SUFFIX = .test; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + WATCHOS_DEPLOYMENT_TARGET = 4.0; + }; + name = "Test Release"; + }; + 978F2FF834AB6B8DFA16158F /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-macOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = "Staging Debug"; + }; + 97943DF689772FAAD2763252 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = App_macOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS-Tests"; + SDKROOT = macosx; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_macOS.app/Contents/MacOS/App_macOS"; + }; + name = "Test Debug"; + }; + 97F35E644613C31A0F6057A9 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = iMessageStickers/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageStickersExtension; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; + 983179BB00CE13590396D418 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + MY_SETTING = hello; + }; + name = "Staging Debug"; + }; + 9851DE9B03B3F61BE95059CD /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-watchOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = "Production Debug"; + }; + 98C2E2329E5338479C21FCB3 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_Clip_UITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-Clip-UITests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = App_Clip; + }; + name = "Production Debug"; + }; + 98C2F16400F0BB2EF4D96C01 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.app; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; + 998C0C1803A225B371B1D1B6 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.Legacy; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; + 9ACC54B12ACACAC806B2713A /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-iOS"; + PRODUCT_NAME = Framework2; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Release"; + }; + 9B7E01C60F1BED584E59C229 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon"; + INFOPLIST_FILE = iMessageExtension/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageApp.extension; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; + 9DFC9F38D927AEADC5D39497 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-iOS"; + PRODUCT_NAME = Framework2; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Release"; + }; + 9E61D0D048FBFE4862531A9D /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-macOS"; + PRODUCT_NAME = Framework2; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Release"; + }; + A12C7C6B28D447A2883E64B1 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-watchOS"; + PRODUCT_NAME = Framework2; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Release"; + }; + A3FA0FDB6F5345F5DC6FAF6A /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = App_Clip/Clip.entitlements; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_Clip/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.appwithclip.clip; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; + A50C9533122E6AD686BBD105 /* Test Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 28B6600F3CDA6F15633D2134 /* config.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + BUNDLE_ID_SUFFIX = .test; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + WATCHOS_DEPLOYMENT_TARGET = 4.0; + }; + name = "Test Debug"; + }; + AA43CD2CE072AC067D41C7B9 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon"; + INFOPLIST_FILE = iMessageExtension/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageApp.extension; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; + AB794EA9075BC2B2E1D742DB /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-macOS"; + PRODUCT_NAME = Framework; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Release"; + }; + AB891D5B82CC0DE77E5B3592 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = iMessageApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageApp; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; + AE10B9A8DD8696989527226F /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-watchOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = "Production Release"; + }; + AEBAEEB0BF317DB830098ECE /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_UITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-iOS-UITests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = App_iOS; + }; + name = "Staging Debug"; + }; + B131DD67F7FAA5B3E8F96D43 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = iMessageApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageApp; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; + B325DC45C94C7C885627F1F7 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_iOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.appwithclip; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; + B34E6EA38DD860CEECFB2DAB /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-iOS"; + PRODUCT_NAME = Framework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Release"; + }; + B427DC9B644A03F75D5EE3B3 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = App_iOS/App.entitlements; + CODE_SIGN_IDENTITY = "iPhone Developer"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.EntitledApp; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; + B63AEDBE2CAF03E47A42EFBB /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-Clip-Tests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_Clip.app/App_Clip"; + }; + name = "Production Release"; + }; + BB3A650A1BBB9DB6128BE748 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-iOS-Tests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_iOS.app/App_iOS"; + }; + name = "Production Release"; + }; + BC7790D72F07EA795C1E173E /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon"; + INFOPLIST_FILE = iMessageExtension/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageApp.extension; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; + BCD6DAE84F6D39A359582F34 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.app; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; + C0E6F72AC67FDABEC3DA0F56 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-iOS"; + PRODUCT_NAME = Framework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Debug"; + }; + C17A2093AEB51B28A3486357 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = "App_watchOS Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch.extension; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = "Production Debug"; + }; + C2170A503C4035851621CFA5 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.Legacy; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; + C348EEA27988050B1A7E44CF /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-Clip-Tests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_Clip.app/App_Clip"; + }; + name = "Test Release"; + }; + C349399AC28634700389BFA0 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-Swift"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; + C3683443B5207E92AE54AC3E /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = iMessageStickers/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageStickersExtension; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; + C5CA0964CE9711DD3663414F /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-iOS"; + PRODUCT_NAME = Framework2; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Release"; + }; + C7A2E4059491C4D3F913820C /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-tvOS"; + PRODUCT_NAME = Framework2; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Debug"; + }; + C8385848D7EC802322A4C9E3 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-watchOS"; + PRODUCT_NAME = Framework2; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Debug"; + }; + C841B18259CE051FD4B3E172 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-iOS"; + PRODUCT_NAME = Framework2; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Debug"; + }; + C8CB6354514BACC27ACFD497 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = App_macOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS-Tests"; + SDKROOT = macosx; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_macOS.app/Contents/MacOS/App_macOS"; + }; + name = "Staging Debug"; + }; + C914FA6353BCB691D4770A79 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-iOS"; + PRODUCT_NAME = Framework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Release"; + }; + CAEC3E96990ECDF1F0232D86 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-Swift"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; + CB42404875DC01211537EBC0 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-tvOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + }; + name = "Test Debug"; + }; + CB7E81E3E358741E4AF626EE /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = App_watchOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 4.0; + }; + name = "Staging Debug"; + }; + CD636013A0F9EE18BC558EE7 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = App_iOS/App.entitlements; + CODE_SIGN_IDENTITY = "iPhone Developer"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.EntitledApp; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; + CED7E259E7C0F45F2011E81C /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-watchOS"; + PRODUCT_NAME = Framework; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Debug"; + }; + CF10817F3ECC67C1E02FCB49 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_Clip_UITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-Clip-UITests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = App_Clip; + }; + name = "Test Release"; + }; + CF1651D9B7BDA2E47376B8B4 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = App_watchOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 4.0; + }; + name = "Test Release"; + }; + CF210234FD3BAEE7A36DD67A /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + MY_SETTING = hello; + }; + name = "Production Debug"; + }; + D0AFC812B233C6FED331FFEA /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = App_macOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS-Tests"; + SDKROOT = macosx; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_macOS.app/Contents/MacOS/App_macOS"; + }; + name = "Production Debug"; + }; + D1080DDE709BA2BCAC27E94D /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = App_watchOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 4.0; + }; + name = "Production Debug"; + }; + D2D301B65251BF1D19527185 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-macOS"; + PRODUCT_NAME = Framework2; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Debug"; + }; + D3CFCC35812F6922F93421BA /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = iMessageApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageApp; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; + D4EA5ACE61DD1FF1759A15F9 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.TestFramework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Debug"; + }; + D5E3DB3EA2AFB7B01449A25A /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = App_iOS/App.entitlements; + CODE_SIGN_IDENTITY = "iPhone Developer"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.EntitledApp; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; + D66CCEDDDB6EEDDFDB01A429 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_iOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.appwithclip; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; + D7EF4B53953AC7DBC16BF5CC /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-iOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; + DAB2F470DFA47016103F2844 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-tvOS"; + PRODUCT_NAME = Framework2; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Release"; + }; + DE81F17DA26F80B807A0ECB4 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-macOS"; + PRODUCT_NAME = Framework; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Release"; + }; + DEB610ED8F66FE30A09B28FB /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-Clip-Tests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_Clip.app/App_Clip"; + }; + name = "Production Debug"; + }; + DF17269AA7642511FE3478FA /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = "App_watchOS Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch.extension; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = "Staging Release"; + }; + E0C7BB51B137528004C6D05B /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + MY_SETTING = hello; + }; + name = "Test Debug"; + }; + E1BDBEB4922DC3ADA85FCB45 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/tvOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-tvOS"; + PRODUCT_NAME = Framework; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Debug"; + }; + E1F957C21FA9E788F3AA9A55 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-watchOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = "Staging Debug"; + }; + EB341083488EA6F9A7B09376 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-tvOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + }; + name = "Staging Debug"; + }; + ED80084E3BA60F92AB7E8272 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = "App_watchOS Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch.extension; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = "Production Release"; + }; + EDA22633538092F196CADFA5 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-tvOS"; + PRODUCT_NAME = Framework2; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Release"; + }; + EDA66845ACB2EC1E2D02DBCE /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-Clip-Tests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_Clip.app/App_Clip"; + }; + name = "Staging Release"; + }; + EDC7F56FE70242B7197B6DBA /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_iOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.appwithclip; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; + EF12A546F36561AD22ABE953 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/iOS/Static", + ); + INFOPLIST_FILE = App_iOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.app; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; + EF761FB40B58F9986BB1EACE /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = App_watchOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 4.0; + }; + name = "Test Debug"; + }; + F049A3E0F7C36718151231E3 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.Tool; + SDKROOT = macosx; + }; + name = "Production Debug"; + }; + F07B8E737BE84E5ACDBC65A1 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = App_watchOS/Info.plist; + PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 4.0; + }; + name = "Production Release"; + }; + F0AEA3C92D045D0911EE0ECD /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = "App_watchOS Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch.extension; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = "Staging Debug"; + }; + F0E85A781F359CDBA52C713C /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = App_macOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS-Tests"; + SDKROOT = macosx; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_macOS.app/Contents/MacOS/App_macOS"; + }; + name = "Production Release"; + }; + F149A50FEDE1D473D0C057F9 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = "App_watchOS Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch.extension; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = "Test Debug"; + }; + F3605B5D6C4420A1213360A8 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-iOS"; + PRODUCT_NAME = Framework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Debug"; + }; + F4603F248DE18834462CB0E5 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-tvOS"; + PRODUCT_NAME = Framework2; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Debug"; + }; + F4757FF1CECDB8A2B713F51F /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_iOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.appwithclip; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; + F5347351BC19A7749E673E47 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = App_iOS/App.entitlements; + CODE_SIGN_IDENTITY = "iPhone Developer"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.EntitledApp; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; + F60F56A09B66D2E156A6BE9B /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-iOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; + F6979D0393CC0D4FB9CA9877 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + MY_SETTING = hello; + }; + name = "Production Release"; + }; + F742C8CFE1D42CD709113154 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-tvOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + }; + name = "Staging Release"; + }; + F77B428B65F1468434D6801A /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_Clip_UITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-Clip-UITests"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = App_Clip; + }; + name = "Production Release"; + }; + F7814E81F508C5AAFD0FF25E /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = iMessageApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.iMessageApp; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; + F94FDBEFBDAC270102F161C3 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/watchOS", + ); + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-watchOS"; + PRODUCT_NAME = Framework; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Debug"; + }; + F990CC508784D61CF58463E6 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.StaticLibrary-ObjC-macOS"; + PRODUCT_NAME = StaticLibrary_ObjC; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = "Test Release"; + }; + F9AE99185A585F0E5FC18494 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = App_Clip/Clip.entitlements; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = App_Clip/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.appwithclip.clip; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; + FBCB8E4B1BFF276E0CC4A6BC /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework2-macOS"; + PRODUCT_NAME = Framework2; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Release"; + }; + FD44525A79C922C647A546C9 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); + INFOPLIST_FILE = App_macOS_Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS-Tests"; + SDKROOT = macosx; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/App_macOS.app/Contents/MacOS/App_macOS"; + }; + name = "Test Release"; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 04F7DFEC84B28DEF04F71F0A /* Build configuration list for PBXNativeTarget "iMessageExtension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BC7790D72F07EA795C1E173E /* Production Debug */, + 9B7E01C60F1BED584E59C229 /* Production Release */, + 8ADCC8ACD4DB8DE8A806C3AF /* Staging Debug */, + AA43CD2CE072AC067D41C7B9 /* Staging Release */, + 352CFDDF22878B21B74F23E7 /* Test Debug */, + 15A1BFD9417590DDD02F6216 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 12219412F67F790403913F07 /* Build configuration list for PBXLegacyTarget "Legacy" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 821EB3E3E2FE9AA073D17D12 /* Production Debug */, + 0D47838E4B33810EB0F412F9 /* Production Release */, + 1ECD0F546386B34DBFE6C17F /* Staging Debug */, + 70AC839150951CD4A4A30F96 /* Staging Release */, + 998C0C1803A225B371B1D1B6 /* Test Debug */, + C2170A503C4035851621CFA5 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 1245739E28D036CED2FF55C1 /* Build configuration list for PBXNativeTarget "App_iOS_With_Clip" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F4757FF1CECDB8A2B713F51F /* Production Debug */, + 3AECB926A8AE276B2019557F /* Production Release */, + B325DC45C94C7C885627F1F7 /* Staging Debug */, + EDC7F56FE70242B7197B6DBA /* Staging Release */, + D66CCEDDDB6EEDDFDB01A429 /* Test Debug */, + 942D2844B060AD5CF5605E6D /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 154811E763287E0982E4010C /* Build configuration list for PBXNativeTarget "App_Clip_UITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 98C2E2329E5338479C21FCB3 /* Production Debug */, + F77B428B65F1468434D6801A /* Production Release */, + 167CE7ABBB81B98E243004BF /* Staging Debug */, + 851A57DE0FE85BF757688ED2 /* Staging Release */, + 67DEEE053A621B66857F9803 /* Test Debug */, + CF10817F3ECC67C1E02FCB49 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 25A6BD812166D38412B7D296 /* Build configuration list for PBXNativeTarget "App_Clip_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DEB610ED8F66FE30A09B28FB /* Production Debug */, + B63AEDBE2CAF03E47A42EFBB /* Production Release */, + 0C7B61BCB19F18E1CAFA9B02 /* Staging Debug */, + EDA66845ACB2EC1E2D02DBCE /* Staging Release */, + 5804A4BD222650F5C32F6825 /* Test Debug */, + C348EEA27988050B1A7E44CF /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 2961C7042EE5F08A22AAF183 /* Build configuration list for PBXProject "ProjectXcode12" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 48FC7D687BB13EE23518E1FC /* Production Debug */, + 198A1841A62FDD2285BE1DEC /* Production Release */, + 5728D851D92C8BA0550695BA /* Staging Debug */, + 73F0DB076A5FCED1A4D04930 /* Staging Release */, + A50C9533122E6AD686BBD105 /* Test Debug */, + 96EBFB5B0E95829CA24B888F /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 29ED792F76D3712D856082B4 /* Build configuration list for PBXNativeTarget "App_Clip" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F9AE99185A585F0E5FC18494 /* Production Debug */, + 172635BE151671235582D608 /* Production Release */, + 90B900384791067500B135B7 /* Staging Debug */, + 721DE2AAC1D8788D496342D5 /* Staging Release */, + 6F20523C3582CFAD67FF337B /* Test Debug */, + A3FA0FDB6F5345F5DC6FAF6A /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 2FB1406136BDEE50410D00FE /* Build configuration list for PBXNativeTarget "TestFramework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D4EA5ACE61DD1FF1759A15F9 /* Production Debug */, + 31C024516D94D042748F457B /* Production Release */, + 04A44577D412ADA4AF40B0CF /* Staging Debug */, + 7CBE3B17DB26AE387A5182D9 /* Staging Release */, + 63B8C37C32DB75550B534E3F /* Test Debug */, + 61401F625B86180823D74815 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 51ECBDC8632467DA3ADA886F /* Build configuration list for PBXNativeTarget "StaticLibrary_Swift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0E9BABB47957C3D52D4A7E4F /* Production Debug */, + CAEC3E96990ECDF1F0232D86 /* Production Release */, + 03A06B8262F1B39589A3B310 /* Staging Debug */, + 48EFEA0B3CA6F5271B373A92 /* Staging Release */, + C349399AC28634700389BFA0 /* Test Debug */, + 487F219E0C5B4852D4240AE3 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 6107B10D2E2D953A15120917 /* Build configuration list for PBXNativeTarget "Framework_iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 89AF7A6AD1A97A3595BE385D /* Production Debug */, + B34E6EA38DD860CEECFB2DAB /* Production Release */, + F3605B5D6C4420A1213360A8 /* Staging Debug */, + C914FA6353BCB691D4770A79 /* Staging Release */, + C0E6F72AC67FDABEC3DA0F56 /* Test Debug */, + 751BB7D52B5275C48FA8561B /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 65393391FA3D521A2D096C75 /* Build configuration list for PBXNativeTarget "iMessageApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1978017BCE4AD3F7E426F0F5 /* Production Debug */, + D3CFCC35812F6922F93421BA /* Production Release */, + 6E5F7AD78B7D395020B2206E /* Staging Debug */, + B131DD67F7FAA5B3E8F96D43 /* Staging Release */, + F7814E81F508C5AAFD0FF25E /* Test Debug */, + AB891D5B82CC0DE77E5B3592 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 6BB95AFCC887A7C884112DCD /* Build configuration list for PBXNativeTarget "Framework2_tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 09AF4A26FD4A80AFB95F39CD /* Production Debug */, + DAB2F470DFA47016103F2844 /* Production Release */, + F4603F248DE18834462CB0E5 /* Staging Debug */, + 15BF441D2B0ED86F6B90EF49 /* Staging Release */, + C7A2E4059491C4D3F913820C /* Test Debug */, + EDA22633538092F196CADFA5 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 70FED818DB797FCDC7929DBC /* Build configuration list for PBXAggregateTarget "SuperTarget" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CF210234FD3BAEE7A36DD67A /* Production Debug */, + F6979D0393CC0D4FB9CA9877 /* Production Release */, + 983179BB00CE13590396D418 /* Staging Debug */, + 32AC37B65B0AD18D0BF30034 /* Staging Release */, + E0C7BB51B137528004C6D05B /* Test Debug */, + 838050FA296DBA072BFBDAC6 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 7FCE6665950846F21D6BA7F1 /* Build configuration list for PBXNativeTarget "App_macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 49E2ACC01AEF00C167607E25 /* Production Debug */, + 86A9639B679041971A10A4A5 /* Production Release */, + 21F40CDB7C206A6F9BFD7E33 /* Staging Debug */, + 674DF9FC12EEAD2B65EDABF3 /* Staging Release */, + 55ED3060EF856102ED57B470 /* Test Debug */, + 6286DF5CB32608C929F71F73 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 8ABE44BA99ABFD6518573B75 /* Build configuration list for PBXNativeTarget "StaticLibrary_ObjC_macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 053EAED64FF4B9A3B4F86991 /* Production Debug */, + 3CD4C8467FE69F1D2092CE66 /* Production Release */, + 978F2FF834AB6B8DFA16158F /* Staging Debug */, + 71A3AC6722DE3CBD99092E8C /* Staging Release */, + 23235B1E6CC12E9F18293EC7 /* Test Debug */, + F990CC508784D61CF58463E6 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 8B6F763B758ED180046D3908 /* Build configuration list for PBXNativeTarget "App_iOS_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1B0C38D8839436D77EA16EF1 /* Production Debug */, + BB3A650A1BBB9DB6128BE748 /* Production Release */, + 798CA37D8B725F91A13557B6 /* Staging Debug */, + 114E824F1D0EAA35886DEF0D /* Staging Release */, + 35AC2E0FB7F982F87319A38C /* Test Debug */, + 2D4302BB2BDA1637648EE400 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + 9EDED21A0C3AD1691C58401D /* Build configuration list for PBXNativeTarget "App_iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BCD6DAE84F6D39A359582F34 /* Production Debug */, + EF12A546F36561AD22ABE953 /* Production Release */, + 797B3A734448D220FC75A683 /* Staging Debug */, + 5A63CA9A024A7C2091BC8A65 /* Staging Release */, + 8E88FBD6519BC82A07713AEA /* Test Debug */, + 98C2F16400F0BB2EF4D96C01 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + A664263A7E39D94679AD5F74 /* Build configuration list for PBXNativeTarget "StaticLibrary_ObjC_tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4FA21CDBD95C8B64FED4FD1F /* Production Debug */, + 0359995ADD0BFA44E9905752 /* Production Release */, + EB341083488EA6F9A7B09376 /* Staging Debug */, + F742C8CFE1D42CD709113154 /* Staging Release */, + CB42404875DC01211537EBC0 /* Test Debug */, + 541AF6B4C6B5311D339FF3ED /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + B19E185DEA8C29F4234D14B9 /* Build configuration list for PBXNativeTarget "Framework2_watchOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6745735B601E00712C6449B5 /* Production Debug */, + 5FDFD00BB647A99AA957DC2D /* Production Release */, + C8385848D7EC802322A4C9E3 /* Staging Debug */, + A12C7C6B28D447A2883E64B1 /* Staging Release */, + 5D1AA3424F6EE7831AC065C9 /* Test Debug */, + 904C4C86D542B6372931CF17 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + BCC8658A349BEF8B35DCEE45 /* Build configuration list for PBXNativeTarget "StaticLibrary_ObjC_iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7FB7D3D5582FEBF67168A7FE /* Production Debug */, + F60F56A09B66D2E156A6BE9B /* Production Release */, + 255923867BD8E40496573826 /* Staging Debug */, + 485C71D2CEF34712CE8813C8 /* Staging Release */, + 5D37F8F1E8C7B174E2BCDBAF /* Test Debug */, + D7EF4B53953AC7DBC16BF5CC /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + BDE5A3172EAD9560272E40D5 /* Build configuration list for PBXNativeTarget "StaticLibrary_ObjC_watchOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9851DE9B03B3F61BE95059CD /* Production Debug */, + AE10B9A8DD8696989527226F /* Production Release */, + E1F957C21FA9E788F3AA9A55 /* Staging Debug */, + 3AAD22CDEC8A1FDDB8A2708D /* Staging Release */, + 74ED626BC2054224876550EE /* Test Debug */, + 1B2F2C5941E877806806E44C /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + C7C54B832F1638EA1C8C506D /* Build configuration list for PBXNativeTarget "Framework2_iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7A0E151513EC4860871B3533 /* Production Debug */, + 9DFC9F38D927AEADC5D39497 /* Production Release */, + C841B18259CE051FD4B3E172 /* Staging Debug */, + 9ACC54B12ACACAC806B2713A /* Staging Release */, + 90C4F3586ECA83132F0DE7B9 /* Test Debug */, + C5CA0964CE9711DD3663414F /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + C7E8A05AB55B088CE727B579 /* Build configuration list for PBXNativeTarget "App_macOS_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D0AFC812B233C6FED331FFEA /* Production Debug */, + F0E85A781F359CDBA52C713C /* Production Release */, + C8CB6354514BACC27ACFD497 /* Staging Debug */, + 423A0373D51B89C5AF9344BF /* Staging Release */, + 97943DF689772FAAD2763252 /* Test Debug */, + FD44525A79C922C647A546C9 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + D5A2344247FF33D62704E2C2 /* Build configuration list for PBXNativeTarget "Framework_tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E1BDBEB4922DC3ADA85FCB45 /* Production Debug */, + 17DF05C2E3715A65EA214144 /* Production Release */, + 8480F258F8BB72C9E64251D2 /* Staging Debug */, + 1D9C86CF49283D1F266E73A9 /* Staging Release */, + 77FF85B1482FA6B1F5C7464D /* Test Debug */, + 3E1E6EF943CEAE3F81929C96 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + D8F179BDF8E4EF8A9DF9D8B7 /* Build configuration list for PBXNativeTarget "App_watchOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D1080DDE709BA2BCAC27E94D /* Production Debug */, + F07B8E737BE84E5ACDBC65A1 /* Production Release */, + CB7E81E3E358741E4AF626EE /* Staging Debug */, + 7715B294A5F1C088685F4C82 /* Staging Release */, + EF761FB40B58F9986BB1EACE /* Test Debug */, + CF1651D9B7BDA2E47376B8B4 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + DA4742F9D7A73F3DB2B4AC87 /* Build configuration list for PBXNativeTarget "Framework_watchOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F94FDBEFBDAC270102F161C3 /* Production Debug */, + 5924F68913C8A193D4081E97 /* Production Release */, + 624FDC440AC60A1426188430 /* Staging Debug */, + 8E96D4EBF49E14AF234B6211 /* Staging Release */, + CED7E259E7C0F45F2011E81C /* Test Debug */, + 16C3E5AA32E607CF8AE94952 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + DD2C419331E24B123E0CBC9E /* Build configuration list for PBXNativeTarget "Framework2_macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5D7368280048BFE21CA52364 /* Production Debug */, + 9E61D0D048FBFE4862531A9D /* Production Release */, + 85832F389D795BA2E92FCB58 /* Staging Debug */, + 589C74C57B978EEE60A84A5D /* Staging Release */, + D2D301B65251BF1D19527185 /* Test Debug */, + FBCB8E4B1BFF276E0CC4A6BC /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + DD8DBB7F2CADB523598B1D3A /* Build configuration list for PBXNativeTarget "iMessageStickersExtension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2155EF66022A1C8A143AFA7D /* Production Debug */, + 8DF455FCCB15089A12904A09 /* Production Release */, + 6A0FBBF697209EA1BF1B8341 /* Staging Debug */, + 53F9B1C928C6DFEEDA0AF698 /* Staging Release */, + C3683443B5207E92AE54AC3E /* Test Debug */, + 97F35E644613C31A0F6057A9 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + E7F77B0DBCCD253D8A6B2645 /* Build configuration list for PBXNativeTarget "App_watchOS Extension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C17A2093AEB51B28A3486357 /* Production Debug */, + ED80084E3BA60F92AB7E8272 /* Production Release */, + F0AEA3C92D045D0911EE0ECD /* Staging Debug */, + DF17269AA7642511FE3478FA /* Staging Release */, + F149A50FEDE1D473D0C057F9 /* Test Debug */, + 9432DC33411B23B8E85E4497 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + EA0D28F9C2ACF4146025F574 /* Build configuration list for PBXNativeTarget "App_iOS_UITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 68C41F11EC3A5F2AD63A9561 /* Production Debug */, + 4C04971715A77E238CBE8A94 /* Production Release */, + AEBAEEB0BF317DB830098ECE /* Staging Debug */, + 1D26D189CE20775E78D4CCD8 /* Staging Release */, + 23B260C8D36C1C7B2EBAE948 /* Test Debug */, + 4D7EF24F4501941FCCD063BD /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + F5B278C2B6590DD1F0CBDE04 /* Build configuration list for PBXNativeTarget "XPC Service" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 212617C380F45FC243973AA9 /* Production Debug */, + 6A0FCE5AE89BD83A6554BB0D /* Production Release */, + 3AFAF82F6BD13C63D55A8308 /* Staging Debug */, + 50D70A3741393712CD35C80C /* Staging Release */, + 67878061E7FE44186F01A87F /* Test Debug */, + 115D9C7C569E8D6887075F9D /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + FB9AF55D22482CDEE8E9AC49 /* Build configuration list for PBXNativeTarget "Tool" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F049A3E0F7C36718151231E3 /* Production Debug */, + 894820264A634C140A7FB375 /* Production Release */, + 02EA7A15EF79E850F9399B41 /* Staging Debug */, + 73A4D390B3E40C79BD6411FF /* Staging Release */, + 501FA5E165A41A6BD1F9045A /* Test Debug */, + 15DA3659204C3AFA53F64ED5 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + FBA5F15A7524F82764D43342 /* Build configuration list for PBXNativeTarget "EntitledApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8F50C33D75184956D99FA6FB /* Production Debug */, + D5E3DB3EA2AFB7B01449A25A /* Production Release */, + B427DC9B644A03F75D5EE3B3 /* Staging Debug */, + CD636013A0F9EE18BC558EE7 /* Staging Release */, + 35EF59B0A6F4215250FC8B6D /* Test Debug */, + F5347351BC19A7749E673E47 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; + FECC727EC6A1CBB859258849 /* Build configuration list for PBXNativeTarget "Framework_macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4B4702B2F362DA39717BC0CC /* Production Debug */, + AB794EA9075BC2B2E1D742DB /* Production Release */, + 6FE62E88CE8995B6B09EA0C8 /* Staging Debug */, + 8E57FECDCAC83BC80F2950B1 /* Staging Release */, + 83369794BD5F599701ECCCAB /* Test Debug */, + DE81F17DA26F80B807A0ECB4 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + 431156B967A9DF0995682D7C /* Model.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + D998E6204320A2092F9327FA /* Model 2.xcdatamodel */, + 610AD86B5088E07993870579 /* Model 3.xcdatamodel */, + 5FF83941D764AEB361249B72 /* Model.xcdatamodel */, + ); + currentVersion = D998E6204320A2092F9327FA /* Model 2.xcdatamodel */; + path = Model.xcdatamodeld; + sourceTree = ""; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = 7467FBF059DC784B5601CA7E /* Project object */; +} diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..be41c34c6 --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme new file mode 100644 index 000000000..2ef04494a --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme new file mode 100644 index 000000000..5ae081082 --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme new file mode 100644 index 000000000..34f5b11cf --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Staging.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Staging.xcscheme new file mode 100644 index 000000000..ef31e1396 --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Staging.xcscheme @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Test.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Test.xcscheme new file mode 100644 index 000000000..bca1a44e2 --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Test.xcscheme @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Production.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Production.xcscheme new file mode 100644 index 000000000..f9998d3eb --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Production.xcscheme @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Staging.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Staging.xcscheme new file mode 100644 index 000000000..c87911bb4 --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Staging.xcscheme @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Test.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Test.xcscheme new file mode 100644 index 000000000..c82da690f --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Test.xcscheme @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_macOS.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_macOS.xcscheme new file mode 100644 index 000000000..e5bb89782 --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_macOS.xcscheme @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_watchOS.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_watchOS.xcscheme new file mode 100644 index 000000000..97721bafc --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_watchOS.xcscheme @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme new file mode 100644 index 000000000..f808f3f18 --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme new file mode 100644 index 000000000..8d5688667 --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageApp.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageApp.xcscheme new file mode 100644 index 000000000..ca0000609 --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageApp.xcscheme @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme new file mode 100644 index 000000000..c49cc6212 --- /dev/null +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/build.sh b/Tests/Fixtures/TestProject/build.sh index 4609b2b57..2fb6c8ba2 100755 --- a/Tests/Fixtures/TestProject/build.sh +++ b/Tests/Fixtures/TestProject/build.sh @@ -13,11 +13,20 @@ echo "MACH_O_TYPE = staticlib" > $STATIC_CONFIG XCODE_XCCONFIG_FILE=$STATIC_CONFIG \ carthage bootstrap $CARTHAGE_STATIC_FRAMEWORKS --cache-builds +XCODE_VERSION=$(/usr/libexec/PlistBuddy -c "Print :DTXcode" "$(xcode-select -p)/../Info.plist") + echo " ⚙️ Building iOS app" xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_iOS Test" -configuration "Test Debug" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO" echo "✅ Successfully built iOS app" +if [[ "$XCODE_VERSION" == 12* ]]; then + echo " + ⚙️ Building iOS app (Xcode 12+)" + xcodebuild -quiet -project ProjectXcode12.xcodeproj -scheme "App_iOS_With_Clip Test" -configuration "Test Debug" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO" + echo "✅ Successfully built iOS app (Xcode 12+)" +fi + echo " ⚙️ Building macOS app" xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_macOS" -configuration "Test Debug" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO" diff --git a/Tests/Fixtures/TestProject/project-xcode-12.yml b/Tests/Fixtures/TestProject/project-xcode-12.yml new file mode 100644 index 000000000..5c5da3337 --- /dev/null +++ b/Tests/Fixtures/TestProject/project-xcode-12.yml @@ -0,0 +1,72 @@ +# NOTE: when Xcode 12 goes GM and the Xcode 11 CI can be dropped, +# this file can be merged into project.yml. As-is, it generates +# targets that Xcode 11 doesn't understand or know how to build. +name: ProjectXcode12 +include: [project.yml] +targets: + App_iOS_With_Clip: + type: application + platform: iOS + attributes: + ProvisioningStyle: Automatic + sources: + - path: StandaloneFiles/Standalone.swift + - path: App_iOS + name: App + compilerFlags: + - "-Werror" + excludes: + - "**/excluded-file" + - "excluded-file" + - "Model.xcmappingmodel" + settings: + INFOPLIST_FILE: App_iOS/Info.plist + PRODUCT_BUNDLE_IDENTIFIER: com.project.appwithclip + dependencies: + - target: Framework_iOS + - target: StaticLibrary_ObjC_iOS + - target: App_Clip + - sdk: Contacts.framework + scheme: + configVariants: + - Test + - Staging + - Production + + App_Clip: + type: application.on-demand-install-capable + platform: iOS + entitlements: + path: App_Clip/Clip.entitlements + properties: + com.apple.developer.parent-application-identifiers: [$(AppIdentifierPrefix)com.project.appwithclip] + com.apple.security.application-groups: group.com.app + sources: + App_Clip + settings: + INFOPLIST_FILE: App_Clip/Info.plist + PRODUCT_BUNDLE_IDENTIFIER: com.project.appwithclip.clip + dependencies: + - target: Framework_iOS + - target: StaticLibrary_ObjC_iOS + scheme: + testTargets: + - App_Clip_Tests + - App_Clip_UITests + + App_Clip_Tests: + type: bundle.unit-test + platform: iOS + sources: App_iOS_Tests + dependencies: + - target: App_Clip + - target: TestFramework + - carthage: swift-tagged + linkType: static + + App_Clip_UITests: + type: bundle.ui-testing + platform: iOS + sources: App_Clip_UITests + dependencies: + - target: App_Clip diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 9b89d7ce4..34895d906 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -201,7 +201,7 @@ targets: iMessageStickersExtension: type: app-extension.messages-sticker-pack platform: iOS - sources: + sources: - path: iMessageStickers StaticLibrary_ObjC: @@ -265,7 +265,7 @@ targets: sources: App_iOS_UITests dependencies: - target: App_iOS - + App_macOS_Tests: type: bundle.unit-test platform: macOS @@ -306,7 +306,7 @@ schemes: App_Scheme: build: targets: - App_iOS: all + App_iOS: all run: simulateLocation: allow: true diff --git a/scripts/gen-fixtures.sh b/scripts/gen-fixtures.sh index a3785436b..a7b14a1b7 100755 --- a/scripts/gen-fixtures.sh +++ b/scripts/gen-fixtures.sh @@ -3,5 +3,6 @@ set -e swift run xcodegen --spec Tests/Fixtures/TestProject/AnotherProject/project.yml swift run xcodegen --spec Tests/Fixtures/TestProject/project.yml +swift run xcodegen --spec Tests/Fixtures/TestProject/project-xcode-12.yml swift run xcodegen --spec Tests/Fixtures/CarthageProject/project.yml swift run xcodegen --spec Tests/Fixtures/SPM/project.yml From cd55bfbdfe5ae72dc6d5a56eb21421d1345ed742 Mon Sep 17 00:00:00 2001 From: Andrew Reach <67667123+andrewreach@users.noreply.github.com> Date: Sun, 16 Aug 2020 15:39:31 -0700 Subject: [PATCH 016/284] Fix a bug in computing relative paths. (#915) Once a difference in path components between base and self has been encountered, it is no longer valid to skip over common components. --- CHANGELOG.md | 1 + Sources/Core/PathExtensions.swift | 2 +- Tests/CoreTests/PathExtensionsTests.swift | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc2bc2291..07aa5b194 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Treat all directories with known UTI as file wrapper. [#896](https://github.com/yonaskolb/XcodeGen/pull/896) @KhaosT - Generated schemes for application extensions now contain `wasCreatedForAppExtension = YES`. [#898](https://github.com/yonaskolb/XcodeGen/issues/898) @muizidn - Allow package dependencies to use `link: false` [#920](https://github.com/yonaskolb/XcodeGen/pull/920) @k-thorat +- Fixed issue computing relative paths. [#915](https://github.com/yonaskolb/XcodeGen/pull/915) @andrewreach #### Internal - Updated to XcodeProj 7.13.0 [#908](https://github.com/yonaskolb/XcodeGen/pull/908) @brentleyjones diff --git a/Sources/Core/PathExtensions.swift b/Sources/Core/PathExtensions.swift index 5e72c9588..7c174b072 100644 --- a/Sources/Core/PathExtensions.swift +++ b/Sources/Core/PathExtensions.swift @@ -49,7 +49,7 @@ extension Path { return try pathComponents(for: path.dropFirst(), relativeTo: base, memo: memo + [rhs]) // Both sides have a common parent - case (.some(let lhs), .some(let rhs)) where lhs == rhs: + case (.some(let lhs), .some(let rhs)) where memo.isEmpty && lhs == rhs: return try pathComponents(for: path.dropFirst(), relativeTo: base.dropFirst(), memo: memo) // `base` has a path to back out of diff --git a/Tests/CoreTests/PathExtensionsTests.swift b/Tests/CoreTests/PathExtensionsTests.swift index 83d2da399..ee9fd6e7a 100644 --- a/Tests/CoreTests/PathExtensionsTests.swift +++ b/Tests/CoreTests/PathExtensionsTests.swift @@ -48,6 +48,7 @@ class PathExtensionsTests: XCTestCase { try expect(relativePath(to: "/a/../../b", from: "/b")) == "." try expect(relativePath(to: "a/..", from: "a")) == ".." try expect(relativePath(to: "a/../b", from: "b")) == "." + try expect(relativePath(to: "/a/c", from: "/a/b/c")) == "../../c" } $0.it("backtracks on a non-normalized base path") { From b11d5d2a1cd9e4a7c59c23ad2588f8d1abab9e9c Mon Sep 17 00:00:00 2001 From: Dan Fleming Date: Fri, 21 Aug 2020 22:23:00 -0400 Subject: [PATCH 017/284] Run CI against Xcode 12 beta (#936) * Run CI against Xcode 12 beta * Update CHANGELOG * fixtures: add workarounds for Xcode 12 * Refine xcode 12 workaround to not fail for xcode 11 --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 3 +++ Tests/Fixtures/TestProject/build.sh | 19 ++++++++----------- .../TestProject/carthage_dynamic.xcconfig | 1 + .../TestProject/carthage_static.xcconfig | 2 ++ Tests/Fixtures/TestProject/fixtures.xcconfig | 7 +++++++ .../TestProject/xcode12_workaround.xcconfig | 9 +++++++++ 7 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 Tests/Fixtures/TestProject/carthage_dynamic.xcconfig create mode 100644 Tests/Fixtures/TestProject/carthage_static.xcconfig create mode 100644 Tests/Fixtures/TestProject/fixtures.xcconfig create mode 100644 Tests/Fixtures/TestProject/xcode12_workaround.xcconfig diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 990a3b176..49dc8be5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: name: Xcode ${{ matrix.xcode }} strategy: matrix: - xcode: ["11"] + xcode: ["11", "12_beta"] steps: - uses: actions/checkout@master - name: Set Xcode diff --git a/CHANGELOG.md b/CHANGELOG.md index 07aa5b194..b92010d7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ - Added ability to set custom LLDBInit scripts for launch and test schemes [#929](https://github.com/yonaskolb/XcodeGen/pull/929) @polac24 - Adds App Clip support. [#909](https://github.com/yonaskolb/XcodeGen/pull/909) @brentleyjones @dflems +#### Internal +- Updates CI to run on Xcode 12 beta. [#936](https://github.com/yonaskolb/XcodeGen/pull/936) @dflems + #### Fixed - Allow SDK dependencies to be embedded. [#922](https://github.com/yonaskolb/XcodeGen/pull/922) @k-thorat diff --git a/Tests/Fixtures/TestProject/build.sh b/Tests/Fixtures/TestProject/build.sh index 2fb6c8ba2..ea5876da3 100755 --- a/Tests/Fixtures/TestProject/build.sh +++ b/Tests/Fixtures/TestProject/build.sh @@ -1,33 +1,30 @@ #!/bin/bash set -e +XCODE_VERSION=$(/usr/libexec/PlistBuddy -c "Print :DTXcode" "$(xcode-select -p)/../Info.plist") + CARTHAGE_DYNAMIC_FRAMEWORKS=(Result) CARTHAGE_STATIC_FRAMEWORKS=(SwiftyJSON swift-nonempty) -carthage bootstrap $CARTHAGE_DYNAMIC_FRAMEWORKS --cache-builds - -# Prepare xcconfig for static bootstrapping -STATIC_CONFIG=$(mktemp -d)/static.xcconfig -echo "MACH_O_TYPE = staticlib" > $STATIC_CONFIG +XCODE_XCCONFIG_FILE="$PWD/carthage_dynamic.xcconfig" \ + carthage bootstrap $CARTHAGE_DYNAMIC_FRAMEWORKS --cache-builds -XCODE_XCCONFIG_FILE=$STATIC_CONFIG \ +XCODE_XCCONFIG_FILE="$PWD/carthage_static.xcconfig" \ carthage bootstrap $CARTHAGE_STATIC_FRAMEWORKS --cache-builds -XCODE_VERSION=$(/usr/libexec/PlistBuddy -c "Print :DTXcode" "$(xcode-select -p)/../Info.plist") - echo " ⚙️ Building iOS app" -xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_iOS Test" -configuration "Test Debug" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO" +xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_iOS Test" -configuration "Test Debug" -xcconfig fixtures.xcconfig echo "✅ Successfully built iOS app" if [[ "$XCODE_VERSION" == 12* ]]; then echo " ⚙️ Building iOS app (Xcode 12+)" - xcodebuild -quiet -project ProjectXcode12.xcodeproj -scheme "App_iOS_With_Clip Test" -configuration "Test Debug" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO" + xcodebuild -quiet -project ProjectXcode12.xcodeproj -scheme "App_iOS_With_Clip Test" -configuration "Test Debug" -xcconfig fixtures.xcconfig echo "✅ Successfully built iOS app (Xcode 12+)" fi echo " ⚙️ Building macOS app" -xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_macOS" -configuration "Test Debug" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO" +xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_macOS" -configuration "Test Debug" -xcconfig fixtures.xcconfig echo "✅ Successfully built macOS app" diff --git a/Tests/Fixtures/TestProject/carthage_dynamic.xcconfig b/Tests/Fixtures/TestProject/carthage_dynamic.xcconfig new file mode 100644 index 000000000..1207c460d --- /dev/null +++ b/Tests/Fixtures/TestProject/carthage_dynamic.xcconfig @@ -0,0 +1 @@ +#include "xcode12_workaround.xcconfig" diff --git a/Tests/Fixtures/TestProject/carthage_static.xcconfig b/Tests/Fixtures/TestProject/carthage_static.xcconfig new file mode 100644 index 000000000..5248a0506 --- /dev/null +++ b/Tests/Fixtures/TestProject/carthage_static.xcconfig @@ -0,0 +1,2 @@ +#include "xcode12_workaround.xcconfig" +MACH_O_TYPE = staticlib diff --git a/Tests/Fixtures/TestProject/fixtures.xcconfig b/Tests/Fixtures/TestProject/fixtures.xcconfig new file mode 100644 index 000000000..1372a09ff --- /dev/null +++ b/Tests/Fixtures/TestProject/fixtures.xcconfig @@ -0,0 +1,7 @@ +#include "xcode12_workaround.xcconfig" + +// Common settings for fixtures +CODE_SIGN_IDENTITY = +CODE_SIGNING_REQUIRED = NO +CODE_SIGN_ENTITLEMENTS = +CODE_SIGNING_ALLOWED = NO diff --git a/Tests/Fixtures/TestProject/xcode12_workaround.xcconfig b/Tests/Fixtures/TestProject/xcode12_workaround.xcconfig new file mode 100644 index 000000000..4585c89f8 --- /dev/null +++ b/Tests/Fixtures/TestProject/xcode12_workaround.xcconfig @@ -0,0 +1,9 @@ +// +// See https://github.com/Carthage/Carthage/issues/3019 +// +// Skips building ARM slices for simulators until Carthage can support it +// + +EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8 +EXCLUDED_ARCHS_1200=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)) +EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS_$(XCODE_VERSION_MAJOR)) From c8b24acbdde0154ea1522b76dd82d006414124c9 Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Wed, 2 Sep 2020 14:45:27 -0700 Subject: [PATCH 018/284] Allow creating intermediary groups outside of the project directory (#892) --- CHANGELOG.md | 3 ++- Sources/Core/PathExtensions.swift | 8 ++++++ Sources/XcodeGenKit/SourceGenerator.swift | 26 ++++++++++++++++--- .../SourceGeneratorTests.swift | 2 +- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b92010d7a..1689d398f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,8 @@ - Updates CI to run on Xcode 12 beta. [#936](https://github.com/yonaskolb/XcodeGen/pull/936) @dflems #### Fixed -- Allow SDK dependencies to be embedded. [#922](https://github.com/yonaskolb/XcodeGen/pull/922) @k-thorat +- Allow SDK dependencies to be embedded. [#922](https://github.com/yonaskolb/XcodeGen/pull/922) @k-thorat +- Allow creating intermediary groups outside of the project directory. [#892](https://github.com/yonaskolb/XcodeGen/pull/892) @segiddins ## 2.17.0 diff --git a/Sources/Core/PathExtensions.swift b/Sources/Core/PathExtensions.swift index 7c174b072..6b72a56f7 100644 --- a/Sources/Core/PathExtensions.swift +++ b/Sources/Core/PathExtensions.swift @@ -73,4 +73,12 @@ extension Path { relativeTo: ArraySlice(base.simplifyingParentDirectoryReferences().components), memo: [])) } + + /// Returns whether `self` is a strict parent of `child`. + /// + /// Both paths must be asbolute or relative paths. + public func isParent(of child: Path) throws -> Bool { + let relativePath = try child.relativePath(from: self) + return relativePath.components.allSatisfy { $0 != ".." } + } } diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index 17255a904..5abb5e1bf 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -294,11 +294,15 @@ class SourceGenerator { // lives outside the project base path let isOutOfBasePath = !path.absolute().string.contains(project.basePath.absolute().string) + // whether the given path is a strict parent of the project base path + // e.g. foo/bar is a parent of foo/bar/baz, but not foo/baz + let isParentOfBasePath = isOutOfBasePath && ((try? path.isParent(of: project.basePath)) == true) + // has no valid parent paths - let isRootPath = (isBaseGroup && isOutOfBasePath) || path.parent() == project.basePath + let isRootPath = (isBaseGroup && isOutOfBasePath && isParentOfBasePath) || path.parent() == project.basePath // is a top level group in the project - let isTopLevelGroup = !hasCustomParent && ((isBaseGroup && !createIntermediateGroups) || isRootPath) + let isTopLevelGroup = !hasCustomParent && ((isBaseGroup && !createIntermediateGroups) || isRootPath || isParentOfBasePath) let groupName = name ?? path.lastComponent @@ -683,12 +687,26 @@ class SourceGenerator { private func createIntermediaGroups(for fileElement: PBXFileElement, at path: Path) { let parentPath = path.parent() - guard parentPath != project.basePath && path.string.contains(project.basePath.string) else { - // we've reached the top or are out of the root directory + guard parentPath != project.basePath else { + // we've reached the top return } let hasParentGroup = groupsByPath[parentPath] != nil + if !hasParentGroup { + do { + // if the path is a parent of the project base path (or if calculating that fails) + // do not create a parent group + // e.g. for project path foo/bar/baz + // - create foo/baz + // - create baz/ + // - do not create foo + let pathIsParentOfProject = try path.isParent(of: project.basePath) + if pathIsParentOfProject { return } + } catch { + return + } + } let parentGroup = getGroup( path: parentPath, mergingChildren: [fileElement], diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index 2a38a7f30..e06112330 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -492,7 +492,7 @@ class SourceGeneratorTests: XCTestCase { let pbxProj = try project.generatePbxProj() try pbxProj.expectFile(paths: ["Sources", "A", "b.swift"], buildPhase: .sources) try pbxProj.expectFile(paths: ["Sources", "F", "G", "h.swift"], buildPhase: .sources) - try pbxProj.expectFile(paths: ["../OtherDirectory/C/D", "e.swift"], names: ["D", "e.swift"], buildPhase: .sources) + try pbxProj.expectFile(paths: ["..", "OtherDirectory", "C", "D", "e.swift"], names: [".", "OtherDirectory", "C", "D", "e.swift"], buildPhase: .sources) try pbxProj.expectFile(paths: ["Sources/B", "b.swift"], names: ["B", "b.swift"], buildPhase: .sources) } From 5ac96741bcdc9942e0e5edf7ff206901049242fa Mon Sep 17 00:00:00 2001 From: Brentley Jones Date: Sun, 6 Sep 2020 00:40:32 -0500 Subject: [PATCH 019/284] Improved Application Extension scheme generation (#932) * Default extensions to launchAutomaticallySubstyle "2" * Don't use debugger launcher with extensions Xcode schemes don't use the LLDB launcher, even when debugging is enabled. Co-authored-by: Yonas Kolb --- CHANGELOG.md | 3 +- Sources/XcodeGenKit/SchemeGenerator.swift | 35 +++++++++++++++++-- .../xcschemes/iMessageExtension.xcscheme | 7 ++-- .../xcschemes/iMessageExtension.xcscheme | 7 ++-- 4 files changed, 42 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1689d398f..98423bfd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Add `Scheme.Test.TestTarget.skipped` to allow skipping of an entire test target. [#916](https://github.com/yonaskolb/XcodeGen/pull/916) @codeman9 - Added ability to set custom LLDBInit scripts for launch and test schemes [#929](https://github.com/yonaskolb/XcodeGen/pull/929) @polac24 - Adds App Clip support. [#909](https://github.com/yonaskolb/XcodeGen/pull/909) @brentleyjones @dflems +- Application extension schemes now default to `launchAutomaticallySubstyle = 2` and the correct debugger and launcher identifiers [#932](https://github.com/yonaskolb/XcodeGen/pull/932) @brentleyjones #### Internal - Updates CI to run on Xcode 12 beta. [#936](https://github.com/yonaskolb/XcodeGen/pull/936) @dflems @@ -23,7 +24,7 @@ #### Fixed - Treat all directories with known UTI as file wrapper. [#896](https://github.com/yonaskolb/XcodeGen/pull/896) @KhaosT - Generated schemes for application extensions now contain `wasCreatedForAppExtension = YES`. [#898](https://github.com/yonaskolb/XcodeGen/issues/898) @muizidn -- Allow package dependencies to use `link: false` [#920](https://github.com/yonaskolb/XcodeGen/pull/920) @k-thorat +- Allow package dependencies to use `link: false` [#920](https://github.com/yonaskolb/XcodeGen/pull/920) @k-thorat - Fixed issue computing relative paths. [#915](https://github.com/yonaskolb/XcodeGen/pull/915) @andrewreach #### Internal diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 111043249..3d1686cc4 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -240,8 +240,8 @@ public class SchemeGenerator { preActions: scheme.run?.preActions.map(getExecutionAction) ?? [], postActions: scheme.run?.postActions.map(getExecutionAction) ?? [], macroExpansion: shouldExecuteOnLaunch ? nil : buildableReference, - selectedDebuggerIdentifier: (scheme.run?.debugEnabled ?? Scheme.Run.debugEnabledDefault) ? XCScheme.defaultDebugger : "", - selectedLauncherIdentifier: (scheme.run?.debugEnabled ?? Scheme.Run.debugEnabledDefault) ? XCScheme.defaultLauncher : "Xcode.IDEFoundation.Launcher.PosixSpawn", + selectedDebuggerIdentifier: selectedDebuggerIdentifier(for: schemeTarget, run: scheme.run), + selectedLauncherIdentifier: selectedLauncherIdentifier(for: schemeTarget, run: scheme.run), askForAppToLaunch: scheme.run?.askForAppToLaunch, allowLocationSimulation: allowLocationSimulation, locationScenarioReference: locationScenarioReference, @@ -251,7 +251,7 @@ public class SchemeGenerator { environmentVariables: launchVariables, language: scheme.run?.language, region: scheme.run?.region, - launchAutomaticallySubstyle: scheme.run?.launchAutomaticallySubstyle, + launchAutomaticallySubstyle: scheme.run?.launchAutomaticallySubstyle ?? launchAutomaticallySubstyle(for: schemeTarget), customLLDBInitFile: scheme.run?.customLLDBInit ) @@ -290,6 +290,14 @@ public class SchemeGenerator { ) } + private func launchAutomaticallySubstyle(for target: Target?) -> String? { + if target?.type.isExtension == true { + return "2" + } else { + return nil + } + } + private func makeProductRunnables(for target: Target?, buildableReference: XCScheme.BuildableReference) -> (launch: XCScheme.Runnable, profile: XCScheme.BuildableProductRunnable) { let buildable = XCScheme.BuildableProductRunnable(buildableReference: buildableReference) if target?.type.isWatchApp == true { @@ -303,6 +311,22 @@ public class SchemeGenerator { return (buildable, buildable) } } + + private func selectedDebuggerIdentifier(for target: Target?, run: Scheme.Run?) -> String { + if target?.type.canUseDebugLauncher != false && run?.debugEnabled ?? Scheme.Run.debugEnabledDefault { + return XCScheme.defaultDebugger + } else { + return "" + } + } + + private func selectedLauncherIdentifier(for target: Target?, run: Scheme.Run?) -> String { + if target?.type.canUseDebugLauncher != false && run?.debugEnabled ?? Scheme.Run.debugEnabledDefault { + return XCScheme.defaultLauncher + } else { + return "Xcode.IDEFoundation.Launcher.PosixSpawn" + } + } } enum SchemeGenerationError: Error, CustomStringConvertible { @@ -380,6 +404,11 @@ extension Scheme { } extension PBXProductType { + var canUseDebugLauncher: Bool { + // Extensions don't use the lldb launcher + return !isExtension + } + var isWatchApp: Bool { switch self { case .watchApp, .watch2App: diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme index 3cc5c5fad..c1fd6aaa6 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme @@ -45,14 +45,15 @@ + allowLocationSimulation = "YES" + launchAutomaticallySubstyle = "2"> + allowLocationSimulation = "YES" + launchAutomaticallySubstyle = "2"> Date: Mon, 14 Sep 2020 11:16:40 +1000 Subject: [PATCH 020/284] Fix Xcode 12 compiler error --- Tests/ProjectSpecTests/SpecLoadingTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 047789df2..58617b9b4 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -1213,7 +1213,7 @@ class SpecLoadingTests: XCTestCase { $0.it("is an invalid package version") { for dictionary in invalidPackages { - try expect { _ = try SwiftPackage(jsonDictionary: dictionary) }.toThrow() + try expect(expression: { _ = try SwiftPackage(jsonDictionary: dictionary) }).toThrow() } } } From 19a5428c8afa36dcc828d54b124d247819f64514 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Mon, 14 Sep 2020 13:12:42 +1000 Subject: [PATCH 021/284] Update ProjectSpec.md --- Docs/ProjectSpec.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 50bf35ba0..7d33a0203 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -47,6 +47,7 @@ You can also use environment variables in your configuration file, by using `${S - [ ] **targets**: **[String: [Target](#target)]** - The list of targets in the project mapped by name - [ ] **fileGroups**: **[String]** - A list of paths to add to the root of the project. These aren't files that will be included in your targets, but that you'd like to include in the project hierarchy anyway. For example a folder of xcconfig files that aren't already added by any target sources, or a Readme file. - [ ] **schemes**: **[Scheme](#scheme)** - A list of schemes by name. This allows more control over what is found in [Target Scheme](#target-scheme) + [ ] **schemeTemplates**: **[String: [Scheme Template](#scheme-template)]** - a list of schemes that can be used as templates for actual schems which reference them via a `template` property. They can be used to extract common scheme settings. Works great in combination with `include`. - [ ] **targetTemplates**: **[String: [Target Template](#target-template)]** - a list of targets that can be used as templates for actual targets which reference them via a `template` property. They can be used to extract common target settings. Works great in combination with `include`. - [ ] **packages**: **[String: [Swift Package](#swift-package)]** - a map of Swift packages by name. - [ ] **projectReferences**: **[String: [Project Reference](#project-reference)]** - a map of project references by name From a8a2c20b11a6e9af9140c76509701a6ce8764f2a Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Mon, 14 Sep 2020 13:13:16 +1000 Subject: [PATCH 022/284] Update ProjectSpec.md --- Docs/ProjectSpec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 7d33a0203..e8b13677f 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -47,7 +47,7 @@ You can also use environment variables in your configuration file, by using `${S - [ ] **targets**: **[String: [Target](#target)]** - The list of targets in the project mapped by name - [ ] **fileGroups**: **[String]** - A list of paths to add to the root of the project. These aren't files that will be included in your targets, but that you'd like to include in the project hierarchy anyway. For example a folder of xcconfig files that aren't already added by any target sources, or a Readme file. - [ ] **schemes**: **[Scheme](#scheme)** - A list of schemes by name. This allows more control over what is found in [Target Scheme](#target-scheme) - [ ] **schemeTemplates**: **[String: [Scheme Template](#scheme-template)]** - a list of schemes that can be used as templates for actual schems which reference them via a `template` property. They can be used to extract common scheme settings. Works great in combination with `include`. +- [ ] **schemeTemplates**: **[String: [Scheme Template](#scheme-template)]** - a list of schemes that can be used as templates for actual schems which reference them via a `template` property. They can be used to extract common scheme settings. Works great in combination with `include`. - [ ] **targetTemplates**: **[String: [Target Template](#target-template)]** - a list of targets that can be used as templates for actual targets which reference them via a `template` property. They can be used to extract common target settings. Works great in combination with `include`. - [ ] **packages**: **[String: [Swift Package](#swift-package)]** - a map of Swift packages by name. - [ ] **projectReferences**: **[String: [Project Reference](#project-reference)]** - a map of project references by name From 775e14c48f0f55be3faecf550e39da50932dfa74 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Mon, 21 Sep 2020 17:44:37 +0900 Subject: [PATCH 023/284] Fix appex's Runpath Search Paths under macOS target (#952) * Fix appex's Runpath Search Paths under macOS target * Update CHANGELOG.md --- CHANGELOG.md | 1 + SettingPresets/Product_Platform/app-extension_macOS.yml | 1 + 2 files changed, 2 insertions(+) create mode 100644 SettingPresets/Product_Platform/app-extension_macOS.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 98423bfd0..7ff0a5759 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ #### Fixed - Allow SDK dependencies to be embedded. [#922](https://github.com/yonaskolb/XcodeGen/pull/922) @k-thorat - Allow creating intermediary groups outside of the project directory. [#892](https://github.com/yonaskolb/XcodeGen/pull/892) @segiddins +- Fix appex's Runpath Search Paths under macOS target. [#952](https://github.com/yonaskolb/XcodeGen/pull/952) @rinsuki ## 2.17.0 diff --git a/SettingPresets/Product_Platform/app-extension_macOS.yml b/SettingPresets/Product_Platform/app-extension_macOS.yml new file mode 100644 index 000000000..65b36ca7d --- /dev/null +++ b/SettingPresets/Product_Platform/app-extension_macOS.yml @@ -0,0 +1 @@ +LD_RUNPATH_SEARCH_PATHS: ["$(inherited)", "@executable_path/../Frameworks", "@executable_path/../../../../Frameworks"] From 43177dec49ef8a8097ea994e3b08f0ac27880ee9 Mon Sep 17 00:00:00 2001 From: Cody Vandermyn <721474+codeman9@users.noreply.github.com> Date: Mon, 28 Sep 2020 23:44:53 -0700 Subject: [PATCH 024/284] Select the first runnable target (#957) * Select the first runnable target, if there is one Instead of just selecting the first target as the scheme target, instead search for and select the first runnable target. If there are no runnables found, then select the first target. * update docs --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 2 +- Sources/XcodeGenKit/SchemeGenerator.swift | 3 ++- .../SchemeGeneratorTests.swift | 18 ++++++++++++++++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ff0a5759..286cf2b4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Updates CI to run on Xcode 12 beta. [#936](https://github.com/yonaskolb/XcodeGen/pull/936) @dflems #### Fixed +- Select the first runnable build target, if present. [#957](https://github.com/yonaskolb/XcodeGen/pull/957) @codeman9 - Allow SDK dependencies to be embedded. [#922](https://github.com/yonaskolb/XcodeGen/pull/922) @k-thorat - Allow creating intermediary groups outside of the project directory. [#892](https://github.com/yonaskolb/XcodeGen/pull/892) @segiddins - Fix appex's Runpath Search Paths under macOS target. [#952](https://github.com/yonaskolb/XcodeGen/pull/952) @rinsuki diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index e8b13677f..aec3502aa 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -783,7 +783,7 @@ Scheme run scripts added via **preActions** or **postActions**. They run before A multiline script can be written using the various YAML multiline methods, for example with `|`. See [Build Script](#build-script). ### Run Action -- [ ] **executable**: **String** - the name of the target to launch as an executable. Defaults to the first build target in the scheme +- [ ] **executable**: **String** - the name of the target to launch as an executable. Defaults to the first runnable build target in the scheme, or the first build target if a runnable build target is not found - [ ] **customLLDBInit**: **String** - the absolute path to the custom `.lldbinit` file ### Test Action diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 3d1686cc4..94ba4ffab 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -165,7 +165,8 @@ public class SchemeGenerator { if let targetName = scheme.run?.executable { schemeTarget = project.getTarget(targetName) } else { - schemeTarget = target ?? project.getTarget(scheme.build.targets.first!.target.name) + let name = scheme.build.targets.first { $0.buildTypes.contains(.running) }?.target.name ?? scheme.build.targets.first!.target.name + schemeTarget = target ?? project.getTarget(name) } let shouldExecuteOnLaunch = schemeTarget?.shouldExecuteOnLaunch == true diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index 85481d63d..0d4e1701c 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -104,6 +104,24 @@ class SchemeGeneratorTests: XCTestCase { try expect(xcscheme.testAction?.customLLDBInitFile) == "/test/.lldbinit" } + let frameworkTarget = Scheme.BuildTarget(target: .local(framework.name), buildTypes: [.archiving]) + $0.it("generates a scheme with the first runnable selected") { + let scheme = Scheme( + name: "MyScheme", + build: Scheme.Build(targets: [frameworkTarget, buildTarget]) + ) + let project = Project( + name: "test", + targets: [framework, app], + schemes: [scheme] + ) + let xcodeProject = try project.generateXcodeProject() + let xcscheme = try unwrap(xcodeProject.sharedData?.schemes.first) + + let buildableReference = xcscheme.launchAction?.runnable?.buildableReference + try expect(buildableReference?.buildableName) == "MyApp.app" + } + $0.it("generates scheme with multiple configs") { let configs: [Config] = [ Config(name: "Beta", type: .debug), From 162635243cee7c91794ae9e264cd9008c1564f9b Mon Sep 17 00:00:00 2001 From: Masaki Haga Date: Tue, 29 Sep 2020 15:45:30 +0900 Subject: [PATCH 025/284] Update ProjectSpec.md (#956) --- Docs/ProjectSpec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index aec3502aa..31ef26b03 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -250,7 +250,7 @@ Settings are merged in the following order: groups, base, configs. - [ ] **transitivelyLinkDependencies**: **Bool** - If this is not specified the value from the project set in [Options](#options)`.transitivelyLinkDependencies` will be used. - [ ] **directlyEmbedCarthageDependencies**: **Bool** - If this is `true` Carthage dependencies will be embedded using an `Embed Frameworks` build phase instead of the `copy-frameworks` script. Defaults to `true` for all targets except iOS/tvOS/watchOS Applications. - [ ] **requiresObjCLinking**: **Bool** - If this is `true` any targets that link to this target will have `-ObjC` added to their `OTHER_LDFLAGS`. This is required if a static library has any catagories or extensions on Objective-C code. See [this guide](https://pewpewthespells.com/blog/objc_linker_flags.html#objc) for more details. Defaults to `true` if `type` is `library.static`. If you are 100% sure you don't have catagories or extensions on Objective-C code (pure Swift with no use of Foundation/UIKit) you can set this to `false`, otherwise it's best to leave it alone. -- [ ]**onlyCopyFilesOnInstall**: **Bool** – If this is `true`, the `Embed Frameworks` build phase will have the "Copy only when installing" chekbox checked. Defaults to `false`. +- [ ] **onlyCopyFilesOnInstall**: **Bool** – If this is `true`, the `Embed Frameworks` build phase will have the "Copy only when installing" chekbox checked. Defaults to `false`. - [ ] **preBuildScripts**: **[[Build Script](#build-script)]** - Build scripts that run *before* any other build phases - [ ] **postCompileScripts**: **[[Build Script](#build-script)]** - Build scripts that run after the Compile Sources phase - [ ] **postBuildScripts**: **[[Build Script](#build-script)]** - Build scripts that run *after* any other build phases From 742fe69c5b1f4b481882f1952824116885856539 Mon Sep 17 00:00:00 2001 From: Roman Podymov Date: Fri, 2 Oct 2020 09:48:32 +0200 Subject: [PATCH 026/284] "Copy only when installing" for "Embed App Extensions" (#948) * Added onlyCopyExtensionsOnInstall * Fix for Xcode 12 * Fixed PBXCopyFilesBuildPhase for "Embed App Extensions" * Test for onlyCopyExtensionsOnInstall * Update CHANGELOG.md * Update ProjectSpec.md * Refactoring * More tests for onlyCopyExtensionsOnInstall * Reverted * Refactoring with getPBXCopyFilesBuildPhase * Deleted similar tests * onlyCopyExtensionsOnInstall -> onlyCopyFilesOnInstall * Update ProjectSpec.md * Update CHANGELOG.md * Update ProjectGeneratorTests.swift --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 2 +- Sources/XcodeGenKit/PBXProjGenerator.swift | 32 ++++---- .../ProjectGeneratorTests.swift | 81 ++++++++++++++++++- 4 files changed, 96 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 286cf2b4b..0d4227a21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Allow SDK dependencies to be embedded. [#922](https://github.com/yonaskolb/XcodeGen/pull/922) @k-thorat - Allow creating intermediary groups outside of the project directory. [#892](https://github.com/yonaskolb/XcodeGen/pull/892) @segiddins - Fix appex's Runpath Search Paths under macOS target. [#952](https://github.com/yonaskolb/XcodeGen/pull/952) @rinsuki +- `onlyCopyFilesOnInstall` is extended for the Embed App Extensions build phase. [#948](https://github.com/yonaskolb/XcodeGen/pull/948) @RomanPodymov ## 2.17.0 diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 31ef26b03..3d4fb2f3b 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -250,7 +250,7 @@ Settings are merged in the following order: groups, base, configs. - [ ] **transitivelyLinkDependencies**: **Bool** - If this is not specified the value from the project set in [Options](#options)`.transitivelyLinkDependencies` will be used. - [ ] **directlyEmbedCarthageDependencies**: **Bool** - If this is `true` Carthage dependencies will be embedded using an `Embed Frameworks` build phase instead of the `copy-frameworks` script. Defaults to `true` for all targets except iOS/tvOS/watchOS Applications. - [ ] **requiresObjCLinking**: **Bool** - If this is `true` any targets that link to this target will have `-ObjC` added to their `OTHER_LDFLAGS`. This is required if a static library has any catagories or extensions on Objective-C code. See [this guide](https://pewpewthespells.com/blog/objc_linker_flags.html#objc) for more details. Defaults to `true` if `type` is `library.static`. If you are 100% sure you don't have catagories or extensions on Objective-C code (pure Swift with no use of Foundation/UIKit) you can set this to `false`, otherwise it's best to leave it alone. -- [ ] **onlyCopyFilesOnInstall**: **Bool** – If this is `true`, the `Embed Frameworks` build phase will have the "Copy only when installing" chekbox checked. Defaults to `false`. +- [ ] **onlyCopyFilesOnInstall**: **Bool** – If this is `true`, the `Embed Frameworks` and `Embed App Extensions` (if available) build phases will have the "Copy only when installing" chekbox checked. Defaults to `false`. - [ ] **preBuildScripts**: **[[Build Script](#build-script)]** - Build scripts that run *before* any other build phases - [ ] **postCompileScripts**: **[[Build Script](#build-script)]** - Build scripts that run after the Compile Sources phase - [ ] **postBuildScripts**: **[[Build Script](#build-script)]** - Build scripts that run *after* any other build phases diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 886cd70cc..8a89814b8 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -13,6 +13,8 @@ public class PBXProjGenerator { let projectDirectory: Path? let carthageResolver: CarthageDependencyResolver + public static let copyFilesActionMask: UInt = 8 + var sourceGenerator: SourceGenerator! var targetObjects: [String: PBXTarget] = [:] @@ -979,6 +981,17 @@ public class PBXProjGenerator { return sourceFilesByCopyFiles.mapValues { getBuildFilesForSourceFiles($0) } } + func getPBXCopyFilesBuildPhase(dstSubfolderSpec: PBXCopyFilesBuildPhase.SubFolder, name: String, files: [PBXBuildFile]) -> PBXCopyFilesBuildPhase { + return PBXCopyFilesBuildPhase( + dstPath: "", + dstSubfolderSpec: dstSubfolderSpec, + name: name, + buildActionMask: target.onlyCopyFilesOnInstall ? PBXProjGenerator.copyFilesActionMask : PBXBuildPhase.defaultBuildActionMask, + files: files, + runOnlyForDeploymentPostprocessing: target.onlyCopyFilesOnInstall ? true : false + ) + } + copyFilesBuildPhasesFiles.merge(getBuildFilesForCopyFilesPhases()) { $0 + $1 } buildPhases += try target.preBuildScripts.map { try generateBuildScript(targetName: target.name, buildScript: $0) } @@ -1076,13 +1089,8 @@ public class PBXProjGenerator { if !extensions.isEmpty { - let copyFilesPhase = addObject( - PBXCopyFilesBuildPhase( - dstPath: "", - dstSubfolderSpec: .plugins, - name: "Embed App Extensions", - files: extensions - ) + let copyFilesPhase = addObject( + getPBXCopyFilesBuildPhase(dstSubfolderSpec: .plugins, name: "Embed App Extensions", files: extensions) ) buildPhases.append(copyFilesPhase) @@ -1105,16 +1113,8 @@ public class PBXProjGenerator { copyFrameworksReferences += getBuildFilesForPhase(.frameworks) if !copyFrameworksReferences.isEmpty { - let copyFilesActionMask: UInt = 8 let copyFilesPhase = addObject( - PBXCopyFilesBuildPhase( - dstPath: "", - dstSubfolderSpec: .frameworks, - name: "Embed Frameworks", - buildActionMask: target.onlyCopyFilesOnInstall ? copyFilesActionMask : PBXBuildPhase.defaultBuildActionMask, - files: copyFrameworksReferences, - runOnlyForDeploymentPostprocessing: target.onlyCopyFilesOnInstall ? true : false - ) + getPBXCopyFilesBuildPhase(dstSubfolderSpec: .frameworks, name: "Embed Frameworks", files: copyFrameworksReferences) ) buildPhases.append(copyFilesPhase) diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 1f2e329ea..81c12d34a 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -805,16 +805,91 @@ class ProjectGeneratorTests: XCTestCase { let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) let buildPhases = nativeTarget.buildPhases - let embedFrameworkPhase = pbxProject + let embedFrameworksPhase = pbxProject .copyFilesBuildPhases .filter { buildPhases.contains($0) } .first { $0.dstSubfolderSpec == .frameworks } - let phase = try unwrap(embedFrameworkPhase) - try expect(phase.buildActionMask) == 8 + let phase = try unwrap(embedFrameworksPhase) + try expect(phase.buildActionMask) == PBXProjGenerator.copyFilesActionMask try expect(phase.runOnlyForDeploymentPostprocessing) == true } + $0.it("copies files only on install in the Embed App Extensions step") { + let appExtension = Target( + name: "AppExtension", + type: .appExtension, + platform: .tvOS + ) + + let app = Target( + name: "App", + type: .application, + platform: .tvOS, + dependencies: [ + Dependency(type: .target, reference: "AppExtension") + ], + onlyCopyFilesOnInstall: true + ) + + let project = Project(name: "test", targets: [app, appExtension]) + let pbxProject = try project.generatePbxProj() + let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) + let buildPhases = nativeTarget.buildPhases + + let embedAppExtensionsPhase = pbxProject + .copyFilesBuildPhases + .filter { buildPhases.contains($0) } + .first { $0.dstSubfolderSpec == .plugins } + + let phase = try unwrap(embedAppExtensionsPhase) + try expect(phase.buildActionMask) == PBXProjGenerator.copyFilesActionMask + try expect(phase.runOnlyForDeploymentPostprocessing) == true + } + + $0.it("copies files only on install in the Embed Frameworks and Embed App Extensions steps") { + let appExtension = Target( + name: "AppExtension", + type: .appExtension, + platform: .tvOS + ) + + let app = Target( + name: "App", + type: .application, + platform: .tvOS, + dependencies: [ + Dependency(type: .target, reference: "AppExtension"), + Dependency(type: .framework, reference: "FrameworkA.framework"), + Dependency(type: .framework, reference: "FrameworkB.framework", embed: false), + ], + onlyCopyFilesOnInstall: true + ) + + let project = Project(name: "test", targets: [app, appExtension]) + let pbxProject = try project.generatePbxProj() + let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) + let buildPhases = nativeTarget.buildPhases + + let embedFrameworksPhase = pbxProject + .copyFilesBuildPhases + .filter { buildPhases.contains($0) } + .first { $0.dstSubfolderSpec == .frameworks } + + let embedFrameworksPhaseValue = try unwrap(embedFrameworksPhase) + try expect(embedFrameworksPhaseValue.buildActionMask) == PBXProjGenerator.copyFilesActionMask + try expect(embedFrameworksPhaseValue.runOnlyForDeploymentPostprocessing) == true + + let embedAppExtensionsPhase = pbxProject + .copyFilesBuildPhases + .filter { buildPhases.contains($0) } + .first { $0.dstSubfolderSpec == .plugins } + + let embedAppExtensionsPhaseValue = try unwrap(embedAppExtensionsPhase) + try expect(embedAppExtensionsPhaseValue.buildActionMask) == PBXProjGenerator.copyFilesActionMask + try expect(embedAppExtensionsPhaseValue.runOnlyForDeploymentPostprocessing) == true + } + $0.it("sets -ObjC for targets that depend on requiresObjCLinking targets") { let requiresObjCLinking = Target( name: "requiresObjCLinking", From 5ea9b4eec4c3ec7ec91147b26edef062a0366f5b Mon Sep 17 00:00:00 2001 From: Liam Nichols Date: Fri, 2 Oct 2020 08:52:30 +0100 Subject: [PATCH 027/284] Update SettingsPresets to include new and modified values as part of Xcode 12 (#953) * Update SettingsPresets to include new and modified values as part of Xcode 12's TemplateInfo.plist * Update CHANGELOG.md * Update Test Fixtures after running unit tests * Revert change to GCC_PREPROCESSOR_DEFINITIONS order (https://github.com/yonaskolb/XcodeGen/pull/953\#discussion_r497486482) * Run tests to update fixtures --- CHANGELOG.md | 1 + SettingPresets/Configs/debug.yml | 2 +- SettingPresets/Configs/release.yml | 3 +- SettingPresets/base.yml | 7 +++- .../Project.xcodeproj/project.pbxproj | 11 +++++-- .../SPM/SPM.xcodeproj/project.pbxproj | 11 +++++-- .../AnotherProject.xcodeproj/project.pbxproj | 33 +++++++++++++++---- .../Project.xcodeproj/project.pbxproj | 33 +++++++++++++++---- .../ProjectXcode12.xcodeproj/project.pbxproj | 33 +++++++++++++++---- .../TestProject.xcodeproj/project.pbxproj | 11 +++++-- 10 files changed, 118 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d4227a21..fe51065e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Added ability to set custom LLDBInit scripts for launch and test schemes [#929](https://github.com/yonaskolb/XcodeGen/pull/929) @polac24 - Adds App Clip support. [#909](https://github.com/yonaskolb/XcodeGen/pull/909) @brentleyjones @dflems - Application extension schemes now default to `launchAutomaticallySubstyle = 2` and the correct debugger and launcher identifiers [#932](https://github.com/yonaskolb/XcodeGen/pull/932) @brentleyjones +- Updated SettingsPresets to use new defaults from Xcode 12. [#953](https://github.com/yonaskolb/XcodeGen/pull/953) @liamnichols #### Internal - Updates CI to run on Xcode 12 beta. [#936](https://github.com/yonaskolb/XcodeGen/pull/936) @dflems diff --git a/SettingPresets/Configs/debug.yml b/SettingPresets/Configs/debug.yml index 5b0b75213..6c3e3c20f 100644 --- a/SettingPresets/Configs/debug.yml +++ b/SettingPresets/Configs/debug.yml @@ -6,7 +6,7 @@ ENABLE_TESTABILITY: YES GCC_DYNAMIC_NO_PIC: NO GCC_OPTIMIZATION_LEVEL: '0' GCC_PREPROCESSOR_DEFINITIONS: ["$(inherited)", "DEBUG=1"] -MTL_ENABLE_DEBUG_INFO: YES +MTL_ENABLE_DEBUG_INFO: INCLUDE_SOURCE ONLY_ACTIVE_ARCH: YES # Swift Settings diff --git a/SettingPresets/Configs/release.yml b/SettingPresets/Configs/release.yml index ce6d9f247..7a14baa93 100644 --- a/SettingPresets/Configs/release.yml +++ b/SettingPresets/Configs/release.yml @@ -3,7 +3,8 @@ # /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/Project Templates/Base/Base_ProjectSettings.xctemplate/TemplateInfo.plist DEBUG_INFORMATION_FORMAT: dwarf-with-dsym ENABLE_NS_ASSERTIONS: NO -VALIDATE_PRODUCT: YES +MTL_ENABLE_DEBUG_INFO: NO # Swift Settings SWIFT_COMPILATION_MODE: wholemodule +SWIFT_OPTIMIZATION_LEVEL: -O diff --git a/SettingPresets/base.yml b/SettingPresets/base.yml index 0cb9ea15d..d7533a841 100644 --- a/SettingPresets/base.yml +++ b/SettingPresets/base.yml @@ -8,6 +8,7 @@ CLANG_CXX_LANGUAGE_STANDARD: gnu++14 CLANG_CXX_LIBRARY: libc++ CLANG_ENABLE_MODULES: YES CLANG_ENABLE_OBJC_ARC: YES +CLANG_ENABLE_OBJC_WEAK: YES CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING: YES CLANG_WARN_BOOL_CONVERSION: YES CLANG_WARN_COMMA: YES @@ -23,6 +24,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION: YES CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF: YES CLANG_WARN_OBJC_LITERAL_CONVERSION: YES CLANG_WARN_OBJC_ROOT_CLASS: YES_ERROR +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER: YES CLANG_WARN_RANGE_LOOP_ANALYSIS: YES CLANG_WARN_STRICT_PROTOTYPES: YES CLANG_WARN_SUSPICIOUS_MOVE: YES @@ -39,7 +41,10 @@ GCC_WARN_UNDECLARED_SELECTOR: YES GCC_WARN_UNINITIALIZED_AUTOS: YES_AGGRESSIVE GCC_WARN_UNUSED_FUNCTION: YES GCC_WARN_UNUSED_VARIABLE: YES +MTL_FAST_MATH: YES -# Swift Settings +# Target Settings PRODUCT_NAME: $(TARGET_NAME) + +# Swift Settings SWIFT_VERSION: '5.0' diff --git a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj index 191fe8a67..300eb080a 100644 --- a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj @@ -377,6 +377,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -392,6 +393,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -410,10 +412,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; }; name = Release; }; @@ -549,6 +553,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -564,6 +569,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -588,7 +594,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index 350ddef65..8236165a9 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -403,6 +403,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -418,6 +419,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -442,7 +444,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -477,6 +480,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -492,6 +496,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -510,11 +515,13 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; }; name = Release; }; diff --git a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj index 2e4c099f7..c9952f548 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj @@ -120,6 +120,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -135,6 +136,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -153,11 +155,13 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; }; name = "Test Release"; }; @@ -171,6 +175,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -186,6 +191,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -204,11 +210,13 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; }; name = "Production Release"; }; @@ -223,6 +231,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -238,6 +247,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -256,11 +266,13 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; }; name = "Staging Release"; }; @@ -296,6 +308,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -311,6 +324,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -335,7 +349,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -454,6 +469,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -469,6 +485,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -493,7 +510,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; @@ -581,6 +599,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -596,6 +615,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -620,7 +640,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 96e72c628..e43c217af 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -4797,6 +4797,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -4812,6 +4813,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -4836,7 +4838,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; @@ -5004,6 +5007,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -5019,6 +5023,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -5037,10 +5042,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; WATCHOS_DEPLOYMENT_TARGET = 4.0; }; name = "Production Release"; @@ -5072,6 +5079,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -5087,6 +5095,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -5105,10 +5114,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; WATCHOS_DEPLOYMENT_TARGET = 4.0; }; name = "Test Release"; @@ -5426,6 +5437,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -5441,6 +5453,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -5465,7 +5478,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; @@ -5651,6 +5665,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -5666,6 +5681,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -5690,7 +5706,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; @@ -5927,6 +5944,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -5942,6 +5960,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -5960,10 +5979,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; WATCHOS_DEPLOYMENT_TARGET = 4.0; }; name = "Staging Release"; diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/project.pbxproj index 509316aae..96d15fb9e 100644 --- a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/project.pbxproj @@ -3204,6 +3204,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -3219,6 +3220,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -3237,10 +3239,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; WATCHOS_DEPLOYMENT_TARGET = 4.0; }; name = "Production Release"; @@ -3716,6 +3720,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -3731,6 +3736,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -3755,7 +3761,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; @@ -3965,6 +3972,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -3980,6 +3988,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -4004,7 +4013,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; @@ -4549,6 +4559,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -4564,6 +4575,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -4582,10 +4594,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; WATCHOS_DEPLOYMENT_TARGET = 4.0; }; name = "Staging Release"; @@ -5213,6 +5227,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -5228,6 +5243,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -5246,10 +5262,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; WATCHOS_DEPLOYMENT_TARGET = 4.0; }; name = "Test Release"; @@ -5524,6 +5542,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -5539,6 +5558,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -5563,7 +5583,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; diff --git a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj index e907f8e29..c63f27c29 100644 --- a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj @@ -91,6 +91,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -106,6 +107,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -124,11 +126,13 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; }; name = Release; }; @@ -184,6 +188,7 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -199,6 +204,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -223,7 +229,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; From d959bdfdddb9563980a7b777ee85514f966d2dff Mon Sep 17 00:00:00 2001 From: Liam Nichols Date: Fri, 2 Oct 2020 09:23:38 +0100 Subject: [PATCH 028/284] Enable Base Localization by default (#955) * Update PBXProjGenerator to include 'Base' developmentRegion and file system derived knownRegions in the output knownRegions * Update CHANGELOG.md * Run tests to update fixtures --- CHANGELOG.md | 1 + Sources/XcodeGenKit/PBXProjGenerator.swift | 6 +++--- .../CarthageProject/Project.xcodeproj/project.pbxproj | 1 + Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj | 1 + .../AnotherProject/AnotherProject.xcodeproj/project.pbxproj | 1 + .../scheme_test/TestProject.xcodeproj/project.pbxproj | 1 + 6 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe51065e6..1282f8fbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Adds App Clip support. [#909](https://github.com/yonaskolb/XcodeGen/pull/909) @brentleyjones @dflems - Application extension schemes now default to `launchAutomaticallySubstyle = 2` and the correct debugger and launcher identifiers [#932](https://github.com/yonaskolb/XcodeGen/pull/932) @brentleyjones - Updated SettingsPresets to use new defaults from Xcode 12. [#953](https://github.com/yonaskolb/XcodeGen/pull/953) @liamnichols +- Enable Base Internationalization by default as per Xcode 12 behavior. [#954](https://github.com/yonaskolb/XcodeGen/issues/954) @liamnichols #### Internal - Updates CI to run on Xcode 12 beta. [#936](https://github.com/yonaskolb/XcodeGen/pull/936) @dflems diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 8a89814b8..06116064f 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -95,13 +95,14 @@ public class PBXProjGenerator { ) ) + let developmentRegion = project.options.developmentLanguage ?? "en" let pbxProject = addObject( PBXProject( name: project.name, buildConfigurationList: buildConfigList, compatibilityVersion: project.compatibilityVersion, mainGroup: mainGroup, - developmentRegion: project.options.developmentLanguage ?? "en" + developmentRegion: developmentRegion ) ) @@ -291,8 +292,7 @@ public class PBXProjGenerator { projectAttributes["knownAssetTags"] = assetTags } - let knownRegions = sourceGenerator.knownRegions.sorted() - pbxProject.knownRegions = knownRegions.isEmpty ? ["en"] : knownRegions + pbxProject.knownRegions = sourceGenerator.knownRegions.union(["Base", developmentRegion]).sorted() pbxProject.packages = packageReferences.sorted { $0.key < $1.key }.map { $1 } diff --git a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj index 300eb080a..df3662bc1 100644 --- a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj @@ -321,6 +321,7 @@ developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( + Base, en, ); mainGroup = 293D0FF827366B513839236A; diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index 8236165a9..cda4da212 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -213,6 +213,7 @@ developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( + Base, en, ); mainGroup = 218F6C96DF9E182F526258CF; diff --git a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj index c9952f548..a3083ce0b 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj @@ -86,6 +86,7 @@ developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( + Base, en, ); mainGroup = 4E8CFA4275C972686621210C; diff --git a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj index c63f27c29..441fd45e9 100644 --- a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj @@ -59,6 +59,7 @@ developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( + Base, en, ); mainGroup = 2D08B11F4EE060D112B7BCA1; From 61a389b83f32f002d666813f3c78c06544302474 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Wed, 30 Sep 2020 23:08:24 +1000 Subject: [PATCH 029/284] Update to 2.18.0 --- Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 904dd784e..83e2c99a8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.17.0 +VERSION = 2.18.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index e4e094e2c..7ab3471dd 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.17.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.18.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 944091cdc..de2b414c6 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.17.0") +let version = Version("2.18.0") let cli = XcodeGenCLI(version: version) cli.execute() From 4988388cc5ca335963eb10cc121329155219d051 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Fri, 2 Oct 2020 18:42:50 +1000 Subject: [PATCH 030/284] Update to Xcode 12 (#960) * update to final xcode 12 version * only generate and test xcode 12 project * update default xcode version to 12 * update changelog --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 5 +- Sources/XcodeGenKit/Version.swift | 2 +- .../Project.xcodeproj/project.pbxproj | 2 +- .../SPM/SPM.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/xcschemes/App.xcscheme | 2 +- .../AnotherProject.xcodeproj/project.pbxproj | 2 +- .../Project.xcodeproj/project.pbxproj | 770 +- .../xcshareddata/xcschemes/App_Clip.xcscheme | 26 +- .../xcschemes/App_Scheme.xcscheme | 2 +- .../xcschemes/App_iOS Production.xcscheme | 2 +- .../xcschemes/App_iOS Staging.xcscheme | 2 +- .../xcschemes/App_iOS Test.xcscheme | 2 +- .../xcshareddata/xcschemes/App_macOS.xcscheme | 2 +- .../xcschemes/App_watchOS.xcscheme | 2 +- .../xcshareddata/xcschemes/Framework.xcscheme | 2 +- .../xcshareddata/xcschemes/Tool.xcscheme | 2 +- .../xcschemes/iMessageApp.xcscheme | 2 +- .../xcschemes/iMessageExtension.xcscheme | 2 +- .../ProjectXcode12.xcodeproj/project.pbxproj | 7504 ----------------- .../contents.xcworkspacedata | 7 - .../xcschemes/App_Scheme.xcscheme | 121 - .../xcschemes/App_iOS Production.xcscheme | 142 - .../xcschemes/App_iOS Staging.xcscheme | 142 - .../xcschemes/App_iOS Test.xcscheme | 142 - .../App_iOS_With_Clip Production.xcscheme | 94 - .../App_iOS_With_Clip Staging.xcscheme | 94 - .../xcschemes/App_iOS_With_Clip Test.xcscheme | 94 - .../xcshareddata/xcschemes/App_macOS.xcscheme | 94 - .../xcschemes/App_watchOS.xcscheme | 109 - .../xcshareddata/xcschemes/Framework.xcscheme | 120 - .../xcshareddata/xcschemes/Tool.xcscheme | 94 - .../xcschemes/iMessageApp.xcscheme | 94 - .../xcschemes/iMessageExtension.xcscheme | 96 - Tests/Fixtures/TestProject/build.sh | 7 - .../Fixtures/TestProject/project-xcode-12.yml | 72 - Tests/Fixtures/TestProject/project.yml | 39 + .../TestProject.xcodeproj/project.pbxproj | 2 +- scripts/gen-fixtures.sh | 1 - 39 files changed, 838 insertions(+), 9063 deletions(-) rename Tests/Fixtures/TestProject/{ProjectXcode12.xcodeproj => Project.xcodeproj}/xcshareddata/xcschemes/App_Clip.xcscheme (80%) delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/project.pbxproj delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Staging.xcscheme delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Test.xcscheme delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Production.xcscheme delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Staging.xcscheme delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Test.xcscheme delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_macOS.xcscheme delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_watchOS.xcscheme delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageApp.xcscheme delete mode 100644 Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme delete mode 100644 Tests/Fixtures/TestProject/project-xcode-12.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49dc8be5f..bcb9f46e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: name: Xcode ${{ matrix.xcode }} strategy: matrix: - xcode: ["11", "12_beta"] + xcode: ["12"] steps: - uses: actions/checkout@master - name: Set Xcode diff --git a/CHANGELOG.md b/CHANGELOG.md index 1282f8fbd..4dd13892e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,11 @@ - Updated SettingsPresets to use new defaults from Xcode 12. [#953](https://github.com/yonaskolb/XcodeGen/pull/953) @liamnichols - Enable Base Internationalization by default as per Xcode 12 behavior. [#954](https://github.com/yonaskolb/XcodeGen/issues/954) @liamnichols +#### Changed +- Change default project version to Xcode 12 [#960](https://github.com/yonaskolb/XcodeGen/pull/960) @yonaskolb + #### Internal -- Updates CI to run on Xcode 12 beta. [#936](https://github.com/yonaskolb/XcodeGen/pull/936) @dflems +- Updates CI to run on Xcode 12. [#936](https://github.com/yonaskolb/XcodeGen/pull/936) [#960](https://github.com/yonaskolb/XcodeGen/pull/960) @dflems @yonaskolb #### Fixed - Select the first runnable build target, if present. [#957](https://github.com/yonaskolb/XcodeGen/pull/957) @codeman9 diff --git a/Sources/XcodeGenKit/Version.swift b/Sources/XcodeGenKit/Version.swift index ca0e6a39d..eb2449152 100644 --- a/Sources/XcodeGenKit/Version.swift +++ b/Sources/XcodeGenKit/Version.swift @@ -4,7 +4,7 @@ import ProjectSpec extension Project { var xcodeVersion: String { - XCodeVersion.parse(options.xcodeVersion ?? "10.2") + XCodeVersion.parse(options.xcodeVersion ?? "12.0") } var schemeVersion: String { diff --git a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj index df3662bc1..1c1440059 100644 --- a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj @@ -312,7 +312,7 @@ 0FBAE303E3CFC2ABAC876A77 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1200; TargetAttributes = { }; }; diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index cda4da212..d1d85e21c 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -204,7 +204,7 @@ F7B09D77DB7447B17DCDA3C4 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1200; TargetAttributes = { }; }; diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme b/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme index 5547dad3d..3c95caf37 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme @@ -1,6 +1,6 @@ + ReferencedContainer = "container:Project.xcodeproj"> @@ -33,30 +33,30 @@ skipped = "NO"> + ReferencedContainer = "container:Project.xcodeproj"> + ReferencedContainer = "container:Project.xcodeproj"> + ReferencedContainer = "container:Project.xcodeproj"> @@ -76,10 +76,10 @@ runnableDebuggingMode = "0"> + ReferencedContainer = "container:Project.xcodeproj"> @@ -95,10 +95,10 @@ runnableDebuggingMode = "0"> + ReferencedContainer = "container:Project.xcodeproj"> diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme index 16b808cbe..df89ce7cd 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme @@ -1,6 +1,6 @@ - - - - diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme deleted file mode 100644 index 5ae081082..000000000 --- a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme deleted file mode 100644 index 34f5b11cf..000000000 --- a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Staging.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Staging.xcscheme deleted file mode 100644 index ef31e1396..000000000 --- a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Staging.xcscheme +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Test.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Test.xcscheme deleted file mode 100644 index bca1a44e2..000000000 --- a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS Test.xcscheme +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Production.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Production.xcscheme deleted file mode 100644 index f9998d3eb..000000000 --- a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Production.xcscheme +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Staging.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Staging.xcscheme deleted file mode 100644 index c87911bb4..000000000 --- a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Staging.xcscheme +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Test.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Test.xcscheme deleted file mode 100644 index c82da690f..000000000 --- a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_iOS_With_Clip Test.xcscheme +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_macOS.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_macOS.xcscheme deleted file mode 100644 index e5bb89782..000000000 --- a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_macOS.xcscheme +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_watchOS.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_watchOS.xcscheme deleted file mode 100644 index 97721bafc..000000000 --- a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/App_watchOS.xcscheme +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme deleted file mode 100644 index f808f3f18..000000000 --- a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme deleted file mode 100644 index 8d5688667..000000000 --- a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageApp.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageApp.xcscheme deleted file mode 100644 index ca0000609..000000000 --- a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageApp.xcscheme +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme b/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme deleted file mode 100644 index e1305825a..000000000 --- a/Tests/Fixtures/TestProject/ProjectXcode12.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/Fixtures/TestProject/build.sh b/Tests/Fixtures/TestProject/build.sh index ea5876da3..590d02387 100755 --- a/Tests/Fixtures/TestProject/build.sh +++ b/Tests/Fixtures/TestProject/build.sh @@ -17,13 +17,6 @@ echo " xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_iOS Test" -configuration "Test Debug" -xcconfig fixtures.xcconfig echo "✅ Successfully built iOS app" -if [[ "$XCODE_VERSION" == 12* ]]; then - echo " - ⚙️ Building iOS app (Xcode 12+)" - xcodebuild -quiet -project ProjectXcode12.xcodeproj -scheme "App_iOS_With_Clip Test" -configuration "Test Debug" -xcconfig fixtures.xcconfig - echo "✅ Successfully built iOS app (Xcode 12+)" -fi - echo " ⚙️ Building macOS app" xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_macOS" -configuration "Test Debug" -xcconfig fixtures.xcconfig diff --git a/Tests/Fixtures/TestProject/project-xcode-12.yml b/Tests/Fixtures/TestProject/project-xcode-12.yml deleted file mode 100644 index 5c5da3337..000000000 --- a/Tests/Fixtures/TestProject/project-xcode-12.yml +++ /dev/null @@ -1,72 +0,0 @@ -# NOTE: when Xcode 12 goes GM and the Xcode 11 CI can be dropped, -# this file can be merged into project.yml. As-is, it generates -# targets that Xcode 11 doesn't understand or know how to build. -name: ProjectXcode12 -include: [project.yml] -targets: - App_iOS_With_Clip: - type: application - platform: iOS - attributes: - ProvisioningStyle: Automatic - sources: - - path: StandaloneFiles/Standalone.swift - - path: App_iOS - name: App - compilerFlags: - - "-Werror" - excludes: - - "**/excluded-file" - - "excluded-file" - - "Model.xcmappingmodel" - settings: - INFOPLIST_FILE: App_iOS/Info.plist - PRODUCT_BUNDLE_IDENTIFIER: com.project.appwithclip - dependencies: - - target: Framework_iOS - - target: StaticLibrary_ObjC_iOS - - target: App_Clip - - sdk: Contacts.framework - scheme: - configVariants: - - Test - - Staging - - Production - - App_Clip: - type: application.on-demand-install-capable - platform: iOS - entitlements: - path: App_Clip/Clip.entitlements - properties: - com.apple.developer.parent-application-identifiers: [$(AppIdentifierPrefix)com.project.appwithclip] - com.apple.security.application-groups: group.com.app - sources: - App_Clip - settings: - INFOPLIST_FILE: App_Clip/Info.plist - PRODUCT_BUNDLE_IDENTIFIER: com.project.appwithclip.clip - dependencies: - - target: Framework_iOS - - target: StaticLibrary_ObjC_iOS - scheme: - testTargets: - - App_Clip_Tests - - App_Clip_UITests - - App_Clip_Tests: - type: bundle.unit-test - platform: iOS - sources: App_iOS_Tests - dependencies: - - target: App_Clip - - target: TestFramework - - carthage: swift-tagged - linkType: static - - App_Clip_UITests: - type: bundle.ui-testing - platform: iOS - sources: App_Clip_UITests - dependencies: - - target: App_Clip diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 34895d906..dd129f356 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -124,6 +124,7 @@ targets: - sdk: Contacts.framework - bundle: BundleX.bundle - target: AnotherProject/ExternalTarget + - target: App_Clip onlyCopyFilesOnInstall: true scheme: testTargets: @@ -285,6 +286,44 @@ targets: sources: [Tool] scheme: {} + App_Clip: + type: application.on-demand-install-capable + platform: iOS + entitlements: + path: App_Clip/Clip.entitlements + properties: + com.apple.developer.parent-application-identifiers: [$(AppIdentifierPrefix)com.project.appwithclip] + com.apple.security.application-groups: group.com.app + sources: + App_Clip + settings: + INFOPLIST_FILE: App_Clip/Info.plist + PRODUCT_BUNDLE_IDENTIFIER: com.project.app.clip + dependencies: + - target: Framework_iOS + - target: StaticLibrary_ObjC_iOS + scheme: + testTargets: + - App_Clip_Tests + - App_Clip_UITests + + App_Clip_Tests: + type: bundle.unit-test + platform: iOS + sources: App_iOS_Tests + dependencies: + - target: App_Clip + - target: TestFramework + - carthage: swift-tagged + linkType: static + + App_Clip_UITests: + type: bundle.ui-testing + platform: iOS + sources: App_Clip_UITests + dependencies: + - target: App_Clip + schemes: Framework: build: diff --git a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj index 441fd45e9..4cbb19508 100644 --- a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj @@ -50,7 +50,7 @@ 8702E0566EC7EF0ABE948569 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1200; TargetAttributes = { }; }; diff --git a/scripts/gen-fixtures.sh b/scripts/gen-fixtures.sh index a7b14a1b7..a3785436b 100755 --- a/scripts/gen-fixtures.sh +++ b/scripts/gen-fixtures.sh @@ -3,6 +3,5 @@ set -e swift run xcodegen --spec Tests/Fixtures/TestProject/AnotherProject/project.yml swift run xcodegen --spec Tests/Fixtures/TestProject/project.yml -swift run xcodegen --spec Tests/Fixtures/TestProject/project-xcode-12.yml swift run xcodegen --spec Tests/Fixtures/CarthageProject/project.yml swift run xcodegen --spec Tests/Fixtures/SPM/project.yml From bb4a3fa2dd720594e47f33cd48cce84fcf9f7066 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Fri, 2 Oct 2020 18:38:16 +1000 Subject: [PATCH 031/284] update changelog for 2.18.0 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dd13892e..78c5977b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.18.0 + #### Added - Add `Scheme.Test.TestTarget.skipped` to allow skipping of an entire test target. [#916](https://github.com/yonaskolb/XcodeGen/pull/916) @codeman9 - Added ability to set custom LLDBInit scripts for launch and test schemes [#929](https://github.com/yonaskolb/XcodeGen/pull/929) @polac24 @@ -23,6 +25,8 @@ - Fix appex's Runpath Search Paths under macOS target. [#952](https://github.com/yonaskolb/XcodeGen/pull/952) @rinsuki - `onlyCopyFilesOnInstall` is extended for the Embed App Extensions build phase. [#948](https://github.com/yonaskolb/XcodeGen/pull/948) @RomanPodymov +[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.17.0...2.18.0) + ## 2.17.0 #### Added From 36932f4f87ed41f250b448079299b3b932f6346e Mon Sep 17 00:00:00 2001 From: Ken Tominaga Date: Tue, 6 Oct 2020 16:12:21 +0900 Subject: [PATCH 032/284] Update Crashlytics FAQ (#962) --- Docs/FAQ.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Docs/FAQ.md b/Docs/FAQ.md index 6f47f1f5a..a5a6fbb10 100644 --- a/Docs/FAQ.md +++ b/Docs/FAQ.md @@ -24,13 +24,12 @@ Yes, but you need to use a little trick when using CocoaPods. Add this script in ```ruby:Podfile // Your dependencies -pod 'Fabric' -pod 'Crashlytics' - -script_phase :name => 'Run Fabric', - :script => '"${PODS_ROOT}/Fabric/run"', - :input_files => ['$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)'] +pod 'Firebase/Crashlytics' +script_phase name: 'Run Firebase Crashlytics', + shell_path: '/bin/sh', + script: '"${PODS_ROOT}/FirebaseCrashlytics/run"', + input_files: ['$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)'] ``` This script will be added after `[CP] Embed Pods Frameworks.` From 9fdc194771168c9128bf7833edbf16391b1b848d Mon Sep 17 00:00:00 2001 From: Liam Nichols Date: Tue, 13 Oct 2020 05:20:53 +0100 Subject: [PATCH 033/284] Add useBaseInternationalization to SpecOptions (#961) * Add 'useBaseInternationalization' setting to SpecOptions (default value of true) * Update PBXProjGenerator to only include Base into knownRegions if it was either detected on the filesystem or if the project spec options opt into it * Update ProjectSpec.md to include useBaseInternationalization * Update AnotherProject to demonstrate Base Internationalization opt out * Update CHANGELOG.md --- CHANGELOG.md | 3 +++ Docs/ProjectSpec.md | 1 + Sources/ProjectSpec/SpecOptions.swift | 10 +++++++++- Sources/XcodeGenKit/PBXProjGenerator.swift | 7 ++++++- .../AnotherProject.xcodeproj/project.pbxproj | 1 - Tests/Fixtures/TestProject/AnotherProject/project.yml | 2 ++ 6 files changed, 21 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78c5977b8..e19e65cb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Next Version +#### Added +- Add `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. [#961](https://github.com/yonaskolb/XcodeGen/pull/961) @liamnichols + ## 2.18.0 #### Added diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 3d4fb2f3b..b10a84ffd 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -127,6 +127,7 @@ Note that target names can also be changed by adding a `name` property to a targ - [ ] **fileTypes**: **[String: [FileType](#filetype)]** - A list of default file options for specific file extensions across the project. Values in [Sources](#sources) will overwrite these settings. - [ ] **preGenCommand**: **String** - A bash command to run before the project has been generated. If the project isn't generated due to no changes when using the cache then this won't run. This is useful for running things like generating resources files before the project is regenerated. - [ ] **postGenCommand**: **String** - A bash command to run after the project has been generated. If the project isn't generated due to no changes when using the cache then this won't run. This is useful for running things like `pod install` only if the project is actually regenerated. +- [ ] **useBaseInternationalization**: **Bool** If this is `false` and your project does not include resources located in a **Base.lproj** directory then `Base` will not be included in the projects 'known regions'. The default value is `true`. ```yaml options: diff --git a/Sources/ProjectSpec/SpecOptions.swift b/Sources/ProjectSpec/SpecOptions.swift index b2d35a9d7..f44fb2aab 100644 --- a/Sources/ProjectSpec/SpecOptions.swift +++ b/Sources/ProjectSpec/SpecOptions.swift @@ -9,6 +9,7 @@ public struct SpecOptions: Equatable { public static let groupSortPositionDefault = GroupSortPosition.bottom public static let generateEmptyDirectoriesDefault = false public static let findCarthageFrameworksDefault = false + public static let useBaseInternationalizationDefault = true public var minimumXcodeGenVersion: Version? public var carthageBuildPath: String? @@ -33,6 +34,7 @@ public struct SpecOptions: Equatable { public var localPackagesGroup: String? public var preGenCommand: String? public var postGenCommand: String? + public var useBaseInternationalization: Bool public enum ValidationType: String { case missingConfigs @@ -93,7 +95,8 @@ public struct SpecOptions: Equatable { findCarthageFrameworks: Bool = findCarthageFrameworksDefault, localPackagesGroup: String? = nil, preGenCommand: String? = nil, - postGenCommand: String? = nil + postGenCommand: String? = nil, + useBaseInternationalization: Bool = useBaseInternationalizationDefault ) { self.minimumXcodeGenVersion = minimumXcodeGenVersion self.carthageBuildPath = carthageBuildPath @@ -118,6 +121,7 @@ public struct SpecOptions: Equatable { self.localPackagesGroup = localPackagesGroup self.preGenCommand = preGenCommand self.postGenCommand = postGenCommand + self.useBaseInternationalization = useBaseInternationalization } } @@ -149,6 +153,7 @@ extension SpecOptions: JSONObjectConvertible { localPackagesGroup = jsonDictionary.json(atKeyPath: "localPackagesGroup") preGenCommand = jsonDictionary.json(atKeyPath: "preGenCommand") postGenCommand = jsonDictionary.json(atKeyPath: "postGenCommand") + useBaseInternationalization = jsonDictionary.json(atKeyPath: "useBaseInternationalization") ?? SpecOptions.useBaseInternationalizationDefault if jsonDictionary["fileTypes"] != nil { fileTypes = try jsonDictionary.json(atKeyPath: "fileTypes") } else { @@ -192,6 +197,9 @@ extension SpecOptions: JSONEncodable { if findCarthageFrameworks != SpecOptions.findCarthageFrameworksDefault { dict["findCarthageFrameworks"] = findCarthageFrameworks } + if useBaseInternationalization != SpecOptions.useBaseInternationalizationDefault { + dict["useBaseInternationalization"] = useBaseInternationalization + } return dict } diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 06116064f..ae765f1bd 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -292,7 +292,12 @@ public class PBXProjGenerator { projectAttributes["knownAssetTags"] = assetTags } - pbxProject.knownRegions = sourceGenerator.knownRegions.union(["Base", developmentRegion]).sorted() + var knownRegions = Set(sourceGenerator.knownRegions) + knownRegions.insert(developmentRegion) + if project.options.useBaseInternationalization { + knownRegions.insert("Base") + } + pbxProject.knownRegions = knownRegions.sorted() pbxProject.packages = packageReferences.sorted { $0.key < $1.key }.map { $1 } diff --git a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj index c9dc9f55c..e4ae5449e 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj @@ -86,7 +86,6 @@ developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( - Base, en, ); mainGroup = 4E8CFA4275C972686621210C; diff --git a/Tests/Fixtures/TestProject/AnotherProject/project.yml b/Tests/Fixtures/TestProject/AnotherProject/project.yml index 5dbb17be0..012d6062a 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/project.yml +++ b/Tests/Fixtures/TestProject/AnotherProject/project.yml @@ -1,5 +1,7 @@ name: AnotherProject include: [../environments.yml] +options: + useBaseInternationalization: false configFiles: Test Debug: ../Configs/config.xcconfig targets: From 297a25eda1ddeeaaa61c085f38e8eeacec901afb Mon Sep 17 00:00:00 2001 From: swiftty <62803132+swiftty@users.noreply.github.com> Date: Tue, 10 Nov 2020 12:18:04 +0900 Subject: [PATCH 034/284] Update Yams to 4.0.0 (#984) --- CHANGELOG.md | 3 +++ Package.resolved | 4 ++-- Package.swift | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e19e65cb0..7adb1d14a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ #### Added - Add `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. [#961](https://github.com/yonaskolb/XcodeGen/pull/961) @liamnichols +#### Internal +- Updated to Yams 4.0.0 [#984](https://github.com/yonaskolb/XcodeGen/pull/984) @swiftty + ## 2.18.0 #### Added diff --git a/Package.resolved b/Package.resolved index 6dc3e99de..672c86107 100644 --- a/Package.resolved +++ b/Package.resolved @@ -96,8 +96,8 @@ "repositoryURL": "https://github.com/jpsim/Yams.git", "state": { "branch": null, - "revision": "c947a306d2e80ecb2c0859047b35c73b8e1ca27f", - "version": "2.0.0" + "revision": "88caa2e6fffdbef2e91c2022d038576062042907", + "version": "4.0.0" } } ] diff --git a/Package.swift b/Package.swift index 69e6d5fd5..baf313736 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/kylef/PathKit.git", from: "1.0.0"), - .package(url: "https://github.com/jpsim/Yams.git", from: "2.0.0"), + .package(url: "https://github.com/jpsim/Yams.git", from: "4.0.0"), .package(url: "https://github.com/yonaskolb/JSONUtilities.git", from: "4.2.0"), .package(url: "https://github.com/kylef/Spectre.git", from: "0.9.0"), .package(url: "https://github.com/onevcat/Rainbow.git", from: "3.0.0"), From 1e7c1c2da0299b26f1bf3985f418631b42696cdd Mon Sep 17 00:00:00 2001 From: Josh Walker Date: Thu, 12 Nov 2020 16:30:35 -0500 Subject: [PATCH 035/284] throw SpecValidationError for minimumXcodeGenVers (#967) * throw SpecValidationError for minimumXcodeGenVers * update changelog # Conflicts: # CHANGELOG.md Co-authored-by: Yonas Kolb --- CHANGELOG.md | 3 +++ Sources/ProjectSpec/SpecValidation.swift | 2 +- Tests/ProjectSpecTests/ProjectSpecTests.swift | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7adb1d14a..708192f4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ #### Added - Add `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. [#961](https://github.com/yonaskolb/XcodeGen/pull/961) @liamnichols +#### Fixed +- Fixed error message output for `minimumXcodeGenVersion`. [#967](https://github.com/yonaskolb/XcodeGen/pull/967) @joshwalker + #### Internal - Updated to Yams 4.0.0 [#984](https://github.com/yonaskolb/XcodeGen/pull/984) @swiftty diff --git a/Sources/ProjectSpec/SpecValidation.swift b/Sources/ProjectSpec/SpecValidation.swift index 3594e658a..923f99684 100644 --- a/Sources/ProjectSpec/SpecValidation.swift +++ b/Sources/ProjectSpec/SpecValidation.swift @@ -228,7 +228,7 @@ extension Project { public func validateMinimumXcodeGenVersion(_ xcodeGenVersion: Version) throws { if let minimumXcodeGenVersion = options.minimumXcodeGenVersion, xcodeGenVersion < minimumXcodeGenVersion { - throw SpecValidationError.ValidationError.invalidXcodeGenVersion(minimumVersion: minimumXcodeGenVersion, version: xcodeGenVersion) + throw SpecValidationError(errors: [SpecValidationError.ValidationError.invalidXcodeGenVersion(minimumVersion: minimumXcodeGenVersion, version: xcodeGenVersion)]) } } diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 22944d4fe..1f4651549 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -111,7 +111,7 @@ class ProjectSpecTests: XCTestCase { project.options = SpecOptions(minimumXcodeGenVersion: minimumVersion) func expectMinimumXcodeGenVersionError(_ project: Project, minimumVersion: Version, xcodeGenVersion: Version, file: String = #file, line: Int = #line) throws { - try expectError(SpecValidationError.ValidationError.invalidXcodeGenVersion(minimumVersion: minimumVersion, version: xcodeGenVersion), file: file, line: line) { + try expectError(SpecValidationError(errors: [SpecValidationError.ValidationError.invalidXcodeGenVersion(minimumVersion: minimumVersion, version: xcodeGenVersion)]), file: file, line: line) { try project.validateMinimumXcodeGenVersion(xcodeGenVersion) } } From 2601d397929139c7a839354477af983454e209be Mon Sep 17 00:00:00 2001 From: Elliott Williams Date: Mon, 23 Nov 2020 16:28:41 -0800 Subject: [PATCH 036/284] Support Linux by upgrading XcodeProj and Spectre (#988) * Bump XcodeProj and Spectre * Add LinuxMain.swift * Linux test fixups * Add CI job for ubuntu-latest * Use URLs in glob logic to avoid Linux/Mac foundation inconsistencies * fatalError when --enable-test-discovery is not used * Update fixtures They changed because of a bugfix in XcodeProj: https://github.com/tuist/XcodeProj/pull/563 * Update CHANGELOG.md --- .github/workflows/ci.yml | 7 ++++ CHANGELOG.md | 1 + Package.resolved | 33 +++++++----------- Package.swift | 4 +-- Sources/Core/Glob.swift | 34 +++++++++++-------- Sources/ProjectSpec/Linkage.swift | 1 + Sources/XcodeGenKit/SchemeGenerator.swift | 2 +- Tests/CoreTests/GlobTests.swift | 2 +- .../AnotherProject.xcodeproj/project.pbxproj | 2 +- .../Project.xcodeproj/project.pbxproj | 6 ++-- Tests/LinuxMain.swift | 3 ++ Tests/ProjectSpecTests/SpecLoadingTests.swift | 2 +- 12 files changed, 53 insertions(+), 44 deletions(-) create mode 100644 Tests/LinuxMain.swift diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcb9f46e3..c396e3489 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,3 +32,10 @@ jobs: run: scripts/diff-fixtures.sh - name: Build fixtures run: scripts/build-fixtures.sh + run-linux: + runs-on: ubuntu-latest + name: Linux + steps: + - uses: actions/checkout@master + - name: Build and run tests + run: swift test --enable-test-discovery diff --git a/CHANGELOG.md b/CHANGELOG.md index 708192f4a..fc5565d6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Next Version #### Added +- Support for building and running on Linux platforms. Tested for compatibility with Swift 5.3+ and Ubuntu 18.04. [#988](https://github.com/yonaskolb/XcodeGen/pull/988) @elliottwilliams - Add `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. [#961](https://github.com/yonaskolb/XcodeGen/pull/961) @liamnichols #### Fixed diff --git a/Package.resolved b/Package.resolved index 672c86107..e42136a42 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/tadija/AEXML", "state": { "branch": null, - "revision": "e4d517844dd03dac557e35d77a8e9ab438de91a6", - "version": "4.4.0" + "revision": "8623e73b193386909566a9ca20203e33a09af142", + "version": "4.5.0" } }, { @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/SwiftDocOrg/GraphViz.git", "state": { "branch": null, - "revision": "08e0cddd013fa2272379d27ec3e0093db51f34fb", - "version": "0.1.0" + "revision": "c4746cb3ff6f5e7c5d5540c40b98555521c3ee43", + "version": "0.1.3" } }, { @@ -42,8 +42,8 @@ "repositoryURL": "https://github.com/onevcat/Rainbow.git", "state": { "branch": null, - "revision": "9c52c1952e9b2305d4507cf473392ac2d7c9b155", - "version": "3.1.5" + "revision": "626c3d4b6b55354b4af3aa309f998fae9b31a3d9", + "version": "3.2.0" } }, { @@ -51,8 +51,8 @@ "repositoryURL": "https://github.com/kylef/Spectre.git", "state": { "branch": null, - "revision": "f14ff47f45642aa5703900980b014c2e9394b6e5", - "version": "0.9.0" + "revision": "f79d4ecbf8bc4e1579fbd86c3e1d652fb6876c53", + "version": "0.9.2" } }, { @@ -60,8 +60,8 @@ "repositoryURL": "https://github.com/jakeheis/SwiftCLI.git", "state": { "branch": null, - "revision": "c72c4564f8c0a24700a59824880536aca45a4cae", - "version": "6.0.1" + "revision": "2816678bcc37f4833d32abeddbdf5e757fa891d8", + "version": "6.0.2" } }, { @@ -78,17 +78,8 @@ "repositoryURL": "https://github.com/tuist/XcodeProj.git", "state": { "branch": null, - "revision": "545bfa746b6eb4ea0ad8d3a12c6590445392bb50", - "version": "7.13.0" - } - }, - { - "package": "XcodeProjCExt", - "repositoryURL": "https://github.com/tuist/XcodeProjCExt", - "state": { - "branch": null, - "revision": "21a510c225ff2bc83d5920a21d902af4b1e7e218", - "version": "0.1.0" + "revision": "82bf5efcaa27e94ed8c761c1eb3e397b6dea82b9", + "version": "7.18.0" } }, { diff --git a/Package.swift b/Package.swift index baf313736..3d5c5b40c 100644 --- a/Package.swift +++ b/Package.swift @@ -14,9 +14,9 @@ let package = Package( .package(url: "https://github.com/kylef/PathKit.git", from: "1.0.0"), .package(url: "https://github.com/jpsim/Yams.git", from: "4.0.0"), .package(url: "https://github.com/yonaskolb/JSONUtilities.git", from: "4.2.0"), - .package(url: "https://github.com/kylef/Spectre.git", from: "0.9.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", .exact("7.13.0")), + .package(url: "https://github.com/tuist/XcodeProj.git", from: "7.18.0"), .package(url: "https://github.com/jakeheis/SwiftCLI.git", from: "6.0.0"), .package(url: "https://github.com/mxcl/Version", from: "2.0.0"), .package(url: "https://github.com/SwiftDocOrg/GraphViz.git", from: "0.1.0"), diff --git a/Sources/Core/Glob.swift b/Sources/Core/Glob.swift index 9eccc61dc..b263cf5d3 100644 --- a/Sources/Core/Glob.swift +++ b/Sources/Core/Glob.swift @@ -136,7 +136,7 @@ public class Glob: Collection { let firstPart = parts.removeFirst() var lastPart = parts.joined(separator: "**") - var directories: [String] + var directories: [URL] if FileManager.default.fileExists(atPath: firstPart) { do { @@ -151,7 +151,7 @@ public class Glob: Collection { if behavior.includesFilesFromRootOfGlobstar { // Check the base directory for the glob star as well. - directories.insert(firstPart, at: 0) + directories.insert(URL(fileURLWithPath: firstPart), at: 0) // Include the globstar root directory ("dir/") in a pattern like "dir/**" or "dir/**/" if lastPart.isEmpty { @@ -163,29 +163,30 @@ public class Glob: Collection { lastPart = "*" } for directory in directories { - let partiallyResolvedPattern = NSString(string: directory).appendingPathComponent(lastPart) - results.append(contentsOf: expandGlobstar(pattern: partiallyResolvedPattern)) + let partiallyResolvedPattern = directory.appendingPathComponent(lastPart) + let standardizedPattern = (partiallyResolvedPattern.relativePath as NSString).standardizingPath + results.append(contentsOf: expandGlobstar(pattern: standardizedPattern)) } return results } - private func exploreDirectories(path: String) throws -> [String] { + private func exploreDirectories(path: String) throws -> [URL] { try FileManager.default.contentsOfDirectory(atPath: path) - .compactMap { subpath -> [String]? in + .compactMap { subpath -> [URL]? in if blacklistedDirectories.contains(subpath) { return nil } - let firstLevelPath = NSString(string: path).appendingPathComponent(subpath) - guard isDirectory(path: firstLevelPath) else { + let firstLevel = URL(fileURLWithPath: path).appendingPathComponent(subpath, isDirectory: true) + guard isDirectory(path: firstLevel.path) else { return nil } - var subDirs: [String] = try FileManager.default.subpathsOfDirectory(atPath: firstLevelPath) - .compactMap { subpath -> String? in - let fullPath = NSString(string: firstLevelPath).appendingPathComponent(subpath) - return isDirectory(path: fullPath) ? fullPath : nil + var subDirs: [URL] = try FileManager.default.subpathsOfDirectory(atPath: firstLevel.path) + .compactMap { subpath -> URL? in + let full = firstLevel.appendingPathComponent(subpath, isDirectory: true) + return isDirectory(path: full.path) ? full : nil } - subDirs.append(firstLevelPath) + subDirs.append(firstLevel) return subDirs } .joined() @@ -211,7 +212,12 @@ public class Glob: Collection { private func populateFiles(gt: glob_t, includeFiles: Bool) { let includeDirectories = behavior.includesDirectoriesInResults - for i in 0.. String { - var tmpDirTmpl = "/tmp/glob-test.XXXXX".cString(using: .utf8)! + var tmpDirTmpl = "/tmp/glob-test.XXXXXX".cString(using: .utf8)! return String(validatingUTF8: mkdtemp(&tmpDirTmpl))! } diff --git a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj index e4ae5449e..9ca477779 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj @@ -7,7 +7,7 @@ objects = { /* Begin PBXFileReference section */ - 6023D61BF2C57E6AE09CE7A3 /* BundleX.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "wrapper.plug-in"; path = BundleX.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 6023D61BF2C57E6AE09CE7A3 /* BundleX.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = BundleX.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 60D6679FB526839EAFEA2EEE /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = config.xcconfig; sourceTree = ""; }; D6340FC7DEBC81E0127BAFD6 /* ExternalTarget.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ExternalTarget.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 0a3bace0e..185a17811 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -617,7 +617,7 @@ 3FC04772130400920D68A167 /* App_Clip_Tests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = App_Clip_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 40863AE6202CFCD0529D8438 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 45C12576F5AA694DD0CE2132 /* BundleX.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = BundleX.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 45C12576F5AA694DD0CE2132 /* BundleX.bundle */ = {isa = PBXFileReference; lastKnownFileType = wrapper.cfbundle; path = BundleX.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 469B630D28015F0EDC456F6B /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; 46DD8F9AAC104BDB63793625 /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; 4BF4D16042A80576D259160C /* Model 3.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Model 3.xcdatamodel"; sourceTree = ""; }; @@ -636,7 +636,7 @@ 70A8E15C81E454DC950C59F0 /* SomeXPCService.xpc */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.xpc-service"; path = SomeXPCService.xpc; sourceTree = ""; }; 72A14C887EF7E9C8CBE914AC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 77C0C341F1865224E0596086 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - 7B5068D64404C61A67A18458 /* MyBundle.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = MyBundle.bundle; sourceTree = ""; }; + 7B5068D64404C61A67A18458 /* MyBundle.bundle */ = {isa = PBXFileReference; lastKnownFileType = wrapper.cfbundle; path = MyBundle.bundle; sourceTree = ""; }; 7C176A8297AC2F5207352BA8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; 7C7EC00B53FF878007F6ECAB /* App_Clip_UITests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = App_Clip_UITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 7D67F1C1BFBACE101DE7DB51 /* Framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -648,7 +648,7 @@ 86169DEEDEAF09AB89C8A31D /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; 87DF9DCA8399E3214A7E27CF /* TestProjectTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectTests.swift; sourceTree = ""; }; 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 8AF20308873AEEEC4D8C45D1 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; + 8AF20308873AEEEC4D8C45D1 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = wrapper.cfbundle; path = Settings.bundle; sourceTree = ""; }; 8CAF6C55B555E3E1352645B6 /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = ""; }; 8CB86294FB939FE6E90932E1 /* libStaticLibrary_Swift.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary_Swift.a; sourceTree = BUILT_PRODUCTS_DIR; }; 8D88C6BF7355702B74396791 /* TestProjectUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectUITests.swift; sourceTree = ""; }; diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift new file mode 100644 index 000000000..711a949e9 --- /dev/null +++ b/Tests/LinuxMain.swift @@ -0,0 +1,3 @@ +// LinuxMain.swift +fatalError("Run the tests with `swift test --enable-test-discovery`.") + diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 58617b9b4..3a7b5ec58 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -202,7 +202,7 @@ class SpecLoadingTests: XCTestCase { throw failure("\(key): \(parsedValue) does not equal \(expectedValue)") } } - if !(dictionary as NSDictionary).isEqual(expectedDictionary) { + if !(dictionary as NSDictionary).isEqual(expectedDictionary as NSDictionary) { throw failure("parsed yaml types don't match:\n\nParsed:\n\t\(dictionary.map { "\($0.key): \($0.value)" }.joined(separator: "\n\t"))\nExpected:\n\t\(expectedDictionary.map { "\($0.key): \($0.value)" }.joined(separator: "\n\t"))") } } From f9d140668307152e9b69c360a8b3386c2447ba52 Mon Sep 17 00:00:00 2001 From: Alvar Hansen Date: Mon, 30 Nov 2020 03:26:56 +0200 Subject: [PATCH 037/284] Add missing quotation marks (#974) Co-authored-by: Alvar Hansen --- Docs/ProjectSpec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index b10a84ffd..a6ce3d4af 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -392,7 +392,7 @@ targets: - "configs/server[0-2].json" - "*-Private.h" - "**/*.md" # excludes all files with the .md extension - - "ios/**/*Tests.[hm] # excludes all files with an h or m extension within the ios directory. + - "ios/**/*Tests.[hm]" # excludes all files with an h or m extension within the ios directory. compilerFlags: - "-Werror" - "-Wextra" From 79738b3e95bc4c1d488b5f2f8451adbf0e472f31 Mon Sep 17 00:00:00 2001 From: bannzai Date: Tue, 1 Dec 2020 16:46:28 +0900 Subject: [PATCH 038/284] More detailed error message with method arguments (#990) * More detailed error message with method arguments * Add pr title to CHANGELOG.md --- CHANGELOG.md | 1 + Sources/XcodeGenKit/PBXProjGenerator.swift | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc5565d6b..ed6127e67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ #### Added - Support for building and running on Linux platforms. Tested for compatibility with Swift 5.3+ and Ubuntu 18.04. [#988](https://github.com/yonaskolb/XcodeGen/pull/988) @elliottwilliams - Add `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. [#961](https://github.com/yonaskolb/XcodeGen/pull/961) @liamnichols +- More detailed error message with method arguments. [#990](https://github.com/yonaskolb/XcodeGen/pull/990) @bannzai #### Fixed - Fixed error message output for `minimumXcodeGenVersion`. [#967](https://github.com/yonaskolb/XcodeGen/pull/967) @joshwalker diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index ae765f1bd..8cce6abfe 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -370,13 +370,13 @@ public class PBXProjGenerator { func generateExternalTargetDependency(from: String, to target: String, in project: String, platform: Platform) throws -> (PBXTargetDependency, Target, PBXReferenceProxy) { guard let projectReference = self.project.getProjectReference(project) else { - fatalError("project not found") + fatalError("project '\(project)' not found") } let pbxProj = try getPBXProj(from: projectReference) guard let targetObject = pbxProj.targets(named: target).first else { - fatalError("target not found") + fatalError("target '\(target)' not found in project '\(project)'") } let projectFileReferenceIndex = self.pbxProj.rootObject! From 983e60e29ffa2d12c61c39880f1c3d22777be3a2 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Wed, 2 Dec 2020 12:18:29 +1100 Subject: [PATCH 039/284] update badges --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7ab3471dd..76877d7a5 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,17 @@

- - Swift Package Manager - - + + + + Swift Package Manager Platforms + + + Swift Versions - +

From 6a5604f4b0750b5d6f7f5f188ce4dfbbaa1db60b Mon Sep 17 00:00:00 2001 From: Joseph Colicchio Date: Tue, 1 Dec 2020 20:46:39 -0600 Subject: [PATCH 040/284] Project Reference LegacyTarget Crash Fix (#982) * Avoid force-unwrapping and allow `.none` type target to continue * Add changelog entry --- CHANGELOG.md | 3 +++ Sources/XcodeGenKit/PBXProjGenerator.swift | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed6127e67..b9a465857 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ #### Internal - Updated to Yams 4.0.0 [#984](https://github.com/yonaskolb/XcodeGen/pull/984) @swiftty +#### Fixed +- Remove force-unwrapping causing crash for `LegacyTarget`s [#982](https://github.com/yonaskolb/XcodeGen/pull/982) @jcolicchio + ## 2.18.0 #### Added diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 8cce6abfe..55e13ce72 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -402,7 +402,7 @@ public class PBXProjGenerator { let productProxy = addObject( PBXContainerItemProxy( containerPortal: .fileReference(projectFileReference), - remoteGlobalID: .object(targetObject.product!), + remoteGlobalID: targetObject.product.flatMap(PBXContainerItemProxy.RemoteGlobalID.object), proxyType: .reference, remoteInfo: target ) @@ -417,7 +417,7 @@ public class PBXProjGenerator { let productReferenceProxy = addObject( PBXReferenceProxy( - fileType: Xcode.fileType(path: Path(targetObject.productNameWithExtension()!)), + fileType: targetObject.productNameWithExtension().flatMap { Xcode.fileType(path: Path($0)) }, path: path, remote: productProxy, sourceTree: .buildProductsDir @@ -433,14 +433,14 @@ public class PBXProjGenerator { ) ) - guard let productType = targetObject.productType, - let buildConfigurations = targetObject.buildConfigurationList?.buildConfigurations, + guard let buildConfigurations = targetObject.buildConfigurationList?.buildConfigurations, let defaultConfigurationName = targetObject.buildConfigurationList?.defaultConfigurationName, let defaultConfiguration = buildConfigurations.first(where: { $0.name == defaultConfigurationName }) ?? buildConfigurations.first else { fatalError("Missing target info") } + let productType: PBXProductType = targetObject.productType ?? .none let buildSettings = defaultConfiguration.buildSettings let settings = Settings(buildSettings: buildSettings, configSettings: [:], groups: []) let deploymentTargetString = buildSettings[platform.deploymentTargetSetting] as? String From efed786cec1fac143d72801d5e516d464a073029 Mon Sep 17 00:00:00 2001 From: Jierong Li Date: Thu, 3 Dec 2020 06:52:24 +0900 Subject: [PATCH 041/284] Add baseOnDependencyAnalysis to Project Spec Build Script (#992) * Add baseOnDependencyAnalysis to BuildScript * Add tests for baseOnDependencyAnalysis * Update CHANGELOG.md --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 1 + Sources/ProjectSpec/BuildScript.swift | 11 ++++++++++- Sources/XcodeGenKit/PBXProjGenerator.swift | 3 ++- .../TestProject/Project.xcodeproj/project.pbxproj | 1 + Tests/Fixtures/TestProject/project.yml | 1 + Tests/ProjectSpecTests/ProjectSpecTests.swift | 12 ++++++++---- Tests/ProjectSpecTests/SpecLoadingTests.swift | 12 ++++++++---- 8 files changed, 32 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9a465857..c0c22cf1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Support for building and running on Linux platforms. Tested for compatibility with Swift 5.3+ and Ubuntu 18.04. [#988](https://github.com/yonaskolb/XcodeGen/pull/988) @elliottwilliams - Add `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. [#961](https://github.com/yonaskolb/XcodeGen/pull/961) @liamnichols - More detailed error message with method arguments. [#990](https://github.com/yonaskolb/XcodeGen/pull/990) @bannzai +- Added `baseOnDependencyAnalysis` to Project Spec Build Script to be able to choose not to skip the script. [#992](https://github.com/yonaskolb/XcodeGen/pull/992) @myihsan #### Fixed - Fixed error message output for `minimumXcodeGenVersion`. [#967](https://github.com/yonaskolb/XcodeGen/pull/967) @joshwalker diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index a6ce3d4af..c992af488 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -563,6 +563,7 @@ Each script can contain: - [ ] **shell**: **String** - shell used for the script. Defaults to `/bin/sh` - [ ] **showEnvVars**: **Bool** - whether the environment variables accessible to the script show be printed to the build log. Defaults to yes - [ ] **runOnlyWhenInstalling**: **Bool** - whether the script is only run when installing (`runOnlyForDeploymentPostprocessing`). Defaults to no +- [ ] **baseOnDependencyAnalysis**: **Bool** - whether to skip the script if inputs, context, or outputs haven't changed. Defaults to yes Either a **path** or **script** must be defined, the rest are optional. diff --git a/Sources/ProjectSpec/BuildScript.swift b/Sources/ProjectSpec/BuildScript.swift index 9c280e1d3..0fccf54bb 100644 --- a/Sources/ProjectSpec/BuildScript.swift +++ b/Sources/ProjectSpec/BuildScript.swift @@ -4,6 +4,7 @@ import JSONUtilities public struct BuildScript: Equatable { public static let runOnlyWhenInstallingDefault = false public static let showEnvVarsDefault = true + public static let baseOnDependencyAnalysisDefault = true public var script: ScriptType public var name: String? @@ -14,6 +15,7 @@ public struct BuildScript: Equatable { public var outputFileLists: [String] public var runOnlyWhenInstalling: Bool public let showEnvVars: Bool + public let baseOnDependencyAnalysis: Bool public enum ScriptType: Equatable { case path(String) @@ -29,7 +31,8 @@ public struct BuildScript: Equatable { outputFileLists: [String] = [], shell: String? = nil, runOnlyWhenInstalling: Bool = runOnlyWhenInstallingDefault, - showEnvVars: Bool = showEnvVarsDefault + showEnvVars: Bool = showEnvVarsDefault, + baseOnDependencyAnalysis: Bool = baseOnDependencyAnalysisDefault ) { self.script = script self.name = name @@ -40,6 +43,7 @@ public struct BuildScript: Equatable { self.shell = shell self.runOnlyWhenInstalling = runOnlyWhenInstalling self.showEnvVars = showEnvVars + self.baseOnDependencyAnalysis = baseOnDependencyAnalysis } } @@ -61,6 +65,7 @@ extension BuildScript: JSONObjectConvertible { shell = jsonDictionary.json(atKeyPath: "shell") runOnlyWhenInstalling = jsonDictionary.json(atKeyPath: "runOnlyWhenInstalling") ?? BuildScript.runOnlyWhenInstallingDefault showEnvVars = jsonDictionary.json(atKeyPath: "showEnvVars") ?? BuildScript.showEnvVarsDefault + baseOnDependencyAnalysis = jsonDictionary.json(atKeyPath: "baseOnDependencyAnalysis") ?? BuildScript.baseOnDependencyAnalysisDefault } } @@ -80,6 +85,10 @@ extension BuildScript: JSONEncodable { dict["showEnvVars"] = showEnvVars } + if baseOnDependencyAnalysis != BuildScript.baseOnDependencyAnalysisDefault { + dict["baseOnDependencyAnalysis"] = baseOnDependencyAnalysis + } + switch script { case .path(let string): dict["path"] = string diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 55e13ce72..4cff3b27f 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -478,7 +478,8 @@ public class PBXProjGenerator { shellPath: buildScript.shell ?? "/bin/sh", shellScript: shellScript, runOnlyForDeploymentPostprocessing: buildScript.runOnlyWhenInstalling, - showEnvVarsInLog: buildScript.showEnvVars + showEnvVarsInLog: buildScript.showEnvVars, + alwaysOutOfDate: !buildScript.baseOnDependencyAnalysis ) return addObject(shellScriptPhase) } diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 185a17811..6d4ccc57e 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -2115,6 +2115,7 @@ }; 71A4CC6ECC8522178F566E7B /* Strip Unused Architectures from Frameworks */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index dd129f356..ff0f75f73 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -144,6 +144,7 @@ targets: - path: scripts/strip-frameworks.sh name: Strip Unused Architectures from Frameworks runOnlyWhenInstalling: true + baseOnDependencyAnalysis: false - name: MyScript script: | echo "You ran a script!" diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 1f4651549..a1a32df7b 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -388,7 +388,8 @@ class ProjectSpecTests: XCTestCase { outputFileLists: ["bar.xcfilelist"], shell: "/bin/bash", runOnlyWhenInstalling: true, - showEnvVars: true)], + showEnvVars: true, + baseOnDependencyAnalysis: false)], postCompileScripts: [BuildScript(script: .path("cmd.sh"), name: "Bar script", inputFiles: ["foo"], @@ -397,7 +398,8 @@ class ProjectSpecTests: XCTestCase { outputFileLists: ["bar.xcfilelist"], shell: "/bin/bash", runOnlyWhenInstalling: true, - showEnvVars: true)], + showEnvVars: true, + baseOnDependencyAnalysis: false)], postBuildScripts: [BuildScript(script: .path("cmd.sh"), name: "an another script", inputFiles: ["foo"], @@ -406,7 +408,8 @@ class ProjectSpecTests: XCTestCase { outputFileLists: ["bar.xcfilelist"], shell: "/bin/bash", runOnlyWhenInstalling: true, - showEnvVars: true)], + showEnvVars: true, + baseOnDependencyAnalysis: false)], buildRules: [BuildRule(fileType: .pattern("*.xcassets"), action: .script("pre_process_swift.py"), name: "My Build Rule", @@ -455,7 +458,8 @@ class ProjectSpecTests: XCTestCase { outputFileLists: ["bar.xcfilelist"], shell: "/bin/bash", runOnlyWhenInstalling: true, - showEnvVars: false)], + showEnvVars: false, + baseOnDependencyAnalysis: false)], scheme: TargetScheme(testTargets: [Scheme.Test.TestTarget(targetReference: "test target", randomExecutionOrder: false, parallelizable: false)], diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 3a7b5ec58..ba3b450cb 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -1052,8 +1052,10 @@ class SpecLoadingTests: XCTestCase { ["path": "script.sh"], ["script": "shell script\ndo thing", "name": "myscript", "inputFiles": ["file", "file2"], "outputFiles": ["file", "file2"], "shell": "bin/customshell", "runOnlyWhenInstalling": true], ["script": "shell script\ndo thing", "name": "myscript", "inputFiles": ["file", "file2"], "outputFiles": ["file", "file2"], "shell": "bin/customshell", "showEnvVars": false], + ["script": "shell script\ndo thing", "name": "myscript", "inputFiles": ["file", "file2"], "outputFiles": ["file", "file2"], "shell": "bin/customshell", "baseOnDependencyAnalysis": false], ["script": "shell script\nwith file lists", "name": "myscript", "inputFileLists": ["inputList.xcfilelist"], "outputFileLists": ["outputList.xcfilelist"], "shell": "bin/customshell", "runOnlyWhenInstalling": true], ["script": "shell script\nwith file lists", "name": "myscript", "inputFileLists": ["inputList.xcfilelist"], "outputFileLists": ["outputList.xcfilelist"], "shell": "bin/customshell", "showEnvVars": false], + ["script": "shell script\nwith file lists", "name": "myscript", "inputFileLists": ["inputList.xcfilelist"], "outputFileLists": ["outputList.xcfilelist"], "shell": "bin/customshell", "baseOnDependencyAnalysis": false], ] target["preBuildScripts"] = scripts target["postCompileScripts"] = scripts @@ -1061,10 +1063,12 @@ class SpecLoadingTests: XCTestCase { let expectedScripts = [ BuildScript(script: .path("script.sh")), - BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: true, showEnvVars: true), - BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: false), - BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: true, showEnvVars: true), - BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: false), + BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: true, showEnvVars: true, baseOnDependencyAnalysis: true), + BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: false, baseOnDependencyAnalysis: true), + BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: true, baseOnDependencyAnalysis: false), + BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: true, showEnvVars: true, baseOnDependencyAnalysis: true), + BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: false, baseOnDependencyAnalysis: true), + BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: true, baseOnDependencyAnalysis: false), ] let parsedTarget = try Target(name: "test", jsonDictionary: target) From 9fa02584ab6ecb5ba63041d7e81fc434dd5a8f85 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 3 Dec 2020 08:54:44 +1100 Subject: [PATCH 042/284] Update ProjectSpec.md --- Docs/ProjectSpec.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index c992af488..08f3fcd13 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -23,7 +23,7 @@ - [Aggregate Target](#aggregate-target) - [Target Template](#target-template) - [Scheme](#scheme) - - [Scheme Template](#scheme-template) +- [Scheme Template](#scheme-template) - [Swift Package](#swift-package) ## General @@ -879,7 +879,7 @@ schemes: revealArchiveInOrganizer: false ``` -### Scheme Template +## Scheme Template This is a template that can be referenced from a normal scheme using the `templates` property. The properties of this template are the same as a [Scheme](#scheme). This functions identically in practice to [Target Template](#target-template). Any instances of `${scheme_name}` within each template will be replaced by the final scheme name which references the template. From 04d6749441eedd65eab6d966922907455597ebe3 Mon Sep 17 00:00:00 2001 From: Jierong Li Date: Thu, 3 Dec 2020 09:20:13 +0900 Subject: [PATCH 043/284] Fix a typo (#993) Rename baseOnDependencyAnalysis to basedOnDependencyAnalysis. --- CHANGELOG.md | 2 +- Docs/ProjectSpec.md | 2 +- Sources/ProjectSpec/BuildScript.swift | 14 +++++++------- Sources/XcodeGenKit/PBXProjGenerator.swift | 2 +- Tests/Fixtures/TestProject/project.yml | 2 +- Tests/ProjectSpecTests/ProjectSpecTests.swift | 8 ++++---- Tests/ProjectSpecTests/SpecLoadingTests.swift | 16 ++++++++-------- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0c22cf1c..6b9ac9ad3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - Support for building and running on Linux platforms. Tested for compatibility with Swift 5.3+ and Ubuntu 18.04. [#988](https://github.com/yonaskolb/XcodeGen/pull/988) @elliottwilliams - Add `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. [#961](https://github.com/yonaskolb/XcodeGen/pull/961) @liamnichols - More detailed error message with method arguments. [#990](https://github.com/yonaskolb/XcodeGen/pull/990) @bannzai -- Added `baseOnDependencyAnalysis` to Project Spec Build Script to be able to choose not to skip the script. [#992](https://github.com/yonaskolb/XcodeGen/pull/992) @myihsan +- Added `basedOnDependencyAnalysis` to Project Spec Build Script to be able to choose not to skip the script. [#992](https://github.com/yonaskolb/XcodeGen/pull/992) @myihsan #### Fixed - Fixed error message output for `minimumXcodeGenVersion`. [#967](https://github.com/yonaskolb/XcodeGen/pull/967) @joshwalker diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 08f3fcd13..e7374fe7f 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -563,7 +563,7 @@ Each script can contain: - [ ] **shell**: **String** - shell used for the script. Defaults to `/bin/sh` - [ ] **showEnvVars**: **Bool** - whether the environment variables accessible to the script show be printed to the build log. Defaults to yes - [ ] **runOnlyWhenInstalling**: **Bool** - whether the script is only run when installing (`runOnlyForDeploymentPostprocessing`). Defaults to no -- [ ] **baseOnDependencyAnalysis**: **Bool** - whether to skip the script if inputs, context, or outputs haven't changed. Defaults to yes +- [ ] **basedOnDependencyAnalysis**: **Bool** - whether to skip the script if inputs, context, or outputs haven't changed. Defaults to yes Either a **path** or **script** must be defined, the rest are optional. diff --git a/Sources/ProjectSpec/BuildScript.swift b/Sources/ProjectSpec/BuildScript.swift index 0fccf54bb..4b7fdc8de 100644 --- a/Sources/ProjectSpec/BuildScript.swift +++ b/Sources/ProjectSpec/BuildScript.swift @@ -4,7 +4,7 @@ import JSONUtilities public struct BuildScript: Equatable { public static let runOnlyWhenInstallingDefault = false public static let showEnvVarsDefault = true - public static let baseOnDependencyAnalysisDefault = true + public static let basedOnDependencyAnalysisDefault = true public var script: ScriptType public var name: String? @@ -15,7 +15,7 @@ public struct BuildScript: Equatable { public var outputFileLists: [String] public var runOnlyWhenInstalling: Bool public let showEnvVars: Bool - public let baseOnDependencyAnalysis: Bool + public let basedOnDependencyAnalysis: Bool public enum ScriptType: Equatable { case path(String) @@ -32,7 +32,7 @@ public struct BuildScript: Equatable { shell: String? = nil, runOnlyWhenInstalling: Bool = runOnlyWhenInstallingDefault, showEnvVars: Bool = showEnvVarsDefault, - baseOnDependencyAnalysis: Bool = baseOnDependencyAnalysisDefault + basedOnDependencyAnalysis: Bool = basedOnDependencyAnalysisDefault ) { self.script = script self.name = name @@ -43,7 +43,7 @@ public struct BuildScript: Equatable { self.shell = shell self.runOnlyWhenInstalling = runOnlyWhenInstalling self.showEnvVars = showEnvVars - self.baseOnDependencyAnalysis = baseOnDependencyAnalysis + self.basedOnDependencyAnalysis = basedOnDependencyAnalysis } } @@ -65,7 +65,7 @@ extension BuildScript: JSONObjectConvertible { shell = jsonDictionary.json(atKeyPath: "shell") runOnlyWhenInstalling = jsonDictionary.json(atKeyPath: "runOnlyWhenInstalling") ?? BuildScript.runOnlyWhenInstallingDefault showEnvVars = jsonDictionary.json(atKeyPath: "showEnvVars") ?? BuildScript.showEnvVarsDefault - baseOnDependencyAnalysis = jsonDictionary.json(atKeyPath: "baseOnDependencyAnalysis") ?? BuildScript.baseOnDependencyAnalysisDefault + basedOnDependencyAnalysis = jsonDictionary.json(atKeyPath: "basedOnDependencyAnalysis") ?? BuildScript.basedOnDependencyAnalysisDefault } } @@ -85,8 +85,8 @@ extension BuildScript: JSONEncodable { dict["showEnvVars"] = showEnvVars } - if baseOnDependencyAnalysis != BuildScript.baseOnDependencyAnalysisDefault { - dict["baseOnDependencyAnalysis"] = baseOnDependencyAnalysis + if basedOnDependencyAnalysis != BuildScript.basedOnDependencyAnalysisDefault { + dict["basedOnDependencyAnalysis"] = basedOnDependencyAnalysis } switch script { diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 4cff3b27f..7327c65c6 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -479,7 +479,7 @@ public class PBXProjGenerator { shellScript: shellScript, runOnlyForDeploymentPostprocessing: buildScript.runOnlyWhenInstalling, showEnvVarsInLog: buildScript.showEnvVars, - alwaysOutOfDate: !buildScript.baseOnDependencyAnalysis + alwaysOutOfDate: !buildScript.basedOnDependencyAnalysis ) return addObject(shellScriptPhase) } diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index ff0f75f73..a1008ffad 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -144,7 +144,7 @@ targets: - path: scripts/strip-frameworks.sh name: Strip Unused Architectures from Frameworks runOnlyWhenInstalling: true - baseOnDependencyAnalysis: false + basedOnDependencyAnalysis: false - name: MyScript script: | echo "You ran a script!" diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index a1a32df7b..d9112a017 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -389,7 +389,7 @@ class ProjectSpecTests: XCTestCase { shell: "/bin/bash", runOnlyWhenInstalling: true, showEnvVars: true, - baseOnDependencyAnalysis: false)], + basedOnDependencyAnalysis: false)], postCompileScripts: [BuildScript(script: .path("cmd.sh"), name: "Bar script", inputFiles: ["foo"], @@ -399,7 +399,7 @@ class ProjectSpecTests: XCTestCase { shell: "/bin/bash", runOnlyWhenInstalling: true, showEnvVars: true, - baseOnDependencyAnalysis: false)], + basedOnDependencyAnalysis: false)], postBuildScripts: [BuildScript(script: .path("cmd.sh"), name: "an another script", inputFiles: ["foo"], @@ -409,7 +409,7 @@ class ProjectSpecTests: XCTestCase { shell: "/bin/bash", runOnlyWhenInstalling: true, showEnvVars: true, - baseOnDependencyAnalysis: false)], + basedOnDependencyAnalysis: false)], buildRules: [BuildRule(fileType: .pattern("*.xcassets"), action: .script("pre_process_swift.py"), name: "My Build Rule", @@ -459,7 +459,7 @@ class ProjectSpecTests: XCTestCase { shell: "/bin/bash", runOnlyWhenInstalling: true, showEnvVars: false, - baseOnDependencyAnalysis: false)], + basedOnDependencyAnalysis: false)], scheme: TargetScheme(testTargets: [Scheme.Test.TestTarget(targetReference: "test target", randomExecutionOrder: false, parallelizable: false)], diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index ba3b450cb..5db5b1aa3 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -1052,10 +1052,10 @@ class SpecLoadingTests: XCTestCase { ["path": "script.sh"], ["script": "shell script\ndo thing", "name": "myscript", "inputFiles": ["file", "file2"], "outputFiles": ["file", "file2"], "shell": "bin/customshell", "runOnlyWhenInstalling": true], ["script": "shell script\ndo thing", "name": "myscript", "inputFiles": ["file", "file2"], "outputFiles": ["file", "file2"], "shell": "bin/customshell", "showEnvVars": false], - ["script": "shell script\ndo thing", "name": "myscript", "inputFiles": ["file", "file2"], "outputFiles": ["file", "file2"], "shell": "bin/customshell", "baseOnDependencyAnalysis": false], + ["script": "shell script\ndo thing", "name": "myscript", "inputFiles": ["file", "file2"], "outputFiles": ["file", "file2"], "shell": "bin/customshell", "basedOnDependencyAnalysis": false], ["script": "shell script\nwith file lists", "name": "myscript", "inputFileLists": ["inputList.xcfilelist"], "outputFileLists": ["outputList.xcfilelist"], "shell": "bin/customshell", "runOnlyWhenInstalling": true], ["script": "shell script\nwith file lists", "name": "myscript", "inputFileLists": ["inputList.xcfilelist"], "outputFileLists": ["outputList.xcfilelist"], "shell": "bin/customshell", "showEnvVars": false], - ["script": "shell script\nwith file lists", "name": "myscript", "inputFileLists": ["inputList.xcfilelist"], "outputFileLists": ["outputList.xcfilelist"], "shell": "bin/customshell", "baseOnDependencyAnalysis": false], + ["script": "shell script\nwith file lists", "name": "myscript", "inputFileLists": ["inputList.xcfilelist"], "outputFileLists": ["outputList.xcfilelist"], "shell": "bin/customshell", "basedOnDependencyAnalysis": false], ] target["preBuildScripts"] = scripts target["postCompileScripts"] = scripts @@ -1063,12 +1063,12 @@ class SpecLoadingTests: XCTestCase { let expectedScripts = [ BuildScript(script: .path("script.sh")), - BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: true, showEnvVars: true, baseOnDependencyAnalysis: true), - BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: false, baseOnDependencyAnalysis: true), - BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: true, baseOnDependencyAnalysis: false), - BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: true, showEnvVars: true, baseOnDependencyAnalysis: true), - BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: false, baseOnDependencyAnalysis: true), - BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: true, baseOnDependencyAnalysis: false), + BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: true, showEnvVars: true, basedOnDependencyAnalysis: true), + BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: false, basedOnDependencyAnalysis: true), + BuildScript(script: .script("shell script\ndo thing"), name: "myscript", inputFiles: ["file", "file2"], outputFiles: ["file", "file2"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: true, basedOnDependencyAnalysis: false), + BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: true, showEnvVars: true, basedOnDependencyAnalysis: true), + BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: false, basedOnDependencyAnalysis: true), + BuildScript(script: .script("shell script\nwith file lists"), name: "myscript", inputFileLists: ["inputList.xcfilelist"], outputFileLists: ["outputList.xcfilelist"], shell: "bin/customshell", runOnlyWhenInstalling: false, showEnvVars: true, basedOnDependencyAnalysis: false), ] let parsedTarget = try Target(name: "test", jsonDictionary: target) From 282761cb215b08b16dc26265c53bd234db7ff466 Mon Sep 17 00:00:00 2001 From: Vasiliy Anisimov Date: Mon, 11 Jan 2021 05:33:44 +0300 Subject: [PATCH 044/284] Fixed adding Info.plists with custom names to Copy Bundle Resources build phase (#945) * Fixed adding Info.plists with custom names to Copy Bundle Resources build phase - Extended check for Info.plist, because they usually named not just "Info.plist", but "-Info.plist" * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Yonas Kolb --- CHANGELOG.md | 3 +++ Sources/XcodeGenKit/SourceGenerator.swift | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b9ac9ad3..d4f25428b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ #### Fixed - Remove force-unwrapping causing crash for `LegacyTarget`s [#982](https://github.com/yonaskolb/XcodeGen/pull/982) @jcolicchio +#### Changed +- **Breaking**: Info.plists with custom prefixes are no longer added to the Copy Bundle Resources build phase [#945](https://github.com/yonaskolb/XcodeGen/pull/945) @anivaros + ## 2.18.0 #### Added diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index 5abb5e1bf..b66346f15 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -250,7 +250,7 @@ class SourceGenerator { /// returns a default build phase for a given path. This is based off the filename private func getDefaultBuildPhase(for path: Path, targetType: PBXProductType) -> BuildPhaseSpec? { - if path.lastComponent == "Info.plist" { + if path.lastComponent.hasSuffix("Info.plist") { return nil } if let buildPhase = getFileType(path: path)?.buildPhase { From 7e536e5a3a0e77017808bb325a440765c158f2df Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 12 Jan 2021 21:13:32 +1100 Subject: [PATCH 045/284] Update CHANGELOG.md --- CHANGELOG.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4f25428b..5a56707f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,18 +8,16 @@ - More detailed error message with method arguments. [#990](https://github.com/yonaskolb/XcodeGen/pull/990) @bannzai - Added `basedOnDependencyAnalysis` to Project Spec Build Script to be able to choose not to skip the script. [#992](https://github.com/yonaskolb/XcodeGen/pull/992) @myihsan +#### Changed +- **Breaking**: Info.plists with custom prefixes are no longer added to the Copy Bundle Resources build phase [#945](https://github.com/yonaskolb/XcodeGen/pull/945) @anivaros + #### Fixed - Fixed error message output for `minimumXcodeGenVersion`. [#967](https://github.com/yonaskolb/XcodeGen/pull/967) @joshwalker +- Remove force-unwrapping causing crash for `LegacyTarget`s [#982](https://github.com/yonaskolb/XcodeGen/pull/982) @jcolicchio #### Internal - Updated to Yams 4.0.0 [#984](https://github.com/yonaskolb/XcodeGen/pull/984) @swiftty -#### Fixed -- Remove force-unwrapping causing crash for `LegacyTarget`s [#982](https://github.com/yonaskolb/XcodeGen/pull/982) @jcolicchio - -#### Changed -- **Breaking**: Info.plists with custom prefixes are no longer added to the Copy Bundle Resources build phase [#945](https://github.com/yonaskolb/XcodeGen/pull/945) @anivaros - ## 2.18.0 #### Added From 2277b323f217b0087a545fef9028dcfc386d6126 Mon Sep 17 00:00:00 2001 From: Sascha Schwabbauer Date: Tue, 12 Jan 2021 23:51:11 +0100 Subject: [PATCH 046/284] Add support for runOncePerArchitecture (#950) Add changelog and small change Fix build error --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 2 ++ Sources/ProjectSpec/BuildRule.swift | 19 +++++++++++++++++-- Sources/XcodeGenKit/PBXProjGenerator.swift | 3 ++- Tests/ProjectSpecTests/ProjectSpecTests.swift | 6 ++++-- 5 files changed, 26 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a56707f9..3b2929c95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Add `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. [#961](https://github.com/yonaskolb/XcodeGen/pull/961) @liamnichols - More detailed error message with method arguments. [#990](https://github.com/yonaskolb/XcodeGen/pull/990) @bannzai - Added `basedOnDependencyAnalysis` to Project Spec Build Script to be able to choose not to skip the script. [#992](https://github.com/yonaskolb/XcodeGen/pull/992) @myihsan +- Add `BuildRule.runOncePerArchitecture` to allow running build rules once per architecture. [#950](https://github.com/yonaskolb/XcodeGen/pull/950) @sascha #### Changed - **Breaking**: Info.plists with custom prefixes are no longer added to the Copy Bundle Resources build phase [#945](https://github.com/yonaskolb/XcodeGen/pull/945) @anivaros diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index e7374fe7f..4cf4f2a16 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -605,6 +605,7 @@ targets: - [ ] **name**: **String** - The name of a build rule. Defaults to `Build Rule` - [ ] **outputFiles**: **[String]** - The list of output files - [ ] **outputFilesCompilerFlags**: **[String]** - The list of compiler flags to apply to the output files +- [ ] **runOncePerArchitecture**: **Bool** - a boolean that indicates if this rule should run once per architecture. This defaults to true ```yaml targets: @@ -619,6 +620,7 @@ targets: compilerSpec: com.apple.xcode.tools.swift.compiler outputFiles: - $(SRCROOT)/Generated.swift + runOncePerArchitecture: false ``` ### Target Scheme diff --git a/Sources/ProjectSpec/BuildRule.swift b/Sources/ProjectSpec/BuildRule.swift index 760b57c7a..f5fefc013 100644 --- a/Sources/ProjectSpec/BuildRule.swift +++ b/Sources/ProjectSpec/BuildRule.swift @@ -5,6 +5,7 @@ public struct BuildRule: Equatable { public static let scriptCompilerSpec = "com.apple.compilers.proxy.script" public static let filePatternFileType = "pattern.proxy" + public static let runOncePerArchitectureDefault = true public enum FileType: Equatable { case type(String) @@ -49,13 +50,22 @@ public struct BuildRule: Equatable { public var outputFiles: [String] public var outputFilesCompilerFlags: [String] public var name: String? - - public init(fileType: FileType, action: Action, name: String? = nil, outputFiles: [String] = [], outputFilesCompilerFlags: [String] = []) { + public var runOncePerArchitecture: Bool + + public init( + fileType: FileType, + action: Action, + name: String? = nil, + outputFiles: [String] = [], + outputFilesCompilerFlags: [String] = [], + runOncePerArchitecture: Bool = runOncePerArchitectureDefault + ) { self.fileType = fileType self.action = action self.name = name self.outputFiles = outputFiles self.outputFilesCompilerFlags = outputFilesCompilerFlags + self.runOncePerArchitecture = runOncePerArchitecture } } @@ -78,6 +88,7 @@ extension BuildRule: JSONObjectConvertible { outputFiles = jsonDictionary.json(atKeyPath: "outputFiles") ?? [] outputFilesCompilerFlags = jsonDictionary.json(atKeyPath: "outputFilesCompilerFlags") ?? [] name = jsonDictionary.json(atKeyPath: "name") + runOncePerArchitecture = jsonDictionary.json(atKeyPath: "runOncePerArchitecture") ?? BuildRule.runOncePerArchitectureDefault } } @@ -103,6 +114,10 @@ extension BuildRule: JSONEncodable { dict["script"] = string } + if runOncePerArchitecture != BuildRule.runOncePerArchitectureDefault { + dict["runOncePerArchitecture"] = runOncePerArchitecture + } + return dict } } diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 7327c65c6..52060d93b 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -1150,7 +1150,8 @@ public class PBXProjGenerator { name: buildRule.name ?? "Build Rule", outputFiles: buildRule.outputFiles, outputFilesCompilerFlags: buildRule.outputFilesCompilerFlags, - script: buildRule.action.script + script: buildRule.action.script, + runOncePerArchitecture: buildRule.runOncePerArchitecture ) ) } diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index d9112a017..2878697d5 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -414,12 +414,14 @@ class ProjectSpecTests: XCTestCase { action: .script("pre_process_swift.py"), name: "My Build Rule", outputFiles: ["$(SRCROOT)/Generated.swift"], - outputFilesCompilerFlags: ["foo"]), + outputFilesCompilerFlags: ["foo"], + runOncePerArchitecture: false), BuildRule(fileType: .type("sourcecode.swift"), action: .compilerSpec("com.apple.xcode.tools.swift.compiler"), name: nil, outputFiles: ["bar"], - outputFilesCompilerFlags: ["foo"])], + outputFilesCompilerFlags: ["foo"], + runOncePerArchitecture: true)], scheme: TargetScheme(testTargets: [Scheme.Test.TestTarget(targetReference: "test target", randomExecutionOrder: false, parallelizable: false)], From c194a2e4e311f7611c8aaa87930c9ba4a9a79475 Mon Sep 17 00:00:00 2001 From: Elliott Williams Date: Wed, 13 Jan 2021 20:42:43 -0800 Subject: [PATCH 047/284] Fix race condition in json decoder (#995) * Fix race condition in json decoder * Update CHANGELOG.md --- CHANGELOG.md | 1 + Sources/ProjectSpec/Decoding.swift | 31 ++++++++---------------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b2929c95..2de0668e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ #### Fixed - Fixed error message output for `minimumXcodeGenVersion`. [#967](https://github.com/yonaskolb/XcodeGen/pull/967) @joshwalker - Remove force-unwrapping causing crash for `LegacyTarget`s [#982](https://github.com/yonaskolb/XcodeGen/pull/982) @jcolicchio +- Fixed a race condition in an internal JSON decoder, which would occasionally fail with an error like `Parsing project spec failed: Error Domain=Unspecified error Code=0`. [#995](https://github.com/yonaskolb/XcodeGen/pull/995) @elliottwilliams #### Internal - Updated to Yams 4.0.0 [#984](https://github.com/yonaskolb/XcodeGen/pull/984) @swiftty diff --git a/Sources/ProjectSpec/Decoding.swift b/Sources/ProjectSpec/Decoding.swift index 2c4fe3f38..24d158d91 100644 --- a/Sources/ProjectSpec/Decoding.swift +++ b/Sources/ProjectSpec/Decoding.swift @@ -10,36 +10,21 @@ extension Dictionary where Key: JSONKey { } if parallel { let defaultError = NSError(domain: "Unspecified error", code: 0, userInfo: nil) - var itemResults: [Result] = Array(repeating: .failure(defaultError), count: dictionary.count) - var ops: [BlockOperation] = [] - var idx: Int = 0 - for (key, _) in dictionary { - ops.append(BlockOperation { [idx] in + let keys = Array(dictionary.keys) + var itemResults: [Result] = Array(repeating: .failure(defaultError), count: keys.count) + itemResults.withUnsafeMutableBufferPointer { buffer in + DispatchQueue.concurrentPerform(iterations: dictionary.count) { idx in do { + let key = keys[idx] let jsonDictionary: JSONDictionary = try dictionary.json(atKeyPath: .key(key)) let item = try T(name: key, jsonDictionary: jsonDictionary) - itemResults[idx] = .success(item) + buffer[idx] = .success(item) } catch { - itemResults[idx] = .failure(error) + buffer[idx] = .failure(error) } - }) - idx += 1 - } - let queue = OperationQueue() - queue.qualityOfService = .userInteractive - queue.maxConcurrentOperationCount = 8 - queue.addOperations(ops, waitUntilFinished: true) - var items = ContiguousArray() - items.reserveCapacity(itemResults.count) - for result in itemResults { - switch result { - case .failure(let error): - throw error - case .success(let item): - items.append(item) } } - return Array(items) + return try itemResults.map { try $0.get() } } else { var items: [T] = [] for (key, _) in dictionary { From 0eeb6369ecb407e5bc5940fb563e486fbf225883 Mon Sep 17 00:00:00 2001 From: Joseph Colicchio Date: Wed, 13 Jan 2021 21:59:59 -0800 Subject: [PATCH 048/284] Legacy / Settings Relative Paths (#981) * Adjust header search paths and legacy working directory for relative included projects * Undo change to HEADER_SEARCH_PATHS * Add test * Update changelog * Fix test * Undo test changes * Fix tests --- CHANGELOG.md | 1 + Sources/ProjectSpec/Target.swift | 10 + .../AnotherProject.xcodeproj/project.pbxproj | 110 +++++ .../TestProject/AnotherProject/project.yml | 7 + .../Project.xcodeproj/project.pbxproj | 391 ++++++++++++++++++ Tests/Fixtures/TestProject/project.yml | 2 +- 6 files changed, 520 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2de0668e4..c5c975121 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ #### Changed - **Breaking**: Info.plists with custom prefixes are no longer added to the Copy Bundle Resources build phase [#945](https://github.com/yonaskolb/XcodeGen/pull/945) @anivaros +- **Breaking**: `workingDirectory` of included legacy targets is now made relative to including project [#981](https://github.com/yonaskolb/XcodeGen/pull/981) @jcolicchio #### Fixed - Fixed error message output for `minimumXcodeGenVersion`. [#967](https://github.com/yonaskolb/XcodeGen/pull/967) @joshwalker diff --git a/Sources/ProjectSpec/Target.swift b/Sources/ProjectSpec/Target.swift index c746129bd..851aa4ef5 100644 --- a/Sources/ProjectSpec/Target.swift +++ b/Sources/ProjectSpec/Target.swift @@ -24,6 +24,15 @@ public struct LegacyTarget: Equatable { } } +extension LegacyTarget: PathContainer { + + static var pathProperties: [PathProperty] { + [ + .string("workingDirectory"), + ] + } +} + public struct Target: ProjectTarget { public var name: String public var type: PBXProductType @@ -134,6 +143,7 @@ extension Target: PathContainer { .object("prebuildScripts", BuildScript.pathProperties), .object("postCompileScripts", BuildScript.pathProperties), .object("postBuildScripts", BuildScript.pathProperties), + .object("legacy", LegacyTarget.pathProperties), ]), ] } diff --git a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj index 9ca477779..c0b561029 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj @@ -41,6 +41,23 @@ }; /* End PBXGroup section */ +/* Begin PBXLegacyTarget section */ + A6D9FB94860C005F0B723B5F /* IncludedLegacy */ = { + isa = PBXLegacyTarget; + buildConfigurationList = AC68886F4CEE08D3593D0877 /* Build configuration list for PBXLegacyTarget "IncludedLegacy" */; + buildPhases = ( + 69078D1DA3F942D5BC752081 /* Sources */, + ); + buildToolPath = /usr/bin/true; + buildWorkingDirectory = .; + dependencies = ( + ); + name = IncludedLegacy; + passBuildSettingsInEnvironment = 0; + productName = IncludedLegacy; + }; +/* End PBXLegacyTarget section */ + /* Begin PBXNativeTarget section */ 63A2D4898D974A06E85B07F8 /* BundleX */ = { isa = PBXNativeTarget; @@ -94,11 +111,19 @@ targets = ( 63A2D4898D974A06E85B07F8 /* BundleX */, E76A5F5E363E470416D3B487 /* ExternalTarget */, + A6D9FB94860C005F0B723B5F /* IncludedLegacy */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ + 69078D1DA3F942D5BC752081 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; F08051CAC5E72EEEB8FB447B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -360,6 +385,18 @@ }; name = "Staging Debug"; }; + 2D7C07F1D50007A04EF6C0EE /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; 30E2E954A636A240B1CE5C15 /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -447,6 +484,18 @@ }; name = "Production Debug"; }; + 5280A75613CFD83BA7EE6AD4 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; 56ADF89C9058B2C25F6C80CE /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -554,6 +603,30 @@ }; name = "Production Release"; }; + 683A510C4120CF5D216E1667 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; + 6C48009F842BEC2467546ADF /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; 7919FDD28F9A535EA26FB151 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -663,6 +736,30 @@ }; name = "Test Release"; }; + CB49A0C6C6CF7FC894E453BE /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; + E1A76975608AFAA966038B93 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -692,6 +789,19 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Production Debug"; }; + AC68886F4CEE08D3593D0877 /* Build configuration list for PBXLegacyTarget "IncludedLegacy" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6C48009F842BEC2467546ADF /* Production Debug */, + E1A76975608AFAA966038B93 /* Production Release */, + 2D7C07F1D50007A04EF6C0EE /* Staging Debug */, + CB49A0C6C6CF7FC894E453BE /* Staging Release */, + 683A510C4120CF5D216E1667 /* Test Debug */, + 5280A75613CFD83BA7EE6AD4 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; B5049D72EC10A5C87F29B6B1 /* Build configuration list for PBXNativeTarget "ExternalTarget" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Tests/Fixtures/TestProject/AnotherProject/project.yml b/Tests/Fixtures/TestProject/AnotherProject/project.yml index 012d6062a..65e729ede 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/project.yml +++ b/Tests/Fixtures/TestProject/AnotherProject/project.yml @@ -11,3 +11,10 @@ targets: ExternalTarget: type: framework platform: iOS + IncludedLegacy: + type: "" + platform: iOS + legacy: + toolPath: /usr/bin/true + workingDirectory: . + diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 6d4ccc57e..8ba9c0601 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -597,6 +597,7 @@ 1FA5E208EC184E3030D2A21D /* Clip.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Clip.entitlements; sourceTree = ""; }; 22237B8EBD9E6BE8EBC8735F /* XPC Service.xpc */ = {isa = PBXFileReference; explicitFileType = "wrapper.xpc-service"; includeInIndex = 0; path = "XPC Service.xpc"; sourceTree = BUILT_PRODUCTS_DIR; }; 2233774B86539B1574D206B0 /* Framework2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2385A62F6C6EE8D461EE19F2 /* ExternalTarget.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ExternalTarget.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 23A2F16890ECF2EE3FED72AE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 28360ECA4D727FAA58557A81 /* example.mp4 */ = {isa = PBXFileReference; path = example.mp4; sourceTree = ""; }; 2A5F527F2590C14956518174 /* FrameworkFile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrameworkFile.swift; sourceTree = ""; }; @@ -645,6 +646,7 @@ 7F1A2F579A6F79C62DDA0571 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7FDC16E1938AA114B67D87A9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; 814822136AF3C64428D69DD6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 84317819C92F78425870E483 /* BundleX.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = BundleX.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 86169DEEDEAF09AB89C8A31D /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; 87DF9DCA8399E3214A7E27CF /* TestProjectTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectTests.swift; sourceTree = ""; }; 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1095,7 +1097,9 @@ 33F6DCDC37D2E66543D4965D /* App_macOS.app */, 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */, A680BE9F68A255B0FB291AE6 /* App_watchOS.app */, + 84317819C92F78425870E483 /* BundleX.bundle */, 7D700FA699849D2F95216883 /* EntitledApp.app */, + 2385A62F6C6EE8D461EE19F2 /* ExternalTarget.framework */, 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */, 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */, 7D67F1C1BFBACE101DE7DB51 /* Framework.framework */, @@ -1323,6 +1327,20 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXLegacyTarget section */ + 700328EE1570207608D6ADB3 /* IncludedLegacy */ = { + isa = PBXLegacyTarget; + buildConfigurationList = 02B721AF7361EBCFA91410BF /* Build configuration list for PBXLegacyTarget "IncludedLegacy" */; + buildPhases = ( + 82E24A8257F299AC04F44A8F /* Sources */, + ); + buildToolPath = /usr/bin/true; + buildWorkingDirectory = AnotherProject; + dependencies = ( + ); + name = IncludedLegacy; + passBuildSettingsInEnvironment = 0; + productName = IncludedLegacy; + }; 72C923899DE05F1281872160 /* Legacy */ = { isa = PBXLegacyTarget; buildConfigurationList = BE0FF81B67730F081F45BC78 /* Build configuration list for PBXLegacyTarget "Legacy" */; @@ -1800,6 +1818,20 @@ productReference = 38DB679FF1CF4E379D1AB103 /* App_Clip.app */; productType = "com.apple.product-type.application.on-demand-install-capable"; }; + DA40AB367B606CCE2FDD398D /* BundleX */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2C39D94CF9C8B1CB79F04AC8 /* Build configuration list for PBXNativeTarget "BundleX" */; + buildPhases = ( + ); + buildRules = ( + ); + dependencies = ( + ); + name = BundleX; + productName = BundleX; + productReference = 84317819C92F78425870E483 /* BundleX.bundle */; + productType = "com.apple.product-type.bundle"; + }; DC2F16BAA6E13B44AB62F888 /* App_iOS_Tests */ = { isa = PBXNativeTarget; buildConfigurationList = F888428CB91ACDDAAE8C8F21 /* Build configuration list for PBXNativeTarget "App_iOS_Tests" */; @@ -1819,6 +1851,21 @@ productReference = CB77A637470A3CDA2BDDBE99 /* App_iOS_Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + E7454C10EA126A93537DD57E /* ExternalTarget */ = { + isa = PBXNativeTarget; + buildConfigurationList = D9EF39CA9A17477264F02057 /* Build configuration list for PBXNativeTarget "ExternalTarget" */; + buildPhases = ( + E3C67D44BD5D2820592267FD /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ExternalTarget; + productName = ExternalTarget; + productReference = 2385A62F6C6EE8D461EE19F2 /* ExternalTarget.framework */; + productType = "com.apple.product-type.framework"; + }; E7815F2F0D9CDECF9185AAF3 /* XPC Service */ = { isa = PBXNativeTarget; buildConfigurationList = D379D1BBEF24ED05EB6ADEB3 /* Build configuration list for PBXNativeTarget "XPC Service" */; @@ -1924,7 +1971,9 @@ 71E2BDAC4B8E8FC2BBF75C55 /* App_macOS_Tests */, 208179651927D1138D19B5AD /* App_watchOS */, 307AE3FA155FFD09B74AE351 /* App_watchOS Extension */, + DA40AB367B606CCE2FDD398D /* BundleX */, B61ED4688789B071275E2B7A /* EntitledApp */, + E7454C10EA126A93537DD57E /* ExternalTarget */, CE7D183D3752B5B35D2D8E6D /* Framework2_iOS */, FC26AF2506D3B2B40DE8A5F8 /* Framework2_macOS */, 8B9A14DC280CCE013CC86440 /* Framework2_tvOS */, @@ -1933,6 +1982,7 @@ 53A3B531E3947D8A8722745E /* Framework_macOS */, 536ACF18E4603B59207D43CE /* Framework_tvOS */, 71B5187E710718C1A205D4DC /* Framework_watchOS */, + 700328EE1570207608D6ADB3 /* IncludedLegacy */, 72C923899DE05F1281872160 /* Legacy */, 13E8C5AB873CEE21E18E552F /* StaticLibrary_ObjC_iOS */, 578C80E461E675508CED5DC3 /* StaticLibrary_ObjC_macOS */, @@ -2355,6 +2405,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 82E24A8257F299AC04F44A8F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 8A616537E6E1BEAB59E069C7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2468,6 +2525,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + E3C67D44BD5D2820592267FD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; EA88FE285DA490166635BE98 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2827,6 +2891,28 @@ }; name = "Staging Release"; }; + 045CB2D74D9A3532E128BDD2 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.ExternalTarget; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Release"; + }; 0579BA94EA238151DAFC2FFC /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3253,6 +3339,19 @@ }; name = "Production Debug"; }; + 221A50372FFB2F1202940FDC /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.IncludedLegacy; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; 234640A811EF6EB9CC9081CA /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3381,6 +3480,28 @@ }; name = "Production Release"; }; + 2C6AB16720ADFB2436337A8F /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.ExternalTarget; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Debug"; + }; 2E5159957368A9CF77A3C9FC /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3447,6 +3568,19 @@ }; name = "Test Debug"; }; + 31931061043C66589547105C /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.BundleX; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; 3236B7B20520584116A96C0D /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -4122,6 +4256,19 @@ }; name = "Test Release"; }; + 57CEA8537C6F3E5B425C5A8E /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.IncludedLegacy; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; 580039D71F71A98572051157 /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -4344,6 +4491,19 @@ }; name = "Production Release"; }; + 64EC1B53D612851D51D18FD2 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.BundleX; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; 65A21512F2B980615DF51D77 /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -4745,6 +4905,19 @@ }; name = "Staging Debug"; }; + 85E6B40848AC2A0B1F921553 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.BundleX; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; 862658ACA3BF7AE7FA22870C /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -4761,6 +4934,19 @@ }; name = "Production Debug"; }; + 8A380D322263800338FA5139 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.IncludedLegacy; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; 8C9F67C7AA56DBE79F0F2640 /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -4789,6 +4975,19 @@ }; name = "Test Debug"; }; + 917341F64B3A9B883FE942AD /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.BundleX; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; 921EC740167F616C38809275 /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -4856,6 +5055,28 @@ }; name = "Production Debug"; }; + 94ECCEFE29DB30C48B227A16 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.ExternalTarget; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Release"; + }; 9666BFAAA42CE2DC7E368E7D /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5321,6 +5542,41 @@ }; name = "Staging Release"; }; + AF3DD6DCF141F35D4129FFF5 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.ExternalTarget; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Release"; + }; + AF4B5E2FF8B6C883C40737C6 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.IncludedLegacy; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; B008685BA25BB8FD771F0AE3 /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5453,6 +5709,41 @@ }; name = "Staging Release"; }; + B5E1584A197C52FC47245FC8 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.ExternalTarget; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Debug"; + }; + B7EBD1A3A3A7E66100F5C845 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.BundleX; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; B928E061A126AC8D17D81D1E /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5782,6 +6073,28 @@ }; name = "Production Debug"; }; + C745E36B41A4ABD1E24A69AF /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.ExternalTarget; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Debug"; + }; C7EF8D96FA7893ADD61CF4C0 /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5917,6 +6230,19 @@ }; name = "Test Release"; }; + D4A6D5FE11C6652E092629BF /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.IncludedLegacy; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; D70B7AB6D219453ABF475EED /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6432,6 +6758,19 @@ }; name = "Production Release"; }; + EBA3332D0144AAAA57630865 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.BundleX; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; EBD2F70285E21FFAB1C23D01 /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6507,6 +6846,19 @@ }; name = "Production Release"; }; + EF6AB18F2D803CB530422BAE /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.IncludedLegacy; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; F3AC6A112F81D0958A316D82 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6779,6 +7131,19 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Production Debug"; }; + 02B721AF7361EBCFA91410BF /* Build configuration list for PBXLegacyTarget "IncludedLegacy" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 221A50372FFB2F1202940FDC /* Production Debug */, + AF4B5E2FF8B6C883C40737C6 /* Production Release */, + D4A6D5FE11C6652E092629BF /* Staging Debug */, + EF6AB18F2D803CB530422BAE /* Staging Release */, + 57CEA8537C6F3E5B425C5A8E /* Test Debug */, + 8A380D322263800338FA5139 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; 02E5A42C8065AF7CCB48FACE /* Build configuration list for PBXNativeTarget "Framework2_macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -6831,6 +7196,19 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Production Debug"; }; + 2C39D94CF9C8B1CB79F04AC8 /* Build configuration list for PBXNativeTarget "BundleX" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 64EC1B53D612851D51D18FD2 /* Production Debug */, + 917341F64B3A9B883FE942AD /* Production Release */, + 31931061043C66589547105C /* Staging Debug */, + EBA3332D0144AAAA57630865 /* Staging Release */, + 85E6B40848AC2A0B1F921553 /* Test Debug */, + B7EBD1A3A3A7E66100F5C845 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; 3F3C272D2EA61F6B88B80D44 /* Build configuration list for PBXNativeTarget "App_watchOS Extension" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -7156,6 +7534,19 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Production Debug"; }; + D9EF39CA9A17477264F02057 /* Build configuration list for PBXNativeTarget "ExternalTarget" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C745E36B41A4ABD1E24A69AF /* Production Debug */, + 045CB2D74D9A3532E128BDD2 /* Production Release */, + B5E1584A197C52FC47245FC8 /* Staging Debug */, + 94ECCEFE29DB30C48B227A16 /* Staging Release */, + 2C6AB16720ADFB2436337A8F /* Test Debug */, + AF3DD6DCF141F35D4129FFF5 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; ED1A174BA92C6E5172B519B7 /* Build configuration list for PBXNativeTarget "iMessageExtension" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index a1008ffad..9ab40ade4 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -1,5 +1,5 @@ name: Project -include: [environments.yml] +include: [environments.yml, AnotherProject/project.yml] options: bundleIdPrefix: com.project usesTabs: false From 6b7ab91440d58f4e6b103a71e641a01ba341caae Mon Sep 17 00:00:00 2001 From: Max Rabiciuc Date: Thu, 14 Jan 2021 14:51:38 -0800 Subject: [PATCH 049/284] Fix issue where frameworks with MACH_O_TYPE:staticlib were being embedded (#1003) --- CHANGELOG.md | 1 + Sources/ProjectSpec/Linkage.swift | 19 +++- Sources/ProjectSpec/XCProjExtensions.swift | 15 ++- Sources/XcodeGenKit/PBXProjGenerator.swift | 4 +- .../ProjectGeneratorTests.swift | 96 +++++++++++++++++++ 5 files changed, 121 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5c975121..79403fe48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Fixed error message output for `minimumXcodeGenVersion`. [#967](https://github.com/yonaskolb/XcodeGen/pull/967) @joshwalker - Remove force-unwrapping causing crash for `LegacyTarget`s [#982](https://github.com/yonaskolb/XcodeGen/pull/982) @jcolicchio - Fixed a race condition in an internal JSON decoder, which would occasionally fail with an error like `Parsing project spec failed: Error Domain=Unspecified error Code=0`. [#995](https://github.com/yonaskolb/XcodeGen/pull/995) @elliottwilliams +- Fixed issue where frameworks with `MACH_O_TYPE: staticlib` were being incorrectly embedded. [#1003](https://github.com/yonaskolb/XcodeGen/pull/1003) @mrabiciu #### Internal - Updated to Yams 4.0.0 [#984](https://github.com/yonaskolb/XcodeGen/pull/984) @swiftty diff --git a/Sources/ProjectSpec/Linkage.swift b/Sources/ProjectSpec/Linkage.swift index fec8023ee..cceda53ec 100644 --- a/Sources/ProjectSpec/Linkage.swift +++ b/Sources/ProjectSpec/Linkage.swift @@ -7,10 +7,10 @@ public enum Linkage { case none } -extension PBXProductType { +extension Target { public var defaultLinkage: Linkage { - switch self { + switch type { case .none, .appExtension, .application, @@ -36,8 +36,12 @@ extension PBXProductType { .xpcService: return .none case .framework, .xcFramework: - // TODO: This should check `MACH_O_TYPE` in case this is a "Static Framework" - return .dynamic + // Check the MACH_O_TYPE for "Static Framework" + if settings.buildSettings.machOType == "staticlib" { + return .static + } else { + return .dynamic + } case .dynamicLibrary: return .dynamic case .staticLibrary, .staticFramework: @@ -45,3 +49,10 @@ extension PBXProductType { } } } + +private extension BuildSettings { + + var machOType: String? { + self["MACH_O_TYPE"] as? String + } +} diff --git a/Sources/ProjectSpec/XCProjExtensions.swift b/Sources/ProjectSpec/XCProjExtensions.swift index 089bb4059..c6e194c2a 100644 --- a/Sources/ProjectSpec/XCProjExtensions.swift +++ b/Sources/ProjectSpec/XCProjExtensions.swift @@ -54,17 +54,16 @@ extension PBXProductType { } /// Function to determine when a dependendency should be embedded into the target - public func shouldEmbed(_ dependencyType: PBXProductType) -> Bool { - switch dependencyType { - case .staticLibrary, .staticFramework: - // Some dependendencies should not be embed, independently of the target type + public func shouldEmbed(_ dependencyTarget: Target) -> Bool { + switch dependencyTarget.defaultLinkage { + case .static: + // Static dependencies should never embed return false - - default: + case .dynamic, .none: if isApp { - // If target is an app, all dependencies should be embed (except for the ones mentioned above) + // If target is an app, all dependencies should be embed (unless they're static) return true - } else if isTest, [.framework, .bundle].contains(dependencyType) { + } else if isTest, [.framework, .bundle].contains(dependencyTarget.type) { // If target is test, some dependencies should be embed (depending on their type) return true } else { diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 52060d93b..5be56ccec 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -690,7 +690,7 @@ public class PBXProjGenerator { } func processTargetDependency(_ dependency: Dependency, dependencyTarget: Target, embedFileReference: PBXFileElement?) { - let dependencyLinkage = dependencyTarget.type.defaultLinkage + let dependencyLinkage = dependencyTarget.defaultLinkage let link = dependency.link ?? ((dependencyLinkage == .dynamic && target.type != .staticLibrary) || (dependencyLinkage == .static && target.type.isExecutable)) @@ -707,7 +707,7 @@ public class PBXProjGenerator { } } - let embed = dependency.embed ?? target.type.shouldEmbed(dependencyTarget.type) + let embed = dependency.embed ?? target.type.shouldEmbed(dependencyTarget) if embed { let embedFile = addObject( PBXBuildFile( diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 81c12d34a..0a189ea5a 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -786,6 +786,102 @@ class ProjectGeneratorTests: XCTestCase { try expect(copyFilesPhases.count) == expectedCopyFilesPhasesCount } } + + $0.it("ensures static frameworks are not embedded by default") { + + let app = Target( + name: "App", + type: .application, + platform: .iOS, + dependencies: [ + Dependency(type: .target, reference: "DynamicFramework"), + Dependency(type: .target, reference: "DynamicFrameworkNotEmbedded", embed: false), + Dependency(type: .target, reference: "StaticFramework"), + Dependency(type: .target, reference: "StaticFrameworkExplicitlyEmbedded", embed: true), + Dependency(type: .target, reference: "StaticFramework2"), + Dependency(type: .target, reference: "StaticFramework2ExplicitlyEmbedded", embed: true), + Dependency(type: .target, reference: "StaticLibrary"), + ] + ) + + let targets = [ + app, + Target( + name: "DynamicFramework", + type: .framework, + platform: .iOS + ), + Target( + name: "DynamicFrameworkNotEmbedded", + type: .framework, + platform: .iOS + ), + Target( + name: "StaticFramework", + type: .framework, + platform: .iOS, + settings: Settings(buildSettings: ["MACH_O_TYPE": "staticlib"]) + ), + Target( + name: "StaticFrameworkExplicitlyEmbedded", + type: .framework, + platform: .iOS, + settings: Settings(buildSettings: ["MACH_O_TYPE": "staticlib"]) + ), + Target( + name: "StaticFramework2", + type: .staticFramework, + platform: .iOS + ), + Target( + name: "StaticFramework2ExplicitlyEmbedded", + type: .staticFramework, + platform: .iOS + ), + Target( + name: "StaticLibrary", + type: .staticLibrary, + platform: .iOS + ), + ] + + let expectedLinkedFiles = Set([ + "DynamicFramework.framework", + "DynamicFrameworkNotEmbedded.framework", + "StaticFramework.framework", + "StaticFrameworkExplicitlyEmbedded.framework", + "StaticFramework2.framework", + "StaticFramework2ExplicitlyEmbedded.framework", + "libStaticLibrary.a", + ]) + + let expectedEmbeddedFrameworks = Set([ + "DynamicFramework.framework", + "StaticFrameworkExplicitlyEmbedded.framework", + "StaticFramework2ExplicitlyEmbedded.framework" + ]) + + let project = Project( + name: "test", + targets: targets + ) + let pbxProject = try project.generatePbxProj() + + let appTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) + let buildPhases = appTarget.buildPhases + let frameworkPhases = pbxProject.frameworksBuildPhases.filter { buildPhases.contains($0) } + let copyFilesPhases = pbxProject.copyFilesBuildPhases.filter { buildPhases.contains($0) } + let embedFrameworkPhase = copyFilesPhases.first { $0.dstSubfolderSpec == .frameworks } + + // Ensure all targets are linked + let linkFrameworks = (frameworkPhases[0].files ?? []).compactMap { $0.file?.nameOrPath } + let linkPackages = (frameworkPhases[0].files ?? []).compactMap { $0.product?.productName } + try expect(Set(linkFrameworks + linkPackages)) == expectedLinkedFiles + + // Ensure only dynamic frameworks are embedded (unless there's an explicit override) + let embeddedFrameworks = Set((embedFrameworkPhase?.files ?? []).compactMap { $0.file?.nameOrPath }) + try expect(embeddedFrameworks) == expectedEmbeddedFrameworks + } $0.it("copies files only on install in the Embed Frameworks step") { let app = Target( From 0ba3cf588862cc48dc9f221301c5ba6fc0c639c9 Mon Sep 17 00:00:00 2001 From: Benjamin Kindle Date: Wed, 20 Jan 2021 20:17:40 -0500 Subject: [PATCH 050/284] Readme improvements (#1011) I'm pretty sure this wording better communicates what you were trying to say --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 76877d7a5..61bfd9f9b 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ git clone https://github.com/yonaskolb/XcodeGen.git cd XcodeGen swift package generate-xcodeproj ``` -This use Swift Project Manager to create an `xcodeproj` file that you can open, edit and run in Xcode, which makes editing any code easier. +This uses Swift Package Manager to create an `xcodeproj` file that you can open, edit and run in Xcode, which makes editing any code easier. If you want to pass any required arguments when running in Xcode, you can edit the scheme to include launch arguments. From 50aedc451192cfed020ece05c837da01320cbe14 Mon Sep 17 00:00:00 2001 From: Joseph Colicchio Date: Sun, 14 Feb 2021 16:58:16 -0800 Subject: [PATCH 051/284] Feature/Store Kit Configuration (#964) * Preemptively fix compilation for latest XcodeProj * Add StoreKitConfiguration to scheme and generator * Add scheme generator test * Fix and add tests * Support StoreKitConfiguration in TargetScheme * Set default type of `storekit` to `.none` * Upgrade XcodeProj to 7.15.0 * Create struct for StoreKitConfiguration * Update tests * Add storekit configuration to test project * Update changelog * Update project spec * Fix xcodeprojs * Fix projects * Capitalize String * Update CHANGELOG.md Co-authored-by: Gemma Barlow * Refactor StoreKitConfiguration init from json * Change `forWorkspace` to `pathPrefix` and add tests * Replace StoreKitConfiguration struct with string + option * Fix tests * Update project spec * Fixup changelog * Add `See Options` to `storeKitConfiguration` in project spec Co-authored-by: Gemma Barlow --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 3 + Package.resolved | 8 +-- Sources/ProjectSpec/FileType.swift | 1 + Sources/ProjectSpec/Scheme.swift | 8 +++ Sources/ProjectSpec/SpecOptions.swift | 10 +++- Sources/ProjectSpec/TargetScheme.swift | 8 +++ Sources/XcodeGenKit/SchemeGenerator.swift | 10 +++- .../App_iOS/Configuration.storekit | 29 ++++++++++ .../Project.xcodeproj/project.pbxproj | 2 + .../xcschemes/App_Scheme.xcscheme | 3 + .../xcschemes/App_iOS Production.xcscheme | 3 + .../xcschemes/App_iOS Staging.xcscheme | 3 + .../xcschemes/App_iOS Test.xcscheme | 3 + Tests/Fixtures/TestProject/project.yml | 2 + Tests/PerformanceTests/TestProject.swift | 1 + Tests/ProjectSpecTests/ProjectSpecTests.swift | 4 +- Tests/ProjectSpecTests/SpecLoadingTests.swift | 56 ++++++++++++++++++- .../SchemeGeneratorTests.swift | 29 +++++++--- 19 files changed, 165 insertions(+), 19 deletions(-) create mode 100644 Tests/Fixtures/TestProject/App_iOS/Configuration.storekit diff --git a/CHANGELOG.md b/CHANGELOG.md index 79403fe48..2a5b3eed2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ #### Added - Support for building and running on Linux platforms. Tested for compatibility with Swift 5.3+ and Ubuntu 18.04. [#988](https://github.com/yonaskolb/XcodeGen/pull/988) @elliottwilliams - Add `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. [#961](https://github.com/yonaskolb/XcodeGen/pull/961) @liamnichols +- Add `storeKitConfiguration` to allow specifying StoreKit Configuration in Scheme and TargetScheme, supporting either xcodeproj or xcworkspace via `schemePathPrefix` option. [#964](https://github.com/yonaskolb/XcodeGen/pull/964) @jcolicchio - More detailed error message with method arguments. [#990](https://github.com/yonaskolb/XcodeGen/pull/990) @bannzai - Added `basedOnDependencyAnalysis` to Project Spec Build Script to be able to choose not to skip the script. [#992](https://github.com/yonaskolb/XcodeGen/pull/992) @myihsan - Add `BuildRule.runOncePerArchitecture` to allow running build rules once per architecture. [#950](https://github.com/yonaskolb/XcodeGen/pull/950) @sascha diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 4cf4f2a16..58ade4d97 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -128,6 +128,7 @@ Note that target names can also be changed by adding a `name` property to a targ - [ ] **preGenCommand**: **String** - A bash command to run before the project has been generated. If the project isn't generated due to no changes when using the cache then this won't run. This is useful for running things like generating resources files before the project is regenerated. - [ ] **postGenCommand**: **String** - A bash command to run after the project has been generated. If the project isn't generated due to no changes when using the cache then this won't run. This is useful for running things like `pod install` only if the project is actually regenerated. - [ ] **useBaseInternationalization**: **Bool** If this is `false` and your project does not include resources located in a **Base.lproj** directory then `Base` will not be included in the projects 'known regions'. The default value is `true`. +- [ ] **schemePathPrefix**: **String** - A path prefix for relative paths in schemes, such as StoreKitConfiguration. The default is `"../../"`, which is suitable for non-workspace projects. For use in workspaces, use `"../"`. ```yaml options: @@ -639,6 +640,7 @@ 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 +- [ ] **storeKitConfiguration**: **String** - specify storekit configuration to use during run. See [Options](#options). For example, the spec below would create 3 schemes called: @@ -775,6 +777,7 @@ The different actions share some properties: - [ ] **simulateLocation**: **[Simulate Location](#simulate-location)** - `run` action can define a simulated location - [ ] **askForAppToLaunch**: **Bool** - `run` action can define the executable set to ask to launch. This defaults to false. - [ ] **launchAutomaticallySubstyle**: **String** - `run` action can define the launch automatically substyle ('2' for extensions). +- [ ] **storeKitConfiguration**: **String** - `run` action can specify a storekit configuration. See [Options](#options). ### Execution Action diff --git a/Package.resolved b/Package.resolved index e42136a42..26a8147f3 100644 --- a/Package.resolved +++ b/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/SwiftDocOrg/GraphViz.git", "state": { "branch": null, - "revision": "c4746cb3ff6f5e7c5d5540c40b98555521c3ee43", - "version": "0.1.3" + "revision": "70bebcf4597b9ce33e19816d6bbd4ba9b7bdf038", + "version": "0.2.0" } }, { @@ -87,8 +87,8 @@ "repositoryURL": "https://github.com/jpsim/Yams.git", "state": { "branch": null, - "revision": "88caa2e6fffdbef2e91c2022d038576062042907", - "version": "4.0.0" + "revision": "138cf1b701cf825233b92ceac919152d5aba8a3f", + "version": "4.0.1" } } ] diff --git a/Sources/ProjectSpec/FileType.swift b/Sources/ProjectSpec/FileType.swift index bc535a1d2..e26200027 100644 --- a/Sources/ProjectSpec/FileType.swift +++ b/Sources/ProjectSpec/FileType.swift @@ -110,5 +110,6 @@ extension FileType { "xcfilelist": FileType(buildPhase: BuildPhaseSpec.none), "apns": FileType(buildPhase: BuildPhaseSpec.none), "pch": FileType(buildPhase: BuildPhaseSpec.none), + "storekit": FileType(buildPhase: BuildPhaseSpec.none), ] } diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index d872129d0..d6481a3ab 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -1,5 +1,6 @@ import Foundation import JSONUtilities +import PathKit import XcodeProj public typealias BuildType = XCScheme.BuildAction.Entry.BuildFor @@ -113,6 +114,7 @@ public struct Scheme: Equatable { public var debugEnabled: Bool public var simulateLocation: SimulateLocation? public var executable: String? + public var storeKitConfiguration: String? public var customLLDBInit: String? public init( @@ -130,6 +132,7 @@ public struct Scheme: Equatable { launchAutomaticallySubstyle: String? = nil, debugEnabled: Bool = debugEnabledDefault, simulateLocation: SimulateLocation? = nil, + storeKitConfiguration: String? = nil, customLLDBInit: String? = nil ) { self.config = config @@ -145,6 +148,7 @@ public struct Scheme: Equatable { self.launchAutomaticallySubstyle = launchAutomaticallySubstyle self.debugEnabled = debugEnabled self.simulateLocation = simulateLocation + self.storeKitConfiguration = storeKitConfiguration self.customLLDBInit = customLLDBInit } } @@ -368,6 +372,7 @@ extension Scheme.Run: JSONObjectConvertible { region = jsonDictionary.json(atKeyPath: "region") debugEnabled = jsonDictionary.json(atKeyPath: "debugEnabled") ?? Scheme.Run.debugEnabledDefault simulateLocation = jsonDictionary.json(atKeyPath: "simulateLocation") + storeKitConfiguration = jsonDictionary.json(atKeyPath: "storeKitConfiguration") executable = jsonDictionary.json(atKeyPath: "executable") // launchAutomaticallySubstyle is defined as a String in XcodeProj but its value is often @@ -415,6 +420,9 @@ extension Scheme.Run: JSONEncodable { if let simulateLocation = simulateLocation { dict["simulateLocation"] = simulateLocation.toJSONValue() } + if let storeKitConfiguration = storeKitConfiguration { + dict["storeKitConfiguration"] = storeKitConfiguration + } if let customLLDBInit = customLLDBInit { dict["customLLDBInit"] = customLLDBInit } diff --git a/Sources/ProjectSpec/SpecOptions.swift b/Sources/ProjectSpec/SpecOptions.swift index f44fb2aab..c1f0645d4 100644 --- a/Sources/ProjectSpec/SpecOptions.swift +++ b/Sources/ProjectSpec/SpecOptions.swift @@ -10,6 +10,7 @@ public struct SpecOptions: Equatable { public static let generateEmptyDirectoriesDefault = false public static let findCarthageFrameworksDefault = false public static let useBaseInternationalizationDefault = true + public static let schemePathPrefixDefault = "../../" public var minimumXcodeGenVersion: Version? public var carthageBuildPath: String? @@ -35,6 +36,7 @@ public struct SpecOptions: Equatable { public var preGenCommand: String? public var postGenCommand: String? public var useBaseInternationalization: Bool + public var schemePathPrefix: String public enum ValidationType: String { case missingConfigs @@ -96,7 +98,8 @@ public struct SpecOptions: Equatable { localPackagesGroup: String? = nil, preGenCommand: String? = nil, postGenCommand: String? = nil, - useBaseInternationalization: Bool = useBaseInternationalizationDefault + useBaseInternationalization: Bool = useBaseInternationalizationDefault, + schemePathPrefix: String = schemePathPrefixDefault ) { self.minimumXcodeGenVersion = minimumXcodeGenVersion self.carthageBuildPath = carthageBuildPath @@ -122,6 +125,7 @@ public struct SpecOptions: Equatable { self.preGenCommand = preGenCommand self.postGenCommand = postGenCommand self.useBaseInternationalization = useBaseInternationalization + self.schemePathPrefix = schemePathPrefix } } @@ -154,6 +158,7 @@ extension SpecOptions: JSONObjectConvertible { preGenCommand = jsonDictionary.json(atKeyPath: "preGenCommand") postGenCommand = jsonDictionary.json(atKeyPath: "postGenCommand") useBaseInternationalization = jsonDictionary.json(atKeyPath: "useBaseInternationalization") ?? SpecOptions.useBaseInternationalizationDefault + schemePathPrefix = jsonDictionary.json(atKeyPath: "schemePathPrefix") ?? SpecOptions.schemePathPrefixDefault if jsonDictionary["fileTypes"] != nil { fileTypes = try jsonDictionary.json(atKeyPath: "fileTypes") } else { @@ -200,6 +205,9 @@ extension SpecOptions: JSONEncodable { if useBaseInternationalization != SpecOptions.useBaseInternationalizationDefault { dict["useBaseInternationalization"] = useBaseInternationalization } + if schemePathPrefix != SpecOptions.schemePathPrefixDefault { + dict["schemePathPrefix"] = schemePathPrefix + } return dict } diff --git a/Sources/ProjectSpec/TargetScheme.swift b/Sources/ProjectSpec/TargetScheme.swift index ce54f6172..1beedb6a9 100644 --- a/Sources/ProjectSpec/TargetScheme.swift +++ b/Sources/ProjectSpec/TargetScheme.swift @@ -11,6 +11,7 @@ public struct TargetScheme: Equatable { public var testTargets: [Scheme.Test.TestTarget] public var configVariants: [String] public var gatherCoverageData: Bool + public var storeKitConfiguration: String? public var language: String? public var region: String? public var disableMainThreadChecker: Bool @@ -25,6 +26,7 @@ public struct TargetScheme: Equatable { testTargets: [Scheme.Test.TestTarget] = [], configVariants: [String] = [], gatherCoverageData: Bool = gatherCoverageDataDefault, + storeKitConfiguration: String? = nil, language: String? = nil, region: String? = nil, disableMainThreadChecker: Bool = disableMainThreadCheckerDefault, @@ -38,6 +40,7 @@ public struct TargetScheme: Equatable { self.testTargets = testTargets self.configVariants = configVariants self.gatherCoverageData = gatherCoverageData + self.storeKitConfiguration = storeKitConfiguration self.language = language self.region = region self.disableMainThreadChecker = disableMainThreadChecker @@ -68,6 +71,7 @@ extension TargetScheme: JSONObjectConvertible { } configVariants = jsonDictionary.json(atKeyPath: "configVariants") ?? [] gatherCoverageData = jsonDictionary.json(atKeyPath: "gatherCoverageData") ?? TargetScheme.gatherCoverageDataDefault + storeKitConfiguration = jsonDictionary.json(atKeyPath: "storeKitConfiguration") language = jsonDictionary.json(atKeyPath: "language") region = jsonDictionary.json(atKeyPath: "region") disableMainThreadChecker = jsonDictionary.json(atKeyPath: "disableMainThreadChecker") ?? TargetScheme.disableMainThreadCheckerDefault @@ -95,6 +99,10 @@ extension TargetScheme: JSONEncodable { dict["gatherCoverageData"] = gatherCoverageData } + if let storeKitConfiguration = storeKitConfiguration { + dict["storeKitConfiguration"] = storeKitConfiguration + } + if disableMainThreadChecker != TargetScheme.disableMainThreadCheckerDefault { dict["disableMainThreadChecker"] = disableMainThreadChecker } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 161befbc9..2729f88cd 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -235,6 +235,12 @@ public class SchemeGenerator { locationScenarioReference = XCScheme.LocationScenarioReference(identifier: identifier, referenceType: referenceType.rawValue) } + var storeKitConfigurationFileReference: XCScheme.StoreKitConfigurationFileReference? + if let storeKitConfiguration = scheme.run?.storeKitConfiguration { + let storeKitConfigurationPath = Path(components: [project.options.schemePathPrefix, storeKitConfiguration]).simplifyingParentDirectoryReferences() + storeKitConfigurationFileReference = XCScheme.StoreKitConfigurationFileReference(identifier: storeKitConfigurationPath.string) + } + let launchAction = XCScheme.LaunchAction( runnable: shouldExecuteOnLaunch ? runnables.launch : nil, buildConfiguration: scheme.run?.config ?? defaultDebugConfig.name, @@ -253,6 +259,7 @@ public class SchemeGenerator { language: scheme.run?.language, region: scheme.run?.region, launchAutomaticallySubstyle: scheme.run?.launchAutomaticallySubstyle ?? launchAutomaticallySubstyle(for: schemeTarget), + storeKitConfigurationFileReference: storeKitConfigurationFileReference, customLLDBInitFile: scheme.run?.customLLDBInit ) @@ -362,7 +369,8 @@ extension Scheme { disableMainThreadChecker: targetScheme.disableMainThreadChecker, stopOnEveryMainThreadCheckerIssue: targetScheme.stopOnEveryMainThreadCheckerIssue, language: targetScheme.language, - region: targetScheme.region + region: targetScheme.region, + storeKitConfiguration: targetScheme.storeKitConfiguration ), test: .init( config: debugConfig, diff --git a/Tests/Fixtures/TestProject/App_iOS/Configuration.storekit b/Tests/Fixtures/TestProject/App_iOS/Configuration.storekit new file mode 100644 index 000000000..aa066b3fe --- /dev/null +++ b/Tests/Fixtures/TestProject/App_iOS/Configuration.storekit @@ -0,0 +1,29 @@ +{ + "products" : [ + { + "displayPrice" : "0.00", + "familyShareable" : false, + "internalID" : "6D7919A3", + "localizations" : [ + { + "description" : "", + "displayName" : "", + "locale" : "en_US" + } + ], + "productID" : "com.xcodegen.0", + "referenceName" : null, + "type" : "Consumable" + } + ], + "settings" : { + + }, + "subscriptionGroups" : [ + + ], + "version" : { + "major" : 1, + "minor" : 0 + } +} diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 8ba9c0601..964356a92 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -656,6 +656,7 @@ 8D88C6BF7355702B74396791 /* TestProjectUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectUITests.swift; sourceTree = ""; }; 93C033648A37D95027845BD3 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; 9A87A926D563773658FB87FE /* iMessageApp.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = iMessageApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 9D4AB3FCF725428EFB56F542 /* Configuration.storekit */ = {isa = PBXFileReference; path = Configuration.storekit; sourceTree = ""; }; 9F27382DD66E26C059E26EFE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; A0DC40025AB59B688E758829 /* Framework2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A220DE4EB3CB2E598D034D9D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; @@ -854,6 +855,7 @@ F0D48A913C087D049C8EDDD7 /* App.entitlements */, 7F1A2F579A6F79C62DDA0571 /* AppDelegate.swift */, 3797E591F302ECC0AA2FC607 /* Assets.xcassets */, + 9D4AB3FCF725428EFB56F542 /* Configuration.storekit */, C9DDE1B06BCC1CDE0ECF1589 /* Info.plist */, AAA49985DFFE797EE8416887 /* inputList.xcfilelist */, CE1F06D99242F4223D081F0D /* LaunchScreen.storyboard */, diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme index df89ce7cd..d9809d0e1 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme @@ -93,6 +93,9 @@ + +
+ +
+ +
+ + Date: Mon, 15 Feb 2021 02:43:41 +0100 Subject: [PATCH 052/284] Add Discovered Dependency File (#1012) * Upgrade XCodeProj to 7.14.0 * Bump to XcodeProj to fork * Add script discoveredDependencyFile * Align cfbundle test * Add changelog mock * Update Documentation * Update SPM manifest * Change property name * Verify defult dependency file to nil * Add JSON encodable test * Add PR number Co-authored-by: Fernanda Geraissate --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 2 ++ Sources/ProjectSpec/BuildScript.swift | 10 +++++++++- Sources/XcodeGenKit/PBXProjGenerator.swift | 3 ++- .../TestProject/Project.xcodeproj/project.pbxproj | 3 ++- Tests/Fixtures/TestProject/project.yml | 2 ++ Tests/ProjectSpecTests/ProjectSpecTests.swift | 13 ++++++++++++- .../XcodeGenKitTests/ProjectGeneratorTests.swift | 15 ++++++++++++--- 8 files changed, 42 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a5b3eed2..d8cdfcc3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - More detailed error message with method arguments. [#990](https://github.com/yonaskolb/XcodeGen/pull/990) @bannzai - Added `basedOnDependencyAnalysis` to Project Spec Build Script to be able to choose not to skip the script. [#992](https://github.com/yonaskolb/XcodeGen/pull/992) @myihsan - Add `BuildRule.runOncePerArchitecture` to allow running build rules once per architecture. [#950](https://github.com/yonaskolb/XcodeGen/pull/950) @sascha +- Adds discovered dependency file for a build script [#1012](https://github.com/yonaskolb/XcodeGen/pull/1012) @polac24 @fggeraissate #### Changed - **Breaking**: Info.plists with custom prefixes are no longer added to the Copy Bundle Resources build phase [#945](https://github.com/yonaskolb/XcodeGen/pull/945) @anivaros diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 58ade4d97..573c0b8d9 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -565,6 +565,7 @@ Each script can contain: - [ ] **showEnvVars**: **Bool** - whether the environment variables accessible to the script show be printed to the build log. Defaults to yes - [ ] **runOnlyWhenInstalling**: **Bool** - whether the script is only run when installing (`runOnlyForDeploymentPostprocessing`). Defaults to no - [ ] **basedOnDependencyAnalysis**: **Bool** - whether to skip the script if inputs, context, or outputs haven't changed. Defaults to yes +- [ ] **discoveredDependencyFile**: **String** - discovered dependency .d file. Defaults to none Either a **path** or **script** must be defined, the rest are optional. @@ -586,6 +587,7 @@ targets: - $(DERIVED_FILE_DIR)/file2 outputFileLists: - $(SRCROOT)/outputFiles.xcfilelist + discoveredDependencyFile: $(DERIVED_FILE_DIR)/target.d postCompileScripts: - script: swiftlint name: Swiftlint diff --git a/Sources/ProjectSpec/BuildScript.swift b/Sources/ProjectSpec/BuildScript.swift index 4b7fdc8de..f22211bc4 100644 --- a/Sources/ProjectSpec/BuildScript.swift +++ b/Sources/ProjectSpec/BuildScript.swift @@ -16,6 +16,7 @@ public struct BuildScript: Equatable { public var runOnlyWhenInstalling: Bool public let showEnvVars: Bool public let basedOnDependencyAnalysis: Bool + public let discoveredDependencyFile: String? public enum ScriptType: Equatable { case path(String) @@ -32,7 +33,8 @@ public struct BuildScript: Equatable { shell: String? = nil, runOnlyWhenInstalling: Bool = runOnlyWhenInstallingDefault, showEnvVars: Bool = showEnvVarsDefault, - basedOnDependencyAnalysis: Bool = basedOnDependencyAnalysisDefault + basedOnDependencyAnalysis: Bool = basedOnDependencyAnalysisDefault, + discoveredDependencyFile: String? = nil ) { self.script = script self.name = name @@ -44,6 +46,7 @@ public struct BuildScript: Equatable { self.runOnlyWhenInstalling = runOnlyWhenInstalling self.showEnvVars = showEnvVars self.basedOnDependencyAnalysis = basedOnDependencyAnalysis + self.discoveredDependencyFile = discoveredDependencyFile } } @@ -66,6 +69,7 @@ extension BuildScript: JSONObjectConvertible { runOnlyWhenInstalling = jsonDictionary.json(atKeyPath: "runOnlyWhenInstalling") ?? BuildScript.runOnlyWhenInstallingDefault showEnvVars = jsonDictionary.json(atKeyPath: "showEnvVars") ?? BuildScript.showEnvVarsDefault basedOnDependencyAnalysis = jsonDictionary.json(atKeyPath: "basedOnDependencyAnalysis") ?? BuildScript.basedOnDependencyAnalysisDefault + discoveredDependencyFile = jsonDictionary.json(atKeyPath: "discoveredDependencyFile") } } @@ -96,6 +100,10 @@ extension BuildScript: JSONEncodable { dict["script"] = string } + if let discoveredDependencyFile = discoveredDependencyFile { + dict["discoveredDependencyFile"] = discoveredDependencyFile + } + return dict } } diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 5be56ccec..933d3e463 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -479,7 +479,8 @@ public class PBXProjGenerator { shellScript: shellScript, runOnlyForDeploymentPostprocessing: buildScript.runOnlyWhenInstalling, showEnvVarsInLog: buildScript.showEnvVars, - alwaysOutOfDate: !buildScript.basedOnDependencyAnalysis + alwaysOutOfDate: !buildScript.basedOnDependencyAnalysis, + dependencyFile: buildScript.discoveredDependencyFile ) return addObject(shellScriptPhase) } diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 964356a92..594fdf965 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -2239,6 +2239,7 @@ CBE633966E8F3819F15270A3 /* MyScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; + dependencyFile = "$(DERIVED_FILE_DIR)/target.d"; files = ( ); inputFileListPaths = ( @@ -2254,7 +2255,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "echo \"You ran a script!\"\n"; + shellScript = "echo \"You ran a script!\"\ntouch \"${DERIVED_FILE_DIR}/target.d\"\n"; }; CF3AABFD4A48983B322677DA /* MyScript */ = { isa = PBXShellScriptBuildPhase; diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 688657f1c..841d1bc86 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -149,10 +149,12 @@ targets: - name: MyScript script: | echo "You ran a script!" + touch "${DERIVED_FILE_DIR}/target.d" inputFileLists: - App_iOS/inputList.xcfilelist outputFileLists: - App_iOS/outputList.xcfilelist + discoveredDependencyFile: $(DERIVED_FILE_DIR)/target.d EntitledApp: type: application diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index c06b75465..7284a799d 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -409,7 +409,18 @@ class ProjectSpecTests: XCTestCase { shell: "/bin/bash", runOnlyWhenInstalling: true, showEnvVars: true, - basedOnDependencyAnalysis: false)], + basedOnDependencyAnalysis: false), + BuildScript(script: .path("cmd.sh"), + name: "Dependency script", + inputFiles: ["foo"], + outputFiles: ["bar"], + inputFileLists: ["foo.xcfilelist"], + outputFileLists: ["bar.xcfilelist"], + shell: "/bin/bash", + runOnlyWhenInstalling: true, + showEnvVars: true, + basedOnDependencyAnalysis: true, + discoveredDependencyFile: "dep.d")], buildRules: [BuildRule(fileType: .pattern("*.xcassets"), action: .script("pre_process_swift.py"), name: "My Build Rule", diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 0a189ea5a..7324374cb 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -1145,20 +1145,29 @@ class ProjectGeneratorTests: XCTestCase { var scriptSpec = project scriptSpec.targets[0].preBuildScripts = [BuildScript(script: .script("script1"))] scriptSpec.targets[0].postCompileScripts = [BuildScript(script: .script("script2"))] - scriptSpec.targets[0].postBuildScripts = [BuildScript(script: .script("script3"))] + scriptSpec.targets[0].postBuildScripts = [ + BuildScript(script: .script("script3")), + BuildScript(script: .script("script4"), discoveredDependencyFile: "$(DERIVED_FILE_DIR)/target.d") + ] let pbxProject = try scriptSpec.generatePbxProj() - let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.buildPhases.count >= 3 })) + let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.buildPhases.count >= 4 })) let buildPhases = nativeTarget.buildPhases let scripts = pbxProject.shellScriptBuildPhases - try expect(scripts.count) == 3 + try expect(scripts.count) == 4 let script1 = scripts.first { $0.shellScript == "script1" }! let script2 = scripts.first { $0.shellScript == "script2" }! let script3 = scripts.first { $0.shellScript == "script3" }! + let script4 = scripts.first { $0.shellScript == "script4" }! try expect(buildPhases.contains(script1)) == true try expect(buildPhases.contains(script2)) == true try expect(buildPhases.contains(script3)) == true + try expect(buildPhases.contains(script4)) == true + try expect(script1.dependencyFile).beNil() + try expect(script2.dependencyFile).beNil() + try expect(script3.dependencyFile).beNil() + try expect(script4.dependencyFile) == "$(DERIVED_FILE_DIR)/target.d" } $0.it("generates targets with cylical dependencies") { From ae186edb6829b4558330184a93711680afbef6d8 Mon Sep 17 00:00:00 2001 From: Joseph Colicchio Date: Mon, 15 Feb 2021 14:35:47 -0800 Subject: [PATCH 053/284] Bugfix/SimulateLocation Fix (#973) * Preemptively fix compilation for latest XcodeProj * Add StoreKitConfiguration to scheme and generator * Add scheme generator test * Fix and add tests * Support StoreKitConfiguration in TargetScheme * Set default type of `storekit` to `.none` * Upgrade XcodeProj to 7.15.0 * Create struct for StoreKitConfiguration * Update tests * Add storekit configuration to test project * Update changelog * Update project spec * Fix xcodeprojs * Fix projects * Capitalize String * Update CHANGELOG.md Co-authored-by: Gemma Barlow * Refactor StoreKitConfiguration init from json * Change `forWorkspace` to `pathPrefix` and add tests * Replace StoreKitConfiguration struct with string + option * Fix tests * Update project spec * Fixup changelog * Add `See Options` to `storeKitConfiguration` in project spec * Make `simulateLocation` respect `schemePathPrefix` * Update docs Co-authored-by: Gemma Barlow --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 2 ++ Sources/XcodeGenKit/SchemeGenerator.swift | 2 +- Tests/XcodeGenKitTests/SchemeGeneratorTests.swift | 8 ++++++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8cdfcc3f..6350eb875 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ #### Changed - **Breaking**: Info.plists with custom prefixes are no longer added to the Copy Bundle Resources build phase [#945](https://github.com/yonaskolb/XcodeGen/pull/945) @anivaros - **Breaking**: `workingDirectory` of included legacy targets is now made relative to including project [#981](https://github.com/yonaskolb/XcodeGen/pull/981) @jcolicchio +- **Breaking**: Make `simulateLocation` respect `schemePathPrefix` option. [#973](https://github.com/yonaskolb/XcodeGen/pull/973) @jcolicchio #### Fixed - Fixed error message output for `minimumXcodeGenVersion`. [#967](https://github.com/yonaskolb/XcodeGen/pull/967) @joshwalker diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 573c0b8d9..ec71f8177 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -840,6 +840,8 @@ targets: - location.gpx ``` +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). + ### Environment Variable diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 2729f88cd..c4c36ee7a 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -228,7 +228,7 @@ public class SchemeGenerator { var locationScenarioReference: XCScheme.LocationScenarioReference? if let simulateLocation = scheme.run?.simulateLocation, var identifier = simulateLocation.defaultLocation, let referenceType = simulateLocation.referenceType { if referenceType == .gpx { - var path = Path("../\(identifier)") + var path = Path(components: [project.options.schemePathPrefix, identifier]) path = path.simplifyingParentDirectoryReferences() identifier = path.string } diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index 2386338fc..a8abb85ab 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -164,7 +164,7 @@ class SchemeGeneratorTests: XCTestCase { let scheme = Scheme( name: "EnvironmentVariablesScheme", build: Scheme.Build(targets: [buildTarget]), - run: Scheme.Run(config: "Debug", environmentVariables: runVariables, storeKitConfiguration: "Configuration.storekit"), + run: Scheme.Run(config: "Debug", environmentVariables: runVariables, simulateLocation: .init(allow: true, defaultLocation: "File.gpx"), storeKitConfiguration: "Configuration.storekit"), test: Scheme.Test(config: "Debug"), profile: Scheme.Profile(config: "Debug") ) @@ -184,6 +184,8 @@ class SchemeGeneratorTests: XCTestCase { ).beTrue() try expect(xcscheme.launchAction?.environmentVariables) == runVariables try expect(xcscheme.launchAction?.storeKitConfigurationFileReference?.identifier) == "../Configuration.storekit" + try expect(xcscheme.launchAction?.locationScenarioReference?.referenceType) == Scheme.SimulateLocation.ReferenceType.gpx.rawValue + try expect(xcscheme.launchAction?.locationScenarioReference?.identifier) == "../File.gpx" try expect(xcscheme.testAction?.environmentVariables).to.beNil() try expect(xcscheme.profileAction?.environmentVariables).to.beNil() } @@ -238,7 +240,7 @@ class SchemeGeneratorTests: XCTestCase { let scheme = Scheme( name: "TestScheme", build: Scheme.Build(targets: [buildTarget]), - run: Scheme.Run(config: "Debug", debugEnabled: false, storeKitConfiguration: "Configuration.storekit") + run: Scheme.Run(config: "Debug", debugEnabled: false, simulateLocation: .init(allow: true, defaultLocation: "File.gpx"), storeKitConfiguration: "Configuration.storekit") ) let project = Project( name: "test", @@ -252,6 +254,8 @@ class SchemeGeneratorTests: XCTestCase { try expect(xcscheme.launchAction?.selectedDebuggerIdentifier) == "" try expect(xcscheme.launchAction?.selectedLauncherIdentifier) == "Xcode.IDEFoundation.Launcher.PosixSpawn" try expect(xcscheme.launchAction?.storeKitConfigurationFileReference?.identifier) == "../../Configuration.storekit" + try expect(xcscheme.launchAction?.locationScenarioReference?.referenceType) == Scheme.SimulateLocation.ReferenceType.gpx.rawValue + try expect(xcscheme.launchAction?.locationScenarioReference?.identifier) == "../../File.gpx" } $0.it("generate scheme without debugger - test") { From 17b40a328889b3abca05dbee98598c1fec042116 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Mon, 22 Feb 2021 21:09:59 +1100 Subject: [PATCH 054/284] Update to 2.19.0 --- CHANGELOG.md | 16 ++++++++++------ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6350eb875..e45896c47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,16 @@ ## Next Version +## 2.19.0 + #### Added -- Support for building and running on Linux platforms. Tested for compatibility with Swift 5.3+ and Ubuntu 18.04. [#988](https://github.com/yonaskolb/XcodeGen/pull/988) @elliottwilliams -- Add `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. [#961](https://github.com/yonaskolb/XcodeGen/pull/961) @liamnichols -- Add `storeKitConfiguration` to allow specifying StoreKit Configuration in Scheme and TargetScheme, supporting either xcodeproj or xcworkspace via `schemePathPrefix` option. [#964](https://github.com/yonaskolb/XcodeGen/pull/964) @jcolicchio -- More detailed error message with method arguments. [#990](https://github.com/yonaskolb/XcodeGen/pull/990) @bannzai +- Added support for building and running on Linux platforms. Tested for compatibility with Swift 5.3+ and Ubuntu 18.04. [#988](https://github.com/yonaskolb/XcodeGen/pull/988) @elliottwilliams +- Added `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. [#961](https://github.com/yonaskolb/XcodeGen/pull/961) @liamnichols +- Added `storeKitConfiguration` to allow specifying StoreKit Configuration in Scheme and TargetScheme, supporting either xcodeproj or xcworkspace via `schemePathPrefix` option. [#964](https://github.com/yonaskolb/XcodeGen/pull/964) @jcolicchio +- Added more detailed error message with method arguments. [#990](https://github.com/yonaskolb/XcodeGen/pull/990) @bannzai - Added `basedOnDependencyAnalysis` to Project Spec Build Script to be able to choose not to skip the script. [#992](https://github.com/yonaskolb/XcodeGen/pull/992) @myihsan -- Add `BuildRule.runOncePerArchitecture` to allow running build rules once per architecture. [#950](https://github.com/yonaskolb/XcodeGen/pull/950) @sascha -- Adds discovered dependency file for a build script [#1012](https://github.com/yonaskolb/XcodeGen/pull/1012) @polac24 @fggeraissate +- Added `BuildRule.runOncePerArchitecture` to allow running build rules once per architecture. [#950](https://github.com/yonaskolb/XcodeGen/pull/950) @sascha +- Added discovered dependency file for a build script [#1012](https://github.com/yonaskolb/XcodeGen/pull/1012) @polac24 @fggeraissate #### Changed - **Breaking**: Info.plists with custom prefixes are no longer added to the Copy Bundle Resources build phase [#945](https://github.com/yonaskolb/XcodeGen/pull/945) @anivaros @@ -25,6 +27,8 @@ #### Internal - Updated to Yams 4.0.0 [#984](https://github.com/yonaskolb/XcodeGen/pull/984) @swiftty +[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.18.0...2.19.0) + ## 2.18.0 #### Added diff --git a/Makefile b/Makefile index 83e2c99a8..26afb1c30 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.18.0 +VERSION = 2.19.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 61bfd9f9b..c39ca8a16 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.18.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.19.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index de2b414c6..6e14e06f1 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.18.0") +let version = Version("2.19.0") let cli = XcodeGenCLI(version: version) cli.execute() From 05ea968f703792084cc70e5a3ddef5dfcc039f0a Mon Sep 17 00:00:00 2001 From: Joseph Colicchio Date: Tue, 23 Feb 2021 13:33:54 -0800 Subject: [PATCH 055/284] Bugfix/StoreKitConfiguration BuildPhase (#1026) * Copy storekit to bundle resources by default * Fix tests * Update changelog --- CHANGELOG.md | 3 +++ Sources/ProjectSpec/FileType.swift | 2 +- Tests/Fixtures/TestProject/project.yml | 2 ++ Tests/XcodeGenKitTests/SourceGeneratorTests.swift | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e45896c47..9c043ac7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Next Version +#### Fixed +- Fixed regression on **.storekit** configuration files' default build phase. [#1026](https://github.com/yonaskolb/XcodeGen/pull/1026) @jcolicchio + ## 2.19.0 #### Added diff --git a/Sources/ProjectSpec/FileType.swift b/Sources/ProjectSpec/FileType.swift index e26200027..732f8b7cb 100644 --- a/Sources/ProjectSpec/FileType.swift +++ b/Sources/ProjectSpec/FileType.swift @@ -71,6 +71,7 @@ extension FileType { // resources "bundle": FileType(buildPhase: .resources), "xcassets": FileType(buildPhase: .resources), + "storekit": FileType(buildPhase: .resources), // sources "swift": FileType(buildPhase: .sources), @@ -110,6 +111,5 @@ extension FileType { "xcfilelist": FileType(buildPhase: BuildPhaseSpec.none), "apns": FileType(buildPhase: BuildPhaseSpec.none), "pch": FileType(buildPhase: BuildPhaseSpec.none), - "storekit": FileType(buildPhase: BuildPhaseSpec.none), ] } diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 841d1bc86..a98f72d6a 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -21,6 +21,7 @@ fileGroups: - FileGroup - SomeFile - Utilities + - App_iOS/Configuration.storekit projectReferences: AnotherProject: path: ./AnotherProject/AnotherProject.xcodeproj @@ -76,6 +77,7 @@ targets: - "**/excluded-file" - "excluded-file" - "Model.xcmappingmodel" + - "Configuration.storekit" - path: App_iOS name: App includes: diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index e06112330..90a84ab49 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -591,6 +591,7 @@ class SourceGeneratorTests: XCTestCase { - file.mlmodel - Info.plist - Intent.intentdefinition + - Configuration.storekit - Settings.bundle: - en.lproj: - Root.strings @@ -646,6 +647,7 @@ class SourceGeneratorTests: XCTestCase { try pbxProj.expectFile(paths: ["C", "file.metal"], buildPhase: .sources) try pbxProj.expectFile(paths: ["C", "file.mlmodel"], buildPhase: .sources) try pbxProj.expectFile(paths: ["C", "Intent.intentdefinition"], buildPhase: .sources) + try pbxProj.expectFile(paths: ["C", "Configuration.storekit"], buildPhase: .resources) try pbxProj.expectFile(paths: ["C", "Settings.bundle"], buildPhase: .resources) try pbxProj.expectFileMissing(paths: ["C", "Settings.bundle", "en.lproj"]) try pbxProj.expectFileMissing(paths: ["C", "Settings.bundle", "en.lproj", "Root.strings"]) From e8237903efa4d89ccdc1125d53466ac73b0c8b3e Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Wed, 24 Feb 2021 21:23:21 +1100 Subject: [PATCH 056/284] add github helper for swift package url (#1029) --- CHANGELOG.md | 3 +++ Docs/ProjectSpec.md | 9 ++++----- Sources/ProjectSpec/SwiftPackage.swift | 17 +++++++++++++++-- Tests/ProjectSpecTests/SpecLoadingTests.swift | 2 ++ 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c043ac7c..257b2713e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Next Version +#### Added +- Allow specifying a `github` name like `JohnSundell/Ink` instead of a full `url` for Swift Packages [#1029](https://github.com/yonaskolb/XcodeGen/pull/1029) @yonaskolb + #### Fixed - Fixed regression on **.storekit** configuration files' default build phase. [#1026](https://github.com/yonaskolb/XcodeGen/pull/1026) @jcolicchio diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index ec71f8177..47127ade9 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -936,6 +936,7 @@ Swift packages are defined at a project level, and then linked to individual tar - `minVersion: 1.0.0, maxVersion: 1.2.9` - `branch: master` - `revision: xxxxxx` +- [ ] **github** : **String**- this is an optional helper you can use for github repos. Instead of specifying the full url in `url` you can just specify the github org and repo ### Local Package @@ -946,13 +947,11 @@ packages: Yams: url: https://github.com/jpsim/Yams from: 2.0.0 + Yams: + github: JohnSundell/Ink + from: 0.5.0 RxClient: path: ../RxClient -targets: - App: - dependencies: - - package: Yams - - package: RxClient ``` ## Project Reference diff --git a/Sources/ProjectSpec/SwiftPackage.swift b/Sources/ProjectSpec/SwiftPackage.swift index 447d5dfa3..254882323 100644 --- a/Sources/ProjectSpec/SwiftPackage.swift +++ b/Sources/ProjectSpec/SwiftPackage.swift @@ -7,6 +7,8 @@ public enum SwiftPackage: Equatable { public typealias VersionRequirement = XCRemoteSwiftPackageReference.VersionRequirement + static let githubPrefix = "https://github.com/" + case remote(url: String, versionRequirement: VersionRequirement) case local(path: String) @@ -26,7 +28,14 @@ extension SwiftPackage: JSONObjectConvertible { } else { let versionRequirement: VersionRequirement = try VersionRequirement(jsonDictionary: jsonDictionary) try Self.validateVersion(versionRequirement: versionRequirement) - self = .remote(url: try jsonDictionary.json(atKeyPath: "url"), versionRequirement: versionRequirement) + let url: String + if jsonDictionary["github"] != nil { + let github: String = try jsonDictionary.json(atKeyPath: "github") + url = "\(Self.githubPrefix)\(github)" + } else { + url = try jsonDictionary.json(atKeyPath: "url") + } + self = .remote(url: url, versionRequirement: versionRequirement) } } @@ -58,7 +67,11 @@ extension SwiftPackage: JSONEncodable { var dictionary: JSONDictionary = [:] switch self { case .remote(let url, let versionRequirement): - dictionary["url"] = url + if url.hasPrefix(Self.githubPrefix) { + dictionary["github"] = url.replacingOccurrences(of: Self.githubPrefix, with: "") + } else { + dictionary["url"] = url + } switch versionRequirement { diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 710fe7701..53175130e 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -1175,6 +1175,7 @@ class SpecLoadingTests: XCTestCase { "package7": .remote(url: "package.git", versionRequirement: .exact("1.2.2")), "package8": .remote(url: "package.git", versionRequirement: .upToNextMajorVersion("4.0.0-beta.5")), "package9": .local(path: "package/package"), + "package10": .remote(url: "https://github.com/yonaskolb/XcodeGen", versionRequirement: .exact("1.2.2")), "XcodeGen": .local(path: "../XcodeGen"), ], options: .init(localPackagesGroup: "MyPackages")) @@ -1193,6 +1194,7 @@ class SpecLoadingTests: XCTestCase { "package7": ["url": "package.git", "version": "1.2.2"], "package8": ["url": "package.git", "majorVersion": "4.0.0-beta.5"], "package9": ["path": "package/package"], + "package10": ["github": "yonaskolb/XcodeGen", "exactVersion": "1.2.2"], ], "localPackages": ["../XcodeGen"], ] From b8b457abdb29681b7692cf4148c299e213445d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thi=20Do=C3=A3n?= Date: Thu, 25 Feb 2021 11:51:50 +0900 Subject: [PATCH 057/284] Build universal binaries for release (#1024) * Build universal binaries for release Closes https://github.com/yonaskolb/XcodeGen/issues/994. * Add a changelog entry for 'Build universal binaries for release' --- CHANGELOG.md | 3 +++ Makefile | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 257b2713e..170b5170c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ #### Fixed - Fixed regression on **.storekit** configuration files' default build phase. [#1026](https://github.com/yonaskolb/XcodeGen/pull/1026) @jcolicchio +#### Internal +- Build universal binaries for release. XcodeGen now runs natively on Apple Silicon. [#1024](https://github.com/yonaskolb/XcodeGen/pull/1024) @thii + ## 2.19.0 #### Added diff --git a/Makefile b/Makefile index 26afb1c30..846649f0b 100644 --- a/Makefile +++ b/Makefile @@ -9,17 +9,18 @@ CURRENT_PATH = $(PWD) REPO = https://github.com/yonaskolb/$(TOOL_NAME) RELEASE_TAR = $(REPO)/archive/$(VERSION).tar.gz SHA = $(shell curl -L -s $(RELEASE_TAR) | shasum -a 256 | sed 's/ .*//') +SWIFT_BUILD_FLAGS = --disable-sandbox -c release --arch arm64 --arch x86_64 .PHONY: install build uninstall format_code brew release install: build mkdir -p $(PREFIX)/bin - cp -f .build/release/$(EXECUTABLE_NAME) $(INSTALL_PATH) + cp -f $(shell swift build $(SWIFT_BUILD_FLAGS) --show-bin-path)/$(EXECUTABLE_NAME) $(INSTALL_PATH) mkdir -p $(SHARE_PATH) cp -R $(CURRENT_PATH)/SettingPresets $(SHARE_PATH)/SettingPresets build: - swift build --disable-sandbox -c release + swift build $(SWIFT_BUILD_FLAGS) uninstall: rm -f $(INSTALL_PATH) From f550d016789862c07e21346e52ddfa286acf6f52 Mon Sep 17 00:00:00 2001 From: "freddi(Yuki Aki)" Date: Wed, 17 Mar 2021 16:10:04 +0900 Subject: [PATCH 058/284] Support `askForAppToLaunch` on profile scheme (#1035) * add askForAppToLaunch to profile scheme * add test * add description for askForAppToLaunch * add Change Log for askForAppToLaunch * Update Docs/ProjectSpec.md --- CHANGELOG.md | 2 ++ Docs/ProjectSpec.md | 2 +- Sources/ProjectSpec/Scheme.swift | 10 +++++++++- Sources/XcodeGenKit/SchemeGenerator.swift | 1 + Tests/XcodeGenKitTests/SchemeGeneratorTests.swift | 4 +++- 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 170b5170c..007cfb6dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ #### Added - Allow specifying a `github` name like `JohnSundell/Ink` instead of a full `url` for Swift Packages [#1029](https://github.com/yonaskolb/XcodeGen/pull/1029) @yonaskolb +- Added `askForAppToLaunch` for `profile` in `schemes` [#1029](https://github.com/yonaskolb/XcodeGen/pull/1035) @freddi-kit + #### Fixed - Fixed regression on **.storekit** configuration files' default build phase. [#1026](https://github.com/yonaskolb/XcodeGen/pull/1026) @jcolicchio diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 47127ade9..72504ec7a 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -777,7 +777,7 @@ The different actions share some properties: - [ ] **region**: **String** - `run` and `test` actions can define a language that is used for Application Region - [ ] **debugEnabled**: **Bool** - `run` and `test` actions can define a whether debugger should be used. This defaults to true. - [ ] **simulateLocation**: **[Simulate Location](#simulate-location)** - `run` action can define a simulated location -- [ ] **askForAppToLaunch**: **Bool** - `run` action can define the executable set to ask to launch. This defaults to false. +- [ ] **askForAppToLaunch**: **Bool** - `run` and `profile` actions can define the executable set to ask to launch. This defaults to false. - [ ] **launchAutomaticallySubstyle**: **String** - `run` action can define the launch automatically substyle ('2' for extensions). - [ ] **storeKitConfiguration**: **String** - `run` action can specify a storekit configuration. See [Options](#options). diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index d6481a3ab..4ec5fbb71 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -260,18 +260,22 @@ public struct Scheme: Equatable { public var preActions: [ExecutionAction] public var postActions: [ExecutionAction] public var environmentVariables: [XCScheme.EnvironmentVariable] + public var askForAppToLaunch: Bool? + public init( config: String, commandLineArguments: [String: Bool] = [:], preActions: [ExecutionAction] = [], postActions: [ExecutionAction] = [], - environmentVariables: [XCScheme.EnvironmentVariable] = [] + environmentVariables: [XCScheme.EnvironmentVariable] = [], + askForAppToLaunch: Bool? = nil ) { self.config = config self.commandLineArguments = commandLineArguments self.preActions = preActions self.postActions = postActions self.environmentVariables = environmentVariables + self.askForAppToLaunch = askForAppToLaunch } public var shouldUseLaunchSchemeArgsEnv: Bool { @@ -539,6 +543,9 @@ extension Scheme.Profile: JSONObjectConvertible { preActions = jsonDictionary.json(atKeyPath: "preActions") ?? [] postActions = jsonDictionary.json(atKeyPath: "postActions") ?? [] environmentVariables = try XCScheme.EnvironmentVariable.parseAll(jsonDictionary: jsonDictionary) + if let askLaunch: Bool = jsonDictionary.json(atKeyPath: "askForAppToLaunch") { + askForAppToLaunch = askLaunch + } } } @@ -550,6 +557,7 @@ extension Scheme.Profile: JSONEncodable { "postActions": postActions.map { $0.toJSONValue() }, "environmentVariables": environmentVariables.map { $0.toJSONValue() }, "config": config, + "askForAppToLaunch": askForAppToLaunch, ] as [String: Any?] } } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index c4c36ee7a..f7741bb21 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -269,6 +269,7 @@ public class SchemeGenerator { preActions: scheme.profile?.preActions.map(getExecutionAction) ?? [], postActions: scheme.profile?.postActions.map(getExecutionAction) ?? [], shouldUseLaunchSchemeArgsEnv: scheme.profile?.shouldUseLaunchSchemeArgsEnv ?? true, + askForAppToLaunch: scheme.profile?.askForAppToLaunch, commandlineArguments: profileCommandLineArgs, environmentVariables: profileVariables ) diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index a8abb85ab..903fcc08c 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -53,7 +53,8 @@ class SchemeGeneratorTests: XCTestCase { name: "MyScheme", build: Scheme.Build(targets: [buildTarget], preActions: [preAction]), run: Scheme.Run(config: "Debug", askForAppToLaunch: true, launchAutomaticallySubstyle: "2", simulateLocation: simulateLocation, storeKitConfiguration: storeKitConfiguration, customLLDBInit: "/sample/.lldbinit"), - test: Scheme.Test(config: "Debug", customLLDBInit: "/test/.lldbinit") + test: Scheme.Test(config: "Debug", customLLDBInit: "/test/.lldbinit"), + profile: Scheme.Profile(config: "Release", askForAppToLaunch: true) ) let project = Project( name: "test", @@ -98,6 +99,7 @@ class SchemeGeneratorTests: XCTestCase { try expect(xcscheme.testAction?.selectedDebuggerIdentifier) == XCScheme.defaultDebugger try expect(xcscheme.launchAction?.askForAppToLaunch) == true + try expect(xcscheme.profileAction?.askForAppToLaunch) == true try expect(xcscheme.launchAction?.launchAutomaticallySubstyle) == "2" try expect(xcscheme.launchAction?.allowLocationSimulation) == true try expect(xcscheme.launchAction?.storeKitConfigurationFileReference?.identifier) == "../Configuration.storekit" From cf886817492cafb68610ffd44424bd0d7434d384 Mon Sep 17 00:00:00 2001 From: "freddi(Yuki Aki)" Date: Sun, 21 Mar 2021 18:02:01 +0900 Subject: [PATCH 059/284] Support `macroExpansion` on run scheme (#1036) * allow to specify macroExpansion on schemes * fix json parsing on macroExpansion * set macroExpansion only launch scheme * add test for macroExpansion * add macroExpansion description * add macroExpansion to Change Log * Update CHANGELOG.md * add App_Extension scheme for macroExpansion * change example of macroExpansion in Fixtures project * fix to keep back to keep back compatibility as possible * Apply suggestions from code review Co-authored-by: Yonas Kolb --- CHANGELOG.md | 4 +-- Docs/ProjectSpec.md | 1 + Sources/ProjectSpec/Scheme.swift | 7 +++- Sources/XcodeGenKit/SchemeGenerator.swift | 10 +++++- .../xcschemes/App_Scheme.xcscheme | 9 ++++++ Tests/Fixtures/TestProject/project.yml | 1 + .../SchemeGeneratorTests.swift | 32 +++++++++++++++++++ 7 files changed, 60 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 007cfb6dc..8959596de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,8 @@ #### Added - Allow specifying a `github` name like `JohnSundell/Ink` instead of a full `url` for Swift Packages [#1029](https://github.com/yonaskolb/XcodeGen/pull/1029) @yonaskolb -- Added `askForAppToLaunch` for `profile` in `schemes` [#1029](https://github.com/yonaskolb/XcodeGen/pull/1035) @freddi-kit - +- Added `macroExpansion` for `run` in `schemes` [#1036](https://github.com/yonaskolb/XcodeGen/pull/1036) @freddi-kit +- Added `askForAppToLaunch` for `profile` in `schemes` [#1035](https://github.com/yonaskolb/XcodeGen/pull/1035) @freddi-kit #### Fixed - Fixed regression on **.storekit** configuration files' default build phase. [#1026](https://github.com/yonaskolb/XcodeGen/pull/1026) @jcolicchio diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 72504ec7a..3acd95d82 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -780,6 +780,7 @@ The different actions share some properties: - [ ] **askForAppToLaunch**: **Bool** - `run` and `profile` actions can define the executable set to ask to launch. This defaults to false. - [ ] **launchAutomaticallySubstyle**: **String** - `run` action can define the launch automatically substyle ('2' for extensions). - [ ] **storeKitConfiguration**: **String** - `run` action can specify a storekit configuration. See [Options](#options). +- [ ] **macroExpansion**: **String** - `run` action can define the macro expansion from other target. This defaults to nil. ### Execution Action diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index 4ec5fbb71..16d3c19d6 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -116,6 +116,7 @@ public struct Scheme: Equatable { public var executable: String? public var storeKitConfiguration: String? public var customLLDBInit: String? + public var macroExpansion: String? public init( config: String, @@ -133,7 +134,8 @@ public struct Scheme: Equatable { debugEnabled: Bool = debugEnabledDefault, simulateLocation: SimulateLocation? = nil, storeKitConfiguration: String? = nil, - customLLDBInit: String? = nil + customLLDBInit: String? = nil, + macroExpansion: String? = nil ) { self.config = config self.commandLineArguments = commandLineArguments @@ -150,6 +152,7 @@ public struct Scheme: Equatable { self.simulateLocation = simulateLocation self.storeKitConfiguration = storeKitConfiguration self.customLLDBInit = customLLDBInit + self.macroExpansion = macroExpansion } } @@ -391,6 +394,7 @@ extension Scheme.Run: JSONObjectConvertible { askForAppToLaunch = askLaunch } customLLDBInit = jsonDictionary.json(atKeyPath: "customLLDBInit") + macroExpansion = jsonDictionary.json(atKeyPath: "macroExpansion") } } @@ -407,6 +411,7 @@ extension Scheme.Run: JSONEncodable { "askForAppToLaunch": askForAppToLaunch, "launchAutomaticallySubstyle": launchAutomaticallySubstyle, "executable": executable, + "macroExpansion": macroExpansion ] if disableMainThreadChecker != Scheme.Run.disableMainThreadCheckerDefault { diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index f7741bb21..562479a29 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -241,12 +241,20 @@ public class SchemeGenerator { storeKitConfigurationFileReference = XCScheme.StoreKitConfigurationFileReference(identifier: storeKitConfigurationPath.string) } + let macroExpansion: XCScheme.BuildableReference? + if let macroExpansionName = scheme.run?.macroExpansion, + let resolvedMacroExpansion = buildActionEntries.first(where: { $0.buildableReference.blueprintName == macroExpansionName })?.buildableReference { + macroExpansion = resolvedMacroExpansion + } else { + macroExpansion = shouldExecuteOnLaunch ? nil : buildableReference + } + let launchAction = XCScheme.LaunchAction( runnable: shouldExecuteOnLaunch ? runnables.launch : nil, buildConfiguration: scheme.run?.config ?? defaultDebugConfig.name, preActions: scheme.run?.preActions.map(getExecutionAction) ?? [], postActions: scheme.run?.postActions.map(getExecutionAction) ?? [], - macroExpansion: shouldExecuteOnLaunch ? nil : buildableReference, + macroExpansion: macroExpansion, selectedDebuggerIdentifier: selectedDebuggerIdentifier(for: schemeTarget, run: scheme.run), selectedLauncherIdentifier: selectedLauncherIdentifier(for: schemeTarget, run: scheme.run), askForAppToLaunch: scheme.run?.askForAppToLaunch, diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme index d9809d0e1..49adf5501 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme @@ -91,6 +91,15 @@ identifier = "Honolulu, HI, USA" referenceType = "1"> + + + + Date: Wed, 31 Mar 2021 22:57:42 +0100 Subject: [PATCH 060/284] Set error message for missing build targets in scheme (#1040) * Set error message for missing build targets in scheme The current behavior means it just crashes due to trying to force unwrap a nil optional. Note: A build target shouldn't really be needed, but this is just a quick fix to get things moving again. * Update changelog --- CHANGELOG.md | 1 + Sources/XcodeGenKit/SchemeGenerator.swift | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8959596de..4cd65607a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ #### Fixed - Fixed regression on **.storekit** configuration files' default build phase. [#1026](https://github.com/yonaskolb/XcodeGen/pull/1026) @jcolicchio +- Fixed bug where schemes without a build target would crash instead of displaying an error [#1040](https://github.com/yonaskolb/XcodeGen/pull/1040) @dalemyers #### Internal - Build universal binaries for release. XcodeGen now runs natively on Apple Silicon. [#1024](https://github.com/yonaskolb/XcodeGen/pull/1024) @thii diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 562479a29..d3729e86e 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -165,7 +165,10 @@ public class SchemeGenerator { if let targetName = scheme.run?.executable { schemeTarget = project.getTarget(targetName) } else { - let name = scheme.build.targets.first { $0.buildTypes.contains(.running) }?.target.name ?? scheme.build.targets.first!.target.name + guard let firstTarget = scheme.build.targets.first else { + throw SchemeGenerationError.missingBuildTargets(scheme.name) + } + let name = scheme.build.targets.first { $0.buildTypes.contains(.running) }?.target.name ?? firstTarget.target.name schemeTarget = target ?? project.getTarget(name) } @@ -350,6 +353,7 @@ enum SchemeGenerationError: Error, CustomStringConvertible { case missingTarget(TargetReference, projectPath: String) case missingProject(String) + case missingBuildTargets(String) var description: String { switch self { @@ -357,6 +361,8 @@ enum SchemeGenerationError: Error, CustomStringConvertible { return "Unable to find target named \"\(target)\" in \"\(projectPath)\"" case .missingProject(let project): return "Unable to find project reference named \"\(project)\" in project.yml" + case .missingBuildTargets(let name): + return "Unable to find at least one build target in scheme \"\(name)\"" } } } From 1b57ba5c75c08c6e7fc95e8b8358e04092bf0d9d Mon Sep 17 00:00:00 2001 From: Liam Nichols Date: Thu, 8 Apr 2021 07:38:21 +0200 Subject: [PATCH 061/284] Improve INFOPLIST_FILE handling to only omit used Info.plist's from Copy Bundle Resources Build Phase (#1027) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update TestProject Fixture to include GoogleService-Info.plist resource bsaed on 2.18.0 generator * Update TestProject fixture to include an Info.plist file named 'App-Info.plist' to simulate scenario in #945 * Resolve INFOPLIST_FILE values upfront ahead of resolving all source files for a target * fixup! Resolve INFOPLIST_FILE values upfront ahead of resolving all source files for a target * fixup! Resolve INFOPLIST_FILE values upfront ahead of resolving all source files for a target * Refactor SourceGenerator to remove some redundant arguments on internal methods when generating source files in a target * Update SourceGenerator to accept '[Path: BuildPhaseSpec]' of preferred build phases in order to prioritise over 'default' value. Remove explicit Info.plist check from SourceGenerator. Update PBXProjGenerator to inject hash of build phases for resolved INFOPLIST_FILE values. Update SourceGeneratorTests to comply with change where only the FIRST Info.plist is excluded from copy bundle resources build phase, additionally resolve absolute path * Ensure project.basePath is always absolute when resolving Info.plist path relative to project * Add test coverage in SourceGeneratorTests.swift * Update CHANGELOG.md * Reword CHANGELOG.md --- CHANGELOG.md | 1 + Sources/ProjectSpec/Config.swift | 2 +- Sources/XcodeGenKit/PBXProjGenerator.swift | 58 ++++++++++---- Sources/XcodeGenKit/SourceGenerator.swift | 69 +++++++++------- .../App_macOS/{Info.plist => App-Info.plist} | 0 .../Project.xcodeproj/project.pbxproj | 20 +++-- .../Resources/GoogleService-Info.plist | 40 ++++++++++ Tests/Fixtures/TestProject/project.yml | 3 +- .../ProjectGeneratorTests.swift | 2 +- .../SourceGeneratorTests.swift | 78 ++++++++++++++++++- 10 files changed, 214 insertions(+), 59 deletions(-) rename Tests/Fixtures/TestProject/App_macOS/{Info.plist => App-Info.plist} (100%) create mode 100644 Tests/Fixtures/TestProject/Resources/GoogleService-Info.plist diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cd65607a..890453840 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ #### Fixed - Fixed regression on **.storekit** configuration files' default build phase. [#1026](https://github.com/yonaskolb/XcodeGen/pull/1026) @jcolicchio - Fixed bug where schemes without a build target would crash instead of displaying an error [#1040](https://github.com/yonaskolb/XcodeGen/pull/1040) @dalemyers +- Fixed files with names ending in **Info.plist** (such as **GoogleServices-Info.plist**) from being omitted from the Copy Resources build phase. Now, only the resolved info plist file for each specific target is omitted. [#1027](https://github.com/yonaskolb/XcodeGen/pull/1027) @liamnichols #### Internal - Build universal binaries for release. XcodeGen now runs natively on Apple Silicon. [#1024](https://github.com/yonaskolb/XcodeGen/pull/1024) @thii diff --git a/Sources/ProjectSpec/Config.swift b/Sources/ProjectSpec/Config.swift index 2e343e578..c8772b7ce 100644 --- a/Sources/ProjectSpec/Config.swift +++ b/Sources/ProjectSpec/Config.swift @@ -1,7 +1,7 @@ import Foundation import JSONUtilities -public struct Config: Equatable { +public struct Config: Hashable { public var name: String public var type: ConfigType? diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 933d3e463..746fc1891 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -643,11 +643,12 @@ public class PBXProjGenerator { func generateTarget(_ target: Target) throws { let carthageDependencies = carthageResolver.dependencies(for: target) - let sourceFiles = try sourceGenerator.getAllSourceFiles(targetType: target.type, sources: target.sources) + let infoPlistFiles: [Config: String] = getInfoPlists(for: target) + let sourceFileBuildPhaseOverrideSequence: [(Path, BuildPhaseSpec)] = Set(infoPlistFiles.values).map({ (project.basePath + $0, .none) }) + let sourceFileBuildPhaseOverrides = Dictionary(uniqueKeysWithValues: sourceFileBuildPhaseOverrideSequence) + let sourceFiles = try sourceGenerator.getAllSourceFiles(targetType: target.type, sources: target.sources, buildPhases: sourceFileBuildPhaseOverrides) .sorted { $0.path.lastComponent < $1.path.lastComponent } - var plistPath: Path? - var searchForPlist = true var anyDependencyRequiresObjCLinking = false var dependencies: [PBXTargetDependency] = [] @@ -1167,17 +1168,9 @@ public class PBXProjGenerator { buildSettings["CODE_SIGN_ENTITLEMENTS"] = entitlements.path } - // Set INFOPLIST_FILE if not defined in settings - if !project.targetHasBuildSetting("INFOPLIST_FILE", target: target, config: config) { - if let info = target.info { - buildSettings["INFOPLIST_FILE"] = info.path - } else if searchForPlist { - plistPath = getInfoPlist(target.sources) - searchForPlist = false - } - if let plistPath = plistPath { - buildSettings["INFOPLIST_FILE"] = (try? plistPath.relativePath(from: projectDirectory ?? project.basePath)) ?? plistPath - } + // Set INFOPLIST_FILE based on the resolved value + if let infoPlistFile = infoPlistFiles[config] { + buildSettings["INFOPLIST_FILE"] = infoPlistFile } // automatically calculate bundle id @@ -1301,6 +1294,43 @@ public class PBXProjGenerator { } } + func getInfoPlists(for target: Target) -> [Config: String] { + var searchForDefaultInfoPlist: Bool = true + var defaultInfoPlist: String? + + let values: [(Config, String)] = project.configs.compactMap { config in + // First, if the plist path was defined by `INFOPLIST_FILE`, use that + let buildSettings = project.getTargetBuildSettings(target: target, config: config) + if let value = buildSettings["INFOPLIST_FILE"] as? String { + return (config, value) + } + + // Otherwise check if the path was defined as part of the `info` spec + if let value = target.info?.path { + return (config, value) + } + + // If we haven't yet looked for the default info plist, try doing so + if searchForDefaultInfoPlist { + searchForDefaultInfoPlist = false + + if let plistPath = getInfoPlist(target.sources) { + let basePath = projectDirectory ?? project.basePath.absolute() + let relative = (try? plistPath.relativePath(from: basePath)) ?? plistPath + defaultInfoPlist = relative.string + } + } + + // Return the default plist if there was one + if let value = defaultInfoPlist { + return (config, value) + } + return nil + } + + return Dictionary(uniqueKeysWithValues: values) + } + func getInfoPlist(_ sources: [TargetSource]) -> Path? { sources .lazy diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index b66346f15..72b1d1c8b 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -77,14 +77,19 @@ class SourceGenerator { localPackageGroup!.children.append(fileReference) } - func getAllSourceFiles(targetType: PBXProductType, sources: [TargetSource]) throws -> [SourceFile] { - try sources.flatMap { try getSourceFiles(targetType: targetType, targetSource: $0, path: project.basePath + $0.path) } + /// Collects an array complete of all `SourceFile` objects that make up the target based on the provided `TargetSource` definitions. + /// + /// - Parameters: + /// - targetType: The type of target that the source files should belong to. + /// - sources: The array of sources defined as part of the targets spec. + /// - buildPhases: A dictionary containing any build phases that should be applied to source files at specific paths in the event that the associated `TargetSource` didn't already define a `buildPhase`. Values from this dictionary are used in cases where the project generator knows more about a file than the spec/filesystem does (i.e if the file should be treated as the targets Info.plist and so on). + func getAllSourceFiles(targetType: PBXProductType, sources: [TargetSource], buildPhases: [Path : BuildPhaseSpec]) throws -> [SourceFile] { + try sources.flatMap { try getSourceFiles(targetType: targetType, targetSource: $0, buildPhases: buildPhases) } } // get groups without build files. Use for Project.fileGroups func getFileGroups(path: String) throws { - let fullPath = project.basePath + path - _ = try getSourceFiles(targetType: .none, targetSource: TargetSource(path: path), path: fullPath) + _ = try getSourceFiles(targetType: .none, targetSource: TargetSource(path: path), buildPhases: [:]) } func getFileType(path: Path) -> FileType? { @@ -95,7 +100,7 @@ class SourceGenerator { } } - func generateSourceFile(targetType: PBXProductType, targetSource: TargetSource, path: Path, buildPhase: BuildPhaseSpec? = nil, fileReference: PBXFileElement? = nil) -> SourceFile { + func generateSourceFile(targetType: PBXProductType, targetSource: TargetSource, path: Path, fileReference: PBXFileElement? = nil, buildPhases: [Path: BuildPhaseSpec]) -> SourceFile { let fileReference = fileReference ?? fileReferencesByPath[path.string.lowercased()]! var settings: [String: Any] = [:] let fileType = getFileType(path: path) @@ -106,9 +111,11 @@ class SourceGenerator { let headerVisibility = targetSource.headerVisibility ?? .public - if let buildPhase = buildPhase { + if let buildPhase = targetSource.buildPhase { chosenBuildPhase = buildPhase - } else if let buildPhase = targetSource.buildPhase { + } else if resolvedTargetSourceType(for: targetSource, at: path) == .folder { + chosenBuildPhase = .resources + } else if let buildPhase = buildPhases[path] { chosenBuildPhase = buildPhase } else { chosenBuildPhase = getDefaultBuildPhase(for: path, targetType: targetType) @@ -250,9 +257,6 @@ class SourceGenerator { /// returns a default build phase for a given path. This is based off the filename private func getDefaultBuildPhase(for path: Path, targetType: PBXProductType) -> BuildPhaseSpec? { - if path.lastComponent.hasSuffix("Info.plist") { - return nil - } if let buildPhase = getFileType(path: path)?.buildPhase { return buildPhase } @@ -404,7 +408,8 @@ class SourceGenerator { isBaseGroup: Bool, hasCustomParent: Bool, excludePaths: Set, - includePaths: Set + includePaths: Set, + buildPhases: [Path: BuildPhaseSpec] ) throws -> (sourceFiles: [SourceFile], groups: [PBXGroup]) { let children = try getSourceChildren(targetSource: targetSource, dirPath: path, excludePaths: excludePaths, includePaths: includePaths) @@ -435,7 +440,7 @@ class SourceGenerator { var groupChildren: [PBXFileElement] = filePaths.map { getFileReference(path: $0, inPath: path) } var allSourceFiles: [SourceFile] = filePaths.map { - generateSourceFile(targetType: targetType, targetSource: targetSource, path: $0) + generateSourceFile(targetType: targetType, targetSource: targetSource, path: $0, buildPhases: buildPhases) } var groups: [PBXGroup] = [] @@ -448,7 +453,8 @@ class SourceGenerator { isBaseGroup: false, hasCustomParent: false, excludePaths: excludePaths, - includePaths: includePaths + includePaths: includePaths, + buildPhases: buildPhases ) guard !subGroups.sourceFiles.isEmpty || project.options.generateEmptyDirectories else { @@ -491,7 +497,8 @@ class SourceGenerator { let sourceFile = generateSourceFile(targetType: targetType, targetSource: targetSource, path: filePath, - fileReference: variantGroup) + fileReference: variantGroup, + buildPhases: buildPhases) allSourceFiles.append(sourceFile) } } @@ -528,7 +535,8 @@ class SourceGenerator { let sourceFile = generateSourceFile(targetType: targetType, targetSource: targetSource, path: filePath, - fileReference: fileReference) + fileReference: fileReference, + buildPhases: buildPhases) allSourceFiles.append(sourceFile) groupChildren.append(fileReference) } @@ -551,14 +559,15 @@ class SourceGenerator { } /// creates source files - private func getSourceFiles(targetType: PBXProductType, targetSource: TargetSource, path: Path) throws -> [SourceFile] { + private func getSourceFiles(targetType: PBXProductType, targetSource: TargetSource, buildPhases: [Path: BuildPhaseSpec]) throws -> [SourceFile] { // generate excluded paths + let path = project.basePath + targetSource.path let excludePaths = getSourceMatches(targetSource: targetSource, patterns: targetSource.excludes) // generate included paths. Excluded paths will override this. let includePaths = getSourceMatches(targetSource: targetSource, patterns: targetSource.includes) - let type = targetSource.type ?? (path.isFile || path.extension != nil ? .file : .group) + let type = resolvedTargetSourceType(for: targetSource, at: path) let customParentGroups = (targetSource.group ?? "").split(separator: "/").map { String($0) } let hasCustomParent = !customParentGroups.isEmpty @@ -570,11 +579,10 @@ class SourceGenerator { var sourcePath = path switch type { case .folder: - let folderPath = project.basePath + Path(targetSource.path) let fileReference = getFileReference( - path: folderPath, + path: path, inPath: project.basePath, - name: targetSource.name ?? folderPath.lastComponent, + name: targetSource.name ?? path.lastComponent, sourceTree: .sourceRoot, lastKnownFileType: "folder" ) @@ -583,14 +591,7 @@ class SourceGenerator { rootGroups.insert(fileReference) } - let buildPhase: BuildPhaseSpec? - if let targetBuildPhase = targetSource.buildPhase { - buildPhase = targetBuildPhase - } else { - buildPhase = .resources - } - - let sourceFile = generateSourceFile(targetType: targetType, targetSource: targetSource, path: folderPath, buildPhase: buildPhase) + let sourceFile = generateSourceFile(targetType: targetType, targetSource: targetSource, path: path, buildPhases: buildPhases) sourceFiles.append(sourceFile) sourceReference = fileReference @@ -598,7 +599,7 @@ class SourceGenerator { let parentPath = path.parent() let fileReference = getFileReference(path: path, inPath: parentPath, name: targetSource.name) - let sourceFile = generateSourceFile(targetType: targetType, targetSource: targetSource, path: path) + let sourceFile = generateSourceFile(targetType: targetType, targetSource: targetSource, path: path, buildPhases: buildPhases) if hasCustomParent { sourcePath = path @@ -633,7 +634,8 @@ class SourceGenerator { isBaseGroup: true, hasCustomParent: hasCustomParent, excludePaths: excludePaths, - includePaths: includePaths + includePaths: includePaths, + buildPhases: buildPhases ) let group = groups.first! @@ -655,6 +657,13 @@ class SourceGenerator { return sourceFiles } + /// Returns the resolved `SourceType` for a given `TargetSource`. + /// + /// While `TargetSource` declares `type`, its optional and in the event that the value is not defined then we must resolve a sensible default based on the path of the source. + private func resolvedTargetSourceType(for targetSource: TargetSource, at path: Path) -> SourceType { + return targetSource.type ?? (path.isFile || path.extension != nil ? .file : .group) + } + private func createParentGroups(_ parentGroups: [String], for fileElement: PBXFileElement) { guard let parentName = parentGroups.last else { return diff --git a/Tests/Fixtures/TestProject/App_macOS/Info.plist b/Tests/Fixtures/TestProject/App_macOS/App-Info.plist similarity index 100% rename from Tests/Fixtures/TestProject/App_macOS/Info.plist rename to Tests/Fixtures/TestProject/App_macOS/App-Info.plist diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 594fdf965..bb0de533f 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -107,6 +107,7 @@ 87927928A8A3460166ACB819 /* SwiftFileInDotPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F430AABE04B7499B458D9DB /* SwiftFileInDotPath.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; 8C941A6EF08069CB3CB88FC1 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 900CFAD929CAEE3861127627 /* MyBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 7B5068D64404C61A67A18458 /* MyBundle.bundle */; }; + 94FD20C3EA5EBCEC8783740C /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = BDCA996D141DD8A16B18D68F /* GoogleService-Info.plist */; }; 95DD9941E1529FD2AE1A191D /* StaticLibrary_ObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5A2B916A11DCC2565241359F /* StaticLibrary_ObjC.h */; }; 96B55C0F660235FE6BDD8869 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 998CCB995347CBB8EDC95FB5 /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; @@ -610,7 +611,6 @@ 3571E41E19A5AB8AAAB04109 /* StandaloneAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = StandaloneAssets.xcassets; sourceTree = ""; }; 3797E591F302ECC0AA2FC607 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 38DB679FF1CF4E379D1AB103 /* App_Clip.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = App_Clip.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 38F1191E5B85DC882B8ABE85 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 3A7BEFAB4710735CF169B1E8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 3D8A2D4363866877B9140156 /* XPC_ServiceProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPC_ServiceProtocol.h; sourceTree = ""; }; 3ED831531AA349CCC19B258B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -655,6 +655,7 @@ 8CB86294FB939FE6E90932E1 /* libStaticLibrary_Swift.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary_Swift.a; sourceTree = BUILT_PRODUCTS_DIR; }; 8D88C6BF7355702B74396791 /* TestProjectUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectUITests.swift; sourceTree = ""; }; 93C033648A37D95027845BD3 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; + 9528528C989D24FE3E6C533E /* App-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "App-Info.plist"; sourceTree = ""; }; 9A87A926D563773658FB87FE /* iMessageApp.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = iMessageApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 9D4AB3FCF725428EFB56F542 /* Configuration.storekit */ = {isa = PBXFileReference; path = Configuration.storekit; sourceTree = ""; }; 9F27382DD66E26C059E26EFE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; @@ -673,6 +674,7 @@ BA040F1F7D6CA08878323A55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; BB178D03E75929F3F5B10C56 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; BC56891DA7446EAC8C2F27EB /* File2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = File2.swift; path = Group2/File2.swift; sourceTree = ""; }; + BDCA996D141DD8A16B18D68F /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "GoogleService-Info.plist"; sourceTree = ""; }; BECEA4A483ADEB8158F640B3 /* Tool */ = {isa = PBXFileReference; includeInIndex = 0; path = Tool; sourceTree = BUILT_PRODUCTS_DIR; }; BF59AC868D227C92CA8B1B57 /* Model.xcmappingmodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcmappingmodel; path = Model.xcmappingmodel; sourceTree = ""; }; C53ACB2962FED621389C36A2 /* iMessageStickersExtension.appex */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "wrapper.app-extension"; path = iMessageStickersExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1071,6 +1073,7 @@ isa = PBXGroup; children = ( 28360ECA4D727FAA58557A81 /* example.mp4 */, + BDCA996D141DD8A16B18D68F /* GoogleService-Info.plist */, 7B5068D64404C61A67A18458 /* MyBundle.bundle */, C9E358FBE2B54D2B5C7FD609 /* SceneKitCatalog.scnassets */, ); @@ -1207,9 +1210,9 @@ EE78B4FBD0137D1975C47D76 /* App_macOS */ = { isa = PBXGroup; children = ( + 9528528C989D24FE3E6C533E /* App-Info.plist */, 09B82F603D981398F38D762E /* AppDelegate.swift */, E55F45EACB0F382722D61C8D /* Assets.xcassets */, - 38F1191E5B85DC882B8ABE85 /* Info.plist */, 74FBDFA5CB063F6001AD8ACD /* Main.storyboard */, A4C3FE6B986506724DAB5D0F /* ViewController.swift */, ); @@ -2052,6 +2055,7 @@ buildActionMask = 2147483647; files = ( 447D59BE2E0993D7245EA247 /* Assets.xcassets in Resources */, + 94FD20C3EA5EBCEC8783740C /* GoogleService-Info.plist in Resources */, A9548E5DCFE92236494164DF /* LaunchScreen.storyboard in Resources */, 6E8F8303759824631C8D9DA3 /* Localizable.strings in Resources */, E5DD0AD6F7AE1DD4AF98B83E /* Localizable.stringsdict in Resources */, @@ -3298,7 +3302,7 @@ "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", ); - INFOPLIST_FILE = App_macOS/Info.plist; + INFOPLIST_FILE = "App_macOS/App-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", @@ -3716,7 +3720,7 @@ "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", ); - INFOPLIST_FILE = App_macOS/Info.plist; + INFOPLIST_FILE = "App_macOS/App-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", @@ -3855,7 +3859,7 @@ "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", ); - INFOPLIST_FILE = App_macOS/Info.plist; + INFOPLIST_FILE = "App_macOS/App-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", @@ -5044,7 +5048,7 @@ "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", ); - INFOPLIST_FILE = App_macOS/Info.plist; + INFOPLIST_FILE = "App_macOS/App-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", @@ -5128,7 +5132,7 @@ "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", ); - INFOPLIST_FILE = App_macOS/Info.plist; + INFOPLIST_FILE = "App_macOS/App-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", @@ -6197,7 +6201,7 @@ "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", ); - INFOPLIST_FILE = App_macOS/Info.plist; + INFOPLIST_FILE = "App_macOS/App-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", diff --git a/Tests/Fixtures/TestProject/Resources/GoogleService-Info.plist b/Tests/Fixtures/TestProject/Resources/GoogleService-Info.plist new file mode 100644 index 000000000..51ff82bc3 --- /dev/null +++ b/Tests/Fixtures/TestProject/Resources/GoogleService-Info.plist @@ -0,0 +1,40 @@ + + + + + AD_UNIT_ID_FOR_BANNER_TEST + ca-app-pub-0000000000000000/1111111111 + AD_UNIT_ID_FOR_INTERSTITIAL_TEST + ca-app-pub-9999999999999999/2222222222 + CLIENT_ID + AAAAAAA + REVERSED_CLIENT_ID + BBBBBBB + API_KEY + CCCCCCC + GCM_SENDER_ID + 000000000000000 + PLIST_VERSION + 1 + BUNDLE_ID + com.project.app + PROJECT_ID + abcdef:app-000000000 + STORAGE_BUCKET + abcdef:app-000000000.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 000000000000000 + DATABASE_URL + https://github.com/yonaskolb/XcodeGen/ + + diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 4445ac512..007117770 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -40,7 +40,7 @@ targets: platform: macOS scheme: {} info: - path: App_macOS/Info.plist + path: App_macOS/App-Info.plist properties: LSMinimumSystemVersion: $(MACOSX_DEPLOYMENT_TARGET) NSMainStoryboardFile: Main @@ -86,6 +86,7 @@ targets: - FileGroup/UnderFileGroup - Resources/MyBundle.bundle - Resources/SceneKitCatalog.scnassets + - Resources/GoogleService-Info.plist - path: Resources/ResourceFolder type: folder - path: Folder diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 7324374cb..9309c59aa 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -1503,7 +1503,7 @@ class ProjectGeneratorTests: XCTestCase { let project = Project(name: "test", targets: [frameworkWithSources]) let generator = ProjectGenerator(project: project) let generatedProject = try generator.generateXcodeProject(in: destinationPath) - let plists = generatedProject.pbxproj.buildConfigurations.compactMap { $0.buildSettings["INFOPLIST_FILE"] as? Path } + let plists = generatedProject.pbxproj.buildConfigurations.compactMap { $0.buildSettings["INFOPLIST_FILE"] as? String } try expect(plists.count) == 2 for plist in plists { try expect(plist) == "TestProject/App_iOS/Info.plist" diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index 90a84ab49..6ee094a48 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -559,13 +559,13 @@ class SourceGeneratorTests: XCTestCase { - file.swift - file.xcassets - file.h - - Info.plist + - GoogleService-Info.plist - file.xcconfig B: - file.swift - file.xcassets - file.h - - Info.plist + - Sample.plist - file.xcconfig C: - file.swift @@ -612,13 +612,13 @@ class SourceGeneratorTests: XCTestCase { try pbxProj.expectFile(paths: ["A", "file.swift"], buildPhase: .resources) try pbxProj.expectFile(paths: ["A", "file.xcassets"], buildPhase: .resources) try pbxProj.expectFile(paths: ["A", "file.h"], buildPhase: .resources) - try pbxProj.expectFile(paths: ["A", "Info.plist"], buildPhase: .resources) + try pbxProj.expectFile(paths: ["A", "GoogleService-Info.plist"], buildPhase: .resources) try pbxProj.expectFile(paths: ["A", "file.xcconfig"], buildPhase: .resources) try pbxProj.expectFile(paths: ["B", "file.swift"], buildPhase: BuildPhaseSpec.none) try pbxProj.expectFile(paths: ["B", "file.xcassets"], buildPhase: BuildPhaseSpec.none) try pbxProj.expectFile(paths: ["B", "file.h"], buildPhase: BuildPhaseSpec.none) - try pbxProj.expectFile(paths: ["B", "Info.plist"], buildPhase: BuildPhaseSpec.none) + try pbxProj.expectFile(paths: ["B", "Sample.plist"], buildPhase: BuildPhaseSpec.none) try pbxProj.expectFile(paths: ["B", "file.xcconfig"], buildPhase: BuildPhaseSpec.none) try pbxProj.expectFile(paths: ["C", "file.swift"], buildPhase: .sources) @@ -656,6 +656,76 @@ class SourceGeneratorTests: XCTestCase { try pbxProj.expectFile(paths: ["C", "WithPeriod2.0", "file.swift"], buildPhase: .sources) } + $0.it("only omits the defined Info.plist from resource build phases but not other plists") { + try createDirectories(""" + A: + - A-Info.plist + B: + - Info.plist + - GoogleServices-Info.plist + C: + - Info.plist + - Info-Production.plist + D: + - Info-Staging.plist + - Info-Production.plist + """) + + // Explicit plist.path value is respected + let targetA = Target( + name: "A", + type: .application, + platform: .iOS, + sources: ["A"], + info: Plist(path: "A/A-Info.plist") + ) + + // Automatically picks first 'Info.plist' at the top-level + let targetB = Target( + name: "B", + type: .application, + platform: .iOS, + sources: ["B"] + ) + + // Also respects INFOPLIST_FILE, ignores other files named Info.plist + let targetC = Target( + name: "C", + type: .application, + platform: .iOS, + settings: Settings(dictionary: [ + "INFOPLIST_FILE": "C/Info-Production.plist" + ]), + sources: ["C"] + ) + + // Does not support INFOPLIST_FILE value that requires expanding + let targetD = Target( + name: "D", + type: .application, + platform: .iOS, + settings: Settings(dictionary: [ + "ENVIRONMENT": "Production", + "INFOPLIST_FILE": "D/Info-${ENVIRONMENT}.plist" + ]), + sources: ["D"] + ) + + let project = Project(basePath: directoryPath.absolute(), name: "Test", targets: [targetA, targetB, targetC, targetD]) + let pbxProj = try project.generatePbxProj() + + try pbxProj.expectFile(paths: ["A", "A-Info.plist"], buildPhase: BuildPhaseSpec.none) + + try pbxProj.expectFile(paths: ["B", "Info.plist"], buildPhase: BuildPhaseSpec.none) + try pbxProj.expectFile(paths: ["B", "GoogleServices-Info.plist"], buildPhase: .resources) + + try pbxProj.expectFile(paths: ["C", "Info.plist"], buildPhase: .resources) + try pbxProj.expectFile(paths: ["C", "Info-Production.plist"], buildPhase: BuildPhaseSpec.none) + + try pbxProj.expectFile(paths: ["D", "Info-Staging.plist"], buildPhase: .resources) + try pbxProj.expectFile(paths: ["D", "Info-Production.plist"], buildPhase: .resources) + } + $0.it("sets file type properties") { let directories = """ A: From 7b8f5a117ff20367ccd61f15e985857f1adef3fb Mon Sep 17 00:00:00 2001 From: Franz Busch Date: Thu, 8 Apr 2021 14:20:01 +0200 Subject: [PATCH 062/284] Change FRAMEWORK_SEARCH_PATH for xcframeworks (#1015) * Change FRAMEWORK_SEARCH_PATH for xcframeworks * Apply suggestions from code review Co-authored-by: Yonas Kolb --- CHANGELOG.md | 1 + Sources/XcodeGenKit/PBXProjGenerator.swift | 14 ++++++- .../ProjectGeneratorTests.swift | 39 +++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 890453840..6bb37aa74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ #### Fixed - Fixed regression on **.storekit** configuration files' default build phase. [#1026](https://github.com/yonaskolb/XcodeGen/pull/1026) @jcolicchio +- Fixed framework search paths when using `.xcframework`s. [#1015](https://github.com/yonaskolb/XcodeGen/pull/1015) @FranzBusch - Fixed bug where schemes without a build target would crash instead of displaying an error [#1040](https://github.com/yonaskolb/XcodeGen/pull/1040) @dalemyers - Fixed files with names ending in **Info.plist** (such as **GoogleServices-Info.plist**) from being omitted from the Copy Resources build phase. Now, only the resolved info plist file for each specific target is omitted. [#1027](https://github.com/yonaskolb/XcodeGen/pull/1027) @liamnichols diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 746fc1891..d76c2f1b4 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -760,9 +760,19 @@ public class PBXProjGenerator { case .framework: if !dependency.implicit { - let buildPath = Path(dependency.reference).parent().string.quoted - frameworkBuildPaths.insert(buildPath) + let buildPath = Path(dependency.reference) + let buildPathString: String + + if buildPath.extension == "xcframework" { + buildPathString = """ + "\(Path(dependency.reference).string)/**" + """ + } else { + buildPathString = buildPath.parent().string.quoted + } + frameworkBuildPaths.insert(buildPathString) } + let fileReference: PBXFileElement if dependency.implicit { diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 9309c59aa..5bc53dfff 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -1369,6 +1369,45 @@ class ProjectGeneratorTests: XCTestCase { // generated plist should not be in buildsettings try expect(targetConfig.buildSettings["INFOPLIST_FILE"] as? String) == predefinedPlistPath } + + describe("XCFramework dependencies") { + $0.context("with xcframework dependency") { + $0.it("should add FRAMEWORK_SEARCH_PATHS") { + let app = Target( + name: "MyApp", + type: .application, + platform: .iOS, + dependencies: [ + Dependency(type: .framework, reference: "some/folder/MyXCFramework.xcframework"), + ] + ) + let project = Project(name: "test", targets: [app]) + let pbxProject = try project.generatePbxProj() + + let target = pbxProject.nativeTargets.first! + let configuration = target.buildConfigurationList!.buildConfigurations.first! + try expect(configuration.buildSettings["FRAMEWORK_SEARCH_PATHS"] as? [String]) == ["$(inherited)", "\"some/folder/MyXCFramework.xcframework/**\""] + } + } + $0.context("with regular framework") { + $0.it("should add FRAMEWORK_SEARCH_PATHS") { + let app = Target( + name: "MyApp", + type: .application, + platform: .iOS, + dependencies: [ + Dependency(type: .framework, reference: "some/folder/MyXCFramework.framework"), + ] + ) + let project = Project(name: "test", targets: [app]) + let pbxProject = try project.generatePbxProj() + + let target = pbxProject.nativeTargets.first! + let configuration = target.buildConfigurationList!.buildConfigurations.first! + try expect(configuration.buildSettings["FRAMEWORK_SEARCH_PATHS"] as? [String]) == ["$(inherited)", "\"some/folder\""] + } + } + } describe("Carthage dependencies") { $0.context("with static dependency") { From 209afcc89849f7b1c45804b3bdc1f4f890e50ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Thu, 8 Apr 2021 09:20:10 -0300 Subject: [PATCH 063/284] Allowing override LastUpgradeCheck and LastUpgradeVersion (#1013) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Allowing the property LastUpgradeCheck and LastUpgradeVersion to be overrided * Updating changelod and project spec * Updating changelog Co-authored-by: André Lucas Ota Co-authored-by: Yonas Kolb --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 2 +- Sources/XcodeGenKit/PBXProjGenerator.swift | 13 ++++-- Sources/XcodeGenKit/SchemeGenerator.swift | 4 +- Sources/XcodeGenKit/Version.swift | 2 +- .../PBXProjGeneratorTests.swift | 40 ++++++++++++++++++- .../SchemeGeneratorTests.swift | 26 ++++++++++++ 7 files changed, 81 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bb37aa74..932316761 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ #### Added - Allow specifying a `github` name like `JohnSundell/Ink` instead of a full `url` for Swift Packages [#1029](https://github.com/yonaskolb/XcodeGen/pull/1029) @yonaskolb +- Added explicity `LastUpgradeCheck` and `LastUpgradeVersion` override support so it's possible to override these properties without using the `project.xcodeVersion`. [1013](https://github.com/yonaskolb/XcodeGen/pull/1013) @Andre113 - Added `macroExpansion` for `run` in `schemes` [#1036](https://github.com/yonaskolb/XcodeGen/pull/1036) @freddi-kit - Added `askForAppToLaunch` for `profile` in `schemes` [#1035](https://github.com/yonaskolb/XcodeGen/pull/1035) @freddi-kit diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 3acd95d82..329d533a4 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -39,7 +39,7 @@ You can also use environment variables in your configuration file, by using `${S - [x] **name**: **String** - Name of the generated project - [ ] **include**: **[Include](#include)** - One or more paths to other specs - [ ] **options**: **[Options](#options)** - Various options to override default behaviour -- [ ] **attributes**: **[String: Any]** - The PBXProject attributes. This is for advanced use. This defaults to ``{"LastUpgradeCheck": "XcodeVersion"}`` with `xcodeVersion` being set by [Options](#options)`.xcodeVersion` +- [ ] **attributes**: **[String: Any]** - The PBXProject attributes. This is for advanced use. If no value is set for `LastUpgradeCheck`, it will be defaulted to ``{"LastUpgradeCheck": "XcodeVersion"}`` with `xcodeVersion` being set by [Options](#options)`.xcodeVersion` - [ ] **configs**: **[Configs](#configs)** - Project build configurations. Defaults to `Debug` and `Release` configs - [ ] **configFiles**: **[Config Files](#config-files)** - `.xcconfig` files per config - [ ] **settings**: **[Settings](#settings)** - Project specific settings. Default base and config type settings will be applied first before any settings defined here diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index d76c2f1b4..2cafa8aad 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -285,9 +285,16 @@ public class PBXProjGenerator { }.flatMap { $0 } ).sorted() - var projectAttributes: [String: Any] = ["LastUpgradeCheck": project.xcodeVersion] - .merged(project.attributes) - + var projectAttributes: [String: Any] = project.attributes + + // Set default LastUpgradeCheck if user did not specify + let lastUpgradeKey = "LastUpgradeCheck" + if !projectAttributes.contains(where: { (key, value) -> Bool in + key == lastUpgradeKey && value is String + }) { + projectAttributes[lastUpgradeKey] = project.xcodeVersion + } + if !assetTags.isEmpty { projectAttributes["knownAssetTags"] = assetTags } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index d3729e86e..74c3dbeb9 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -295,9 +295,11 @@ public class SchemeGenerator { postActions: scheme.archive?.postActions.map(getExecutionAction) ?? [] ) + let lastUpgradeVersion = project.attributes["LastUpgradeCheck"] as? String ?? project.xcodeVersion + return XCScheme( name: scheme.name, - lastUpgradeVersion: project.xcodeVersion, + lastUpgradeVersion: lastUpgradeVersion, version: project.schemeVersion, buildAction: buildAction, testAction: testAction, diff --git a/Sources/XcodeGenKit/Version.swift b/Sources/XcodeGenKit/Version.swift index eb2449152..f94d42e26 100644 --- a/Sources/XcodeGenKit/Version.swift +++ b/Sources/XcodeGenKit/Version.swift @@ -3,7 +3,7 @@ import ProjectSpec extension Project { - var xcodeVersion: String { + public var xcodeVersion: String { XCodeVersion.parse(options.xcodeVersion ?? "12.0") } diff --git a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift index 9be66e26d..d5905e62f 100644 --- a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift @@ -261,5 +261,43 @@ class PBXProjGeneratorTests: XCTestCase { } } } - + + func testDefaultLastUpgradeCheckWhenUserDidSpecifyInvalidValue() throws { + let lastUpgradeKey = "LastUpgradeCheck" + let attributes: [String: Any] = [lastUpgradeKey: 1234] + let project = Project(name: "Test", attributes: attributes) + let projGenerator = PBXProjGenerator(project: project) + + let pbxProj = try projGenerator.generate() + + for pbxProject in pbxProj.projects { + XCTAssertEqual(pbxProject.attributes[lastUpgradeKey] as? String, project.xcodeVersion) + } + } + + func testOverrideLastUpgradeCheckWhenUserDidSpecifyValue() throws { + let lastUpgradeKey = "LastUpgradeCheck" + let lastUpgradeValue = "1234" + let attributes: [String: Any] = [lastUpgradeKey: lastUpgradeValue] + let project = Project(name: "Test", attributes: attributes) + let projGenerator = PBXProjGenerator(project: project) + + let pbxProj = try projGenerator.generate() + + for pbxProject in pbxProj.projects { + XCTAssertEqual(pbxProject.attributes[lastUpgradeKey] as? String, lastUpgradeValue) + } + } + + func testDefaultLastUpgradeCheckWhenUserDidNotSpecifyValue() throws { + let lastUpgradeKey = "LastUpgradeCheck" + let project = Project(name: "Test") + let projGenerator = PBXProjGenerator(project: project) + + let pbxProj = try projGenerator.generate() + + for pbxProject in pbxProj.projects { + XCTAssertEqual(pbxProject.attributes[lastUpgradeKey] as? String, project.xcodeVersion) + } + } } diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index 6c8656881..ce7cd5f03 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -434,6 +434,32 @@ class SchemeGeneratorTests: XCTestCase { } } } + + func testOverrideLastUpgradeVersionWhenUserDidSpecify() throws { + var target = app + target.scheme = TargetScheme() + + let lastUpgradeKey = "LastUpgradeCheck" + let lastUpgradeValue = "1234" + let attributes: [String: Any] = [lastUpgradeKey: lastUpgradeValue] + let project = Project(name: "test", targets: [target, framework], attributes: attributes) + let xcodeProject = try project.generateXcodeProject() + + let xcscheme = try unwrap(xcodeProject.sharedData?.schemes.first) + XCTAssertEqual(xcscheme.lastUpgradeVersion, lastUpgradeValue) + } + + + func testDefaultLastUpgradeVersionWhenUserDidNotSpecify() throws { + var target = app + target.scheme = TargetScheme() + + let project = Project(name: "test", targets: [target, framework]) + let xcodeProject = try project.generateXcodeProject() + + let xcscheme = try unwrap(xcodeProject.sharedData?.schemes.first) + XCTAssertEqual(xcscheme.lastUpgradeVersion, project.xcodeVersion) + } // MARK: - Helpers From 0ac7a5f8c6652650d03d89c92da09ec74c6e6060 Mon Sep 17 00:00:00 2001 From: Artem Semavin Date: Thu, 8 Apr 2021 18:01:28 +0500 Subject: [PATCH 064/284] Added support for SelectedTests in schemes `Test` configuration. (#913) * added support for selectedTests in test shemes * added PR description to changelog * CHANGELOG fix * use presence of selectedTests for useTestSelectionWhitelist Co-authored-by: Artem Semavin Co-authored-by: yonaskolb --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 3 +- Sources/ProjectSpec/Scheme.swift | 7 +++- Sources/XcodeGenKit/SchemeGenerator.swift | 4 +- Tests/ProjectSpecTests/SpecLoadingTests.swift | 40 +++++++++++++++++++ 5 files changed, 52 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 932316761..cfb49fcd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Added explicity `LastUpgradeCheck` and `LastUpgradeVersion` override support so it's possible to override these properties without using the `project.xcodeVersion`. [1013](https://github.com/yonaskolb/XcodeGen/pull/1013) @Andre113 - Added `macroExpansion` for `run` in `schemes` [#1036](https://github.com/yonaskolb/XcodeGen/pull/1036) @freddi-kit - Added `askForAppToLaunch` for `profile` in `schemes` [#1035](https://github.com/yonaskolb/XcodeGen/pull/1035) @freddi-kit +- Added support for selectedTests in schemes `Test` configuration. [#913](https://github.com/yonaskolb/XcodeGen/pull/913) @ooodin #### Fixed - Fixed regression on **.storekit** configuration files' default build phase. [#1026](https://github.com/yonaskolb/XcodeGen/pull/1026) @jcolicchio diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 329d533a4..6487a9a6b 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -808,7 +808,8 @@ A multiline script can be written using the various YAML multiline methods, for - [ ] **parallelizable**: **Bool** - Whether to run tests in parallel. Defaults to false - [ ] **randomExecutionOrder**: **Bool** - Whether to run tests in a random order. Defaults to false - [ ] **skipped**: **Bool** - Whether to skip all of the test target tests. Defaults to false -- [ ] **skippedTests**: **[String]** - List of tests in the test target to skip. Defaults to empty. +- [ ] **skippedTests**: **[String]** - List of tests in the test target to skip. Defaults to empty +- [ ] **selectedTests**: **[String]** - List of tests in the test target to whitelist and select. Defaults to empty. This will override `skippedTests` if provided ### Archive Action diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index 16d3c19d6..47d8ad8aa 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -185,19 +185,22 @@ public struct Scheme: Equatable { public var parallelizable: Bool public var skipped: Bool public var skippedTests: [String] + public var selectedTests: [String] public init( targetReference: TargetReference, randomExecutionOrder: Bool = randomExecutionOrderDefault, parallelizable: Bool = parallelizableDefault, skipped: Bool = false, - skippedTests: [String] = [] + skippedTests: [String] = [], + selectedTests: [String] = [] ) { self.targetReference = targetReference self.randomExecutionOrder = randomExecutionOrder self.parallelizable = parallelizable self.skipped = skipped self.skippedTests = skippedTests + self.selectedTests = selectedTests } public init(stringLiteral value: String) { @@ -207,6 +210,7 @@ public struct Scheme: Equatable { parallelizable = false skipped = false skippedTests = [] + selectedTests = [] } catch { fatalError(SpecParsingError.invalidTargetReference(value).description) } @@ -512,6 +516,7 @@ extension Scheme.Test.TestTarget: JSONObjectConvertible { parallelizable = jsonDictionary.json(atKeyPath: "parallelizable") ?? Scheme.Test.TestTarget.parallelizableDefault skipped = jsonDictionary.json(atKeyPath: "skipped") ?? false skippedTests = jsonDictionary.json(atKeyPath: "skippedTests") ?? [] + selectedTests = jsonDictionary.json(atKeyPath: "selectedTests") ?? [] } } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 74c3dbeb9..3b81d1da5 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -191,7 +191,9 @@ public class SchemeGenerator { parallelizable: testTarget.parallelizable, randomExecutionOrdering: testTarget.randomExecutionOrder, buildableReference: testBuilEntries.buildableReference, - skippedTests: testTarget.skippedTests.map(XCScheme.TestItem.init) + skippedTests: testTarget.skippedTests.map(XCScheme.TestItem.init), + selectedTests: testTarget.selectedTests.map(XCScheme.TestItem.init), + useTestSelectionWhitelist: !testTarget.selectedTests.isEmpty ? true : nil ) } diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 53175130e..015f62e73 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -839,6 +839,46 @@ class SpecLoadingTests: XCTestCase { try expect(scheme.test) == expectedTest } + $0.it("parses alternate test schemes") { + let schemeDictionary: [String: Any] = [ + "build": [ + "targets": ["Target1": "all"], + ], + "test": [ + "config": "debug", + "targets": [ + "Target1", + [ + "name": "ExternalProject/Target2", + "parallelizable": true, + "randomExecutionOrder": true, + "selectedTests": ["Test/testExample()"], + ], + ], + "gatherCoverageData": true, + "disableMainThreadChecker": true, + "stopOnEveryMainThreadCheckerIssue": true, + ], + ] + let scheme = try Scheme(name: "Scheme", jsonDictionary: schemeDictionary) + + let expectedTest = Scheme.Test( + config: "debug", + gatherCoverageData: true, + disableMainThreadChecker: true, + targets: [ + "Target1", + Scheme.Test.TestTarget( + targetReference: "ExternalProject/Target2", + randomExecutionOrder: true, + parallelizable: true, + selectedTests: ["Test/testExample()"] + ), + ] + ) + try expect(scheme.test) == expectedTest + } + $0.it("parses schemes variables") { let schemeDictionary: [String: Any] = [ "build": [ From 3757f82bf6ed3916235828a3e3d64fa0c787d564 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Fri, 9 Apr 2021 09:32:17 +1000 Subject: [PATCH 065/284] Update to 2.20.0 --- CHANGELOG.md | 8 ++++++-- Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfb49fcd2..32c158732 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,15 +2,17 @@ ## Next Version +## 2.20.0 + #### Added - Allow specifying a `github` name like `JohnSundell/Ink` instead of a full `url` for Swift Packages [#1029](https://github.com/yonaskolb/XcodeGen/pull/1029) @yonaskolb - Added explicity `LastUpgradeCheck` and `LastUpgradeVersion` override support so it's possible to override these properties without using the `project.xcodeVersion`. [1013](https://github.com/yonaskolb/XcodeGen/pull/1013) @Andre113 - Added `macroExpansion` for `run` in `schemes` [#1036](https://github.com/yonaskolb/XcodeGen/pull/1036) @freddi-kit -- Added `askForAppToLaunch` for `profile` in `schemes` [#1035](https://github.com/yonaskolb/XcodeGen/pull/1035) @freddi-kit +- Added `askForAppToLaunch` for `profile` in `schemes` [#1035](https://github.com/yonaskolb/XcodeGen/pull/1035) @freddi-kit - Added support for selectedTests in schemes `Test` configuration. [#913](https://github.com/yonaskolb/XcodeGen/pull/913) @ooodin #### Fixed -- Fixed regression on **.storekit** configuration files' default build phase. [#1026](https://github.com/yonaskolb/XcodeGen/pull/1026) @jcolicchio +- Fixed regression on `.storekit` configuration files' default build phase. [#1026](https://github.com/yonaskolb/XcodeGen/pull/1026) @jcolicchio - Fixed framework search paths when using `.xcframework`s. [#1015](https://github.com/yonaskolb/XcodeGen/pull/1015) @FranzBusch - Fixed bug where schemes without a build target would crash instead of displaying an error [#1040](https://github.com/yonaskolb/XcodeGen/pull/1040) @dalemyers - Fixed files with names ending in **Info.plist** (such as **GoogleServices-Info.plist**) from being omitted from the Copy Resources build phase. Now, only the resolved info plist file for each specific target is omitted. [#1027](https://github.com/yonaskolb/XcodeGen/pull/1027) @liamnichols @@ -18,6 +20,8 @@ #### Internal - Build universal binaries for release. XcodeGen now runs natively on Apple Silicon. [#1024](https://github.com/yonaskolb/XcodeGen/pull/1024) @thii +[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.19.0...2.20.0) + ## 2.19.0 #### Added diff --git a/Makefile b/Makefile index 846649f0b..b207931dd 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.19.0 +VERSION = 2.20.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index c39ca8a16..65333f668 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.19.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.20.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 6e14e06f1..500d46e95 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.19.0") +let version = Version("2.20.0") let cli = XcodeGenCLI(version: version) cli.execute() From c28b1a4082d8540f7760a7c1fc0d99c61ae15f70 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Sat, 1 May 2021 12:54:59 +1000 Subject: [PATCH 066/284] fix archive --- Makefile | 5 +++-- scripts/archive.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b207931dd..38d04f741 100644 --- a/Makefile +++ b/Makefile @@ -10,12 +10,13 @@ REPO = https://github.com/yonaskolb/$(TOOL_NAME) RELEASE_TAR = $(REPO)/archive/$(VERSION).tar.gz SHA = $(shell curl -L -s $(RELEASE_TAR) | shasum -a 256 | sed 's/ .*//') SWIFT_BUILD_FLAGS = --disable-sandbox -c release --arch arm64 --arch x86_64 +EXECUTABLE_PATH = $(shell swift build $(SWIFT_BUILD_FLAGS) --show-bin-path)/$(EXECUTABLE_NAME) .PHONY: install build uninstall format_code brew release install: build mkdir -p $(PREFIX)/bin - cp -f $(shell swift build $(SWIFT_BUILD_FLAGS) --show-bin-path)/$(EXECUTABLE_NAME) $(INSTALL_PATH) + cp -f $(EXECUTABLE_PATH) $(INSTALL_PATH) mkdir -p $(SHARE_PATH) cp -R $(CURRENT_PATH)/SettingPresets $(SHARE_PATH)/SettingPresets @@ -45,4 +46,4 @@ brew: brew bump-formula-pr --url=$(RELEASE_TAR) XcodeGen archive: build - ./scripts/archive.sh + ./scripts/archive.sh $(EXECUTABLE_PATH) diff --git a/scripts/archive.sh b/scripts/archive.sh index 7ec329e49..ad3355072 100755 --- a/scripts/archive.sh +++ b/scripts/archive.sh @@ -10,7 +10,7 @@ LICENSE=LICENSE # copy mkdir -p $BINDIR -cp -f .build/release/$EXECUTABLE_NAME $BINDIR +cp -f $1 $BINDIR mkdir -p $SHAREDIR cp -R SettingPresets $SHAREDIR/SettingPresets From 56f943ec010a1324b01dfdd24ca5e6445a8b6444 Mon Sep 17 00:00:00 2001 From: "freddi(Yuki Aki)" Date: Sat, 1 May 2021 12:09:19 +0900 Subject: [PATCH 067/284] Support weak link for Swift Package Dependency (#1064) * support weak link to Swift Package dependency * update test for weak link * add changelog about Swift Package Dependency * Update CHANGELOG.md --- CHANGELOG.md | 2 ++ Sources/XcodeGenKit/PBXProjGenerator.swift | 2 +- Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj | 2 +- Tests/Fixtures/SPM/project.yml | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32c158732..81c6e07b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Change Log ## Next Version +#### Added +- Support weak link for Swift Package Dependency [#1064](https://github.com/yonaskolb/XcodeGen/pull/1064) @freddi-kit ## 2.20.0 diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 2cafa8aad..9b4f80978 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -912,7 +912,7 @@ public class PBXProjGenerator { let link = dependency.link ?? (target.type != .staticLibrary) if link { let buildFile = addObject( - PBXBuildFile(product: packageDependency) + PBXBuildFile(product: packageDependency, settings: getDependencyFrameworkSettings(dependency: dependency)) ) targetFrameworkBuildFiles.append(buildFile) } else { diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index d1d85e21c..0f9810390 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -14,7 +14,7 @@ 9AD886A88D3E4A1B5E900687 /* SPMTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7970A2253B14A9B27C307FAC /* SPMTests.swift */; }; 9C4AD0711D706FD3ED0E436D /* StaticLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61C17B77601A9D1B7895AB42 /* StaticLibrary.swift */; }; B89EA0F3859878A1DCF7BAFD /* SwiftRoaringDynamic in Embed Frameworks */ = {isa = PBXBuildFile; productRef = DC73B269C8B0C0BF6912842C /* SwiftRoaringDynamic */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - CE46CBA5671B951B546C8673 /* Codability in Frameworks */ = {isa = PBXBuildFile; productRef = 16E6FE01D5BD99F78D4A17E2 /* Codability */; }; + CE46CBA5671B951B546C8673 /* Codability in Frameworks */ = {isa = PBXBuildFile; productRef = 16E6FE01D5BD99F78D4A17E2 /* Codability */; settings = {ATTRIBUTES = (Weak, ); }; }; E368431019ABC696E4FFC0CF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4E22B8BCC18A29EFE1DE3BE4 /* Assets.xcassets */; }; /* End PBXBuildFile section */ diff --git a/Tests/Fixtures/SPM/project.yml b/Tests/Fixtures/SPM/project.yml index a34b360a7..f8cac8b5e 100644 --- a/Tests/Fixtures/SPM/project.yml +++ b/Tests/Fixtures/SPM/project.yml @@ -16,6 +16,7 @@ targets: scheme: {} dependencies: - package: Codability + weak: true - package: SwiftRoaring product: SwiftRoaringDynamic embed: true From 35212a6154a36d2e77ca5f3b63f6218e5ebb38e7 Mon Sep 17 00:00:00 2001 From: Elliott Williams Date: Fri, 30 Apr 2021 20:39:34 -0700 Subject: [PATCH 068/284] Rename `Core` to avoid collisions with other packages (i.e. GraphViz) (#1057) * Rename 'Core' to 'XcodeGenCore' * Update CHANGELOG.md * Update CHANGELOG.md --- CHANGELOG.md | 1 + Package.swift | 10 +++++----- Sources/ProjectSpec/CacheFile.swift | 2 +- Sources/XcodeGenCLI/Commands/ProjectCommand.swift | 2 +- Sources/{Core => XcodeGenCore}/Glob.swift | 0 Sources/{Core => XcodeGenCore}/MD5.swift | 0 Sources/{Core => XcodeGenCore}/PathExtensions.swift | 0 Sources/{Core => XcodeGenCore}/StringDiff.swift | 0 Sources/XcodeGenKit/SourceGenerator.swift | 2 +- Tests/{CoreTests => XcodeGenCoreTests}/GlobTests.swift | 2 +- .../PathExtensionsTests.swift | 2 +- 11 files changed, 11 insertions(+), 10 deletions(-) rename Sources/{Core => XcodeGenCore}/Glob.swift (100%) rename Sources/{Core => XcodeGenCore}/MD5.swift (100%) rename Sources/{Core => XcodeGenCore}/PathExtensions.swift (100%) rename Sources/{Core => XcodeGenCore}/StringDiff.swift (100%) rename Tests/{CoreTests => XcodeGenCoreTests}/GlobTests.swift (99%) rename Tests/{CoreTests => XcodeGenCoreTests}/PathExtensionsTests.swift (99%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81c6e07b1..e0c313c70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ #### Internal - Build universal binaries for release. XcodeGen now runs natively on Apple Silicon. [#1024](https://github.com/yonaskolb/XcodeGen/pull/1024) @thii +- The `Core` target is renamed to avoid collisions with other packages. [#1057](https://github.com/yonaskolb/XcodeGen/pull/1057) @elliottwilliams [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.19.0...2.20.0) diff --git a/Package.swift b/Package.swift index 3d5c5b40c..3db1b9343 100644 --- a/Package.swift +++ b/Package.swift @@ -39,17 +39,17 @@ let package = Package( "JSONUtilities", "XcodeProj", "PathKit", - "Core", + "XcodeGenCore", "GraphViz", ]), .target(name: "ProjectSpec", dependencies: [ "JSONUtilities", "XcodeProj", "Yams", - "Core", + "XcodeGenCore", "Version", ]), - .target(name: "Core", dependencies: [ + .target(name: "XcodeGenCore", dependencies: [ "PathKit", "Yams", ]), @@ -70,8 +70,8 @@ let package = Package( "PathKit", "TestSupport", ]), - .testTarget(name: "CoreTests", dependencies: [ - "Core", + .testTarget(name: "XcodeGenCoreTests", dependencies: [ + "XcodeGenCore", "Spectre", "PathKit", "TestSupport", diff --git a/Sources/ProjectSpec/CacheFile.swift b/Sources/ProjectSpec/CacheFile.swift index 10e21afdc..c9c64692b 100644 --- a/Sources/ProjectSpec/CacheFile.swift +++ b/Sources/ProjectSpec/CacheFile.swift @@ -1,5 +1,5 @@ import Foundation -import Core +import XcodeGenCore import Version public class CacheFile { diff --git a/Sources/XcodeGenCLI/Commands/ProjectCommand.swift b/Sources/XcodeGenCLI/Commands/ProjectCommand.swift index 7866661a1..c47967784 100644 --- a/Sources/XcodeGenCLI/Commands/ProjectCommand.swift +++ b/Sources/XcodeGenCLI/Commands/ProjectCommand.swift @@ -3,7 +3,7 @@ import SwiftCLI import ProjectSpec import XcodeGenKit import PathKit -import Core +import XcodeGenCore import Version class ProjectCommand: Command { diff --git a/Sources/Core/Glob.swift b/Sources/XcodeGenCore/Glob.swift similarity index 100% rename from Sources/Core/Glob.swift rename to Sources/XcodeGenCore/Glob.swift diff --git a/Sources/Core/MD5.swift b/Sources/XcodeGenCore/MD5.swift similarity index 100% rename from Sources/Core/MD5.swift rename to Sources/XcodeGenCore/MD5.swift diff --git a/Sources/Core/PathExtensions.swift b/Sources/XcodeGenCore/PathExtensions.swift similarity index 100% rename from Sources/Core/PathExtensions.swift rename to Sources/XcodeGenCore/PathExtensions.swift diff --git a/Sources/Core/StringDiff.swift b/Sources/XcodeGenCore/StringDiff.swift similarity index 100% rename from Sources/Core/StringDiff.swift rename to Sources/XcodeGenCore/StringDiff.swift diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index 72b1d1c8b..c3987b743 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -2,7 +2,7 @@ import Foundation import PathKit import ProjectSpec import XcodeProj -import Core +import XcodeGenCore struct SourceFile { let path: Path diff --git a/Tests/CoreTests/GlobTests.swift b/Tests/XcodeGenCoreTests/GlobTests.swift similarity index 99% rename from Tests/CoreTests/GlobTests.swift rename to Tests/XcodeGenCoreTests/GlobTests.swift index 596ada743..101479515 100644 --- a/Tests/CoreTests/GlobTests.swift +++ b/Tests/XcodeGenCoreTests/GlobTests.swift @@ -7,7 +7,7 @@ // Adapted from https://gist.github.com/efirestone/ce01ae109e08772647eb061b3bb387c3 import XCTest -@testable import Core +@testable import XcodeGenCore class GlobTests: XCTestCase { diff --git a/Tests/CoreTests/PathExtensionsTests.swift b/Tests/XcodeGenCoreTests/PathExtensionsTests.swift similarity index 99% rename from Tests/CoreTests/PathExtensionsTests.swift rename to Tests/XcodeGenCoreTests/PathExtensionsTests.swift index ee9fd6e7a..d3bdc8b7e 100644 --- a/Tests/CoreTests/PathExtensionsTests.swift +++ b/Tests/XcodeGenCoreTests/PathExtensionsTests.swift @@ -1,7 +1,7 @@ import Spectre import PathKit import XCTest -import Core +import XcodeGenCore import TestSupport class PathExtensionsTests: XCTestCase { From 8d918c1e7e2ea555ff0d332122275567dfe47409 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Sat, 1 May 2021 13:40:20 +1000 Subject: [PATCH 069/284] updated changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0c313c70..1414946aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,13 @@ # Change Log ## Next Version + #### Added - Support weak link for Swift Package Dependency [#1064](https://github.com/yonaskolb/XcodeGen/pull/1064) @freddi-kit +#### Fixed +- The `Core` target is renamed to avoid collisions with other packages. [#1057](https://github.com/yonaskolb/XcodeGen/pull/1057) @elliottwilliams + ## 2.20.0 #### Added @@ -21,7 +25,6 @@ #### Internal - Build universal binaries for release. XcodeGen now runs natively on Apple Silicon. [#1024](https://github.com/yonaskolb/XcodeGen/pull/1024) @thii -- The `Core` target is renamed to avoid collisions with other packages. [#1057](https://github.com/yonaskolb/XcodeGen/pull/1057) @elliottwilliams [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.19.0...2.20.0) From fb559ba153a14fefa1a5a92b3034a5d04e7dcfde Mon Sep 17 00:00:00 2001 From: Elliott Williams Date: Fri, 30 Apr 2021 22:39:55 -0700 Subject: [PATCH 070/284] CarthageDependencyResolver: ignore order-only dependencies (#1041) * CarthageDependencyResolver: ignore target-only dependencies * Update fixtures for expected changed in watchOS apps' FRAMEWORK_SEARCH_PATHS * Update CHANGELOG.md --- CHANGELOG.md | 1 + .../CarthageDependencyResolver.swift | 3 +++ .../Project.xcodeproj/project.pbxproj | 24 ------------------- .../CarthageDependencyResolverTests.swift | 23 ++++++++++++++++++ 4 files changed, 27 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1414946aa..ee0a68eff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - Fixed framework search paths when using `.xcframework`s. [#1015](https://github.com/yonaskolb/XcodeGen/pull/1015) @FranzBusch - Fixed bug where schemes without a build target would crash instead of displaying an error [#1040](https://github.com/yonaskolb/XcodeGen/pull/1040) @dalemyers - Fixed files with names ending in **Info.plist** (such as **GoogleServices-Info.plist**) from being omitted from the Copy Resources build phase. Now, only the resolved info plist file for each specific target is omitted. [#1027](https://github.com/yonaskolb/XcodeGen/pull/1027) @liamnichols +- Carthage frameworks are no longer embedded for "order-only" target dependencies. This avoid redundant embeds in situations where a target's sources _import_ a Carthage framework but do not have a binary dependency on it (like a test target which runs in a host app). [#1041](https://github.com/yonaskolb/XcodeGen/pull/1041) @elliottwilliams #### Internal - Build universal binaries for release. XcodeGen now runs natively on Apple Silicon. [#1024](https://github.com/yonaskolb/XcodeGen/pull/1024) @thii diff --git a/Sources/XcodeGenKit/CarthageDependencyResolver.swift b/Sources/XcodeGenKit/CarthageDependencyResolver.swift index 8a0b256a6..ac4588fb7 100644 --- a/Sources/XcodeGenKit/CarthageDependencyResolver.swift +++ b/Sources/XcodeGenKit/CarthageDependencyResolver.swift @@ -68,6 +68,9 @@ public class CarthageDependencyResolver { if let target = projectTarget as? Target { for dependency in target.dependencies { + if case (false, false) = (dependency.link, dependency.embed ?? topLevelTarget.shouldEmbedCarthageDependencies) { + continue + } guard !frameworks.contains(where: { $0.dependency == dependency }) else { continue } diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index bb0de533f..4b8df8bcc 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -2809,10 +2809,6 @@ 00FD318C7418F3351FC00744 /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = App_watchOS/Info.plist; PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch; SDKROOT = watchos; @@ -3333,10 +3329,6 @@ 20803EC42C26E4EA13474E5A /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = App_watchOS/Info.plist; PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch; SDKROOT = watchos; @@ -4704,10 +4696,6 @@ 7B2A1BE6CA654E9903A4C680 /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = App_watchOS/Info.plist; PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch; SDKROOT = watchos; @@ -5457,10 +5445,6 @@ AABC1E325EADF86C5137D659 /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = App_watchOS/Info.plist; PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch; SDKROOT = watchos; @@ -5965,10 +5949,6 @@ C4397CDA0D458BAD55C911B0 /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = App_watchOS/Info.plist; PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch; SDKROOT = watchos; @@ -6869,10 +6849,6 @@ F3AC6A112F81D0958A316D82 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = App_watchOS/Info.plist; PRODUCT_BUNDLE_IDENTIFIER = com.project.app.watch; SDKROOT = watchos; diff --git a/Tests/XcodeGenKitTests/CarthageDependencyResolverTests.swift b/Tests/XcodeGenKitTests/CarthageDependencyResolverTests.swift index 935c8842a..0e160ea99 100644 --- a/Tests/XcodeGenKitTests/CarthageDependencyResolverTests.swift +++ b/Tests/XcodeGenKitTests/CarthageDependencyResolverTests.swift @@ -146,6 +146,29 @@ class CarthageDependencyResolverTests: XCTestCase { try expect(related) == expectedDependencies } + + $0.it("skips dependencies which are not embedded") { + let resolver = CarthageDependencyResolver(project: makeTestProject()) + + let target = Target(name: "1", type: .application, platform: .iOS, dependencies: [ + Dependency(type: .carthage(findFrameworks: false, linkType: .dynamic), reference: dependencyFixtureName, embed: false, link: false) + ]) + try expect(resolver.dependencies(for: target)) == [] + } + + $0.it("skips dependencies nested in targets which are not embedded") { + let nestedTarget = Target(name: "1", type: .framework, platform: .iOS, dependencies: [ + Dependency(type: .carthage(findFrameworks: false, linkType: .dynamic), reference: dependencyFixtureName) + ]) + + let resolver = CarthageDependencyResolver(project: makeTestProject(with: [nestedTarget])) + + let target = Target(name: "2", type: .application, platform: .iOS, dependencies: [ + Dependency(type: .target, reference: "1", embed: false, link: false) + ]) + try expect(resolver.dependencies(for: target)) == [] + + } } } From 3a193eacf94a2d21a87f70b513dbe6f8671e204b Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Sat, 1 May 2021 15:49:39 +1000 Subject: [PATCH 071/284] update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee0a68eff..39aec8967 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ #### Added - Support weak link for Swift Package Dependency [#1064](https://github.com/yonaskolb/XcodeGen/pull/1064) @freddi-kit +#### Changed +- Carthage frameworks are no longer embedded for "order-only" target dependencies. This avoid redundant embeds in situations where a target's sources _import_ a Carthage framework but do not have a binary dependency on it (like a test target which runs in a host app). [#1041](https://github.com/yonaskolb/XcodeGen/pull/1041) @elliottwilliams + #### Fixed - The `Core` target is renamed to avoid collisions with other packages. [#1057](https://github.com/yonaskolb/XcodeGen/pull/1057) @elliottwilliams @@ -22,7 +25,6 @@ - Fixed framework search paths when using `.xcframework`s. [#1015](https://github.com/yonaskolb/XcodeGen/pull/1015) @FranzBusch - Fixed bug where schemes without a build target would crash instead of displaying an error [#1040](https://github.com/yonaskolb/XcodeGen/pull/1040) @dalemyers - Fixed files with names ending in **Info.plist** (such as **GoogleServices-Info.plist**) from being omitted from the Copy Resources build phase. Now, only the resolved info plist file for each specific target is omitted. [#1027](https://github.com/yonaskolb/XcodeGen/pull/1027) @liamnichols -- Carthage frameworks are no longer embedded for "order-only" target dependencies. This avoid redundant embeds in situations where a target's sources _import_ a Carthage framework but do not have a binary dependency on it (like a test target which runs in a host app). [#1041](https://github.com/yonaskolb/XcodeGen/pull/1041) @elliottwilliams #### Internal - Build universal binaries for release. XcodeGen now runs natively on Apple Silicon. [#1024](https://github.com/yonaskolb/XcodeGen/pull/1024) @thii From dfe7f28bcb32decc476d9b7a0b25e8227ae8e45b Mon Sep 17 00:00:00 2001 From: Stefano Mondino Date: Sat, 1 May 2021 07:50:39 +0200 Subject: [PATCH 072/284] Scheme config variants wrong assignment for similar config names (#976) * Failing test for #975 * fixes #975 * chore: refactor to properly select a config from a collection with specific variant and config type chore: updated changelog * fix: lowercase compare on config variant names * fix CI * fix missing scheme for CI * fix schemes for CI * Update CHANGELOG.md Co-authored-by: Yonas Kolb * Update Sources/ProjectSpec/Config.swift Co-authored-by: Yonas Kolb * - fix compilation issue - duplicated test for config variant name (uppercase/lowercase) Co-authored-by: Yonas Kolb --- CHANGELOG.md | 3 ++ Sources/ProjectSpec/Config.swift | 26 ++++++++++- Sources/ProjectSpec/SpecValidation.swift | 6 +-- Sources/XcodeGenKit/SchemeGenerator.swift | 9 ++-- Tests/PerformanceTests/TestProject.swift | 4 +- .../SchemeGeneratorTests.swift | 44 ++++++++++++------- 6 files changed, 66 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39aec8967..3b9828f41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,9 @@ [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.18.0...2.19.0) +#### Fixed +- Lookup scheme config variants by whole words, fixing incorrect assignment in names that contain subtrings of each other (eg PreProd and Prod) [#976](https://github.com/yonaskolb/XcodeGen/pull/976) @stefanomondino + ## 2.18.0 #### Added diff --git a/Sources/ProjectSpec/Config.swift b/Sources/ProjectSpec/Config.swift index c8772b7ce..70247873b 100644 --- a/Sources/ProjectSpec/Config.swift +++ b/Sources/ProjectSpec/Config.swift @@ -10,10 +10,34 @@ public struct Config: Hashable { self.type = type } - public static var defaultConfigs: [Config] = [Config(name: "Debug", type: .debug), Config(name: "Release", type: .release)] + public static var defaultConfigs: [Config] = [Config(name: ConfigType.debug.name, type: .debug), Config(name: ConfigType.release.name, type: .release)] } public enum ConfigType: String { case debug case release + + public var name: String { + rawValue.prefix(1).uppercased() + rawValue.dropFirst() + } +} + +public extension Collection where Element == Config { + func first(including configVariant: String, for type: ConfigType) -> Config? { + first(where: { $0.type == type && $0.name.variantName(for: $0.type) == configVariant }) + } +} + +private extension String { + func variantName(for configType: ConfigType?) -> String { + self.components(separatedBy: " ") + .compactMap { component in + if component.lowercased() == (configType?.name.lowercased() ?? "") { + return nil + } + return component + } + .joined(separator: " ") + .trimmingCharacters(in: CharacterSet.whitespaces) + } } diff --git a/Sources/ProjectSpec/SpecValidation.swift b/Sources/ProjectSpec/SpecValidation.swift index 923f99684..fd1049c6e 100644 --- a/Sources/ProjectSpec/SpecValidation.swift +++ b/Sources/ProjectSpec/SpecValidation.swift @@ -90,16 +90,16 @@ extension Project { } if let scheme = target.scheme { - + for configVariant in scheme.configVariants { - if !configs.contains(where: { $0.name.contains(configVariant) && $0.type == .debug }) { + if configs.first(including: configVariant, for: .debug) == nil { errors.append(.invalidTargetSchemeConfigVariant( target: target.name, configVariant: configVariant, configType: .debug )) } - if !configs.contains(where: { $0.name.contains(configVariant) && $0.type == .release }) { + if configs.first(including: configVariant, for: .release) == nil { errors.append(.invalidTargetSchemeConfigVariant( target: target.name, configVariant: configVariant, diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 3b81d1da5..c45c87d96 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -70,12 +70,13 @@ public class SchemeGenerator { for configVariant in targetScheme.configVariants { let schemeName = "\(target.name) \(configVariant)" - + let debugConfig = project.configs - .first { $0.type == .debug && $0.name.contains(configVariant) }! + .first(including: configVariant, for: .debug)! + let releaseConfig = project.configs - .first { $0.type == .release && $0.name.contains(configVariant) }! - + .first(including: configVariant, for: .release)! + let scheme = Scheme( name: schemeName, target: target, diff --git a/Tests/PerformanceTests/TestProject.swift b/Tests/PerformanceTests/TestProject.swift index cb7a6ae1c..e1d8edc9f 100644 --- a/Tests/PerformanceTests/TestProject.swift +++ b/Tests/PerformanceTests/TestProject.swift @@ -116,8 +116,8 @@ extension Project { Config(name: "Release Test", type: .release), Config(name: "Debug Staging", type: .debug), Config(name: "Release Staging", type: .release), - Config(name: "Debug Production", type: .debug), - Config(name: "Release Production", type: .release), + Config(name: "Debug Prod", type: .debug), + Config(name: "Release Prod", type: .release), ], targets: targets, aggregateTargets: [], diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index ce7cd5f03..ac392130d 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -193,32 +193,44 @@ class SchemeGeneratorTests: XCTestCase { } $0.it("generates target schemes from config variant") { - let configVariants = ["Test", "Production"] + let configVariants = ["Test", "PreProd", "Prod"] var target = app target.scheme = TargetScheme(configVariants: configVariants) + + // Including here a double test for custom upper/lowercase in config types let configs: [Config] = [ Config(name: "Test Debug", type: .debug), - Config(name: "Production Debug", type: .debug), + Config(name: "PreProd debug", type: .debug), + Config(name: "Prod Debug", type: .debug), Config(name: "Test Release", type: .release), - Config(name: "Production Release", type: .release), + Config(name: "PreProd release", type: .release), + Config(name: "Prod Release", type: .release), ] let project = Project(name: "test", configs: configs, targets: [target, framework]) let xcodeProject = try project.generateXcodeProject() - try expect(xcodeProject.sharedData?.schemes.count) == 2 - - let xcscheme = try unwrap(xcodeProject.sharedData?.schemes - .first(where: { $0.name == "\(target.name) Test" })) - let buildActionEntry = try unwrap(xcscheme.buildAction?.buildActionEntries.first) - - try expect(buildActionEntry.buildableReference.blueprintIdentifier.count > 0) == true - - try expect(xcscheme.launchAction?.buildConfiguration) == "Test Debug" - try expect(xcscheme.testAction?.buildConfiguration) == "Test Debug" - try expect(xcscheme.profileAction?.buildConfiguration) == "Test Release" - try expect(xcscheme.analyzeAction?.buildConfiguration) == "Test Debug" - try expect(xcscheme.archiveAction?.buildConfiguration) == "Test Release" + try expect(xcodeProject.sharedData?.schemes.count) == 3 + try configVariants.forEach { variantName in + let xcscheme = try unwrap(xcodeProject.sharedData?.schemes + .first(where: { $0.name == "\(target.name) \(variantName)" })) + let buildActionEntry = try unwrap(xcscheme.buildAction?.buildActionEntries.first) + + try expect(buildActionEntry.buildableReference.blueprintIdentifier.count > 0) == true + if variantName == "PreProd" { + try expect(xcscheme.launchAction?.buildConfiguration) == "\(variantName) debug" + try expect(xcscheme.testAction?.buildConfiguration) == "\(variantName) debug" + try expect(xcscheme.profileAction?.buildConfiguration) == "\(variantName) release" + try expect(xcscheme.analyzeAction?.buildConfiguration) == "\(variantName) debug" + try expect(xcscheme.archiveAction?.buildConfiguration) == "\(variantName) release" + } else { + try expect(xcscheme.launchAction?.buildConfiguration) == "\(variantName) Debug" + try expect(xcscheme.testAction?.buildConfiguration) == "\(variantName) Debug" + try expect(xcscheme.profileAction?.buildConfiguration) == "\(variantName) Release" + try expect(xcscheme.analyzeAction?.buildConfiguration) == "\(variantName) Debug" + try expect(xcscheme.archiveAction?.buildConfiguration) == "\(variantName) Release" + } + } } $0.it("generates environment variables for target schemes") { From 5b1b56df4a2f653720604d23725e1d5f708e0221 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Sat, 1 May 2021 15:51:49 +1000 Subject: [PATCH 073/284] update changelog --- CHANGELOG.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b9828f41..0258cd5b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ #### Fixed - The `Core` target is renamed to avoid collisions with other packages. [#1057](https://github.com/yonaskolb/XcodeGen/pull/1057) @elliottwilliams +- Lookup scheme config variants by whole words, fixing incorrect assignment in names that contain subtrings of each other (eg PreProd and Prod) [#976](https://github.com/yonaskolb/XcodeGen/pull/976) @stefanomondino ## 2.20.0 @@ -58,9 +59,6 @@ [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.18.0...2.19.0) -#### Fixed -- Lookup scheme config variants by whole words, fixing incorrect assignment in names that contain subtrings of each other (eg PreProd and Prod) [#976](https://github.com/yonaskolb/XcodeGen/pull/976) @stefanomondino - ## 2.18.0 #### Added From a6cfa0e5b656ee984143bfdb7779f87f08b38fe1 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Sat, 1 May 2021 16:08:50 +1000 Subject: [PATCH 074/284] Update to 2.21.0 --- CHANGELOG.md | 4 ++++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0258cd5b9..a6b81ea22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.21.0 + #### Added - Support weak link for Swift Package Dependency [#1064](https://github.com/yonaskolb/XcodeGen/pull/1064) @freddi-kit @@ -12,6 +14,8 @@ - The `Core` target is renamed to avoid collisions with other packages. [#1057](https://github.com/yonaskolb/XcodeGen/pull/1057) @elliottwilliams - Lookup scheme config variants by whole words, fixing incorrect assignment in names that contain subtrings of each other (eg PreProd and Prod) [#976](https://github.com/yonaskolb/XcodeGen/pull/976) @stefanomondino +[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.20.0...2.21.0) + ## 2.20.0 #### Added diff --git a/Makefile b/Makefile index 38d04f741..f695f7611 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.20.0 +VERSION = 2.21.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 65333f668..24f7144db 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.20.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.21.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 500d46e95..484fe5ed0 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.20.0") +let version = Version("2.21.0") let cli = XcodeGenCLI(version: version) cli.execute() From 69a1cd56b5a3c24cafac9996647f12630a483b3c Mon Sep 17 00:00:00 2001 From: Yasuharu Yanamura Date: Sun, 2 May 2021 10:55:43 +0900 Subject: [PATCH 075/284] Fix no such module 'DOT' (#1065) * Update GraphViz to 0.4.0 * Update CHANGELOG.md --- CHANGELOG.md | 3 +++ Package.resolved | 4 ++-- Package.swift | 2 +- Sources/XcodeGenKit/GraphVizGenerator.swift | 1 - 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6b81ea22..96f8edad9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Next Version +#### Fixed +- Fixed no such mocule `DOT` error [#1065](https://github.com/yonaskolb/XcodeGen/pull/1065) @yanamura + ## 2.21.0 #### Added diff --git a/Package.resolved b/Package.resolved index 26a8147f3..35579516d 100644 --- a/Package.resolved +++ b/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/SwiftDocOrg/GraphViz.git", "state": { "branch": null, - "revision": "70bebcf4597b9ce33e19816d6bbd4ba9b7bdf038", - "version": "0.2.0" + "revision": "e9a73a30755c3c5b26ba7c73312b1f2ccb9a1a30", + "version": "0.4.0" } }, { diff --git a/Package.swift b/Package.swift index 3db1b9343..2d9ec7477 100644 --- a/Package.swift +++ b/Package.swift @@ -19,7 +19,7 @@ let package = Package( .package(url: "https://github.com/tuist/XcodeProj.git", from: "7.18.0"), .package(url: "https://github.com/jakeheis/SwiftCLI.git", from: "6.0.0"), .package(url: "https://github.com/mxcl/Version", from: "2.0.0"), - .package(url: "https://github.com/SwiftDocOrg/GraphViz.git", from: "0.1.0"), + .package(url: "https://github.com/SwiftDocOrg/GraphViz.git", from: "0.4.0"), ], targets: [ .target(name: "XcodeGen", dependencies: [ diff --git a/Sources/XcodeGenKit/GraphVizGenerator.swift b/Sources/XcodeGenKit/GraphVizGenerator.swift index e7e97b02f..74665e2da 100644 --- a/Sources/XcodeGenKit/GraphVizGenerator.swift +++ b/Sources/XcodeGenKit/GraphVizGenerator.swift @@ -1,4 +1,3 @@ -import DOT import Foundation import GraphViz import ProjectSpec From 1df0bb3e7b65bd01cef457399d53bf5050c2b46c Mon Sep 17 00:00:00 2001 From: Yasuharu Yanamura Date: Wed, 5 May 2021 07:45:42 +0900 Subject: [PATCH 076/284] Fix no such module 'DOT' by pinning GraphViz 0.2.0 (#1067) * Revert "Fix no such module 'DOT' (#1065)" This reverts commit 69a1cd56b5a3c24cafac9996647f12630a483b3c. * pin GraphViz v0.2.0 * update CHANGELOG --- CHANGELOG.md | 2 +- Package.resolved | 4 ++-- Package.swift | 2 +- Sources/XcodeGenKit/GraphVizGenerator.swift | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96f8edad9..55ce845ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## Next Version #### Fixed -- Fixed no such mocule `DOT` error [#1065](https://github.com/yonaskolb/XcodeGen/pull/1065) @yanamura +- Fixed no such module `DOT` error [#1067](https://github.com/yonaskolb/XcodeGen/pull/1067) @yanamura ## 2.21.0 diff --git a/Package.resolved b/Package.resolved index 35579516d..26a8147f3 100644 --- a/Package.resolved +++ b/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/SwiftDocOrg/GraphViz.git", "state": { "branch": null, - "revision": "e9a73a30755c3c5b26ba7c73312b1f2ccb9a1a30", - "version": "0.4.0" + "revision": "70bebcf4597b9ce33e19816d6bbd4ba9b7bdf038", + "version": "0.2.0" } }, { diff --git a/Package.swift b/Package.swift index 2d9ec7477..cbbb27106 100644 --- a/Package.swift +++ b/Package.swift @@ -19,7 +19,7 @@ let package = Package( .package(url: "https://github.com/tuist/XcodeProj.git", from: "7.18.0"), .package(url: "https://github.com/jakeheis/SwiftCLI.git", from: "6.0.0"), .package(url: "https://github.com/mxcl/Version", from: "2.0.0"), - .package(url: "https://github.com/SwiftDocOrg/GraphViz.git", from: "0.4.0"), + .package(url: "https://github.com/SwiftDocOrg/GraphViz.git", .exact("0.2.0")), ], targets: [ .target(name: "XcodeGen", dependencies: [ diff --git a/Sources/XcodeGenKit/GraphVizGenerator.swift b/Sources/XcodeGenKit/GraphVizGenerator.swift index 74665e2da..e7e97b02f 100644 --- a/Sources/XcodeGenKit/GraphVizGenerator.swift +++ b/Sources/XcodeGenKit/GraphVizGenerator.swift @@ -1,3 +1,4 @@ +import DOT import Foundation import GraphViz import ProjectSpec From 05a64bd05da70eb97ab908d66544458a420b3937 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Wed, 5 May 2021 12:49:04 +1000 Subject: [PATCH 077/284] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55ce845ab..ae579faf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## Next Version #### Fixed -- Fixed no such module `DOT` error [#1067](https://github.com/yonaskolb/XcodeGen/pull/1067) @yanamura +- Fixed no such module `DOT` error when package is used as a dependency [#1067](https://github.com/yonaskolb/XcodeGen/pull/1067) @yanamura ## 2.21.0 From 98cde509dd4219f78aac4f46c0b9011f5b91b4f8 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Sun, 2 May 2021 12:38:08 +1000 Subject: [PATCH 078/284] Update to 2.21.1 --- CHANGELOG.md | 4 ++++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae579faf5..2c973eb3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,13 @@ ## Next Version +## 2.21.1 + #### Fixed - Fixed no such module `DOT` error when package is used as a dependency [#1067](https://github.com/yonaskolb/XcodeGen/pull/1067) @yanamura +[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.21.0...2.21.1) + ## 2.21.0 #### Added diff --git a/Makefile b/Makefile index f695f7611..f4100679b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.21.0 +VERSION = 2.21.1 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 24f7144db..020640cd8 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.21.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.21.1"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 484fe5ed0..e9854ad3a 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.21.0") +let version = Version("2.21.1") let cli = XcodeGenCLI(version: version) cli.execute() From 8a0615e883584b221c7433d66c22668b4c409899 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 6 May 2021 00:07:38 +1000 Subject: [PATCH 079/284] Fix config variant lookup (#1070) * fix config lookup * update changelog --- CHANGELOG.md | 1 + Sources/ProjectSpec/Config.swift | 26 +++++++++---------- Tests/ProjectSpecTests/ProjectSpecTests.swift | 21 +++++++++++++++ .../SchemeGeneratorTests.swift | 12 ++++----- 4 files changed, 40 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c973eb3f..116f13009 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ #### Fixed - Fixed no such module `DOT` error when package is used as a dependency [#1067](https://github.com/yonaskolb/XcodeGen/pull/1067) @yanamura +- Fixed scheme config variant lookups for some configs like `ProdDebug` and `Prod-Debug` that broke in 2.21.0 [#1070](https://github.com/yonaskolb/XcodeGen/pull/1070) @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.21.0...2.21.1) diff --git a/Sources/ProjectSpec/Config.swift b/Sources/ProjectSpec/Config.swift index 70247873b..6eddcc4a2 100644 --- a/Sources/ProjectSpec/Config.swift +++ b/Sources/ProjectSpec/Config.swift @@ -22,22 +22,20 @@ public enum ConfigType: String { } } -public extension Collection where Element == Config { - func first(including configVariant: String, for type: ConfigType) -> Config? { - first(where: { $0.type == type && $0.name.variantName(for: $0.type) == configVariant }) +extension Config { + + public func matchesVariant(_ variant: String, for type: ConfigType) -> Bool { + guard self.type == type else { return false } + let nameWithoutType = self.name.lowercased() + .replacingOccurrences(of: type.name.lowercased(), with: "") + .trimmingCharacters(in: CharacterSet(charactersIn: " -_")) + return nameWithoutType == variant.lowercased() } } -private extension String { - func variantName(for configType: ConfigType?) -> String { - self.components(separatedBy: " ") - .compactMap { component in - if component.lowercased() == (configType?.name.lowercased() ?? "") { - return nil - } - return component - } - .joined(separator: " ") - .trimmingCharacters(in: CharacterSet.whitespaces) +public extension Collection where Element == Config { + func first(including configVariant: String, for type: ConfigType) -> Config? { + first { $0.matchesVariant(configVariant, for: type) } } } + diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 7284a799d..1b2bfd858 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -339,6 +339,27 @@ class ProjectSpecTests: XCTestCase { project.schemes = [scheme] try project.validate() } + + $0.it("validates scheme variants") { + + func expectVariant(_ variant: String, type: ConfigType = .debug, for config: Config, matches: Bool, file: String = #file, line: Int = #line) throws { + let configs = [Config(name: "xxxxxxxxxxx", type: .debug), config] + let foundConfig = configs.first(including: variant, for: type) + let found = foundConfig != nil && foundConfig != configs[0] + try expect(found, file: file, line: line) == matches + } + + try expectVariant("Dev", for: Config(name: "DevDebug", type: .debug), matches: true) + try expectVariant("Dev", for: Config(name: "Dev debug", type: .debug), matches: true) + try expectVariant("Dev", for: Config(name: "DEV DEBUG", type: .debug), matches: true) + try expectVariant("Dev", for: Config(name: "Debug Dev", type: .debug), matches: true) + try expectVariant("Dev", for: Config(name: "dev Debug", type: .debug), matches: true) + try expectVariant("Dev", for: Config(name: "Dev debug", type: .release), matches: false) + try expectVariant("Dev", for: Config(name: "Dev-debug", type: .debug), matches: true) + try expectVariant("Dev", for: Config(name: "Dev_debug", type: .debug), matches: true) + try expectVariant("Prod", for: Config(name: "PreProd debug", type: .debug), matches: false) + try expectVariant("Develop", for: Config(name: "Dev debug", type: .debug), matches: false) + } } } diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index ac392130d..1aa42972d 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -197,11 +197,11 @@ class SchemeGeneratorTests: XCTestCase { var target = app target.scheme = TargetScheme(configVariants: configVariants) - // Including here a double test for custom upper/lowercase in config types + // Including here a double test for custom upper/lowercase, and dash delimited in config types let configs: [Config] = [ - Config(name: "Test Debug", type: .debug), + Config(name: "Test-Debug", type: .debug), Config(name: "PreProd debug", type: .debug), - Config(name: "Prod Debug", type: .debug), + Config(name: "Prod-Debug", type: .debug), Config(name: "Test Release", type: .release), Config(name: "PreProd release", type: .release), Config(name: "Prod Release", type: .release), @@ -224,10 +224,10 @@ class SchemeGeneratorTests: XCTestCase { try expect(xcscheme.analyzeAction?.buildConfiguration) == "\(variantName) debug" try expect(xcscheme.archiveAction?.buildConfiguration) == "\(variantName) release" } else { - try expect(xcscheme.launchAction?.buildConfiguration) == "\(variantName) Debug" - try expect(xcscheme.testAction?.buildConfiguration) == "\(variantName) Debug" + try expect(xcscheme.launchAction?.buildConfiguration) == "\(variantName)-Debug" + try expect(xcscheme.testAction?.buildConfiguration) == "\(variantName)-Debug" try expect(xcscheme.profileAction?.buildConfiguration) == "\(variantName) Release" - try expect(xcscheme.analyzeAction?.buildConfiguration) == "\(variantName) Debug" + try expect(xcscheme.analyzeAction?.buildConfiguration) == "\(variantName)-Debug" try expect(xcscheme.archiveAction?.buildConfiguration) == "\(variantName) Release" } } From 7c510af3d7655eb77b4eee231963040ef8795dc8 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 6 May 2021 08:33:42 +1000 Subject: [PATCH 080/284] Fix Xcode alert on generation (#1072) * fix xcode warning alert on regeneration * commit fixture diffs * update changelog --- CHANGELOG.md | 1 + Package.resolved | 8 ++++---- Sources/XcodeGenKit/ProjectGenerator.swift | 3 ++- .../project.xcworkspace/contents.xcworkspacedata | 2 +- .../project.xcworkspace/contents.xcworkspacedata | 2 +- .../SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme | 3 ++- .../project.xcworkspace/contents.xcworkspacedata | 2 +- .../project.xcworkspace/contents.xcworkspacedata | 2 +- .../xcshareddata/xcschemes/App_Clip.xcscheme | 3 ++- .../xcshareddata/xcschemes/App_Scheme.xcscheme | 3 ++- .../xcshareddata/xcschemes/App_iOS Production.xcscheme | 3 ++- .../xcshareddata/xcschemes/App_iOS Staging.xcscheme | 3 ++- .../xcshareddata/xcschemes/App_iOS Test.xcscheme | 3 ++- .../xcshareddata/xcschemes/App_macOS.xcscheme | 3 ++- .../xcshareddata/xcschemes/App_watchOS.xcscheme | 3 ++- .../xcshareddata/xcschemes/Framework.xcscheme | 3 ++- .../xcshareddata/xcschemes/Tool.xcscheme | 3 ++- .../xcshareddata/xcschemes/iMessageApp.xcscheme | 3 ++- .../xcshareddata/xcschemes/iMessageExtension.xcscheme | 3 ++- .../project.xcworkspace/contents.xcworkspacedata | 2 +- 20 files changed, 36 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 116f13009..4c8b43031 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ #### Fixed - Fixed no such module `DOT` error when package is used as a dependency [#1067](https://github.com/yonaskolb/XcodeGen/pull/1067) @yanamura - Fixed scheme config variant lookups for some configs like `ProdDebug` and `Prod-Debug` that broke in 2.21.0 [#1070](https://github.com/yonaskolb/XcodeGen/pull/1070) @yonaskolb +- Fixed Xcode alerting to project changes after regeneration [#1072](https://github.com/yonaskolb/XcodeGen/pull/1072) @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.21.0...2.21.1) diff --git a/Package.resolved b/Package.resolved index 26a8147f3..9c25e6d48 100644 --- a/Package.resolved +++ b/Package.resolved @@ -78,8 +78,8 @@ "repositoryURL": "https://github.com/tuist/XcodeProj.git", "state": { "branch": null, - "revision": "82bf5efcaa27e94ed8c761c1eb3e397b6dea82b9", - "version": "7.18.0" + "revision": "94e55232d227f9d78b811c98cb2e5d0cbd08987b", + "version": "7.22.0" } }, { @@ -87,8 +87,8 @@ "repositoryURL": "https://github.com/jpsim/Yams.git", "state": { "branch": null, - "revision": "138cf1b701cf825233b92ceac919152d5aba8a3f", - "version": "4.0.1" + "revision": "9ff1cc9327586db4e0c8f46f064b6a82ec1566fa", + "version": "4.0.6" } } ] diff --git a/Sources/XcodeGenKit/ProjectGenerator.swift b/Sources/XcodeGenKit/ProjectGenerator.swift index 8fb149c6f..65f3216ec 100644 --- a/Sources/XcodeGenKit/ProjectGenerator.swift +++ b/Sources/XcodeGenKit/ProjectGenerator.swift @@ -32,7 +32,8 @@ public class ProjectGenerator { } func generateWorkspace() throws -> XCWorkspace { - let dataElement: XCWorkspaceDataElement = .file(XCWorkspaceDataFileRef(location: .self(project.defaultProjectPath.lastComponent))) + let selfReference = XCWorkspaceDataFileRef(location: .`self`("")) + let dataElement = XCWorkspaceDataElement.file(selfReference) let workspaceData = XCWorkspaceData(children: [dataElement]) return XCWorkspace(data: workspaceData) } diff --git a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 881a6dff3..919434a62 100644 --- a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Tests/Fixtures/SPM/SPM.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 4c49d31b6..919434a62 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme b/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme index 3c95caf37..ed6efd9af 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme @@ -4,7 +4,8 @@ version = "1.3"> + buildImplicitDependencies = "YES" + runPostActionsOnFailure = "NO"> + location = "self:"> diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Tests/Fixtures/TestProject/Project.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 881a6dff3..919434a62 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme index 87860eacc..45020c38c 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme @@ -4,7 +4,8 @@ version = "1.3"> + buildImplicitDependencies = "YES" + runPostActionsOnFailure = "NO"> + buildImplicitDependencies = "YES" + runPostActionsOnFailure = "NO"> + buildImplicitDependencies = "YES" + runPostActionsOnFailure = "NO"> + buildImplicitDependencies = "YES" + runPostActionsOnFailure = "NO"> + buildImplicitDependencies = "YES" + runPostActionsOnFailure = "NO"> + buildImplicitDependencies = "YES" + runPostActionsOnFailure = "NO"> + buildImplicitDependencies = "YES" + runPostActionsOnFailure = "NO"> + buildImplicitDependencies = "NO" + runPostActionsOnFailure = "NO"> diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme index aa620c94c..2e8e81306 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme @@ -4,7 +4,8 @@ version = "1.3"> + buildImplicitDependencies = "YES" + runPostActionsOnFailure = "NO"> + buildImplicitDependencies = "YES" + runPostActionsOnFailure = "NO"> + buildImplicitDependencies = "YES" + runPostActionsOnFailure = "NO"> + location = "self:"> From 4233cc8578b660f7a5df2a345fd3bbaf425af747 Mon Sep 17 00:00:00 2001 From: "freddi(Yuki Aki)" Date: Thu, 6 May 2021 11:54:33 +0900 Subject: [PATCH 081/284] Support runPostActionsOnFailure on build scheme (#1075) * supports runPostActionsOnFailure on build scheme * updates test for runPostActionsOnFailure update runPostActionsOnFailure tests * update Docs for runPostActionsOnFailure * update change log * Update CHANGELOG.md * Update CHANGELOG.md --- CHANGELOG.md | 3 +++ Docs/ProjectSpec.md | 5 +++++ Sources/ProjectSpec/Scheme.swift | 10 +++++++++- Sources/XcodeGenKit/SchemeGenerator.swift | 3 ++- .../xcshareddata/xcschemes/Framework.xcscheme | 2 +- Tests/Fixtures/TestProject/project.yml | 1 + Tests/ProjectSpecTests/SpecLoadingTests.swift | 4 ++++ Tests/XcodeGenKitTests/SchemeGeneratorTests.swift | 1 + 8 files changed, 26 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c8b43031..592ad88d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ ## 2.21.1 +#### Added +- Support `runPostActionsOnFailure` for running build post scripts on failing build [#1075](https://github.com/yonaskolb/XcodeGen/pull/1075) @freddi-kit + #### Fixed - Fixed no such module `DOT` error when package is used as a dependency [#1067](https://github.com/yonaskolb/XcodeGen/pull/1067) @yanamura - Fixed scheme config variant lookups for some configs like `ProdDebug` and `Prod-Debug` that broke in 2.21.0 [#1070](https://github.com/yonaskolb/XcodeGen/pull/1070) @yonaskolb diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 6487a9a6b..dfeedd7cc 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -752,6 +752,11 @@ Schemes allows for more control than the convenience [Target Scheme](#target-sch - `true`: Discover implicit dependencies of this scheme - `false`: Only build explicit dependencies of this scheme +- [ ] **runPostActionsOnFailure**: **Bool** - Flag to determine if Xcode should run post scripts despite failure build. By default this is `false` if not set. +- `true`: Run post scripts even if build is failed +- `false`: Only run post scripts if build success + + ```yaml targets: MyTarget: all diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index 47d8ad8aa..e5e30b1b0 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -73,25 +73,29 @@ public struct Scheme: Equatable { public struct Build: Equatable { public static let parallelizeBuildDefault = true public static let buildImplicitDependenciesDefault = true + public static let runPostActionsOnFailureDefault = false public var targets: [BuildTarget] public var parallelizeBuild: Bool public var buildImplicitDependencies: Bool public var preActions: [ExecutionAction] public var postActions: [ExecutionAction] + public var runPostActionsOnFailure: Bool public init( targets: [BuildTarget], parallelizeBuild: Bool = parallelizeBuildDefault, buildImplicitDependencies: Bool = buildImplicitDependenciesDefault, preActions: [ExecutionAction] = [], - postActions: [ExecutionAction] = [] + postActions: [ExecutionAction] = [], + runPostActionsOnFailure: Bool = false ) { self.targets = targets self.parallelizeBuild = parallelizeBuild self.buildImplicitDependencies = buildImplicitDependencies self.preActions = preActions self.postActions = postActions + self.runPostActionsOnFailure = runPostActionsOnFailure } } @@ -671,6 +675,7 @@ extension Scheme.Build: JSONObjectConvertible { postActions = try jsonDictionary.json(atKeyPath: "postActions")?.map(Scheme.ExecutionAction.init) ?? [] parallelizeBuild = jsonDictionary.json(atKeyPath: "parallelizeBuild") ?? Scheme.Build.parallelizeBuildDefault buildImplicitDependencies = jsonDictionary.json(atKeyPath: "buildImplicitDependencies") ?? Scheme.Build.buildImplicitDependenciesDefault + runPostActionsOnFailure = jsonDictionary.json(atKeyPath: "runPostActionsOnFailure") ?? Scheme.Build.runPostActionsOnFailureDefault } } @@ -690,6 +695,9 @@ extension Scheme.Build: JSONEncodable { if buildImplicitDependencies != Scheme.Build.buildImplicitDependenciesDefault { dict["buildImplicitDependencies"] = buildImplicitDependencies } + if runPostActionsOnFailure != Scheme.Build.runPostActionsOnFailureDefault { + dict["runPostActionsOnFailure"] = runPostActionsOnFailure + } return dict } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index c45c87d96..907e2e5d4 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -183,7 +183,8 @@ public class SchemeGenerator { preActions: scheme.build.preActions.map(getExecutionAction), postActions: scheme.build.postActions.map(getExecutionAction), parallelizeBuild: scheme.build.parallelizeBuild, - buildImplicitDependencies: scheme.build.buildImplicitDependencies + buildImplicitDependencies: scheme.build.buildImplicitDependencies, + runPostActionsOnFailure: scheme.build.runPostActionsOnFailure ) let testables = zip(testTargets, testBuildTargetEntries).map { testTarget, testBuilEntries in diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme index 5110e3d12..e759440c0 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme @@ -5,7 +5,7 @@ + runPostActionsOnFailure = "YES"> diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 007117770..9ee74b93d 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -341,6 +341,7 @@ schemes: preActions: - script: echo Starting Framework Build settingsTarget: Framework_iOS + runPostActionsOnFailure: true run: commandLineArguments: argument: YES diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 015f62e73..9505eb5c4 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -756,6 +756,7 @@ class SpecLoadingTests: XCTestCase { "build": [ "parallelizeBuild": false, "buildImplicitDependencies": false, + "runPostActionsOnFailure": true, "targets": [ "Target1": "all", "Target2": "testing", @@ -813,6 +814,7 @@ class SpecLoadingTests: XCTestCase { try expect(scheme.build.parallelizeBuild) == false try expect(scheme.build.buildImplicitDependencies) == false + try expect(scheme.build.runPostActionsOnFailure) == true let expectedRun = Scheme.Run( config: "debug", @@ -981,6 +983,7 @@ class SpecLoadingTests: XCTestCase { "build": [ "parallelizeBuild": false, "buildImplicitDependencies": false, + "runPostActionsOnFailure": true, "targets": [ "Target${name_1}": "all", "Target2": "testing", @@ -1046,6 +1049,7 @@ class SpecLoadingTests: XCTestCase { try expect(scheme.build.parallelizeBuild) == false try expect(scheme.build.buildImplicitDependencies) == false + try expect(scheme.build.runPostActionsOnFailure) == true try expect(scheme.run?.storeKitConfiguration) == "Configuration.storekit" diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index 1aa42972d..0fd95eef1 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -69,6 +69,7 @@ class SchemeGeneratorTests: XCTestCase { try expect(scheme.name) == "MyScheme" try expect(xcscheme.buildAction?.buildImplicitDependencies) == true try expect(xcscheme.buildAction?.parallelizeBuild) == true + try expect(xcscheme.buildAction?.runPostActionsOnFailure) == false try expect(xcscheme.buildAction?.preActions.first?.title) == "Script" try expect(xcscheme.buildAction?.preActions.first?.scriptText) == "echo Starting" try expect(xcscheme.buildAction?.preActions.first?.environmentBuildable?.buildableName) == "MyApp.app" From 34dd90ad612fcd09bfe0a6b7e5bf0399d4451966 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Thu, 6 May 2021 20:43:05 +1000 Subject: [PATCH 082/284] Update to 2.22.0 --- CHANGELOG.md | 4 ++-- Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 592ad88d6..e02e54fd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Next Version -## 2.21.1 +## 2.22.0 #### Added - Support `runPostActionsOnFailure` for running build post scripts on failing build [#1075](https://github.com/yonaskolb/XcodeGen/pull/1075) @freddi-kit @@ -12,7 +12,7 @@ - Fixed scheme config variant lookups for some configs like `ProdDebug` and `Prod-Debug` that broke in 2.21.0 [#1070](https://github.com/yonaskolb/XcodeGen/pull/1070) @yonaskolb - Fixed Xcode alerting to project changes after regeneration [#1072](https://github.com/yonaskolb/XcodeGen/pull/1072) @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.21.0...2.21.1) +[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.21.0...2.22.0) ## 2.21.0 diff --git a/Makefile b/Makefile index f4100679b..e9a01262f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.21.1 +VERSION = 2.22.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 020640cd8..087f73615 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.21.1"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.22.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index e9854ad3a..32aacfd47 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.21.1") +let version = Version("2.22.0") let cli = XcodeGenCLI(version: version) cli.execute() From dc8544f34613ba06f6f26c81e6e8b5c442715378 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 6 May 2021 20:51:51 +1000 Subject: [PATCH 083/284] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e02e54fd4..145b7c901 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,12 @@ #### Added - Support `runPostActionsOnFailure` for running build post scripts on failing build [#1075](https://github.com/yonaskolb/XcodeGen/pull/1075) @freddi-kit +#### Changed +- Xcode no longer alerts to project changes after regeneration, due to internal workspace not regenerating if identical [#1072](https://github.com/yonaskolb/XcodeGen/pull/1072) @yonaskolb + #### Fixed - Fixed no such module `DOT` error when package is used as a dependency [#1067](https://github.com/yonaskolb/XcodeGen/pull/1067) @yanamura - Fixed scheme config variant lookups for some configs like `ProdDebug` and `Prod-Debug` that broke in 2.21.0 [#1070](https://github.com/yonaskolb/XcodeGen/pull/1070) @yonaskolb -- Fixed Xcode alerting to project changes after regeneration [#1072](https://github.com/yonaskolb/XcodeGen/pull/1072) @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.21.0...2.22.0) From b6d87a1cc6ee35af64a916a3873776bc4f71891c Mon Sep 17 00:00:00 2001 From: David Lee <74229219+DavidWoohyunLee@users.noreply.github.com> Date: Sun, 16 May 2021 02:12:04 -0500 Subject: [PATCH 084/284] added () to config variant trimming character set (#1078) * added () to config variant trimming character set * added test cases * added test cases and changelog entry * Update CHANGELOG.md removed Co-authored-by: Yonas Kolb * fixed incorrect test case Co-authored-by: Yonas Kolb --- CHANGELOG.md | 3 +++ Sources/ProjectSpec/Config.swift | 2 +- Tests/ProjectSpecTests/ProjectSpecTests.swift | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 145b7c901..eb407eaac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Next Version +#### Fixed +- Added `()` to config variant trimming charater set to fix scheme config variant lookups for some configs like `Debug (Development)` that broke in 2.22.0 [#1078](https://github.com/yonaskolb/XcodeGen/pull/1078) @DavidWoohyunLee + ## 2.22.0 #### Added diff --git a/Sources/ProjectSpec/Config.swift b/Sources/ProjectSpec/Config.swift index 6eddcc4a2..d5bb3996b 100644 --- a/Sources/ProjectSpec/Config.swift +++ b/Sources/ProjectSpec/Config.swift @@ -28,7 +28,7 @@ extension Config { guard self.type == type else { return false } let nameWithoutType = self.name.lowercased() .replacingOccurrences(of: type.name.lowercased(), with: "") - .trimmingCharacters(in: CharacterSet(charactersIn: " -_")) + .trimmingCharacters(in: CharacterSet(charactersIn: " -_()")) return nameWithoutType == variant.lowercased() } } diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 1b2bfd858..07bbe8441 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -359,6 +359,9 @@ class ProjectSpecTests: XCTestCase { try expectVariant("Dev", for: Config(name: "Dev_debug", type: .debug), matches: true) try expectVariant("Prod", for: Config(name: "PreProd debug", type: .debug), matches: false) try expectVariant("Develop", for: Config(name: "Dev debug", type: .debug), matches: false) + try expectVariant("Development", for: Config(name: "Debug (Development)", type: .debug), matches: true) + try expectVariant("Staging", for: Config(name: "Debug (Staging)", type: .debug), matches: true) + try expectVariant("Production", for: Config(name: "Debug (Production)", type: .debug), matches: true) } } } From 38888237c723673e38a822131d3378944d6d1b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kry=C5=A1tof=20Mat=C4=9Bj?= Date: Tue, 18 May 2021 12:52:24 +0200 Subject: [PATCH 085/284] Add platform filter to dependencies (#951) --- CHANGELOG.md | 3 + Docs/ProjectSpec.md | 1 + Sources/ProjectSpec/Dependency.swift | 18 +++- Sources/XcodeGenKit/PBXProjGenerator.swift | 90 +++++++++++-------- .../Project.xcodeproj/project.pbxproj | 11 ++- Tests/Fixtures/TestProject/project.yml | 4 + Tests/ProjectSpecTests/SpecLoadingTests.swift | 12 +-- .../PBXProjGeneratorTests.swift | 72 +++++++++++++++ 8 files changed, 164 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb407eaac..922146f8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Next Version +#### Added +- Added ability to set custom platform for dependency [#934](https://github.com/yonaskolb/XcodeGen/pull/934) @raptorxcz + #### Fixed - Added `()` to config variant trimming charater set to fix scheme config variant lookups for some configs like `Debug (Development)` that broke in 2.22.0 [#1078](https://github.com/yonaskolb/XcodeGen/pull/1078) @DavidWoohyunLee diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index dfeedd7cc..7c154469f 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -428,6 +428,7 @@ A dependency can be one of a 6 types: - [ ] **codeSign**: **Bool** - Whether the `codeSignOnCopy` setting is applied when embedding framework. Defaults to true - [ ] **removeHeaders**: **Bool** - Whether the `removeHeadersOnCopy` setting is applied when embedding the framework. Defaults to true - [ ] **weak**: **Bool** - Whether the `Weak` setting is applied when linking the framework. Defaults to false +- [ ] **platform**: **String** - Add dependency to selected platforms. Available platforms are: **iOS**, **macOS** and **all**. Defaults is **all** **Implicit Framework options**: diff --git a/Sources/ProjectSpec/Dependency.swift b/Sources/ProjectSpec/Dependency.swift index 13e8b4849..726e1e1a8 100644 --- a/Sources/ProjectSpec/Dependency.swift +++ b/Sources/ProjectSpec/Dependency.swift @@ -5,6 +5,7 @@ public struct Dependency: Equatable { public static let removeHeadersDefault = true public static let implicitDefault = false public static let weakLinkDefault = false + public static let platformDefault: Platform = .all public var type: DependencyType public var reference: String @@ -14,6 +15,7 @@ public struct Dependency: Equatable { public var link: Bool? public var implicit: Bool = implicitDefault public var weakLink: Bool = weakLinkDefault + public var platform: Platform = platformDefault public init( type: DependencyType, @@ -22,7 +24,8 @@ public struct Dependency: Equatable { codeSign: Bool? = nil, link: Bool? = nil, implicit: Bool = implicitDefault, - weakLink: Bool = weakLinkDefault + weakLink: Bool = weakLinkDefault, + platform: Platform = platformDefault ) { self.type = type self.reference = reference @@ -31,6 +34,13 @@ public struct Dependency: Equatable { self.link = link self.implicit = implicit self.weakLink = weakLink + self.platform = platform + } + + public enum Platform: String, Equatable { + case all + case iOS + case macOS } public enum CarthageLinkType: String { @@ -112,6 +122,12 @@ extension Dependency: JSONObjectConvertible { if let bool: Bool = jsonDictionary.json(atKeyPath: "weak") { weakLink = bool } + + if let platformString: String = jsonDictionary.json(atKeyPath: "platform"), let platform = Platform(rawValue: platformString) { + self.platform = platform + } else { + self.platform = .all + } } } diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 9b4f80978..8587e5c30 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -336,7 +336,7 @@ public class PBXProjGenerator { return addObject(buildConfig) } - let dependencies = target.targets.map { generateTargetDependency(from: target.name, to: $0) } + let dependencies = target.targets.map { generateTargetDependency(from: target.name, to: $0, platform: nil) } let defaultConfigurationName = project.options.defaultConfig ?? project.configs.first?.name ?? "" let buildConfigList = addObject(XCConfigurationList( @@ -352,7 +352,7 @@ public class PBXProjGenerator { aggregateTarget.dependencies = dependencies } - func generateTargetDependency(from: String, to target: String) -> PBXTargetDependency { + func generateTargetDependency(from: String, to target: String, platform: String?) -> PBXTargetDependency { guard let targetObject = targetObjects[target] ?? targetAggregateObjects[target] else { fatalError("Target dependency not found: from ( \(from) ) to ( \(target) )") } @@ -368,6 +368,7 @@ public class PBXProjGenerator { let targetDependency = addObject( PBXTargetDependency( + platformFilter: platform, target: targetObject, targetProxy: targetProxy ) @@ -698,16 +699,16 @@ public class PBXProjGenerator { return !linkingAttributes.isEmpty ? ["ATTRIBUTES": linkingAttributes] : nil } - func processTargetDependency(_ dependency: Dependency, dependencyTarget: Target, embedFileReference: PBXFileElement?) { + func processTargetDependency(_ dependency: Dependency, dependencyTarget: Target, embedFileReference: PBXFileElement?, platform: String?) { let dependencyLinkage = dependencyTarget.defaultLinkage let link = dependency.link ?? ((dependencyLinkage == .dynamic && target.type != .staticLibrary) || (dependencyLinkage == .static && target.type.isExecutable)) if link, let dependencyFile = embedFileReference { - let buildFile = addObject( - PBXBuildFile(file: dependencyFile, settings: getDependencyFrameworkSettings(dependency: dependency)) - ) + let pbxBuildFile = PBXBuildFile(file: dependencyFile, settings: getDependencyFrameworkSettings(dependency: dependency)) + pbxBuildFile.platformFilter = platform + let buildFile = addObject(pbxBuildFile) targetFrameworkBuildFiles.append(buildFile) if !anyDependencyRequiresObjCLinking @@ -718,12 +719,12 @@ public class PBXProjGenerator { let embed = dependency.embed ?? target.type.shouldEmbed(dependencyTarget) if embed { - let embedFile = addObject( - PBXBuildFile( - file: embedFileReference, - settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? !dependencyTarget.type.isExecutable) - ) + let pbxBuildFile = PBXBuildFile( + file: embedFileReference, + settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? !dependencyTarget.type.isExecutable) ) + pbxBuildFile.platformFilter = platform + let embedFile = addObject(pbxBuildFile) if dependencyTarget.type.isExtension { // embed app extension @@ -746,7 +747,8 @@ public class PBXProjGenerator { for dependency in targetDependencies { let embed = dependency.embed ?? target.shouldEmbedDependencies - + let platform = makePlatform(for: dependency.platform) + switch dependency.type { case .target: let dependencyTargetReference = try TargetReference(dependency.reference) @@ -754,15 +756,15 @@ public class PBXProjGenerator { switch dependencyTargetReference.location { case .local: let dependencyTargetName = dependency.reference - let targetDependency = generateTargetDependency(from: target.name, to: dependencyTargetName) + let targetDependency = generateTargetDependency(from: target.name, to: dependencyTargetName, platform: platform) dependencies.append(targetDependency) guard let dependencyTarget = project.getTarget(dependencyTargetName) else { continue } - processTargetDependency(dependency, dependencyTarget: dependencyTarget, embedFileReference: targetFileReferences[dependencyTarget.name]) + processTargetDependency(dependency, dependencyTarget: dependencyTarget, embedFileReference: targetFileReferences[dependencyTarget.name], platform: platform) case .project(let dependencyProjectName): let dependencyTargetName = dependencyTargetReference.name let (targetDependency, dependencyTarget, dependencyProductProxy) = try generateExternalTargetDependency(from: target.name, to: dependencyTargetName, in: dependencyProjectName, platform: target.platform) dependencies.append(targetDependency) - processTargetDependency(dependency, dependencyTarget: dependencyTarget, embedFileReference: dependencyProductProxy) + processTargetDependency(dependency, dependencyTarget: dependencyTarget, embedFileReference: dependencyProductProxy, platform: platform) } case .framework: @@ -796,9 +798,9 @@ public class PBXProjGenerator { } if dependency.link ?? (target.type != .staticLibrary) { - let buildFile = addObject( - PBXBuildFile(file: fileReference, settings: getDependencyFrameworkSettings(dependency: dependency)) - ) + let pbxBuildFile = PBXBuildFile(file: fileReference, settings: getDependencyFrameworkSettings(dependency: dependency)) + pbxBuildFile.platformFilter = platform + let buildFile = addObject(pbxBuildFile) targetFrameworkBuildFiles.append(buildFile) } @@ -808,9 +810,9 @@ public class PBXProjGenerator { } if embed { - let embedFile = addObject( - PBXBuildFile(file: fileReference, settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) - ) + let pbxBuildFile = PBXBuildFile(file: fileReference, settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) + pbxBuildFile.platformFilter = platform + let embedFile = addObject(pbxBuildFile) copyFrameworksReferences.append(embedFile) } case .sdk(let root): @@ -850,18 +852,18 @@ public class PBXProjGenerator { frameworkFiles.append(fileReference) } - let buildFile = addObject( - PBXBuildFile( - file: fileReference, - settings: getDependencyFrameworkSettings(dependency: dependency) - ) + let pbxBuildFile = PBXBuildFile( + file: fileReference, + settings: getDependencyFrameworkSettings(dependency: dependency) ) + pbxBuildFile.platformFilter = platform + let buildFile = addObject(pbxBuildFile) targetFrameworkBuildFiles.append(buildFile) if dependency.embed == true { - let embedFile = addObject( - PBXBuildFile(file: fileReference, settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) - ) + let pbxBuildFile = PBXBuildFile(file: fileReference, settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) + pbxBuildFile.platformFilter = platform + let embedFile = addObject(pbxBuildFile) copyFrameworksReferences.append(embedFile) } @@ -883,9 +885,9 @@ public class PBXProjGenerator { let isStaticLibrary = target.type == .staticLibrary let isCarthageStaticLink = dependency.carthageLinkType == .static if dependency.link ?? (!isStaticLibrary && !isCarthageStaticLink) { - let buildFile = self.addObject( - PBXBuildFile(file: fileReference, settings: getDependencyFrameworkSettings(dependency: dependency)) - ) + let pbxBuildFile = PBXBuildFile(file: fileReference, settings: getDependencyFrameworkSettings(dependency: dependency)) + pbxBuildFile.platformFilter = platform + let buildFile = addObject(pbxBuildFile) targetFrameworkBuildFiles.append(buildFile) } } @@ -917,16 +919,16 @@ public class PBXProjGenerator { targetFrameworkBuildFiles.append(buildFile) } else { let targetDependency = addObject( - PBXTargetDependency(product: packageDependency) + PBXTargetDependency(platformFilter: platform, product: packageDependency) ) dependencies.append(targetDependency) } if dependency.embed == true { - let embedFile = addObject( - PBXBuildFile(product: packageDependency, - settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) - ) + let pbxBuildFile = PBXBuildFile(product: packageDependency, + settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) + pbxBuildFile.platformFilter = platform + let embedFile = addObject(pbxBuildFile) copyFrameworksReferences.append(embedFile) } case .bundle: @@ -940,6 +942,7 @@ public class PBXProjGenerator { ) let pbxBuildFile = PBXBuildFile(file: fileReference, settings: nil) + pbxBuildFile.platformFilter = platform let buildFile = addObject(pbxBuildFile) copyBundlesReferences.append(buildFile) @@ -978,6 +981,8 @@ public class PBXProjGenerator { } } } + + carthageFrameworksToEmbed = carthageFrameworksToEmbed.uniqued() var buildPhases: [PBXBuildPhase] = [] @@ -1310,6 +1315,17 @@ public class PBXProjGenerator { targetObject.productType = target.type } } + + private func makePlatform(for platform: Dependency.Platform) -> String? { + switch platform { + case .all: + return nil + case .macOS: + return "maccatalyst" + case .iOS: + return "ios" + } + } func getInfoPlists(for target: Target) -> [Config: String] { var searchForDefaultInfoPlist: Bool = true diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 4b8df8bcc..b9ce92204 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -46,7 +46,7 @@ 21425F6DE3D493B6F1E33D21 /* Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */; }; 216B220EC7961DF7CA9188B7 /* StaticLibrary_ObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5A2B916A11DCC2565241359F /* StaticLibrary_ObjC.h */; }; 21CA04F29CD0DEB0DD27B808 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; }; - 262891CCD5F74316610437FA /* Framework2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EF21DF245F66BEF5446AAEF /* Framework2.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 262891CCD5F74316610437FA /* Framework2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EF21DF245F66BEF5446AAEF /* Framework2.framework */; platformFilter = ios; settings = {ATTRIBUTES = (Weak, ); }; }; 265B6A05C0198FD2EB485173 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93C033648A37D95027845BD3 /* main.swift */; }; 2730C6D0A35AED4ADD6EDF17 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0704B6CAFBB53E0EBB08F6B3 /* ViewController.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; 28A96EBC76D53817AABDA91C /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 8AF20308873AEEEC4D8C45D1 /* Settings.bundle */; }; @@ -84,7 +84,7 @@ 61601545B6BE00CA74A4E38F /* SceneKitCatalog.scnassets in Resources */ = {isa = PBXBuildFile; fileRef = C9E358FBE2B54D2B5C7FD609 /* SceneKitCatalog.scnassets */; }; 6241507B4947B0B65429587C /* ExternalTarget.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F6ADE654A3459AFDA2CC0CD3 /* ExternalTarget.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 632774E7F21CCB386A76B2A8 /* MessagesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B198242976C3395E31FE000A /* MessagesViewController.swift */; }; - 63D8E7F00276736EDA62D227 /* Framework2.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3EF21DF245F66BEF5446AAEF /* Framework2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 63D8E7F00276736EDA62D227 /* Framework2.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3EF21DF245F66BEF5446AAEF /* Framework2.framework */; platformFilter = ios; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 65B3BAC02D5FAE632719C984 /* Model.xcmappingmodel in Sources */ = {isa = PBXBuildFile; fileRef = BF59AC868D227C92CA8B1B57 /* Model.xcmappingmodel */; }; 65EBD2D87F1F5FDA63F8C027 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; }; 666AA5F3F63C8FD7C68A6CC5 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -97,6 +97,7 @@ 747CAE14D196F5652E93353C /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 2E1E747C7BC434ADB80CC269 /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; 75F2774F183838AF34CA9B8A /* StaticLibrary_ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D0C79A8C750EC0DE748C463 /* StaticLibrary_ObjC.m */; }; 768648ED7E93B6D888574144 /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = F2950763C4C568CC85021D18 /* module.modulemap */; }; + 778F71CA1CC4BEECDACAD8B9 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 77C3CB285572EA4BB7E201A7 /* App_Clip.app in Embed App Clips */ = {isa = PBXBuildFile; fileRef = 38DB679FF1CF4E379D1AB103 /* App_Clip.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 7A0DABBEA55B06E148C665A8 /* StaticLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AC91042453E18DF74BA1C0F /* StaticLibrary.swift */; }; 7A8C78212CEAC6452DFAB00E /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; @@ -121,7 +122,7 @@ A7D1A9942302569A9515696A /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D296BB7355994040E197A1EE /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; A9548E5DCFE92236494164DF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE1F06D99242F4223D081F0D /* LaunchScreen.storyboard */; }; AFF19412E9B35635D3AF48CB /* XPC_Service.m in Sources */ = {isa = PBXBuildFile; fileRef = 148B7C933698BCC4F1DBA979 /* XPC_Service.m */; }; - B142965C5AE9C6200BF65802 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; }; + B142965C5AE9C6200BF65802 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; platformFilter = maccatalyst; }; B18C121B0A4D43ED8149D8E2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 79325B44B19B83EC6CEDBCC5 /* LaunchScreen.storyboard */; }; B20617116B230DED1F7AF5E5 /* libStaticLibrary_ObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B221F5A689AD7D3AD52F56B8 /* libStaticLibrary_ObjC.a */; }; B2D43A31C184E34EF9CB743C /* Framework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -129,6 +130,7 @@ B49D3A51787E362DE4D0E78A /* SomeXPCService.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70A8E15C81E454DC950C59F0 /* SomeXPCService.xpc */; }; B9F3C9E77019EC3423A7F5D8 /* TestProjectTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87DF9DCA8399E3214A7E27CF /* TestProjectTests.swift */; }; BAA1C1E3828F5D43546AF997 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BB1B49A91B892152D68ED76 /* libc++.tbd */; }; + BB06A57E259D0D2A001EA21F /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; BD1419893577E6CEDF8CBA83 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; BD95416F2005199F6B3572CF /* Framework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; BFCCC56337A5D9D513C1C791 /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = F2950763C4C568CC85021D18 /* module.modulemap */; }; @@ -386,6 +388,7 @@ dstSubfolderSpec = 10; files = ( 1E457F55331FD2C3E8E00BE2 /* Result.framework in Embed Frameworks */, + 778F71CA1CC4BEECDACAD8B9 /* Result.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -508,6 +511,7 @@ files = ( 535A98A3E3B74E09891D977F /* TestFramework.framework in Embed Frameworks */, BD1419893577E6CEDF8CBA83 /* Result.framework in Embed Frameworks */, + BB06A57E259D0D2A001EA21F /* Result.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -2645,6 +2649,7 @@ }; A94F38390A74E215EC107BB5 /* PBXTargetDependency */ = { isa = PBXTargetDependency; + platformFilter = ios; target = CE7D183D3752B5B35D2D8E6D /* Framework2_iOS */; targetProxy = D3E1EE9F1E22A388123A116D /* PBXContainerItemProxy */; }; diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 9ee74b93d..78b84d60c 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -116,12 +116,16 @@ targets: PRODUCT_BUNDLE_IDENTIFIER: com.project.app dependencies: - target: Framework_iOS + platform: all - target: StaticLibrary_ObjC_iOS - carthage: Result + platform: macOS - carthage: SwiftyJSON linkType: static + platform: iOS - target: Framework2_iOS weak: true + platform: iOS - target: App_watchOS - target: iMessageApp - sdk: Contacts.framework diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 9505eb5c4..d302e8b3d 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -376,9 +376,9 @@ class SpecLoadingTests: XCTestCase { $0.it("parses target dependencies") { var targetDictionary = validTarget targetDictionary["dependencies"] = [ - ["target": "name", "embed": false], - ["target": "project/name", "embed": false], - ["carthage": "name", "findFrameworks": true], + ["target": "name", "embed": false, "platform": "all"], + ["target": "project/name", "embed": false, "platform": "macOS"], + ["carthage": "name", "findFrameworks": true, "platform": "iOS"], ["carthage": "name", "findFrameworks": true, "linkType": "static"], ["framework": "path", "weak": true], ["sdk": "Contacts.framework"], @@ -389,9 +389,9 @@ class SpecLoadingTests: XCTestCase { ] let target = try Target(name: "test", jsonDictionary: targetDictionary) try expect(target.dependencies.count) == 7 - try expect(target.dependencies[0]) == Dependency(type: .target, reference: "name", embed: false) - try expect(target.dependencies[1]) == Dependency(type: .target, reference: "project/name", embed: false) - try expect(target.dependencies[2]) == Dependency(type: .carthage(findFrameworks: true, linkType: .dynamic), reference: "name") + try expect(target.dependencies[0]) == Dependency(type: .target, reference: "name", embed: false, platform: .all) + try expect(target.dependencies[1]) == Dependency(type: .target, reference: "project/name", embed: false, platform: .macOS) + try expect(target.dependencies[2]) == Dependency(type: .carthage(findFrameworks: true, linkType: .dynamic), reference: "name", platform: .iOS) try expect(target.dependencies[3]) == Dependency(type: .carthage(findFrameworks: true, linkType: .static), reference: "name") try expect(target.dependencies[4]) == Dependency(type: .framework, reference: "path", weakLink: true) try expect(target.dependencies[5]) == Dependency(type: .sdk(root: nil), reference: "Contacts.framework") diff --git a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift index d5905e62f..93280d7be 100644 --- a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift @@ -300,4 +300,76 @@ class PBXProjGeneratorTests: XCTestCase { XCTAssertEqual(pbxProject.attributes[lastUpgradeKey] as? String, project.xcodeVersion) } } + + func testPlatformDependencies() { + describe { + let directoryPath = Path("TestDirectory") + + func createDirectories(_ directories: String) throws { + let yaml = try Yams.load(yaml: directories)! + + func getFiles(_ file: Any, path: Path) -> [Path] { + if let array = file as? [Any] { + return array.flatMap { getFiles($0, path: path) } + } else if let string = file as? String { + return [path + string] + } else if let dictionary = file as? [String: Any] { + var array: [Path] = [] + for (key, value) in dictionary { + array += getFiles(value, path: path + key) + } + return array + } else { + return [] + } + } + + let files = getFiles(yaml, path: directoryPath).filter { $0.extension != nil } + for file in files { + try file.parent().mkpath() + try file.write("") + } + } + + func removeDirectories() { + try? directoryPath.delete() + } + + $0.before { + removeDirectories() + } + + $0.after { + removeDirectories() + } + + $0.it("setups target with different dependencies") { + let directories = """ + Sources: + - MainScreen: + - Entities: + - file.swift + """ + try createDirectories(directories) + let target1 = Target(name: "TestAll", type: .application, platform: .iOS, sources: ["Sources"]) + let target2 = Target(name: "TestiOS", type: .application, platform: .iOS, sources: ["Sources"]) + let target3 = Target(name: "TestmacOS", type: .application, platform: .iOS, sources: ["Sources"]) + let dependency1 = Dependency(type: .target, reference: "TestAll", platform: .all) + let dependency2 = Dependency(type: .target, reference: "TestiOS", platform: .iOS) + let dependency3 = Dependency(type: .target, reference: "TestmacOS", platform: .macOS) + let target = Target(name: "Test", type: .application, platform: .iOS, sources: ["Sources"], dependencies: [dependency1, dependency2, dependency3]) + let project = Project(basePath: directoryPath, name: "Test", targets: [target, target1, target2, target3]) + + let pbxProj = try project.generatePbxProj() + + let targets = pbxProj.projects.first?.targets + let testTargetDependencies = pbxProj.projects.first?.targets.first(where: { $0.name == "Test" })?.dependencies + try expect(targets?.count) == 4 + try expect(testTargetDependencies?.count) == 3 + try expect(testTargetDependencies?[0].platformFilter).beNil() + try expect(testTargetDependencies?[1].platformFilter) == "ios" + try expect(testTargetDependencies?[2].platformFilter) == "maccatalyst" + } + } + } } From 938b8269130df4cdeb9b48352df79bc649b2d56b Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Wed, 19 May 2021 23:00:07 +1000 Subject: [PATCH 086/284] update XcodeProj to fix linux (#1083) --- CHANGELOG.md | 3 ++- Package.resolved | 4 ++-- Package.swift | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 922146f8c..88676650b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ - Added ability to set custom platform for dependency [#934](https://github.com/yonaskolb/XcodeGen/pull/934) @raptorxcz #### Fixed -- Added `()` to config variant trimming charater set to fix scheme config variant lookups for some configs like `Debug (Development)` that broke in 2.22.0 [#1078](https://github.com/yonaskolb/XcodeGen/pull/1078) @DavidWoohyunLee +- Added `()` to config variant trimming charater set to fix scheme config variant lookups for some configs like `Debug (Development)` that broke in 2.22.0 [#1078](https://github.com/yonaskolb/XcodeGen/pull/1078) @DavidWoohyunLee +- Fixed Linux builds on Swift 5.4 [#1083](https://github.com/yonaskolb/XcodeGen/pull/1083) @yonaskolb ## 2.22.0 diff --git a/Package.resolved b/Package.resolved index 9c25e6d48..43d754dad 100644 --- a/Package.resolved +++ b/Package.resolved @@ -78,8 +78,8 @@ "repositoryURL": "https://github.com/tuist/XcodeProj.git", "state": { "branch": null, - "revision": "94e55232d227f9d78b811c98cb2e5d0cbd08987b", - "version": "7.22.0" + "revision": "45e349e1c4e4da1a85a7b9392b737acde2e2f2a8", + "version": "7.23.0" } }, { diff --git a/Package.swift b/Package.swift index cbbb27106..2249f0129 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: "7.18.0"), + .package(url: "https://github.com/tuist/XcodeProj.git", from: "7.23.0"), .package(url: "https://github.com/jakeheis/SwiftCLI.git", from: "6.0.0"), .package(url: "https://github.com/mxcl/Version", from: "2.0.0"), .package(url: "https://github.com/SwiftDocOrg/GraphViz.git", .exact("0.2.0")), From 8bfa2f33e4a7d99eb8b8068bf671c7060b8de63e Mon Sep 17 00:00:00 2001 From: Elliott Williams Date: Fri, 21 May 2021 17:32:09 -0700 Subject: [PATCH 087/284] Revert "Change FRAMEWORK_SEARCH_PATH for xcframeworks (#1015)" (#1081) * Revert "Change FRAMEWORK_SEARCH_PATH for xcframeworks (#1015)" This reverts commit 7b8f5a117ff20367ccd61f15e985857f1adef3fb. * Don't actually revert the changelog entry * ProjectSpec.md: document how to link an xcframework * Update CHANGELOG.md --- CHANGELOG.md | 2 + Docs/ProjectSpec.md | 13 ++++--- Sources/XcodeGenKit/PBXProjGenerator.swift | 14 +------ .../ProjectGeneratorTests.swift | 39 ------------------- 4 files changed, 12 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88676650b..037011040 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ #### Fixed - Added `()` to config variant trimming charater set to fix scheme config variant lookups for some configs like `Debug (Development)` that broke in 2.22.0 [#1078](https://github.com/yonaskolb/XcodeGen/pull/1078) @DavidWoohyunLee - Fixed Linux builds on Swift 5.4 [#1083](https://github.com/yonaskolb/XcodeGen/pull/1083) @yonaskolb +- Reverted "Change FRAMEWORK_SEARCH_PATH for xcframeworks (#1015)", introduced in 2.20.0. XCFrameworks need to be + referenced directly in the project for Xcode's build system to extract the appropriate frameworks [#1081](https://github.com/yonaskolb/XcodeGen/pull/1081) @elliottwilliams ## 2.22.0 diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 7c154469f..3c2941334 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -122,7 +122,7 @@ Note that target names can also be changed by adding a `name` property to a targ - [ ] **groupOrdering**: **[[GroupOrdering]](#groupOrdering)** - An order of groups. - [ ] **transitivelyLinkDependencies**: **Bool** - If this is `true` then targets will link to the dependencies of their target dependencies. If a target should embed its dependencies, such as application and test bundles, it will embed these transitive dependencies as well. Some complex setups might want to set this to `false` and explicitly specify dependencies at every level. Targets can override this with [Target](#target).transitivelyLinkDependencies. Defaults to `false`. - [ ] **generateEmptyDirectories**: **Bool** - If this is `true` then empty directories will be added to project too else will be missed. Defaults to `false`. -- [ ] **findCarthageFrameworks**: **Bool** - When this is set to `true`, all the invididual frameworks for Carthage dependencies will automatically be found. This property can be overriden individually for each carthage dependency - for more details see See **findFrameworks** in the [Dependency](#dependency) section. Defaults to `false`. +- [ ] **findCarthageFrameworks**: **Bool** - When this is set to `true`, all the invididual frameworks for Carthage framework dependencies will automatically be found. This property can be overriden individually for each carthage dependency - for more details see See **findFrameworks** in the [Dependency](#dependency) section. Defaults to `false`. - [ ] **localPackagesGroup**: **String** - The group name that local packages are put into. This defaults to `Packages` - [ ] **fileTypes**: **[String: [FileType](#filetype)]** - A list of default file options for specific file extensions across the project. Values in [Sources](#sources) will overwrite these settings. - [ ] **preGenCommand**: **String** - A bash command to run before the project has been generated. If the project isn't generated due to no changes when using the cache then this won't run. This is useful for running things like generating resources files before the project is regenerated. @@ -232,7 +232,7 @@ Settings are merged in the following order: groups, base, configs. - [ ] **configFiles**: **[Config Files](#config-files)** - `.xcconfig` files per config - [ ] **settings**: **[Settings](#settings)** - Target specific build settings. Default platform and product type settings will be applied first before any custom settings defined here. Other context dependant settings will be set automatically as well: - `INFOPLIST_FILE`: If it doesn't exist your sources will be searched for `Info.plist` files and the first one found will be used for this setting - - `FRAMEWORK_SEARCH_PATHS`: If carthage dependencies are used, the platform build path will be added to this setting + - `FRAMEWORK_SEARCH_PATHS`: If carthage framework dependencies are used, the platform build path will be added to this setting - `OTHER_LDFLAGS`: See `requiresObjCLinking` below - `TEST_TARGET_NAME`: for ui tests that target an application - `TEST_HOST`: for unit tests that target an application @@ -250,7 +250,7 @@ Settings are merged in the following order: groups, base, configs. - [ ] **templates**: **[String]** - A list of [Target Templates](#target-template) referenced by name that will be merged with the target in order. Any instances of `${target_name}` within these templates will be replaced with the target name. - [ ] **templateAttributes**: **[String: String]** - A list of attributes where each instance of `${attributeName}` within the templates listed in `templates` will be replaced with the value specified. - [ ] **transitivelyLinkDependencies**: **Bool** - If this is not specified the value from the project set in [Options](#options)`.transitivelyLinkDependencies` will be used. -- [ ] **directlyEmbedCarthageDependencies**: **Bool** - If this is `true` Carthage dependencies will be embedded using an `Embed Frameworks` build phase instead of the `copy-frameworks` script. Defaults to `true` for all targets except iOS/tvOS/watchOS Applications. +- [ ] **directlyEmbedCarthageDependencies**: **Bool** - If this is `true` Carthage framework dependencies will be embedded using an `Embed Frameworks` build phase instead of the `copy-frameworks` script. Defaults to `true` for all targets except iOS/tvOS/watchOS Applications. - [ ] **requiresObjCLinking**: **Bool** - If this is `true` any targets that link to this target will have `-ObjC` added to their `OTHER_LDFLAGS`. This is required if a static library has any catagories or extensions on Objective-C code. See [this guide](https://pewpewthespells.com/blog/objc_linker_flags.html#objc) for more details. Defaults to `true` if `type` is `library.static`. If you are 100% sure you don't have catagories or extensions on Objective-C code (pure Swift with no use of Foundation/UIKit) you can set this to `false`, otherwise it's best to leave it alone. - [ ] **onlyCopyFilesOnInstall**: **Bool** – If this is `true`, the `Embed Frameworks` and `Embed App Extensions` (if available) build phases will have the "Copy only when installing" chekbox checked. Defaults to `false`. - [ ] **preBuildScripts**: **[[Build Script](#build-script)]** - Build scripts that run *before* any other build phases @@ -415,8 +415,8 @@ targets: A dependency can be one of a 6 types: - `target: name` - links to another target. If you are using project references you can specify a target within another project by using `ProjectName/TargetName` for the name -- `framework: path` - links to a framework -- `carthage: name` - helper for linking to a Carthage framework +- `framework: path` - links to a framework or XCFramework +- `carthage: name` - helper for linking to a Carthage framework (not XCFramework) - `sdk: name` - links to a dependency with the SDK. This can either be a relative path within the sdk root or a single filename that references a framework (.framework) or lib (.tbd) - `package: name` - links to a Swift Package. The name must match the name of a package defined in the top level `packages` - `bundle: name` - adds the pre-built bundle for the supplied name to the copy resources build phase. This is useful when a dependency exists on a static library target that has an associated bundle target, both existing in a separate project. Only usable in target types which can copy resources. @@ -447,6 +447,9 @@ Carthage frameworks are expected to be in `CARTHAGE_BUILD_PATH/PLATFORM/FRAMEWOR - `PLATFORM` = the target's platform - `FRAMEWORK` = the specified name. + To link an XCFramework produced by Carthage (in `CARTHAGE_BUILD_PATH/FRAMEWORK.xcframework`), use a normal `framework:` + dependency. The helper logic provided by this dependency type is not necessary. + All the individual frameworks of a Carthage dependency can be automatically found via `findFrameworks: true`. This overrides the value of [Options](#options).findCarthageFrameworks. Otherwise each one will have to be listed individually. Xcodegen uses `.version` files generated by Carthage in order for this framework lookup to work, so the Carthage dependencies will need to have already been built at the time XcodeGen is run. diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 8587e5c30..a23f76702 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -769,19 +769,9 @@ public class PBXProjGenerator { case .framework: if !dependency.implicit { - let buildPath = Path(dependency.reference) - let buildPathString: String - - if buildPath.extension == "xcframework" { - buildPathString = """ - "\(Path(dependency.reference).string)/**" - """ - } else { - buildPathString = buildPath.parent().string.quoted - } - frameworkBuildPaths.insert(buildPathString) + let buildPath = Path(dependency.reference).parent().string.quoted + frameworkBuildPaths.insert(buildPath) } - let fileReference: PBXFileElement if dependency.implicit { diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 5bc53dfff..9309c59aa 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -1369,45 +1369,6 @@ class ProjectGeneratorTests: XCTestCase { // generated plist should not be in buildsettings try expect(targetConfig.buildSettings["INFOPLIST_FILE"] as? String) == predefinedPlistPath } - - describe("XCFramework dependencies") { - $0.context("with xcframework dependency") { - $0.it("should add FRAMEWORK_SEARCH_PATHS") { - let app = Target( - name: "MyApp", - type: .application, - platform: .iOS, - dependencies: [ - Dependency(type: .framework, reference: "some/folder/MyXCFramework.xcframework"), - ] - ) - let project = Project(name: "test", targets: [app]) - let pbxProject = try project.generatePbxProj() - - let target = pbxProject.nativeTargets.first! - let configuration = target.buildConfigurationList!.buildConfigurations.first! - try expect(configuration.buildSettings["FRAMEWORK_SEARCH_PATHS"] as? [String]) == ["$(inherited)", "\"some/folder/MyXCFramework.xcframework/**\""] - } - } - $0.context("with regular framework") { - $0.it("should add FRAMEWORK_SEARCH_PATHS") { - let app = Target( - name: "MyApp", - type: .application, - platform: .iOS, - dependencies: [ - Dependency(type: .framework, reference: "some/folder/MyXCFramework.framework"), - ] - ) - let project = Project(name: "test", targets: [app]) - let pbxProject = try project.generatePbxProj() - - let target = pbxProject.nativeTargets.first! - let configuration = target.buildConfigurationList!.buildConfigurations.first! - try expect(configuration.buildSettings["FRAMEWORK_SEARCH_PATHS"] as? [String]) == ["$(inherited)", "\"some/folder\""] - } - } - } describe("Carthage dependencies") { $0.context("with static dependency") { From 90bcaffbedef1cf38243db36bc7a131af4a732f3 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Wed, 19 May 2021 23:03:03 +1000 Subject: [PATCH 088/284] Update to 2.23.0 --- CHANGELOG.md | 4 ++++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 037011040..56f03aaab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.23.0 + #### Added - Added ability to set custom platform for dependency [#934](https://github.com/yonaskolb/XcodeGen/pull/934) @raptorxcz @@ -11,6 +13,8 @@ - Reverted "Change FRAMEWORK_SEARCH_PATH for xcframeworks (#1015)", introduced in 2.20.0. XCFrameworks need to be referenced directly in the project for Xcode's build system to extract the appropriate frameworks [#1081](https://github.com/yonaskolb/XcodeGen/pull/1081) @elliottwilliams +[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.22.0...2.23.0) + ## 2.22.0 #### Added diff --git a/Makefile b/Makefile index e9a01262f..efddae67f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.22.0 +VERSION = 2.23.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 087f73615..61de9b0c1 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.22.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.23.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 32aacfd47..e141f80f9 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.22.0") +let version = Version("2.23.0") let cli = XcodeGenCLI(version: version) cli.execute() From 39ee9c2981ae6f63c9081130e2475c318ca01935 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Sun, 23 May 2021 21:33:57 +1000 Subject: [PATCH 089/284] Update to 2.23.1 --- CHANGELOG.md | 10 ++++++++-- Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56f03aaab..6784539a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ ## Next Version +## 2.23.1 + +### Changed +- Reverted "Change FRAMEWORK_SEARCH_PATH for xcframeworks (#1015)", introduced in 2.20.0. XCFrameworks need to be + referenced directly in the project for Xcode's build system to extract the appropriate frameworks [#1081](https://github.com/yonaskolb/XcodeGen/pull/1081) @elliottwilliams + +[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.23.0...2.23.1) + ## 2.23.0 #### Added @@ -10,8 +18,6 @@ #### Fixed - Added `()` to config variant trimming charater set to fix scheme config variant lookups for some configs like `Debug (Development)` that broke in 2.22.0 [#1078](https://github.com/yonaskolb/XcodeGen/pull/1078) @DavidWoohyunLee - Fixed Linux builds on Swift 5.4 [#1083](https://github.com/yonaskolb/XcodeGen/pull/1083) @yonaskolb -- Reverted "Change FRAMEWORK_SEARCH_PATH for xcframeworks (#1015)", introduced in 2.20.0. XCFrameworks need to be - referenced directly in the project for Xcode's build system to extract the appropriate frameworks [#1081](https://github.com/yonaskolb/XcodeGen/pull/1081) @elliottwilliams [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.22.0...2.23.0) diff --git a/Makefile b/Makefile index efddae67f..876ea0d5a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.23.0 +VERSION = 2.23.1 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 61de9b0c1..bb8191f2b 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.23.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.23.1"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index e141f80f9..d1c2d5c65 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.23.0") +let version = Version("2.23.1") let cli = XcodeGenCLI(version: version) cli.execute() From b8af21d12f8fead895ff4fb718d9aa683ebecec2 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Wed, 16 Jun 2021 09:12:01 +0900 Subject: [PATCH 090/284] Add Support for DocC in Xcode 13 (#1091) * Add support for DocC DocC "files" are actually folders `.docc` appended to the name, but Xcode 13 treats them differently. Therefore, we need to exclude them from the normal BuildPhase. Resolves #1089 * Add tests for DocC Expanded an existing test to include .docc support. Also added a .docc catalog to the Test Project. * Update changelog.md * Update changelog.md to get the correct PR Link --- CHANGELOG.md | 4 ++++ Sources/ProjectSpec/FileType.swift | 1 + .../App_iOS/Documentation.docc/Documentation.md | 7 +++++++ .../App_iOS/Documentation.docc/Resources/resource.png | 0 .../Fixtures/TestProject/Project.xcodeproj/project.pbxproj | 2 ++ Tests/XcodeGenKitTests/SourceGeneratorTests.swift | 2 ++ 6 files changed, 16 insertions(+) create mode 100644 Tests/Fixtures/TestProject/App_iOS/Documentation.docc/Documentation.md create mode 100644 Tests/Fixtures/TestProject/App_iOS/Documentation.docc/Resources/resource.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 6784539a7..d77f1d13d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Added + +- Added support for DocC Catalogs [#1091](https://github.com/yonaskolb/XcodeGen/pull/1091) @brevansio + ## 2.23.1 ### Changed diff --git a/Sources/ProjectSpec/FileType.swift b/Sources/ProjectSpec/FileType.swift index 732f8b7cb..1cde9514d 100644 --- a/Sources/ProjectSpec/FileType.swift +++ b/Sources/ProjectSpec/FileType.swift @@ -111,5 +111,6 @@ extension FileType { "xcfilelist": FileType(buildPhase: BuildPhaseSpec.none), "apns": FileType(buildPhase: BuildPhaseSpec.none), "pch": FileType(buildPhase: BuildPhaseSpec.none), + "docc": FileType(buildPhase: BuildPhaseSpec.none), ] } diff --git a/Tests/Fixtures/TestProject/App_iOS/Documentation.docc/Documentation.md b/Tests/Fixtures/TestProject/App_iOS/Documentation.docc/Documentation.md new file mode 100644 index 000000000..7afe5dd3d --- /dev/null +++ b/Tests/Fixtures/TestProject/App_iOS/Documentation.docc/Documentation.md @@ -0,0 +1,7 @@ +# ``App_Clip`` + +Test + +## Overview + +Test diff --git a/Tests/Fixtures/TestProject/App_iOS/Documentation.docc/Resources/resource.png b/Tests/Fixtures/TestProject/App_iOS/Documentation.docc/Resources/resource.png new file mode 100644 index 000000000..e69de29bb diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index b9ce92204..f4704f0fb 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -674,6 +674,7 @@ B198242976C3395E31FE000A /* MessagesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagesViewController.swift; sourceTree = ""; }; B1C33BB070583BE3B0EC0E68 /* App_iOS.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = App_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; B221F5A689AD7D3AD52F56B8 /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; + B5C943D39DD7812CAB94B614 /* Documentation.docc */ = {isa = PBXFileReference; path = Documentation.docc; sourceTree = ""; }; B76E17CE3574081D5BF45B44 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; BA040F1F7D6CA08878323A55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; BB178D03E75929F3F5B10C56 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; @@ -862,6 +863,7 @@ 7F1A2F579A6F79C62DDA0571 /* AppDelegate.swift */, 3797E591F302ECC0AA2FC607 /* Assets.xcassets */, 9D4AB3FCF725428EFB56F542 /* Configuration.storekit */, + B5C943D39DD7812CAB94B614 /* Documentation.docc */, C9DDE1B06BCC1CDE0ECF1589 /* Info.plist */, AAA49985DFFE797EE8416887 /* inputList.xcfilelist */, CE1F06D99242F4223D081F0D /* LaunchScreen.storyboard */, diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index 6ee094a48..3ef691027 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -598,6 +598,7 @@ class SourceGeneratorTests: XCTestCase { - Root.plist - WithPeriod2.0: - file.swift + - Documentation.docc """ try createDirectories(directories) @@ -654,6 +655,7 @@ class SourceGeneratorTests: XCTestCase { try pbxProj.expectFileMissing(paths: ["C", "Settings.bundle", "Root.plist"]) try pbxProj.expectFileMissing(paths: ["C", "WithPeriod2.0"]) try pbxProj.expectFile(paths: ["C", "WithPeriod2.0", "file.swift"], buildPhase: .sources) + try pbxProj.expectFile(paths: ["C", "Documentation.docc"], buildPhase: BuildPhaseSpec.none) } $0.it("only omits the defined Info.plist from resource build phases but not other plists") { From 4455919be3027bbae3985aad8ac456e33a933d33 Mon Sep 17 00:00:00 2001 From: Vlad Gorlov Date: Sun, 20 Jun 2021 06:08:38 +0200 Subject: [PATCH 091/284] Added support for "driver-extension" and "system-extension" product types (#1094) * Squashed commit of the following: commit 0bcdce0d1f0f1d13fb5a284404e4eaea4e805a89 Author: Vlad Gorlov Date: Fri Jun 18 00:58:50 2021 +0200 [#1092] Dependency version update. commit 0040c46fd4ce9f42102faeb744104027b6c2c757 Author: Bruce Evans Date: Wed Jun 16 09:12:01 2021 +0900 Add Support for DocC in Xcode 13 (#1091) * Add support for DocC DocC "files" are actually folders `.docc` appended to the name, but Xcode 13 treats them differently. Therefore, we need to exclude them from the normal BuildPhase. Resolves #1089 * Add tests for DocC Expanded an existing test to include .docc support. Also added a .docc catalog to the Test Project. * Update changelog.md * Update changelog.md to get the correct PR Link commit 5bb7ef4e1c632f80f63c49ee280d64b8dab1603f Author: Vlad Gorlov Date: Wed Jun 16 01:03:42 2021 +0200 Added support for missed product types. commit 3f8bfdf749d0d15da8490550b95a31cf961d8649 Author: Vlad Gorlov Date: Wed Jun 16 00:01:47 2021 +0200 Added support for missed product types. commit 235ebe4fe906716a6a37421346318fc6515836ce Author: Vlad Gorlov Date: Tue Jun 15 23:53:52 2021 +0200 Added support for missed product types. * [#1094] Fixes failing tests. * [#1094] Added test project targets. * [#1094] Making iig-file type of source code. * [#1094] Attempt to fix CI failure. --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 2 + Package.resolved | 4 +- Package.swift | 2 +- Sources/ProjectSpec/FileType.swift | 1 + Sources/ProjectSpec/Linkage.swift | 4 +- Sources/ProjectSpec/XCProjExtensions.swift | 8 +- Sources/XcodeGenKit/PBXProjGenerator.swift | 18 +- .../TestProject/DriverKit Driver/Driver.cpp | 22 + .../DriverKit Driver/Driver.entitlements | 8 + .../TestProject/DriverKit Driver/Driver.iig | 21 + .../TestProject/DriverKit Driver/Info.plist | 46 ++ .../EndpointSecurity.entitlements | 12 + .../EndpointSecurity Extension/Info.plist | 28 + .../EndpointSecurity Extension/main.swift | 22 + .../FilterDataProvider.swift | 26 + .../TestProject/Network Extension/Info.plist | 38 ++ .../NetworkExtension.entitlements | 19 + .../TestProject/Network Extension/main.swift | 15 + .../Project.xcodeproj/project.pbxproj | 544 ++++++++++++++++++ .../xcschemes/DriverKitDriver.xcscheme | 95 +++ .../EndpointSecuritySystemExtension.xcscheme | 95 +++ .../xcschemes/NetworkSystemExtension.xcscheme | 95 +++ Tests/Fixtures/TestProject/project.yml | 41 ++ .../SchemeGeneratorTests.swift | 2 +- 25 files changed, 1160 insertions(+), 9 deletions(-) create mode 100644 Tests/Fixtures/TestProject/DriverKit Driver/Driver.cpp create mode 100644 Tests/Fixtures/TestProject/DriverKit Driver/Driver.entitlements create mode 100644 Tests/Fixtures/TestProject/DriverKit Driver/Driver.iig create mode 100644 Tests/Fixtures/TestProject/DriverKit Driver/Info.plist create mode 100644 Tests/Fixtures/TestProject/EndpointSecurity Extension/EndpointSecurity.entitlements create mode 100644 Tests/Fixtures/TestProject/EndpointSecurity Extension/Info.plist create mode 100644 Tests/Fixtures/TestProject/EndpointSecurity Extension/main.swift create mode 100644 Tests/Fixtures/TestProject/Network Extension/FilterDataProvider.swift create mode 100644 Tests/Fixtures/TestProject/Network Extension/Info.plist create mode 100644 Tests/Fixtures/TestProject/Network Extension/NetworkExtension.entitlements create mode 100644 Tests/Fixtures/TestProject/Network Extension/main.swift create mode 100644 Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/DriverKitDriver.xcscheme create mode 100644 Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/EndpointSecuritySystemExtension.xcscheme create mode 100644 Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/NetworkSystemExtension.xcscheme diff --git a/CHANGELOG.md b/CHANGELOG.md index d77f1d13d..61deea73d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added - Added support for DocC Catalogs [#1091](https://github.com/yonaskolb/XcodeGen/pull/1091) @brevansio +- Added support for "driver-extension" and "system-extension" product types [#1092](https://github.com/yonaskolb/XcodeGen/issues/1092) @vgorloff ## 2.23.1 diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 3c2941334..b13ae18a1 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -292,6 +292,8 @@ This will provide default build settings for a certain product type. It can be a - `watchkit-extension` - `watchkit2-extension` - `xcode-extension` +- `driver-extension` +- `system-extension` - `xpc-service` - ``""`` (used for legacy targets) diff --git a/Package.resolved b/Package.resolved index 43d754dad..9c1119ed3 100644 --- a/Package.resolved +++ b/Package.resolved @@ -78,8 +78,8 @@ "repositoryURL": "https://github.com/tuist/XcodeProj.git", "state": { "branch": null, - "revision": "45e349e1c4e4da1a85a7b9392b737acde2e2f2a8", - "version": "7.23.0" + "revision": "0b18c3e7a10c241323397a80cb445051f4494971", + "version": "8.0.0" } }, { diff --git a/Package.swift b/Package.swift index 2249f0129..899547eda 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: "7.23.0"), + .package(url: "https://github.com/tuist/XcodeProj.git", from: "8.0.0"), .package(url: "https://github.com/jakeheis/SwiftCLI.git", from: "6.0.0"), .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/FileType.swift b/Sources/ProjectSpec/FileType.swift index 1cde9514d..372bc79d8 100644 --- a/Sources/ProjectSpec/FileType.swift +++ b/Sources/ProjectSpec/FileType.swift @@ -87,6 +87,7 @@ extension FileType { "metal": FileType(buildPhase: .sources), "mlmodel": FileType(buildPhase: .sources), "rcproject": FileType(buildPhase: .sources), + "iig": FileType(buildPhase: .sources), // headers "h": FileType(buildPhase: .headers), diff --git a/Sources/ProjectSpec/Linkage.swift b/Sources/ProjectSpec/Linkage.swift index cceda53ec..0e134fa08 100644 --- a/Sources/ProjectSpec/Linkage.swift +++ b/Sources/ProjectSpec/Linkage.swift @@ -33,7 +33,9 @@ extension Target { .watch2AppContainer, .watch2Extension, .xcodeExtension, - .xpcService: + .xpcService, + .systemExtension, + .driverExtension: return .none case .framework, .xcFramework: // Check the MACH_O_TYPE for "Static Framework" diff --git a/Sources/ProjectSpec/XCProjExtensions.swift b/Sources/ProjectSpec/XCProjExtensions.swift index c6e194c2a..bf3d36d21 100644 --- a/Sources/ProjectSpec/XCProjExtensions.swift +++ b/Sources/ProjectSpec/XCProjExtensions.swift @@ -26,6 +26,10 @@ extension PBXProductType { fileExtension == "appex" } + public var isSystemExtension: Bool { + fileExtension == "dext" || fileExtension == "systemextension" + } + public var isApp: Bool { fileExtension == "app" } @@ -35,7 +39,7 @@ extension PBXProductType { } public var isExecutable: Bool { - isApp || isExtension || isTest || self == .commandLineTool + isApp || isExtension || isSystemExtension || isTest || self == .commandLineTool } public var name: String { @@ -89,7 +93,7 @@ extension Platform { extension Target { public var shouldExecuteOnLaunch: Bool { // This is different from `type.isExecutable`, because we don't want to "run" a test - type.isApp || type.isExtension || type == .commandLineTool + type.isApp || type.isExtension || type.isSystemExtension || type == .commandLineTool } } diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index a23f76702..cc12d2f6b 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -669,6 +669,7 @@ public class PBXProjGenerator { var copyWatchReferences: [PBXBuildFile] = [] var packageDependencies: [XCSwiftPackageProductDependency] = [] var extensions: [PBXBuildFile] = [] + var systemExtensions: [PBXBuildFile] = [] var appClips: [PBXBuildFile] = [] var carthageFrameworksToEmbed: [String] = [] let localPackageReferences: [String] = project.packages.compactMap { $0.value.isLocal ? $0.key : nil } @@ -729,6 +730,9 @@ public class PBXProjGenerator { if dependencyTarget.type.isExtension { // embed app extension extensions.append(embedFile) + } else if dependencyTarget.type.isSystemExtension { + // embed system extension + systemExtensions.append(embedFile) } else if dependencyTarget.type == .onDemandInstallCapableApplication { // embed app clip appClips.append(embedFile) @@ -1001,9 +1005,9 @@ public class PBXProjGenerator { return sourceFilesByCopyFiles.mapValues { getBuildFilesForSourceFiles($0) } } - func getPBXCopyFilesBuildPhase(dstSubfolderSpec: PBXCopyFilesBuildPhase.SubFolder, name: String, files: [PBXBuildFile]) -> PBXCopyFilesBuildPhase { + func getPBXCopyFilesBuildPhase(dstSubfolderSpec: PBXCopyFilesBuildPhase.SubFolder, dstPath: String = "", name: String, files: [PBXBuildFile]) -> PBXCopyFilesBuildPhase { return PBXCopyFilesBuildPhase( - dstPath: "", + dstPath: dstPath, dstSubfolderSpec: dstSubfolderSpec, name: name, buildActionMask: target.onlyCopyFilesOnInstall ? PBXProjGenerator.copyFilesActionMask : PBXBuildPhase.defaultBuildActionMask, @@ -1116,6 +1120,16 @@ public class PBXProjGenerator { buildPhases.append(copyFilesPhase) } + if !systemExtensions.isEmpty { + + let copyFilesPhase = addObject( + // With parameters below the Xcode will show "Destination: System Extensions". + getPBXCopyFilesBuildPhase(dstSubfolderSpec: .productsDirectory, dstPath: "$(SYSTEM_EXTENSIONS_FOLDER_PATH)", name: "Embed System Extensions", files: systemExtensions) + ) + + buildPhases.append(copyFilesPhase) + } + if !appClips.isEmpty { let copyFilesPhase = addObject( diff --git a/Tests/Fixtures/TestProject/DriverKit Driver/Driver.cpp b/Tests/Fixtures/TestProject/DriverKit Driver/Driver.cpp new file mode 100644 index 000000000..875a03948 --- /dev/null +++ b/Tests/Fixtures/TestProject/DriverKit Driver/Driver.cpp @@ -0,0 +1,22 @@ +// +// Driver.cpp +// Driver +// +// Created by Vlad Gorlov on 18.06.21. +// + +#include + +#include +#include + +#include "Driver.h" + +kern_return_t +IMPL(Driver, Start) +{ + kern_return_t ret; + ret = Start(provider, SUPERDISPATCH); + os_log(OS_LOG_DEFAULT, "Hello World"); + return ret; +} diff --git a/Tests/Fixtures/TestProject/DriverKit Driver/Driver.entitlements b/Tests/Fixtures/TestProject/DriverKit Driver/Driver.entitlements new file mode 100644 index 000000000..852fa1a47 --- /dev/null +++ b/Tests/Fixtures/TestProject/DriverKit Driver/Driver.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/Tests/Fixtures/TestProject/DriverKit Driver/Driver.iig b/Tests/Fixtures/TestProject/DriverKit Driver/Driver.iig new file mode 100644 index 000000000..886a04c91 --- /dev/null +++ b/Tests/Fixtures/TestProject/DriverKit Driver/Driver.iig @@ -0,0 +1,21 @@ +// +// Driver.iig +// Driver +// +// Created by Vlad Gorlov on 18.06.21. +// + +#ifndef Driver_h +#define Driver_h + +#include +#include + +class Driver: public IOService +{ +public: + virtual kern_return_t + Start(IOService * provider) override; +}; + +#endif /* Driver_h */ diff --git a/Tests/Fixtures/TestProject/DriverKit Driver/Info.plist b/Tests/Fixtures/TestProject/DriverKit Driver/Info.plist new file mode 100644 index 000000000..fd5d03af8 --- /dev/null +++ b/Tests/Fixtures/TestProject/DriverKit Driver/Info.plist @@ -0,0 +1,46 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + IOKitPersonalities + + Driver + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleIdentifierKernel + com.apple.kpi.iokit + IOClass + IOUserService + IOMatchCategory + com.apple.null.driver + IOProviderClass + IOUserResources + IOResourceMatch + IOKit + IOUserClass + Driver + IOUserServerName + com.apple.null.driver + + + OSBundleUsageDescription + + + diff --git a/Tests/Fixtures/TestProject/EndpointSecurity Extension/EndpointSecurity.entitlements b/Tests/Fixtures/TestProject/EndpointSecurity Extension/EndpointSecurity.entitlements new file mode 100644 index 000000000..03a3d8341 --- /dev/null +++ b/Tests/Fixtures/TestProject/EndpointSecurity Extension/EndpointSecurity.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.developer.endpoint-security.client + + com.apple.security.application-groups + + $(TeamIdentifierPrefix)com.example.app-group + + + diff --git a/Tests/Fixtures/TestProject/EndpointSecurity Extension/Info.plist b/Tests/Fixtures/TestProject/EndpointSecurity Extension/Info.plist new file mode 100644 index 000000000..d787bc3cd --- /dev/null +++ b/Tests/Fixtures/TestProject/EndpointSecurity Extension/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + EndpointSecurity + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSSystemExtensionUsageDescription + + + diff --git a/Tests/Fixtures/TestProject/EndpointSecurity Extension/main.swift b/Tests/Fixtures/TestProject/EndpointSecurity Extension/main.swift new file mode 100644 index 000000000..d163fadda --- /dev/null +++ b/Tests/Fixtures/TestProject/EndpointSecurity Extension/main.swift @@ -0,0 +1,22 @@ +// +// main.swift +// EndpointSecurity +// +// Created by Vlad Gorlov on 18.06.21. +// + +import Foundation +import EndpointSecurity + +var client: OpaquePointer? + +// Create the client +let res = es_new_client(&client) { (client, message) in + // Do processing on the message received +} + +if res != ES_NEW_CLIENT_RESULT_SUCCESS { + exit(EXIT_FAILURE) +} + +dispatchMain() diff --git a/Tests/Fixtures/TestProject/Network Extension/FilterDataProvider.swift b/Tests/Fixtures/TestProject/Network Extension/FilterDataProvider.swift new file mode 100644 index 000000000..5a5d4dd38 --- /dev/null +++ b/Tests/Fixtures/TestProject/Network Extension/FilterDataProvider.swift @@ -0,0 +1,26 @@ +// +// FilterDataProvider.swift +// NetworkExtension +// +// Created by Vlad Gorlov on 18.06.21. +// + +import NetworkExtension + +class FilterDataProvider: NEFilterDataProvider { + + override func startFilter(completionHandler: @escaping (Error?) -> Void) { + // Add code to initialize the filter. + completionHandler(nil) + } + + override func stopFilter(with reason: NEProviderStopReason, completionHandler: @escaping () -> Void) { + // Add code to clean up filter resources. + completionHandler() + } + + override func handleNewFlow(_ flow: NEFilterFlow) -> NEFilterNewFlowVerdict { + // Add code to determine if the flow should be dropped or not, downloading new rules if required. + return .allow() + } +} diff --git a/Tests/Fixtures/TestProject/Network Extension/Info.plist b/Tests/Fixtures/TestProject/Network Extension/Info.plist new file mode 100644 index 000000000..88c7ae8f5 --- /dev/null +++ b/Tests/Fixtures/TestProject/Network Extension/Info.plist @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + NetworkExtension + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSSystemExtensionUsageDescription + + NetworkExtension + + NEMachServiceName + $(TeamIdentifierPrefix)com.example.app-group.MySystemExtension + NEProviderClasses + + com.apple.networkextension.filter-data + $(PRODUCT_MODULE_NAME).FilterDataProvider + + + + diff --git a/Tests/Fixtures/TestProject/Network Extension/NetworkExtension.entitlements b/Tests/Fixtures/TestProject/Network Extension/NetworkExtension.entitlements new file mode 100644 index 000000000..b8ae39612 --- /dev/null +++ b/Tests/Fixtures/TestProject/Network Extension/NetworkExtension.entitlements @@ -0,0 +1,19 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.application-groups + + $(TeamIdentifierPrefix)com.example.app-group + + com.apple.developer.networking.networkextension + + packet-tunnel-provider + app-proxy-provider + content-filter-provider + dns-proxy + + + diff --git a/Tests/Fixtures/TestProject/Network Extension/main.swift b/Tests/Fixtures/TestProject/Network Extension/main.swift new file mode 100644 index 000000000..2313f84f4 --- /dev/null +++ b/Tests/Fixtures/TestProject/Network Extension/main.swift @@ -0,0 +1,15 @@ +// +// main.swift +// NetworkExtension +// +// Created by Vlad Gorlov on 18.06.21. +// + +import Foundation +import NetworkExtension + +autoreleasepool { + NEProvider.startSystemExtensionMode() +} + +dispatchMain() diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index f4704f0fb..4e2f4355f 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -30,6 +30,7 @@ 079B6E02AF21664AB08E621C /* TestProjectUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 587B9E9A3533E965CA602B76 /* TestProjectUITests.swift */; }; 07EDA4085F0E7EE1471DC64F /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 0927149520F12314CE8B4079 /* TestFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E43116070AFEF5D8C3A5A957 /* TestFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 0932FB6FB887D7D6F7727CB7 /* Driver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 432E2C071A4B6B3757BEA13E /* Driver.cpp */; }; 09617AB755651FFEB2564CBC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F1A2F579A6F79C62DDA0571 /* AppDelegate.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; 0AB541AE3163B063E7012877 /* StaticLibrary_ObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5A2B916A11DCC2565241359F /* StaticLibrary_ObjC.h */; }; 0BDA156BEBFCB9E65910F838 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -71,7 +72,9 @@ 47FC57B04A3AD83359F433EA /* StaticLibrary_ObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5A2B916A11DCC2565241359F /* StaticLibrary_ObjC.h */; }; 49A4B8937BB5520B36EA33F0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 814D72C2B921F60B759C2D4B /* Main.storyboard */; }; 4CB673A7C0C11E04F8544BDB /* Contacts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB2B6A77D39CD5602F2125F /* Contacts.framework */; }; + 4DA7140FF84DBF39961F3409 /* NetworkSystemExtension.systemextension in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = 2049B6DD2AFE85F9DC9F3EB3 /* NetworkSystemExtension.systemextension */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 4F6481557E2BEF8D749C37E3 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 187E665975BB5611AF0F27E1 /* main.m */; }; + 5126CD91C2CB41C9B14B6232 /* DriverKitDriver.dext in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = 83B5EC7EF81F7E4B6F426D4E /* DriverKitDriver.dext */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 52AD3276E068EB3396A292BB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D8A016580A3B8F72B820BFBF /* Assets.xcassets */; }; 535A98A3E3B74E09891D977F /* TestFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E43116070AFEF5D8C3A5A957 /* TestFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 5447AD526B2A1FD4262E2B61 /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; @@ -80,6 +83,7 @@ 58C18019E71E372F635A3FB4 /* MoreUnder.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA8718C7CD3BE86D9B1F5120 /* MoreUnder.swift */; }; 5D10822B0E7C33DD6979F656 /* Standalone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F5BD97AF0F94A15A5B7DDB7 /* Standalone.swift */; }; 5E0369B907E239D1E6884ECF /* TestFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E43116070AFEF5D8C3A5A957 /* TestFramework.framework */; }; + 61401517ECCEB2362582B5DA /* libEndpointSecurity.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BC75409252FF15F540FBB7B /* libEndpointSecurity.tbd */; }; 61516CAC12B2843FBC4572E6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 59DA55A04FA2366B5D0BEEFF /* Assets.xcassets */; }; 61601545B6BE00CA74A4E38F /* SceneKitCatalog.scnassets in Resources */ = {isa = PBXBuildFile; fileRef = C9E358FBE2B54D2B5C7FD609 /* SceneKitCatalog.scnassets */; }; 6241507B4947B0B65429587C /* ExternalTarget.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F6ADE654A3459AFDA2CC0CD3 /* ExternalTarget.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -97,6 +101,7 @@ 747CAE14D196F5652E93353C /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 2E1E747C7BC434ADB80CC269 /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; 75F2774F183838AF34CA9B8A /* StaticLibrary_ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D0C79A8C750EC0DE748C463 /* StaticLibrary_ObjC.m */; }; 768648ED7E93B6D888574144 /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = F2950763C4C568CC85021D18 /* module.modulemap */; }; + 76DC6A4B18F434BAC239CC4A /* DriverKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A428E67153BB40184F37BE /* DriverKit.framework */; }; 778F71CA1CC4BEECDACAD8B9 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 77C3CB285572EA4BB7E201A7 /* App_Clip.app in Embed App Clips */ = {isa = PBXBuildFile; fileRef = 38DB679FF1CF4E379D1AB103 /* App_Clip.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 7A0DABBEA55B06E148C665A8 /* StaticLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AC91042453E18DF74BA1C0F /* StaticLibrary.swift */; }; @@ -105,6 +110,7 @@ 7F658343A505B824321E086B /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 2E1E747C7BC434ADB80CC269 /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; 803B7CE086CFBA409F9D1ED7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 108BB29172D27BE3BD1E7F35 /* Assets.xcassets */; }; 818D448D4DDD6649B5B26098 /* example.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 28360ECA4D727FAA58557A81 /* example.mp4 */; settings = {ASSET_TAGS = (tag1, tag2, ); }; }; + 8267B75289E9D6C7B38FC426 /* DriverKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A428E67153BB40184F37BE /* DriverKit.framework */; }; 87927928A8A3460166ACB819 /* SwiftFileInDotPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F430AABE04B7499B458D9DB /* SwiftFileInDotPath.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; 8C941A6EF08069CB3CB88FC1 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 900CFAD929CAEE3861127627 /* MyBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 7B5068D64404C61A67A18458 /* MyBundle.bundle */; }; @@ -120,6 +126,8 @@ A1AEAAB53EAEDA1C307871FA /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB178D03E75929F3F5B10C56 /* Result.framework */; }; A59B3F08914812573AFF6C2D /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FD4A16C7B8FEB7F97F3CBE3F /* libz.dylib */; }; A7D1A9942302569A9515696A /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D296BB7355994040E197A1EE /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + A90C4C147AD175DB9F7B5114 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CD22B8CD2E91BB97CC534E /* main.swift */; }; + A949422315536EACDF8DD78A /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B785B1161553A7DD6DA4255 /* NetworkExtension.framework */; }; A9548E5DCFE92236494164DF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE1F06D99242F4223D081F0D /* LaunchScreen.storyboard */; }; AFF19412E9B35635D3AF48CB /* XPC_Service.m in Sources */ = {isa = PBXBuildFile; fileRef = 148B7C933698BCC4F1DBA979 /* XPC_Service.m */; }; B142965C5AE9C6200BF65802 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; platformFilter = maccatalyst; }; @@ -134,15 +142,19 @@ BD1419893577E6CEDF8CBA83 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; BD95416F2005199F6B3572CF /* Framework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; BFCCC56337A5D9D513C1C791 /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = F2950763C4C568CC85021D18 /* module.modulemap */; }; + C093BF20B99FE892D0F06B2D /* libEndpointSecurity.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BC75409252FF15F540FBB7B /* libEndpointSecurity.tbd */; }; C3672B561F456794151C047C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4C3FE6B986506724DAB5D0F /* ViewController.swift */; }; C400EBD25886ACB5CD9035EB /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = F2950763C4C568CC85021D18 /* module.modulemap */; }; C4378E3DAF5E0B2F7AB60E03 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFE6A6FAAFF701FE729293DE /* ViewController.swift */; }; C836F09B677937EFF69B1FCE /* NotificationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C934C1F7A68CCD0AB6B38478 /* NotificationController.swift */; }; C88598A49087A212990F4E8B /* ResourceFolder in Resources */ = {isa = PBXBuildFile; fileRef = 6B1603BA83AA0C7B94E45168 /* ResourceFolder */; }; + CAE18A2194B57C830A297F83 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6680EFE4E908CDBDCE405C8 /* main.swift */; }; CCA17097382757012B58C17C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1BC32A813B80A53962A1F365 /* Assets.xcassets */; }; D5458D67C3596943114C3205 /* Standalone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F5BD97AF0F94A15A5B7DDB7 /* Standalone.swift */; }; D61BEABD5B26B2DE67D0C2EC /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; D8ED40ED61AD912385CFF5F0 /* StaticLibrary_ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D0C79A8C750EC0DE748C463 /* StaticLibrary_ObjC.m */; }; + DD5FBFC3C1B2DB3D0D1CF210 /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B785B1161553A7DD6DA4255 /* NetworkExtension.framework */; }; + E0B27599D701E6BB0223D0A8 /* FilterDataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16AA52945B70B1BF9E246350 /* FilterDataProvider.swift */; }; E1836941C13CC7F13650C317 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3ED831531AA349CCC19B258B /* Assets.xcassets */; }; E34351AC0049221C167A60AC /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; E4B41CB5C796DD2C3C2E564C /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -152,10 +164,12 @@ E8A135F768448632F8D77C8F /* StandaloneAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3571E41E19A5AB8AAAB04109 /* StandaloneAssets.xcassets */; }; EDB55692D392FD09C3FCFBF6 /* libStaticLibrary_ObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 86169DEEDEAF09AB89C8A31D /* libStaticLibrary_ObjC.a */; }; EDE8DD3CB36D65C300A53D1E /* swift-tagged.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E4841131C451A658AC8596C /* swift-tagged.framework */; }; + F4D77E81B0539EA5F4F141A6 /* EndpointSecuritySystemExtension.systemextension in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = E5E0A80CCE8F8DB662DCD2D0 /* EndpointSecuritySystemExtension.systemextension */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; F5D71267BB5A326BDD69D532 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E55F45EACB0F382722D61C8D /* Assets.xcassets */; }; F6537CE373C94809E6653758 /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 2E1E747C7BC434ADB80CC269 /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; F7423E8738EECF04795C7601 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3F6BCB5FEFB16F1BA368059 /* InterfaceController.swift */; }; F788A3FA1CE6489BC257C1C3 /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 306796628DD52FA55E833B65 /* Model.xcdatamodeld */; settings = {COMPILER_FLAGS = "-Werror"; }; }; + FB6DA0DB62C425066D51767E /* Driver.iig in Sources */ = {isa = PBXBuildFile; fileRef = 5A3A73F307648F58213E4EA1 /* Driver.iig */; }; FF030751A47C85F082C7EDB9 /* TestProjectTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D132EA69984F32DA9DC727B6 /* TestProjectTests.swift */; }; /* End PBXBuildFile section */ @@ -244,6 +258,13 @@ remoteGlobalIDString = 0636AAF06498C336E1CEEDE4; remoteInfo = TestFramework; }; + 6ED42BD51E8832232E58D9C1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0FBAE303E3CFC2ABAC876A77 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 428715FBC1D86458DA70CBDE; + remoteInfo = DriverKitDriver; + }; 747773057270E6F58470B5FA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0FBAE303E3CFC2ABAC876A77 /* Project object */; @@ -328,6 +349,20 @@ remoteGlobalIDString = CE7D183D3752B5B35D2D8E6D; remoteInfo = Framework2_iOS; }; + D4A7C57F6272F44F2E69A5DB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0FBAE303E3CFC2ABAC876A77 /* Project object */; + proxyType = 1; + remoteGlobalIDString = AD28397BCC984F769EE8A937; + remoteInfo = NetworkSystemExtension; + }; + DD32A97CFD2016BF1477CF6C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0FBAE303E3CFC2ABAC876A77 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 9F551F66949B55E8328EB995; + remoteInfo = EndpointSecuritySystemExtension; + }; DECF0B88B325A158E4E1D9AE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0FBAE303E3CFC2ABAC876A77 /* Project object */; @@ -527,6 +562,19 @@ name = "Embed App Extensions"; runOnlyForDeploymentPostprocessing = 0; }; + DE875E9A37F7CB9C347AEFA0 /* Embed System Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(SYSTEM_EXTENSIONS_FOLDER_PATH)"; + dstSubfolderSpec = 16; + files = ( + 5126CD91C2CB41C9B14B6232 /* DriverKitDriver.dext in Embed System Extensions */, + F4D77E81B0539EA5F4F141A6 /* EndpointSecuritySystemExtension.systemextension in Embed System Extensions */, + 4DA7140FF84DBF39961F3409 /* NetworkSystemExtension.systemextension in Embed System Extensions */, + ); + name = "Embed System Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; E8BC0F358D693454E5027ECC /* Copy Bundle Resources */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -579,6 +627,7 @@ 01E6934B571B91EAAFF0EDCB /* Resource.abc */ = {isa = PBXFileReference; path = Resource.abc; sourceTree = ""; }; 020E4DA91C9132845CAFDC5D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = ""; }; 039F208D1138598CE060F140 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 03CD22B8CD2E91BB97CC534E /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; 03D6D1E34022DA9524E5B38D /* Mintfile */ = {isa = PBXFileReference; path = Mintfile; sourceTree = ""; }; 0510CEA09E3BFD387E3EDE28 /* MyPlayground.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = MyPlayground.playground; sourceTree = ""; }; 068EDF47F0B087F6A4052AC0 /* Empty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Empty.h; sourceTree = ""; }; @@ -587,6 +636,7 @@ 0B193CC6D2B3003418A550B6 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/LocalizedStoryboard.strings; sourceTree = ""; }; 0B9D98D935F2C69A1F5BA539 /* App_macOS_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = App_macOS_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 0BB1B49A91B892152D68ED76 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; + 0BC75409252FF15F540FBB7B /* libEndpointSecurity.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libEndpointSecurity.tbd; path = usr/lib/libEndpointSecurity.tbd; sourceTree = SDKROOT; }; 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "App_watchOS Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; 0E4841131C451A658AC8596C /* swift-tagged.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = "swift-tagged.framework"; sourceTree = ""; }; @@ -595,11 +645,13 @@ 108BB29172D27BE3BD1E7F35 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 13EEAB58665D79C15184D9D0 /* App_iOS_UITests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = App_iOS_UITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 148B7C933698BCC4F1DBA979 /* XPC_Service.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPC_Service.m; sourceTree = ""; }; + 16AA52945B70B1BF9E246350 /* FilterDataProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilterDataProvider.swift; sourceTree = ""; }; 16D662EE577E4CD6AFF39D66 /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = config.xcconfig; sourceTree = ""; }; 187E665975BB5611AF0F27E1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 1BC32A813B80A53962A1F365 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 1D0C79A8C750EC0DE748C463 /* StaticLibrary_ObjC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StaticLibrary_ObjC.m; sourceTree = ""; }; 1FA5E208EC184E3030D2A21D /* Clip.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Clip.entitlements; sourceTree = ""; }; + 2049B6DD2AFE85F9DC9F3EB3 /* NetworkSystemExtension.systemextension */ = {isa = PBXFileReference; explicitFileType = "wrapper.system-extension"; includeInIndex = 0; path = NetworkSystemExtension.systemextension; sourceTree = BUILT_PRODUCTS_DIR; }; 22237B8EBD9E6BE8EBC8735F /* XPC Service.xpc */ = {isa = PBXFileReference; explicitFileType = "wrapper.xpc-service"; includeInIndex = 0; path = "XPC Service.xpc"; sourceTree = BUILT_PRODUCTS_DIR; }; 2233774B86539B1574D206B0 /* Framework2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 2385A62F6C6EE8D461EE19F2 /* ExternalTarget.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ExternalTarget.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -614,6 +666,7 @@ 34F13B632328979093CE6056 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 3571E41E19A5AB8AAAB04109 /* StandaloneAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = StandaloneAssets.xcassets; sourceTree = ""; }; 3797E591F302ECC0AA2FC607 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 382E11E88B12BCB30F575686 /* Driver.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Driver.entitlements; sourceTree = ""; }; 38DB679FF1CF4E379D1AB103 /* App_Clip.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = App_Clip.app; sourceTree = BUILT_PRODUCTS_DIR; }; 3A7BEFAB4710735CF169B1E8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 3D8A2D4363866877B9140156 /* XPC_ServiceProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPC_ServiceProtocol.h; sourceTree = ""; }; @@ -622,6 +675,8 @@ 3FC04772130400920D68A167 /* App_Clip_Tests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = App_Clip_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 40863AE6202CFCD0529D8438 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 432E2C071A4B6B3757BEA13E /* Driver.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Driver.cpp; sourceTree = ""; }; + 45BBB9A7599490883491C808 /* NetworkExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NetworkExtension.entitlements; sourceTree = ""; }; 45C12576F5AA694DD0CE2132 /* BundleX.bundle */ = {isa = PBXFileReference; lastKnownFileType = wrapper.cfbundle; path = BundleX.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 469B630D28015F0EDC456F6B /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; 46DD8F9AAC104BDB63793625 /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -632,6 +687,9 @@ 587B9E9A3533E965CA602B76 /* TestProjectUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectUITests.swift; sourceTree = ""; }; 59DA55A04FA2366B5D0BEEFF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 5A2B916A11DCC2565241359F /* StaticLibrary_ObjC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StaticLibrary_ObjC.h; sourceTree = ""; }; + 5A3A73F307648F58213E4EA1 /* Driver.iig */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.iig; path = Driver.iig; sourceTree = ""; }; + 5B785B1161553A7DD6DA4255 /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = System/Library/Frameworks/NetworkExtension.framework; sourceTree = SDKROOT; }; + 5D13DDAB46F80D94D7345063 /* EndpointSecurity.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = EndpointSecurity.entitlements; sourceTree = ""; }; 6177CC6263783487E93F7F4D /* Framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6A58A16491CDDF968B0D56DE /* MyFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyFramework.h; sourceTree = ""; }; 6AC91042453E18DF74BA1C0F /* StaticLibrary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StaticLibrary.swift; sourceTree = ""; }; @@ -650,11 +708,13 @@ 7F1A2F579A6F79C62DDA0571 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7FDC16E1938AA114B67D87A9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; 814822136AF3C64428D69DD6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 83B5EC7EF81F7E4B6F426D4E /* DriverKitDriver.dext */ = {isa = PBXFileReference; explicitFileType = "wrapper.driver-extension"; includeInIndex = 0; path = DriverKitDriver.dext; sourceTree = BUILT_PRODUCTS_DIR; }; 84317819C92F78425870E483 /* BundleX.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = BundleX.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 86169DEEDEAF09AB89C8A31D /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; 87DF9DCA8399E3214A7E27CF /* TestProjectTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectTests.swift; sourceTree = ""; }; 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8AF20308873AEEEC4D8C45D1 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = wrapper.cfbundle; path = Settings.bundle; sourceTree = ""; }; + 8C62E8644AC5070AFC737BCC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 8CAF6C55B555E3E1352645B6 /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = ""; }; 8CB86294FB939FE6E90932E1 /* libStaticLibrary_Swift.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary_Swift.a; sourceTree = BUILT_PRODUCTS_DIR; }; 8D88C6BF7355702B74396791 /* TestProjectUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectUITests.swift; sourceTree = ""; }; @@ -667,6 +727,7 @@ A220DE4EB3CB2E598D034D9D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; A3F6BCB5FEFB16F1BA368059 /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = ""; }; A4C3FE6B986506724DAB5D0F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + A6680EFE4E908CDBDCE405C8 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; A680BE9F68A255B0FB291AE6 /* App_watchOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App_watchOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; AAA49985DFFE797EE8416887 /* inputList.xcfilelist */ = {isa = PBXFileReference; lastKnownFileType = text.xcfilelist; path = inputList.xcfilelist; sourceTree = ""; }; AB055761199DF36DB0C629A6 /* Framework2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -682,6 +743,7 @@ BDCA996D141DD8A16B18D68F /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "GoogleService-Info.plist"; sourceTree = ""; }; BECEA4A483ADEB8158F640B3 /* Tool */ = {isa = PBXFileReference; includeInIndex = 0; path = Tool; sourceTree = BUILT_PRODUCTS_DIR; }; BF59AC868D227C92CA8B1B57 /* Model.xcmappingmodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcmappingmodel; path = Model.xcmappingmodel; sourceTree = ""; }; + C0A428E67153BB40184F37BE /* DriverKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DriverKit.framework; path = System/Library/Frameworks/DriverKit.framework; sourceTree = SDKROOT; }; C53ACB2962FED621389C36A2 /* iMessageStickersExtension.appex */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "wrapper.app-extension"; path = iMessageStickersExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; C7809CE9FE9852C2AA87ACE5 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; }; C934C1F7A68CCD0AB6B38478 /* NotificationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationController.swift; sourceTree = ""; }; @@ -695,13 +757,16 @@ D629E142AB87C681D4EC90F7 /* iMessageExtension.appex */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "wrapper.app-extension"; path = iMessageExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; D6C89D80B5458D8929F5C127 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; D70BE0C05E5779A077793BE6 /* Model 2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Model 2.xcdatamodel"; sourceTree = ""; }; + D7E73F4E11A4B74449E7FDFE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; D8A016580A3B8F72B820BFBF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; DAA7880242A9DE61E68026CC /* Folder */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Folder; sourceTree = SOURCE_ROOT; }; DFE6A6FAAFF701FE729293DE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; E42335D1200CB7B8B91E962F /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = Base; path = Base.lproj/Localizable.stringsdict; sourceTree = ""; }; E43116070AFEF5D8C3A5A957 /* TestFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TestFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E55F45EACB0F382722D61C8D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + E5E0A80CCE8F8DB662DCD2D0 /* EndpointSecuritySystemExtension.systemextension */ = {isa = PBXFileReference; explicitFileType = "wrapper.system-extension"; includeInIndex = 0; path = EndpointSecuritySystemExtension.systemextension; sourceTree = BUILT_PRODUCTS_DIR; }; E9672EF8FE1DDC8DE0705129 /* PushNotificationPayload.apns */ = {isa = PBXFileReference; lastKnownFileType = text; path = PushNotificationPayload.apns; sourceTree = ""; }; + EDCC70978B8AD49373DA0DE0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; EE1343F2238429D4DA9D830B /* File1.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = File1.swift; path = Group/File1.swift; sourceTree = ""; }; F0D48A913C087D049C8EDDD7 /* App.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = App.entitlements; sourceTree = ""; }; F15E5C60B7E05D06B1B8E18E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; @@ -756,6 +821,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 7448069D11FB1A170F943C90 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DD5FBFC3C1B2DB3D0D1CF210 /* NetworkExtension.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 9B861C58E640BD4AD391900C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -778,9 +851,12 @@ buildActionMask = 2147483647; files = ( B47F2629BFE5853767C8BB5E /* Contacts.framework in Frameworks */, + 76DC6A4B18F434BAC239CC4A /* DriverKit.framework in Frameworks */, 21425F6DE3D493B6F1E33D21 /* Framework.framework in Frameworks */, + A949422315536EACDF8DD78A /* NetworkExtension.framework in Frameworks */, 078FAAF5C2B851C7D5EA714F /* Result.framework in Frameworks */, EDB55692D392FD09C3FCFBF6 /* libStaticLibrary_ObjC.a in Frameworks */, + C093BF20B99FE892D0F06B2D /* libEndpointSecurity.tbd in Frameworks */, BAA1C1E3828F5D43546AF997 /* libc++.tbd in Frameworks */, A59B3F08914812573AFF6C2D /* libz.dylib in Frameworks */, ); @@ -804,6 +880,22 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + E63B2ED6C095617F6F53C14A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 61401517ECCEB2362582B5DA /* libEndpointSecurity.tbd in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EA2F63A326C56F6ECA7F5D7D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8267B75289E9D6C7B38FC426 /* DriverKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -907,11 +999,14 @@ 6DBE0EE90642BB3F6E58AD43 /* Configs */, 3F2E22B7AB20FA42CD205C2A /* CopyFiles */, FCC084D4F8992BBC49983A38 /* CustomGroup */, + 7979F5A04B370C36415EFB11 /* DriverKit Driver */, + 99EF37D6DEE914E180236A91 /* EndpointSecurity Extension */, 5CBCE0E2A145046265FE99E2 /* FileGroup */, 1A57D1EE1FBC13598F6B5CB0 /* Framework */, A3DCF90D9B1EF4E27CF54B19 /* iMessageApp */, BF58996786F85CB77BEE72EF /* iMessageExtension */, 018CC36B301BFA9965780BD9 /* iMessageStickers */, + A0F4C565134899E0C5EB2EA7 /* Network Extension */, 9EDF27BB8A57733E6639D36D /* Resources */, 9DB22CB08CFAA455518700DB /* StandaloneFiles */, BDA839814AF73F01F7710518 /* StaticLibrary_ObjC */, @@ -1030,6 +1125,17 @@ path = "App_watchOS Extension"; sourceTree = ""; }; + 7979F5A04B370C36415EFB11 /* DriverKit Driver */ = { + isa = PBXGroup; + children = ( + 432E2C071A4B6B3757BEA13E /* Driver.cpp */, + 382E11E88B12BCB30F575686 /* Driver.entitlements */, + 5A3A73F307648F58213E4EA1 /* Driver.iig */, + D7E73F4E11A4B74449E7FDFE /* Info.plist */, + ); + path = "DriverKit Driver"; + sourceTree = ""; + }; 79DC4A1E4D2E0D3A215179BC /* Bundles */ = { isa = PBXGroup; children = ( @@ -1066,6 +1172,16 @@ path = Mac; sourceTree = ""; }; + 99EF37D6DEE914E180236A91 /* EndpointSecurity Extension */ = { + isa = PBXGroup; + children = ( + 5D13DDAB46F80D94D7345063 /* EndpointSecurity.entitlements */, + 8C62E8644AC5070AFC737BCC /* Info.plist */, + A6680EFE4E908CDBDCE405C8 /* main.swift */, + ); + path = "EndpointSecurity Extension"; + sourceTree = ""; + }; 9DB22CB08CFAA455518700DB /* StandaloneFiles */ = { isa = PBXGroup; children = ( @@ -1086,6 +1202,17 @@ path = Resources; sourceTree = ""; }; + A0F4C565134899E0C5EB2EA7 /* Network Extension */ = { + isa = PBXGroup; + children = ( + 16AA52945B70B1BF9E246350 /* FilterDataProvider.swift */, + EDCC70978B8AD49373DA0DE0 /* Info.plist */, + 03CD22B8CD2E91BB97CC534E /* main.swift */, + 45BBB9A7599490883491C808 /* NetworkExtension.entitlements */, + ); + path = "Network Extension"; + sourceTree = ""; + }; A3DCF90D9B1EF4E27CF54B19 /* iMessageApp */ = { isa = PBXGroup; children = ( @@ -1109,6 +1236,8 @@ 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */, A680BE9F68A255B0FB291AE6 /* App_watchOS.app */, 84317819C92F78425870E483 /* BundleX.bundle */, + 83B5EC7EF81F7E4B6F426D4E /* DriverKitDriver.dext */, + E5E0A80CCE8F8DB662DCD2D0 /* EndpointSecuritySystemExtension.systemextension */, 7D700FA699849D2F95216883 /* EntitledApp.app */, 2385A62F6C6EE8D461EE19F2 /* ExternalTarget.framework */, 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */, @@ -1127,6 +1256,7 @@ 469B630D28015F0EDC456F6B /* libStaticLibrary_ObjC.a */, 46DD8F9AAC104BDB63793625 /* libStaticLibrary_ObjC.a */, 8CB86294FB939FE6E90932E1 /* libStaticLibrary_Swift.a */, + 2049B6DD2AFE85F9DC9F3EB3 /* NetworkSystemExtension.systemextension */, E43116070AFEF5D8C3A5A957 /* TestFramework.framework */, BECEA4A483ADEB8158F640B3 /* Tool */, 22237B8EBD9E6BE8EBC8735F /* XPC Service.xpc */, @@ -1230,8 +1360,11 @@ children = ( 12809A79ACE69F501A5FE815 /* Carthage */, FDB2B6A77D39CD5602F2125F /* Contacts.framework */, + C0A428E67153BB40184F37BE /* DriverKit.framework */, 0BB1B49A91B892152D68ED76 /* libc++.tbd */, + 0BC75409252FF15F540FBB7B /* libEndpointSecurity.tbd */, FD4A16C7B8FEB7F97F3CBE3F /* libz.dylib */, + 5B785B1161553A7DD6DA4255 /* NetworkExtension.framework */, ); name = Frameworks; sourceTree = ""; @@ -1376,12 +1509,16 @@ 77D35586228BF8AB74152BB5 /* Resources */, FB79B30FEA6073A29B4D9FCC /* CopyFiles */, A6E1C88C073F8CC6B5B072B6 /* Frameworks */, + DE875E9A37F7CB9C347AEFA0 /* Embed System Extensions */, F8CDEFED6ED131A09041F995 /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( + 6BE35B7C058BE1B6F3B906C0 /* PBXTargetDependency */, + 1652DB87B43B72B5DE0601C4 /* PBXTargetDependency */, F3930A0708A7EB1BDA25B31B /* PBXTargetDependency */, + F7532D3474E04037FF26E9BC /* PBXTargetDependency */, 7EFC0278E67CD35F8981993C /* PBXTargetDependency */, B95DA92D1265C094E71B4A5D /* PBXTargetDependency */, ); @@ -1551,6 +1688,22 @@ productReference = 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */; productType = "com.apple.product-type.watchkit2-extension"; }; + 428715FBC1D86458DA70CBDE /* DriverKitDriver */ = { + isa = PBXNativeTarget; + buildConfigurationList = 412FA71CA97AD6851A1828DD /* Build configuration list for PBXNativeTarget "DriverKitDriver" */; + buildPhases = ( + 3422D8A97652F33BA3AEAD6E /* Sources */, + EA2F63A326C56F6ECA7F5D7D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DriverKitDriver; + productName = DriverKitDriver; + productReference = 83B5EC7EF81F7E4B6F426D4E /* DriverKitDriver.dext */; + productType = "com.apple.product-type.driver-extension"; + }; 536ACF18E4603B59207D43CE /* Framework_tvOS */ = { isa = PBXNativeTarget; buildConfigurationList = 658628E35283172E17BFC6A3 /* Build configuration list for PBXNativeTarget "Framework_tvOS" */; @@ -1758,6 +1911,38 @@ productReference = 469B630D28015F0EDC456F6B /* libStaticLibrary_ObjC.a */; productType = "com.apple.product-type.library.static"; }; + 9F551F66949B55E8328EB995 /* EndpointSecuritySystemExtension */ = { + isa = PBXNativeTarget; + buildConfigurationList = C4FB84AAA6F6974CEA51D359 /* Build configuration list for PBXNativeTarget "EndpointSecuritySystemExtension" */; + buildPhases = ( + EAFB6030AE5D2E4D9ACA6ECC /* Sources */, + E63B2ED6C095617F6F53C14A /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = EndpointSecuritySystemExtension; + productName = EndpointSecuritySystemExtension; + productReference = E5E0A80CCE8F8DB662DCD2D0 /* EndpointSecuritySystemExtension.systemextension */; + productType = "com.apple.product-type.system-extension"; + }; + AD28397BCC984F769EE8A937 /* NetworkSystemExtension */ = { + isa = PBXNativeTarget; + buildConfigurationList = 78DB808B74D58314279E7FD7 /* Build configuration list for PBXNativeTarget "NetworkSystemExtension" */; + buildPhases = ( + DEB2782C650F563EB8C62B28 /* Sources */, + 7448069D11FB1A170F943C90 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = NetworkSystemExtension; + productName = NetworkSystemExtension; + productReference = 2049B6DD2AFE85F9DC9F3EB3 /* NetworkSystemExtension.systemextension */; + productType = "com.apple.product-type.system-extension"; + }; AE3F93DB94E7208F2F1D9A78 /* Framework_iOS */ = { isa = PBXNativeTarget; buildConfigurationList = 50DA67E9A951C40D9536609D /* Build configuration list for PBXNativeTarget "Framework_iOS" */; @@ -1983,6 +2168,8 @@ 208179651927D1138D19B5AD /* App_watchOS */, 307AE3FA155FFD09B74AE351 /* App_watchOS Extension */, DA40AB367B606CCE2FDD398D /* BundleX */, + 428715FBC1D86458DA70CBDE /* DriverKitDriver */, + 9F551F66949B55E8328EB995 /* EndpointSecuritySystemExtension */, B61ED4688789B071275E2B7A /* EntitledApp */, E7454C10EA126A93537DD57E /* ExternalTarget */, CE7D183D3752B5B35D2D8E6D /* Framework2_iOS */, @@ -1995,6 +2182,7 @@ 71B5187E710718C1A205D4DC /* Framework_watchOS */, 700328EE1570207608D6ADB3 /* IncludedLegacy */, 72C923899DE05F1281872160 /* Legacy */, + AD28397BCC984F769EE8A937 /* NetworkSystemExtension */, 13E8C5AB873CEE21E18E552F /* StaticLibrary_ObjC_iOS */, 578C80E461E675508CED5DC3 /* StaticLibrary_ObjC_macOS */, 93542A75A613F00FDB5C9C63 /* StaticLibrary_ObjC_tvOS */, @@ -2353,6 +2541,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 3422D8A97652F33BA3AEAD6E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0932FB6FB887D7D6F7727CB7 /* Driver.cpp in Sources */, + FB6DA0DB62C425066D51767E /* Driver.iig in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 40A4456A24F99A01E340C032 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2538,6 +2735,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DEB2782C650F563EB8C62B28 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E0B27599D701E6BB0223D0A8 /* FilterDataProvider.swift in Sources */, + A90C4C147AD175DB9F7B5114 /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; E3C67D44BD5D2820592267FD /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2553,6 +2759,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + EAFB6030AE5D2E4D9ACA6ECC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CAE18A2194B57C830A297F83 /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; F39FAD4CC93306087D129EBD /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2584,6 +2798,11 @@ target = D137C04B64B7052419A2DF4E /* App_Clip */; targetProxy = 0B37F7A37D610FCFE187A6B7 /* PBXContainerItemProxy */; }; + 1652DB87B43B72B5DE0601C4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9F551F66949B55E8328EB995 /* EndpointSecuritySystemExtension */; + targetProxy = DD32A97CFD2016BF1477CF6C /* PBXContainerItemProxy */; + }; 2D1B4333107E10912508724E /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 0636AAF06498C336E1CEEDE4 /* TestFramework */; @@ -2624,6 +2843,11 @@ target = 0636AAF06498C336E1CEEDE4 /* TestFramework */; targetProxy = C42BA4EA0239AF536F0F0993 /* PBXContainerItemProxy */; }; + 6BE35B7C058BE1B6F3B906C0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 428715FBC1D86458DA70CBDE /* DriverKitDriver */; + targetProxy = 6ED42BD51E8832232E58D9C1 /* PBXContainerItemProxy */; + }; 7EFC0278E67CD35F8981993C /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 578C80E461E675508CED5DC3 /* StaticLibrary_ObjC_macOS */; @@ -2700,6 +2924,11 @@ target = 53A3B531E3947D8A8722745E /* Framework_macOS */; targetProxy = 7F4EAACE4AD6CF285B7D3308 /* PBXContainerItemProxy */; }; + F7532D3474E04037FF26E9BC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = AD28397BCC984F769EE8A937 /* NetworkSystemExtension */; + targetProxy = D4A7C57F6272F44F2E69A5DB /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -2879,6 +3108,38 @@ }; name = "Staging Debug"; }; + 035FC5362AE3E9696248DFD0 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "DriverKit Driver/Driver.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + DRIVERKIT_DEPLOYMENT_TARGET = 20.4; + INFOPLIST_FILE = "DriverKit Driver/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.Driver"; + SDKROOT = driverkit; + }; + name = "Production Debug"; + }; + 03B133682B8BEF8B1D647C76 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "DriverKit Driver/Driver.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + DRIVERKIT_DEPLOYMENT_TARGET = 20.4; + INFOPLIST_FILE = "DriverKit Driver/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.Driver"; + SDKROOT = driverkit; + }; + name = "Production Release"; + }; 04172E0BDC7C512A23A51C76 /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2957,6 +3218,21 @@ }; name = "Test Release"; }; + 06D6C7ED89937E7891E70B55 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "EndpointSecurity Extension/EndpointSecurity.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "EndpointSecurity Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.EndpointSecurity"; + SDKROOT = macosx; + }; + name = "Production Release"; + }; 06E4383A2687EAD5877836CD /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3067,6 +3343,21 @@ }; name = "Test Debug"; }; + 0C18EEAE68FBEBCF066E0CD9 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "Network Extension/NetworkExtension.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "Network Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.NetworkExtension"; + SDKROOT = macosx; + }; + name = "Test Release"; + }; 0C66F8A2D0CB0D802A327EB4 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3149,6 +3440,21 @@ }; name = "Test Debug"; }; + 11919FD24AA8A110C24C0FEF /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "EndpointSecurity Extension/EndpointSecurity.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "EndpointSecurity Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.EndpointSecurity"; + SDKROOT = macosx; + }; + name = "Test Release"; + }; 12BCDE0EFCEE621B881E424C /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3486,6 +3792,22 @@ }; name = "Production Release"; }; + 291A37106E83E5C30890F422 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "DriverKit Driver/Driver.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + DRIVERKIT_DEPLOYMENT_TARGET = 20.4; + INFOPLIST_FILE = "DriverKit Driver/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.Driver"; + SDKROOT = driverkit; + }; + name = "Staging Debug"; + }; 2C6AB16720ADFB2436337A8F /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3888,6 +4210,21 @@ }; name = "Staging Release"; }; + 46DAC1602BF6BEBCD177342F /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "EndpointSecurity Extension/EndpointSecurity.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "EndpointSecurity Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.EndpointSecurity"; + SDKROOT = macosx; + }; + name = "Staging Debug"; + }; 49322BF02F4F345A1339EF7A /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -4003,6 +4340,22 @@ }; name = "Staging Release"; }; + 4DA924C751AD8FAF891F953D /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "DriverKit Driver/Driver.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + DRIVERKIT_DEPLOYMENT_TARGET = 20.4; + INFOPLIST_FILE = "DriverKit Driver/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.Driver"; + SDKROOT = driverkit; + }; + name = "Test Release"; + }; 4EBCDEB4013FDB0720343467 /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -4659,6 +5012,21 @@ }; name = "Production Debug"; }; + 77C426E60C6FCB5A01EFC401 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "Network Extension/NetworkExtension.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "Network Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.NetworkExtension"; + SDKROOT = macosx; + }; + name = "Staging Release"; + }; 7931F229200F89B8CDC8A5E3 /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -4936,6 +5304,21 @@ }; name = "Production Debug"; }; + 86BDA2C16646B065BDE01177 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "EndpointSecurity Extension/EndpointSecurity.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "EndpointSecurity Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.EndpointSecurity"; + SDKROOT = macosx; + }; + name = "Production Debug"; + }; 8A380D322263800338FA5139 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -4949,6 +5332,21 @@ }; name = "Test Release"; }; + 8BAC4B81735DDF8537709B8D /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "Network Extension/NetworkExtension.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "Network Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.NetworkExtension"; + SDKROOT = macosx; + }; + name = "Production Debug"; + }; 8C9F67C7AA56DBE79F0F2640 /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5449,6 +5847,22 @@ }; name = "Staging Release"; }; + AA6BC5199D9705F3182D0C00 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "DriverKit Driver/Driver.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + DRIVERKIT_DEPLOYMENT_TARGET = 20.4; + INFOPLIST_FILE = "DriverKit Driver/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.Driver"; + SDKROOT = driverkit; + }; + name = "Test Debug"; + }; AABC1E325EADF86C5137D659 /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5461,6 +5875,21 @@ }; name = "Production Release"; }; + AB455120CB69CF0A7E128221 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "Network Extension/NetworkExtension.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "Network Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.NetworkExtension"; + SDKROOT = macosx; + }; + name = "Production Release"; + }; AC8E8FEA35961580D23185B2 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5766,6 +6195,21 @@ }; name = "Staging Debug"; }; + B987E9BED4B423A049202386 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "Network Extension/NetworkExtension.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "Network Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.NetworkExtension"; + SDKROOT = macosx; + }; + name = "Staging Debug"; + }; B9AF2E89FE3E9E03E0029607 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5965,6 +6409,21 @@ }; name = "Staging Debug"; }; + C44EBD74DF4B95E30983A798 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "EndpointSecurity Extension/EndpointSecurity.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "EndpointSecurity Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.EndpointSecurity"; + SDKROOT = macosx; + }; + name = "Staging Release"; + }; C59E649CEDC0E973B28B57A4 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6202,6 +6661,22 @@ }; name = "Staging Release"; }; + CF7D27DBBF0667D789D53D29 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "DriverKit Driver/Driver.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + DRIVERKIT_DEPLOYMENT_TARGET = 20.4; + INFOPLIST_FILE = "DriverKit Driver/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.Driver"; + SDKROOT = driverkit; + }; + name = "Staging Release"; + }; D24E68EE5DE052219B036D63 /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6287,6 +6762,21 @@ }; name = "Staging Release"; }; + D93982FB34335E2D1B9751FE /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "EndpointSecurity Extension/EndpointSecurity.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "EndpointSecurity Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.EndpointSecurity"; + SDKROOT = macosx; + }; + name = "Test Debug"; + }; D9A0609EE6F341CD4E8758C1 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6738,6 +7228,21 @@ }; name = "Test Debug"; }; + E9C964F0189C68721012002B /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "Network Extension/NetworkExtension.entitlements"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "Network Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.App-macOS.NetworkExtension"; + SDKROOT = macosx; + }; + name = "Test Debug"; + }; EA62022185E4BCDA6786EC0D /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -7212,6 +7717,19 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Production Debug"; }; + 412FA71CA97AD6851A1828DD /* Build configuration list for PBXNativeTarget "DriverKitDriver" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 035FC5362AE3E9696248DFD0 /* Production Debug */, + 03B133682B8BEF8B1D647C76 /* Production Release */, + 291A37106E83E5C30890F422 /* Staging Debug */, + CF7D27DBBF0667D789D53D29 /* Staging Release */, + AA6BC5199D9705F3182D0C00 /* Test Debug */, + 4DA924C751AD8FAF891F953D /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; 498FA7414845B8834E48496F /* Build configuration list for PBXNativeTarget "App_Clip_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -7381,6 +7899,19 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Production Debug"; }; + 78DB808B74D58314279E7FD7 /* Build configuration list for PBXNativeTarget "NetworkSystemExtension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8BAC4B81735DDF8537709B8D /* Production Debug */, + AB455120CB69CF0A7E128221 /* Production Release */, + B987E9BED4B423A049202386 /* Staging Debug */, + 77C426E60C6FCB5A01EFC401 /* Staging Release */, + E9C964F0189C68721012002B /* Test Debug */, + 0C18EEAE68FBEBCF066E0CD9 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; 7CBF487CACC0BBFB530D7963 /* Build configuration list for PBXAggregateTarget "SuperTarget" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -7485,6 +8016,19 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Production Debug"; }; + C4FB84AAA6F6974CEA51D359 /* Build configuration list for PBXNativeTarget "EndpointSecuritySystemExtension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 86BDA2C16646B065BDE01177 /* Production Debug */, + 06D6C7ED89937E7891E70B55 /* Production Release */, + 46DAC1602BF6BEBCD177342F /* Staging Debug */, + C44EBD74DF4B95E30983A798 /* Staging Release */, + D93982FB34335E2D1B9751FE /* Test Debug */, + 11919FD24AA8A110C24C0FEF /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; D379D1BBEF24ED05EB6ADEB3 /* Build configuration list for PBXNativeTarget "XPC Service" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/DriverKitDriver.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/DriverKitDriver.xcscheme new file mode 100644 index 000000000..e917aaf6c --- /dev/null +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/DriverKitDriver.xcscheme @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/EndpointSecuritySystemExtension.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/EndpointSecuritySystemExtension.xcscheme new file mode 100644 index 000000000..65c7766dc --- /dev/null +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/EndpointSecuritySystemExtension.xcscheme @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/NetworkSystemExtension.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/NetworkSystemExtension.xcscheme new file mode 100644 index 000000000..f4f211925 --- /dev/null +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/NetworkSystemExtension.xcscheme @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 78b84d60c..784d14dac 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -58,6 +58,9 @@ targets: dependencies: - target: Framework_macOS - target: XPC Service + - target: NetworkSystemExtension + - target: EndpointSecuritySystemExtension + - target: DriverKitDriver - sdk: Contacts.framework - sdk: libc++.tbd - sdk: libz.dylib @@ -216,6 +219,44 @@ targets: sources: - path: iMessageStickers + DriverKitDriver: + platform: macOS + type: driver-extension + sources: + - DriverKit Driver + settings: + PRODUCT_BUNDLE_IDENTIFIER: com.project.App-macOS.Driver + CODE_SIGN_ENTITLEMENTS: DriverKit Driver/Driver.entitlements + SDKROOT: driverkit + DRIVERKIT_DEPLOYMENT_TARGET: 20.4 + scheme: {} + dependencies: + - sdk: DriverKit.framework + + NetworkSystemExtension: + platform: macOS + type: system-extension + sources: + - Network Extension + settings: + PRODUCT_BUNDLE_IDENTIFIER: com.project.App-macOS.NetworkExtension + CODE_SIGN_ENTITLEMENTS: Network Extension/NetworkExtension.entitlements + scheme: {} + dependencies: + - sdk: NetworkExtension.framework + + EndpointSecuritySystemExtension: + platform: macOS + type: system-extension + sources: + - EndpointSecurity Extension + settings: + PRODUCT_BUNDLE_IDENTIFIER: com.project.App-macOS.EndpointSecurity + CODE_SIGN_ENTITLEMENTS: EndpointSecurity Extension/EndpointSecurity.entitlements + scheme: {} + dependencies: + - sdk: libEndpointSecurity.tbd + StaticLibrary_ObjC: type: library.static platform: [iOS, tvOS, watchOS, macOS] diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index 0fd95eef1..16f437464 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -217,7 +217,7 @@ class SchemeGeneratorTests: XCTestCase { .first(where: { $0.name == "\(target.name) \(variantName)" })) let buildActionEntry = try unwrap(xcscheme.buildAction?.buildActionEntries.first) - try expect(buildActionEntry.buildableReference.blueprintIdentifier.count > 0) == true + try expect((buildActionEntry.buildableReference.blueprintIdentifier?.count ?? 0) > 0) == true if variantName == "PreProd" { try expect(xcscheme.launchAction?.buildConfiguration) == "\(variantName) debug" try expect(xcscheme.testAction?.buildConfiguration) == "\(variantName) debug" From 81bd52be4b4a6779a24684a48d42e83448b95a90 Mon Sep 17 00:00:00 2001 From: Dalton Claybrook Date: Sun, 20 Jun 2021 06:19:02 -0400 Subject: [PATCH 092/284] Add support for conditionally linking dependencies based on platform (#1087) * Add initial support for conditional platform dependencies * Add tests for conditional platforms * Update docs and changelog * Respond to PR feedback * Change name of field from 'conditionalPlatforms' to 'platforms' Co-authored-by: Yonas Kolb --- CHANGELOG.md | 4 +++ Docs/ProjectSpec.md | 3 +- Sources/ProjectSpec/Dependency.swift | 24 ++++++++++----- Sources/ProjectSpec/Target.swift | 7 ++++- Sources/XcodeGenKit/PBXProjGenerator.swift | 6 ++-- .../Project.xcodeproj/project.pbxproj | 30 +++++++++++++++++++ Tests/Fixtures/TestProject/project.yml | 10 ++++--- Tests/ProjectSpecTests/SpecLoadingTests.swift | 17 ++++++----- .../PBXProjGeneratorTests.swift | 6 ++-- 9 files changed, 80 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61deea73d..d5c1a46c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - Added support for DocC Catalogs [#1091](https://github.com/yonaskolb/XcodeGen/pull/1091) @brevansio - Added support for "driver-extension" and "system-extension" product types [#1092](https://github.com/yonaskolb/XcodeGen/issues/1092) @vgorloff +- Add support for conditionally linking dependencies for specific platforms [#1087](https://github.com/yonaskolb/XcodeGen/pull/1087) @daltonclaybrook + +### Changed +- **Breaking**: Rename the `platform` field on `Dependency` to `platformFilter` [#1087](https://github.com/yonaskolb/XcodeGen/pull/1087) @daltonclaybrook ## 2.23.1 diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index b13ae18a1..4d57e3f38 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -430,7 +430,8 @@ A dependency can be one of a 6 types: - [ ] **codeSign**: **Bool** - Whether the `codeSignOnCopy` setting is applied when embedding framework. Defaults to true - [ ] **removeHeaders**: **Bool** - Whether the `removeHeadersOnCopy` setting is applied when embedding the framework. Defaults to true - [ ] **weak**: **Bool** - Whether the `Weak` setting is applied when linking the framework. Defaults to false -- [ ] **platform**: **String** - Add dependency to selected platforms. Available platforms are: **iOS**, **macOS** and **all**. Defaults is **all** +- [ ] **platformFilter**: **String** - This field is specific to Mac Catalyst. It corresponds to the "Platforms" dropdown in the Frameworks & Libraries section of Target settings in Xcode. Available options are: **iOS**, **macOS** and **all**. Defaults is **all** +- [ ] **platforms**: **[[Platform](#platform)]** - List of platforms this dependency should apply to. Defaults to all applicable platforms. **Implicit Framework options**: diff --git a/Sources/ProjectSpec/Dependency.swift b/Sources/ProjectSpec/Dependency.swift index 726e1e1a8..795d0ed60 100644 --- a/Sources/ProjectSpec/Dependency.swift +++ b/Sources/ProjectSpec/Dependency.swift @@ -5,7 +5,7 @@ public struct Dependency: Equatable { public static let removeHeadersDefault = true public static let implicitDefault = false public static let weakLinkDefault = false - public static let platformDefault: Platform = .all + public static let platformFilterDefault: PlatformFilter = .all public var type: DependencyType public var reference: String @@ -15,7 +15,8 @@ public struct Dependency: Equatable { public var link: Bool? public var implicit: Bool = implicitDefault public var weakLink: Bool = weakLinkDefault - public var platform: Platform = platformDefault + public var platformFilter: PlatformFilter = platformFilterDefault + public var platforms: Set? public init( type: DependencyType, @@ -25,7 +26,8 @@ public struct Dependency: Equatable { link: Bool? = nil, implicit: Bool = implicitDefault, weakLink: Bool = weakLinkDefault, - platform: Platform = platformDefault + platformFilter: PlatformFilter = platformFilterDefault, + platforms: Set? = nil ) { self.type = type self.reference = reference @@ -34,10 +36,11 @@ public struct Dependency: Equatable { self.link = link self.implicit = implicit self.weakLink = weakLink - self.platform = platform + self.platformFilter = platformFilter + self.platforms = platforms } - public enum Platform: String, Equatable { + public enum PlatformFilter: String, Equatable { case all case iOS case macOS @@ -123,10 +126,14 @@ extension Dependency: JSONObjectConvertible { weakLink = bool } - if let platformString: String = jsonDictionary.json(atKeyPath: "platform"), let platform = Platform(rawValue: platformString) { - self.platform = platform + if let platformFilterString: String = jsonDictionary.json(atKeyPath: "platformFilter"), let platformFilter = PlatformFilter(rawValue: platformFilterString) { + self.platformFilter = platformFilter } else { - self.platform = .all + self.platformFilter = .all + } + + if let platforms: [ProjectSpec.Platform] = jsonDictionary.json(atKeyPath: "platforms") { + self.platforms = Set(platforms) } } } @@ -137,6 +144,7 @@ extension Dependency: JSONEncodable { "embed": embed, "codeSign": codeSign, "link": link, + "platforms": platforms?.map(\.rawValue).sorted() ] if removeHeaders != Dependency.removeHeadersDefault { diff --git a/Sources/ProjectSpec/Target.swift b/Sources/ProjectSpec/Target.swift index 851aa4ef5..60752f445 100644 --- a/Sources/ProjectSpec/Target.swift +++ b/Sources/ProjectSpec/Target.swift @@ -301,7 +301,12 @@ extension Target: NamedJSONDictionaryConvertible { if jsonDictionary["dependencies"] == nil { dependencies = [] } else { - dependencies = try jsonDictionary.json(atKeyPath: "dependencies", invalidItemBehaviour: .fail) + let dependencies: [Dependency] = try jsonDictionary.json(atKeyPath: "dependencies", invalidItemBehaviour: .fail) + self.dependencies = dependencies.filter { [platform] dependency -> Bool in + // If unspecified, all platforms are supported + guard let platforms = dependency.platforms else { return true } + return platforms.contains(platform) + } } if jsonDictionary["info"] != nil { diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index cc12d2f6b..3b4d4b188 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -751,7 +751,7 @@ public class PBXProjGenerator { for dependency in targetDependencies { let embed = dependency.embed ?? target.shouldEmbedDependencies - let platform = makePlatform(for: dependency.platform) + let platform = makePlatformFilter(for: dependency.platformFilter) switch dependency.type { case .target: @@ -1320,8 +1320,8 @@ public class PBXProjGenerator { } } - private func makePlatform(for platform: Dependency.Platform) -> String? { - switch platform { + private func makePlatformFilter(for filter: Dependency.PlatformFilter) -> String? { + switch filter { case .all: return nil case .macOS: diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 4e2f4355f..0e634a03d 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -71,6 +71,7 @@ 47D1F439B8E6D287B3F3E8D1 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 47FC57B04A3AD83359F433EA /* StaticLibrary_ObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5A2B916A11DCC2565241359F /* StaticLibrary_ObjC.h */; }; 49A4B8937BB5520B36EA33F0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 814D72C2B921F60B759C2D4B /* Main.storyboard */; }; + 4C1504A05321046B3ED7A839 /* Framework2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB055761199DF36DB0C629A6 /* Framework2.framework */; }; 4CB673A7C0C11E04F8544BDB /* Contacts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB2B6A77D39CD5602F2125F /* Contacts.framework */; }; 4DA7140FF84DBF39961F3409 /* NetworkSystemExtension.systemextension in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = 2049B6DD2AFE85F9DC9F3EB3 /* NetworkSystemExtension.systemextension */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 4F6481557E2BEF8D749C37E3 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 187E665975BB5611AF0F27E1 /* main.m */; }; @@ -125,6 +126,7 @@ A1588BF3BFFE1DF7409CBA10 /* Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */; }; A1AEAAB53EAEDA1C307871FA /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB178D03E75929F3F5B10C56 /* Result.framework */; }; A59B3F08914812573AFF6C2D /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FD4A16C7B8FEB7F97F3CBE3F /* libz.dylib */; }; + A7438C77A05D83E7016CF044 /* Framework2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A0DC40025AB59B688E758829 /* Framework2.framework */; }; A7D1A9942302569A9515696A /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D296BB7355994040E197A1EE /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; A90C4C147AD175DB9F7B5114 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CD22B8CD2E91BB97CC534E /* main.swift */; }; A949422315536EACDF8DD78A /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B785B1161553A7DD6DA4255 /* NetworkExtension.framework */; }; @@ -223,6 +225,13 @@ remoteGlobalIDString = 0867B0DACEF28C11442DE8F7; remoteInfo = App_iOS; }; + 45907115465077029040BF29 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0FBAE303E3CFC2ABAC876A77 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8B9A14DC280CCE013CC86440; + remoteInfo = Framework2_tvOS; + }; 469D922BE967C6D52ED84552 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0FBAE303E3CFC2ABAC876A77 /* Project object */; @@ -244,6 +253,13 @@ remoteGlobalIDString = 13E8C5AB873CEE21E18E552F; remoteInfo = StaticLibrary_ObjC_iOS; }; + 59BFAC272F73B46E97B74426 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0FBAE303E3CFC2ABAC876A77 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6ED01BC471A8C3642258E178; + remoteInfo = Framework2_watchOS; + }; 610412261F48A0A36C32FC5C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0FBAE303E3CFC2ABAC876A77 /* Project object */; @@ -800,6 +816,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 4C1504A05321046B3ED7A839 /* Framework2.framework in Frameworks */, A1AEAAB53EAEDA1C307871FA /* Result.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -808,6 +825,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + A7438C77A05D83E7016CF044 /* Framework2.framework in Frameworks */, 9DF5931DAD58C35B830A0A75 /* Result.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1716,6 +1734,7 @@ buildRules = ( ); dependencies = ( + D6C733BEB62EAA62CCC68556 /* PBXTargetDependency */, CE96B0951433713033A03DCD /* PBXTargetDependency */, ); name = Framework_tvOS; @@ -1805,6 +1824,7 @@ buildRules = ( ); dependencies = ( + 0C99705018337CE91AA34CBA /* PBXTargetDependency */, 35DF16CA4A1F88140CF69620 /* PBXTargetDependency */, ); name = Framework_watchOS; @@ -2783,6 +2803,11 @@ target = 1C26A6A0BC446191F311D470 /* iMessageExtension */; targetProxy = C8FD369800D87311EC532712 /* PBXContainerItemProxy */; }; + 0C99705018337CE91AA34CBA /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6ED01BC471A8C3642258E178 /* Framework2_watchOS */; + targetProxy = 59BFAC272F73B46E97B74426 /* PBXContainerItemProxy */; + }; 0D33D01C71E8002A07F02122 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 208179651927D1138D19B5AD /* App_watchOS */; @@ -2909,6 +2934,11 @@ target = 0867B0DACEF28C11442DE8F7 /* App_iOS */; targetProxy = 3A81C6D6875469889D53A2C5 /* PBXContainerItemProxy */; }; + D6C733BEB62EAA62CCC68556 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 8B9A14DC280CCE013CC86440 /* Framework2_tvOS */; + targetProxy = 45907115465077029040BF29 /* PBXContainerItemProxy */; + }; E84285243DE0BB361A708079 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = AE3F93DB94E7208F2F1D9A78 /* Framework_iOS */; diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 784d14dac..10bbabffa 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -119,16 +119,16 @@ targets: PRODUCT_BUNDLE_IDENTIFIER: com.project.app dependencies: - target: Framework_iOS - platform: all + platformFilter: all - target: StaticLibrary_ObjC_iOS - carthage: Result - platform: macOS + platformFilter: macOS - carthage: SwiftyJSON linkType: static - platform: iOS + platformFilter: iOS - target: Framework2_iOS weak: true - platform: iOS + platformFilter: iOS - target: App_watchOS - target: iMessageApp - sdk: Contacts.framework @@ -284,6 +284,8 @@ targets: dependencies: - carthage: Result - target: StaticLibrary_ObjC_${platform} + - target: Framework2_${platform} + platforms: [tvOS, watchOS] Framework2: type: framework diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index d302e8b3d..2282a8fa1 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -376,9 +376,9 @@ class SpecLoadingTests: XCTestCase { $0.it("parses target dependencies") { var targetDictionary = validTarget targetDictionary["dependencies"] = [ - ["target": "name", "embed": false, "platform": "all"], - ["target": "project/name", "embed": false, "platform": "macOS"], - ["carthage": "name", "findFrameworks": true, "platform": "iOS"], + ["target": "name", "embed": false, "platformFilter": "all"], + ["target": "project/name", "embed": false, "platformFilter": "macOS"], + ["carthage": "name", "findFrameworks": true, "platformFilter": "iOS"], ["carthage": "name", "findFrameworks": true, "linkType": "static"], ["framework": "path", "weak": true], ["sdk": "Contacts.framework"], @@ -386,16 +386,19 @@ class SpecLoadingTests: XCTestCase { "sdk": "Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework", "root": "DEVELOPER_DIR", ], + ["target": "conditionalMatch", "platforms": ["iOS"]], + ["target": "conditionalMiss", "platforms": ["watchOS"]], ] let target = try Target(name: "test", jsonDictionary: targetDictionary) - try expect(target.dependencies.count) == 7 - try expect(target.dependencies[0]) == Dependency(type: .target, reference: "name", embed: false, platform: .all) - try expect(target.dependencies[1]) == Dependency(type: .target, reference: "project/name", embed: false, platform: .macOS) - try expect(target.dependencies[2]) == Dependency(type: .carthage(findFrameworks: true, linkType: .dynamic), reference: "name", platform: .iOS) + try expect(target.dependencies.count) == 8 + try expect(target.dependencies[0]) == Dependency(type: .target, reference: "name", embed: false, platformFilter: .all) + try expect(target.dependencies[1]) == Dependency(type: .target, reference: "project/name", embed: false, platformFilter: .macOS) + try expect(target.dependencies[2]) == Dependency(type: .carthage(findFrameworks: true, linkType: .dynamic), reference: "name", platformFilter: .iOS) try expect(target.dependencies[3]) == Dependency(type: .carthage(findFrameworks: true, linkType: .static), reference: "name") try expect(target.dependencies[4]) == Dependency(type: .framework, reference: "path", weakLink: true) try expect(target.dependencies[5]) == Dependency(type: .sdk(root: nil), reference: "Contacts.framework") try expect(target.dependencies[6]) == Dependency(type: .sdk(root: "DEVELOPER_DIR"), reference: "Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework") + try expect(target.dependencies[7]) == Dependency(type: .target, reference: "conditionalMatch", platforms: [.iOS]) } $0.it("parses info plist") { diff --git a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift index 93280d7be..359b6ce5f 100644 --- a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift @@ -354,9 +354,9 @@ class PBXProjGeneratorTests: XCTestCase { let target1 = Target(name: "TestAll", type: .application, platform: .iOS, sources: ["Sources"]) let target2 = Target(name: "TestiOS", type: .application, platform: .iOS, sources: ["Sources"]) let target3 = Target(name: "TestmacOS", type: .application, platform: .iOS, sources: ["Sources"]) - let dependency1 = Dependency(type: .target, reference: "TestAll", platform: .all) - let dependency2 = Dependency(type: .target, reference: "TestiOS", platform: .iOS) - let dependency3 = Dependency(type: .target, reference: "TestmacOS", platform: .macOS) + let dependency1 = Dependency(type: .target, reference: "TestAll", platformFilter: .all) + let dependency2 = Dependency(type: .target, reference: "TestiOS", platformFilter: .iOS) + let dependency3 = Dependency(type: .target, reference: "TestmacOS", platformFilter: .macOS) let target = Target(name: "Test", type: .application, platform: .iOS, sources: ["Sources"], dependencies: [dependency1, dependency2, dependency3]) let project = Project(basePath: directoryPath, name: "Test", targets: [target, target1, target2, target3]) From ce051293de1dafafbc36e89bc390536f8a554f34 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 27 Jun 2021 14:23:48 +0200 Subject: [PATCH 093/284] Fix path to an example project spec (#1096) The previous linked file (`project.yml`) doesn't exist anymore in RxUserDefaults. Instead, `Examples/CocoaPodExample.yml` is an example spec in RxUserDefaults. --- Docs/Examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/Examples.md b/Docs/Examples.md index 47ce369e1..19dc40975 100644 --- a/Docs/Examples.md +++ b/Docs/Examples.md @@ -2,7 +2,7 @@ These are a bunch of real world examples of XcodeGen project specs. Feel free to add your own via PR. -- [num42/RxUserDefaults](https://github.com/num42/RxUserDefaults/blob/master/project.yml) +- [num42/RxUserDefaults](https://github.com/num42/RxUserDefaults/blob/master/Examples/CocoaPodsExample.yml) - [toshi0383/Bitrise-iOS](https://github.com/toshi0383/Bitrise-iOS/blob/master/project.yml) - [johndpope/swift-models](https://github.com/johndpope/swift-models/tree/stable/Inference) - [atelier-socle/AppRepositoryTemplate](https://github.com/atelier-socle/AppRepositoryTemplate/blob/master/project.yml) From 66b1db4b5c0a59560bdbe649f03dc001f3eb1106 Mon Sep 17 00:00:00 2001 From: Dalton Claybrook Date: Sun, 27 Jun 2021 08:25:26 -0400 Subject: [PATCH 094/284] Add support for specifying the UI testing screenshot behavior in a scheme test action (#942) * Support for specifying UI testing snapshot behavior in scheme test action * Add tests for new screenshot scheme options * Update changelog * Add new fields to Scheme.Test json encoding * Only save values to JSON if they aren't the defaults * Using new defaults constants --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 2 + Sources/ProjectSpec/Scheme.swift | 20 ++++++- Sources/XcodeGenKit/SchemeGenerator.swift | 14 +++++ .../SchemeGeneratorTests.swift | 53 +++++++++++++++++++ 5 files changed, 89 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5c1a46c5..988888557 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Added support for DocC Catalogs [#1091](https://github.com/yonaskolb/XcodeGen/pull/1091) @brevansio - Added support for "driver-extension" and "system-extension" product types [#1092](https://github.com/yonaskolb/XcodeGen/issues/1092) @vgorloff - Add support for conditionally linking dependencies for specific platforms [#1087](https://github.com/yonaskolb/XcodeGen/pull/1087) @daltonclaybrook +- Add ability to specify UI testing screenshot behavior in test schemes [#942](https://github.com/yonaskolb/XcodeGen/pull/942) @daltonclaybrook ### Changed - **Breaking**: Rename the `platform` field on `Dependency` to `platformFilter` [#1087](https://github.com/yonaskolb/XcodeGen/pull/1087) @daltonclaybrook diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 4d57e3f38..91d80e3f6 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -814,6 +814,8 @@ A multiline script can be written using the various YAML multiline methods, for - [ ] **coverageTargets**: **[String]** - a list of targets to gather code coverage. Each entry can either be a simple string, or a string using [Project Reference](#project-reference) - [ ] **targets**: **[[Test Target](#test-target)]** - a list of targets to test. Each entry can either be a simple string, or a [Test Target](#test-target) - [ ] **customLLDBInit**: **String** - the absolute path to the custom `.lldbinit` file +- [ ] **captureScreenshotsAutomatically**: **Bool** - indicates whether screenshots should be captured automatically while UI Testing. This defaults to true. +- [ ] **deleteScreenshotsWhenEachTestSucceeds**: **Bool** - whether successful UI tests should cause automatically-captured screenshots to be deleted. If `captureScreenshotsAutomatically` is false, this value is ignored. This defaults to true. #### Test Target - [x] **name**: **String** - The name of the target diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index e5e30b1b0..ed921c89d 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -164,6 +164,8 @@ public struct Scheme: Equatable { public static let gatherCoverageDataDefault = false public static let disableMainThreadCheckerDefault = false public static let debugEnabledDefault = true + public static let captureScreenshotsAutomaticallyDefault = true + public static let deleteScreenshotsWhenEachTestSucceedsDefault = true public var config: String? public var gatherCoverageData: Bool @@ -178,6 +180,8 @@ public struct Scheme: Equatable { public var region: String? public var debugEnabled: Bool public var customLLDBInit: String? + public var captureScreenshotsAutomatically: Bool + public var deleteScreenshotsWhenEachTestSucceeds: Bool public struct TestTarget: Equatable, ExpressibleByStringLiteral { public static let randomExecutionOrderDefault = false @@ -236,7 +240,9 @@ public struct Scheme: Equatable { language: String? = nil, region: String? = nil, debugEnabled: Bool = debugEnabledDefault, - customLLDBInit: String? = nil + customLLDBInit: String? = nil, + captureScreenshotsAutomatically: Bool = captureScreenshotsAutomaticallyDefault, + deleteScreenshotsWhenEachTestSucceeds: Bool = deleteScreenshotsWhenEachTestSucceedsDefault ) { self.config = config self.gatherCoverageData = gatherCoverageData @@ -251,6 +257,8 @@ public struct Scheme: Equatable { self.region = region self.debugEnabled = debugEnabled self.customLLDBInit = customLLDBInit + self.captureScreenshotsAutomatically = captureScreenshotsAutomatically + self.deleteScreenshotsWhenEachTestSucceeds = deleteScreenshotsWhenEachTestSucceeds } public var shouldUseLaunchSchemeArgsEnv: Bool { @@ -475,6 +483,8 @@ extension Scheme.Test: JSONObjectConvertible { region = jsonDictionary.json(atKeyPath: "region") debugEnabled = jsonDictionary.json(atKeyPath: "debugEnabled") ?? Scheme.Test.debugEnabledDefault customLLDBInit = jsonDictionary.json(atKeyPath: "customLLDBInit") + captureScreenshotsAutomatically = jsonDictionary.json(atKeyPath: "captureScreenshotsAutomatically") ?? Scheme.Test.captureScreenshotsAutomaticallyDefault + deleteScreenshotsWhenEachTestSucceeds = jsonDictionary.json(atKeyPath: "deleteScreenshotsWhenEachTestSucceeds") ?? Scheme.Test.deleteScreenshotsWhenEachTestSucceedsDefault } } @@ -508,6 +518,14 @@ extension Scheme.Test: JSONEncodable { dict["customLLDBInit"] = customLLDBInit } + if captureScreenshotsAutomatically != Scheme.Test.captureScreenshotsAutomaticallyDefault { + dict["captureScreenshotsAutomatically"] = captureScreenshotsAutomatically + } + + if deleteScreenshotsWhenEachTestSucceeds != Scheme.Test.deleteScreenshotsWhenEachTestSucceedsDefault { + dict["deleteScreenshotsWhenEachTestSucceeds"] = deleteScreenshotsWhenEachTestSucceeds + } + return dict } } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 907e2e5d4..67f681964 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -228,6 +228,7 @@ public class SchemeGenerator { environmentVariables: testVariables, language: scheme.test?.language, region: scheme.test?.region, + systemAttachmentLifetime: scheme.test?.systemAttachmentLifetime, customLLDBInitFile: scheme.test?.customLLDBInit ) @@ -448,3 +449,16 @@ extension PBXProductType { } } } + +extension Scheme.Test { + var systemAttachmentLifetime: XCScheme.TestAction.AttachmentLifetime? { + switch (captureScreenshotsAutomatically, deleteScreenshotsWhenEachTestSucceeds) { + case (false, _): + return .keepNever + case (true, false): + return .keepAlways + case (true, true): + return nil + } + } +} diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index 16f437464..3c27b8a91 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -108,6 +108,7 @@ class SchemeGeneratorTests: XCTestCase { try expect(xcscheme.launchAction?.locationScenarioReference?.identifier) == "New York, NY, USA" try expect(xcscheme.launchAction?.customLLDBInitFile) == "/sample/.lldbinit" try expect(xcscheme.testAction?.customLLDBInitFile) == "/test/.lldbinit" + try expect(xcscheme.testAction?.systemAttachmentLifetime).to.beNil() } let frameworkTarget = Scheme.BuildTarget(target: .local(framework.name), buildTypes: [.archiving]) @@ -445,6 +446,42 @@ class SchemeGeneratorTests: XCTestCase { let xcscheme = try unwrap(xcodeProject.sharedData?.schemes.first) try expect(xcscheme.launchAction?.macroExpansion?.buildableName) == "MyApp.app" } + + $0.it("generates scheme capturing screenshots automatically and deleting on success") { + let xcscheme = try self.makeSnapshotScheme( + buildTarget: buildTarget, + captureScreenshotsAutomatically: true, + deleteScreenshotsWhenEachTestSucceeds: true) + + try expect(xcscheme.testAction?.systemAttachmentLifetime).to.beNil() + } + + $0.it("generates scheme capturing screenshots and not deleting") { + let xcscheme = try self.makeSnapshotScheme( + buildTarget: buildTarget, + captureScreenshotsAutomatically: true, + deleteScreenshotsWhenEachTestSucceeds: false) + + try expect(xcscheme.testAction?.systemAttachmentLifetime) == .keepAlways + } + + $0.it("generates scheme not capturing screenshots") { + let xcscheme = try self.makeSnapshotScheme( + buildTarget: buildTarget, + captureScreenshotsAutomatically: false, + deleteScreenshotsWhenEachTestSucceeds: false) + + try expect(xcscheme.testAction?.systemAttachmentLifetime) == .keepNever + } + + $0.it("ignores screenshot delete preference when not capturing screenshots") { + let xcscheme = try self.makeSnapshotScheme( + buildTarget: buildTarget, + captureScreenshotsAutomatically: false, + deleteScreenshotsWhenEachTestSucceeds: true) + + try expect(xcscheme.testAction?.systemAttachmentLifetime) == .keepNever + } } } @@ -503,4 +540,20 @@ class SchemeGeneratorTests: XCTestCase { let xcodeProject = try project.generateXcodeProject() return try unwrap(xcodeProject.sharedData?.schemes.first) } + + private func makeSnapshotScheme(buildTarget: Scheme.BuildTarget, captureScreenshotsAutomatically: Bool, deleteScreenshotsWhenEachTestSucceeds: Bool) throws -> XCScheme { + let scheme = Scheme( + name: "MyScheme", + build: Scheme.Build(targets: [buildTarget]), + run: Scheme.Run(config: "Debug"), + test: Scheme.Test(config: "Debug", captureScreenshotsAutomatically: captureScreenshotsAutomatically, deleteScreenshotsWhenEachTestSucceeds: deleteScreenshotsWhenEachTestSucceeds) + ) + let project = Project( + name: "test", + targets: [app, framework], + schemes: [scheme] + ) + let xcodeProject = try project.generateXcodeProject() + return try unwrap(xcodeProject.sharedData?.schemes.first) + } } From 270ef8b27963b9fbfae3d02a253cc32a82f04ab1 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Sun, 27 Jun 2021 22:30:14 +1000 Subject: [PATCH 095/284] Update to 2.24.0 --- CHANGELOG.md | 4 ++++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 988888557..4096688d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.24.0 + ### Added - Added support for DocC Catalogs [#1091](https://github.com/yonaskolb/XcodeGen/pull/1091) @brevansio @@ -12,6 +14,8 @@ ### Changed - **Breaking**: Rename the `platform` field on `Dependency` to `platformFilter` [#1087](https://github.com/yonaskolb/XcodeGen/pull/1087) @daltonclaybrook +[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.23.1...2.24.0) + ## 2.23.1 ### Changed diff --git a/Makefile b/Makefile index 876ea0d5a..9f5dad1d1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.23.1 +VERSION = 2.24.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index bb8191f2b..5b4d507c6 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.23.1"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.24.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index d1c2d5c65..b952f7af6 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.23.1") +let version = Version("2.24.0") let cli = XcodeGenCLI(version: version) cli.execute() From e2f062b6be56f63d9cc65ea6c041da28460de7d5 Mon Sep 17 00:00:00 2001 From: Roman Podymov Date: Thu, 15 Jul 2021 03:41:48 +0200 Subject: [PATCH 096/284] erouska (#1107) --- Docs/Examples.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Docs/Examples.md b/Docs/Examples.md index 19dc40975..27159d966 100644 --- a/Docs/Examples.md +++ b/Docs/Examples.md @@ -10,3 +10,4 @@ These are a bunch of real world examples of XcodeGen project specs. Feel free to - [scelis/XcodeGen-TestStickers](https://github.com/scelis/XcodeGen-TestStickers/blob/master/project.yml) - [minvws/nl-covid19-notification-app-ios](https://github.com/minvws/nl-covid19-notification-app-ios/blob/master/project.yml) - [pvinis/react-native-xcodegen](https://github.com/pvinis/react-native-xcodegen/blob/master/templates) +- [covid19cz/erouska-ios](https://github.com/covid19cz/erouska-ios/blob/develop/project.yml) From d35d22f08bede3180bcdaa2b3270faf3bcbc0a4d Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Thu, 15 Jul 2021 04:10:34 +0200 Subject: [PATCH 097/284] Added support for dependency destination specification. (Resolves #1038) (#1039) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added support for dependency destination specification. (Resolves #1038) * More generic way covering more different dependency types. (#1038) * Added unit-test for each possible dependency combination. First test current embeding then the new one with custom copy spec. (#1038) * Review fixes. (#1038) * Minimized unit-test boiler-plate (#1038) * Update CHANGELOG.md Co-authored-by: Jakub Bednář Co-authored-by: Yonas Kolb --- CHANGELOG.md | 3 + Docs/ProjectSpec.md | 13 + Sources/ProjectSpec/Dependency.swift | 12 +- Sources/XcodeGenKit/PBXProjGenerator.swift | 67 +- .../Project.xcodeproj/project.pbxproj | 15 +- Tests/Fixtures/TestProject/project.yml | 3 + Tests/ProjectSpecTests/ProjectSpecTests.swift | 3 +- .../ProjectGeneratorTests.swift | 1417 +++++++++++++++++ 8 files changed, 1522 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4096688d2..4bcbc98de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Next Version +### Added +- Allow specifying a `copy` setting for each dependency. [#1038](https://github.com/yonaskolb/XcodeGen/pull/1039) @JakubBednar + ## 2.24.0 ### Added diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 91d80e3f6..c99f14628 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -432,6 +432,19 @@ A dependency can be one of a 6 types: - [ ] **weak**: **Bool** - Whether the `Weak` setting is applied when linking the framework. Defaults to false - [ ] **platformFilter**: **String** - This field is specific to Mac Catalyst. It corresponds to the "Platforms" dropdown in the Frameworks & Libraries section of Target settings in Xcode. Available options are: **iOS**, **macOS** and **all**. Defaults is **all** - [ ] **platforms**: **[[Platform](#platform)]** - List of platforms this dependency should apply to. Defaults to all applicable platforms. +- **copy** - Copy Files Phase for this dependency. This only applies when `embed` is true. Must be specified as an object with the following fields: + - [x] **destination**: **String** - Destination of the Copy Files phase. This can be one of the following values: + - `absolutePath` + - `productsDirectory` + - `wrapper` + - `executables` + - `resources` + - `javaResources` + - `frameworks` + - `sharedFrameworks` + - `sharedSupport` + - `plugins` + - [ ] **subpath**: **String** - The path inside of the destination to copy the files. **Implicit Framework options**: diff --git a/Sources/ProjectSpec/Dependency.swift b/Sources/ProjectSpec/Dependency.swift index 795d0ed60..2037bd444 100644 --- a/Sources/ProjectSpec/Dependency.swift +++ b/Sources/ProjectSpec/Dependency.swift @@ -17,6 +17,7 @@ public struct Dependency: Equatable { public var weakLink: Bool = weakLinkDefault public var platformFilter: PlatformFilter = platformFilterDefault public var platforms: Set? + public var copyPhase: BuildPhaseSpec.CopyFilesSettings? public init( type: DependencyType, @@ -27,7 +28,8 @@ public struct Dependency: Equatable { implicit: Bool = implicitDefault, weakLink: Bool = weakLinkDefault, platformFilter: PlatformFilter = platformFilterDefault, - platforms: Set? = nil + platforms: Set? = nil, + copyPhase: BuildPhaseSpec.CopyFilesSettings? = nil ) { self.type = type self.reference = reference @@ -38,6 +40,7 @@ public struct Dependency: Equatable { self.weakLink = weakLink self.platformFilter = platformFilter self.platforms = platforms + self.copyPhase = copyPhase } public enum PlatformFilter: String, Equatable { @@ -135,6 +138,10 @@ extension Dependency: JSONObjectConvertible { if let platforms: [ProjectSpec.Platform] = jsonDictionary.json(atKeyPath: "platforms") { self.platforms = Set(platforms) } + + if let object: JSONDictionary = jsonDictionary.json(atKeyPath: "copy") { + copyPhase = try BuildPhaseSpec.CopyFilesSettings(jsonDictionary: object) + } } } @@ -144,7 +151,8 @@ extension Dependency: JSONEncodable { "embed": embed, "codeSign": codeSign, "link": link, - "platforms": platforms?.map(\.rawValue).sorted() + "platforms": platforms?.map(\.rawValue).sorted(), + "copy": copyPhase?.toJSONValue(), ] if removeHeaders != Dependency.removeHeadersDefault { diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 3b4d4b188..033b0fe31 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -662,6 +662,7 @@ public class PBXProjGenerator { var dependencies: [PBXTargetDependency] = [] var targetFrameworkBuildFiles: [PBXBuildFile] = [] var frameworkBuildPaths = Set() + var customCopyDependenciesReferences: [PBXBuildFile] = [] var copyFilesBuildPhasesFiles: [BuildPhaseSpec.CopyFilesSettings: [PBXBuildFile]] = [:] var copyFrameworksReferences: [PBXBuildFile] = [] var copyResourcesReferences: [PBXBuildFile] = [] @@ -689,7 +690,11 @@ public class PBXProjGenerator { if dependency.removeHeaders { embedAttributes.append("RemoveHeadersOnCopy") } - return ["ATTRIBUTES": embedAttributes] + var retval: [String:Any] = ["ATTRIBUTES": embedAttributes] + if let copyPhase = dependency.copyPhase { + retval["COPY_PHASE"] = copyPhase + } + return retval } func getDependencyFrameworkSettings(dependency: Dependency) -> [String: Any]? { @@ -727,7 +732,10 @@ public class PBXProjGenerator { pbxBuildFile.platformFilter = platform let embedFile = addObject(pbxBuildFile) - if dependencyTarget.type.isExtension { + if dependency.copyPhase != nil { + // custom copy takes precedence + customCopyDependenciesReferences.append(embedFile) + } else if dependencyTarget.type.isExtension { // embed app extension extensions.append(embedFile) } else if dependencyTarget.type.isSystemExtension { @@ -807,7 +815,12 @@ public class PBXProjGenerator { let pbxBuildFile = PBXBuildFile(file: fileReference, settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) pbxBuildFile.platformFilter = platform let embedFile = addObject(pbxBuildFile) - copyFrameworksReferences.append(embedFile) + + if dependency.copyPhase != nil { + customCopyDependenciesReferences.append(embedFile) + } else { + copyFrameworksReferences.append(embedFile) + } } case .sdk(let root): @@ -858,7 +871,12 @@ public class PBXProjGenerator { let pbxBuildFile = PBXBuildFile(file: fileReference, settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) pbxBuildFile.platformFilter = platform let embedFile = addObject(pbxBuildFile) - copyFrameworksReferences.append(embedFile) + + if dependency.copyPhase != nil { + customCopyDependenciesReferences.append(embedFile) + } else { + copyFrameworksReferences.append(embedFile) + } } case .carthage(let findFrameworks, let linkType): @@ -923,7 +941,12 @@ public class PBXProjGenerator { settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) pbxBuildFile.platformFilter = platform let embedFile = addObject(pbxBuildFile) - copyFrameworksReferences.append(embedFile) + + if dependency.copyPhase != nil { + customCopyDependenciesReferences.append(embedFile) + } else { + copyFrameworksReferences.append(embedFile) + } } case .bundle: // Static and dynamic libraries can't copy resources @@ -969,7 +992,11 @@ public class PBXProjGenerator { let embedFile = addObject( PBXBuildFile(file: fileReference, settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) ) - copyFrameworksReferences.append(embedFile) + if dependency.copyPhase != nil { + customCopyDependenciesReferences.append(embedFile) + } else { + copyFrameworksReferences.append(embedFile) + } } else { carthageFrameworksToEmbed.append(dependency.reference) } @@ -1016,6 +1043,19 @@ public class PBXProjGenerator { ) } + func splitCopyDepsByDestination(_ references: [PBXBuildFile]) -> [BuildPhaseSpec.CopyFilesSettings : [PBXBuildFile]] { + + var retval = [BuildPhaseSpec.CopyFilesSettings : [PBXBuildFile]]() + for reference in references { + + guard let key = reference.settings?["COPY_PHASE"] as? BuildPhaseSpec.CopyFilesSettings else { continue } + var filesWithSameDestination = retval[key] ?? [PBXBuildFile]() + filesWithSameDestination.append(reference) + retval[key] = filesWithSameDestination + } + return retval + } + copyFilesBuildPhasesFiles.merge(getBuildFilesForCopyFilesPhases()) { $0 + $1 } buildPhases += try target.preBuildScripts.map { try generateBuildScript(targetName: target.name, buildScript: $0) } @@ -1154,6 +1194,21 @@ public class PBXProjGenerator { buildPhases.append(copyFilesPhase) } + if !customCopyDependenciesReferences.isEmpty { + + let splitted = splitCopyDepsByDestination(customCopyDependenciesReferences) + for (phase, references) in splitted { + + guard let destination = phase.destination.destination else { continue } + + let copyFilesPhase = addObject( + getPBXCopyFilesBuildPhase(dstSubfolderSpec: destination, dstPath:phase.subpath, name: "Embed Dependencies", files: references) + ) + + buildPhases.append(copyFilesPhase) + } + } + if !copyWatchReferences.isEmpty { let copyFilesPhase = addObject( diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 0e634a03d..edfa695ab 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -111,6 +111,7 @@ 7F658343A505B824321E086B /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 2E1E747C7BC434ADB80CC269 /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; 803B7CE086CFBA409F9D1ED7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 108BB29172D27BE3BD1E7F35 /* Assets.xcassets */; }; 818D448D4DDD6649B5B26098 /* example.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 28360ECA4D727FAA58557A81 /* example.mp4 */; settings = {ASSET_TAGS = (tag1, tag2, ); }; }; + 81DFAB3A7633CE97929B9B2A /* Framework.framework in Embed Dependencies */ = {isa = PBXBuildFile; fileRef = 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 8267B75289E9D6C7B38FC426 /* DriverKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A428E67153BB40184F37BE /* DriverKit.framework */; }; 87927928A8A3460166ACB819 /* SwiftFileInDotPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F430AABE04B7499B458D9DB /* SwiftFileInDotPath.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; 8C941A6EF08069CB3CB88FC1 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -142,7 +143,6 @@ BAA1C1E3828F5D43546AF997 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BB1B49A91B892152D68ED76 /* libc++.tbd */; }; BB06A57E259D0D2A001EA21F /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; BD1419893577E6CEDF8CBA83 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - BD95416F2005199F6B3572CF /* Framework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; BFCCC56337A5D9D513C1C791 /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = F2950763C4C568CC85021D18 /* module.modulemap */; }; C093BF20B99FE892D0F06B2D /* libEndpointSecurity.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BC75409252FF15F540FBB7B /* libEndpointSecurity.tbd */; }; C3672B561F456794151C047C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4C3FE6B986506724DAB5D0F /* ViewController.swift */; }; @@ -578,6 +578,17 @@ name = "Embed App Extensions"; runOnlyForDeploymentPostprocessing = 0; }; + CF6B94E7B2D2312582A526F5 /* Embed Dependencies */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = test; + dstSubfolderSpec = 13; + files = ( + 81DFAB3A7633CE97929B9B2A /* Framework.framework in Embed Dependencies */, + ); + name = "Embed Dependencies"; + runOnlyForDeploymentPostprocessing = 0; + }; DE875E9A37F7CB9C347AEFA0 /* Embed System Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -607,7 +618,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - BD95416F2005199F6B3572CF /* Framework.framework in Embed Frameworks */, A7D1A9942302569A9515696A /* Result.framework in Embed Frameworks */, ); name = "Embed Frameworks"; @@ -1529,6 +1539,7 @@ A6E1C88C073F8CC6B5B072B6 /* Frameworks */, DE875E9A37F7CB9C347AEFA0 /* Embed System Extensions */, F8CDEFED6ED131A09041F995 /* Embed Frameworks */, + CF6B94E7B2D2312582A526F5 /* Embed Dependencies */, ); buildRules = ( ); diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 10bbabffa..686471eb2 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -57,6 +57,9 @@ targets: optional: true dependencies: - target: Framework_macOS + copy: + destination: plugins + subpath: "test" - target: XPC Service - target: NetworkSystemExtension - target: EndpointSecuritySystemExtension diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 07bbe8441..56b93c41d 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -398,7 +398,8 @@ class ProjectSpecTests: XCTestCase { codeSign: true, link: true, implicit: true, - weakLink: true)], + weakLink: true, + copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "example", phaseOrder: .postCompile))], info: Plist(path: "info.plist", attributes: ["foo": "bar"]), entitlements: Plist(path: "entitlements.plist", attributes: ["foo": "bar"]), transitivelyLinkDependencies: true, diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 9309c59aa..8b3d71ec9 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -1581,6 +1581,1423 @@ class ProjectGeneratorTests: XCTestCase { } } } + + func testGenerateXcodeProjectWithCustomDependencyDestinations() throws { + + describe("generateXcodeProject") { + + func generateProjectForApp(withDependencies: [Dependency], targets: [Target], packages: [String: SwiftPackage] = [:]) throws -> PBXProj { + + let app = Target( + name: "App", + type: .application, + platform: .macOS, + dependencies: withDependencies + ) + + let project = Project( + name: "test", + targets: targets + [app], + packages: packages + ) + + return try project.generatePbxProj() + } + + func expectCopyPhase(in project:PBXProj, withFilePaths: [String]? = nil, withProductPaths: [String]? = nil, toSubFolder subfolder: PBXCopyFilesBuildPhase.SubFolder, dstPath: String? = nil) throws { + + let phases = project.copyFilesBuildPhases + try expect(phases.count) == 1 + let phase = phases.first! + try expect(phase.dstSubfolderSpec) == subfolder + try expect(phase.dstPath) == dstPath + if let paths = withFilePaths { + try expect(phase.files?.count) == paths.count + let filePaths = phase.files!.map { $0.file!.path } + try expect(filePaths) == paths + } + if let paths = withProductPaths { + try expect(phase.files?.count) == paths.count + let filePaths = phase.files!.map { $0.product!.productName } + try expect(filePaths) == paths + } + } + + $0.context("with target dependencies") { + $0.context("application") { + + let appA = Target( + name: "appA", + type: .application, + platform: .macOS + ) + let appB = Target( + name: "appB", + type: .application, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: appA.name, embed: true), + Dependency(type: .target, reference: appB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [ appA, appB ]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: appA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: appB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [appA, appB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["appA.app"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("framework") { + + let frameworkA = Target( + name: "frameworkA", + type: .framework, + platform: .macOS + ) + let frameworkB = Target( + name: "frameworkB", + type: .framework, + platform: .macOS + ) + + $0.it("embeds them into frameworks without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: frameworkA.name, embed: true), + Dependency(type: .target, reference: frameworkB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [frameworkA, frameworkB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["frameworkA.framework"], toSubFolder: .frameworks, dstPath: "") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: frameworkA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: frameworkB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [frameworkA, frameworkB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["frameworkA.framework"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("staticFramework") { + + let frameworkA = Target( + name: "frameworkA", + type: .staticFramework, + platform: .macOS + ) + let frameworkB = Target( + name: "frameworkB", + type: .staticFramework, + platform: .macOS + ) + + $0.it("embeds them into frameworks without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: frameworkA.name, embed: true), + Dependency(type: .target, reference: frameworkB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [frameworkA, frameworkB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["frameworkA.framework"], toSubFolder: .frameworks, dstPath: "") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: frameworkA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: frameworkB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [frameworkA, frameworkB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["frameworkA.framework"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("xcFramework") { + + let frameworkA = Target( + name: "frameworkA", + type: .xcFramework, + platform: .macOS + ) + let frameworkB = Target( + name: "frameworkB", + type: .xcFramework, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: frameworkA.name, embed: true), + Dependency(type: .target, reference: frameworkB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [frameworkA, frameworkB]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: frameworkA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: frameworkB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [frameworkA, frameworkB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["frameworkA.xcframework"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("Dynamic Library") { + + let libraryA = Target( + name: "libraryA", + type: .dynamicLibrary, + platform: .macOS + ) + let libraryB = Target( + name: "libraryB", + type: .dynamicLibrary, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: libraryA.name, embed: true), + Dependency(type: .target, reference: libraryB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [libraryA, libraryB]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: libraryA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: libraryB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [libraryA, libraryB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["libraryA.dylib"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("Static Library") { + + let libraryA = Target( + name: "libraryA", + type: .staticLibrary, + platform: .macOS + ) + let libraryB = Target( + name: "libraryB", + type: .staticLibrary, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: libraryA.name, embed: true), + Dependency(type: .target, reference: libraryB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [libraryA, libraryB]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them to custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: libraryA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: libraryB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [libraryA, libraryB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["liblibraryA.a"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("bundle") { + + let bundleA = Target( + name: "bundleA", + type: .bundle, + platform: .macOS + ) + let bundleB = Target( + name: "bundleB", + type: .bundle, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: bundleA.name, embed: true), + Dependency(type: .target, reference: bundleB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [bundleA, bundleB]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: bundleA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: bundleB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [bundleA, bundleB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["bundleA.bundle"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("unitTestBundle") { + + let bundleA = Target( + name: "bundleA", + type: .unitTestBundle, + platform: .macOS + ) + let bundleB = Target( + name: "bundleB", + type: .unitTestBundle, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: bundleA.name, embed: true), + Dependency(type: .target, reference: bundleB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [bundleA, bundleB]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: bundleA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: bundleB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [bundleA, bundleB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["bundleA.xctest"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("uitTestBundle") { + + let bundleA = Target( + name: "bundleA", + type: .uiTestBundle, + platform: .macOS + ) + let bundleB = Target( + name: "bundleB", + type: .uiTestBundle, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: bundleA.name, embed: true), + Dependency(type: .target, reference: bundleB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [bundleA, bundleB]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: bundleA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: bundleB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [bundleA, bundleB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["bundleA.xctest"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("appExtension") { + + let extA = Target( + name: "extA", + type: .appExtension, + platform: .macOS + ) + let extB = Target( + name: "extB", + type: .appExtension, + platform: .macOS + ) + + $0.it("embeds them into plugins without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true), + Dependency(type: .target, reference: extB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .plugins, dstPath: "") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .executables, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: extB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .executables, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .executables, dstPath: "test") + } + } + + $0.context("commandLineTool") { + + let toolA = Target( + name: "toolA", + type: .commandLineTool, + platform: .macOS + ) + let toolB = Target( + name: "toolB", + type: .commandLineTool, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: toolA.name, embed: true), + Dependency(type: .target, reference: toolB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [toolA, toolB]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: toolA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: toolB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [toolA, toolB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["toolA"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("watchApp") { + + let appA = Target( + name: "appA", + type: .watchApp, + platform: .macOS + ) + let appB = Target( + name: "appB", + type: .watchApp, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: appA.name, embed: true), + Dependency(type: .target, reference: appB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [appA, appB]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: appA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: appB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [appA, appB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["appA.app"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("watch2App") { + + let appA = Target( + name: "appA", + type: .watch2App, + platform: .macOS + ) + let appB = Target( + name: "appB", + type: .watch2App, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: appA.name, embed: true), + Dependency(type: .target, reference: appB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [appA, appB]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: appA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: appB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [appA, appB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["appA.app"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("watch2AppContainer") { + + let appA = Target( + name: "appA", + type: .watch2AppContainer, + platform: .macOS + ) + let appB = Target( + name: "appB", + type: .watch2AppContainer, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: appA.name, embed: true), + Dependency(type: .target, reference: appB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [appA, appB]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: appA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: appB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [appA, appB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["appA.app"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("watchExtension") { + + let extA = Target( + name: "extA", + type: .watchExtension, + platform: .macOS + ) + let extB = Target( + name: "extB", + type: .watchExtension, + platform: .macOS + ) + + $0.it("embeds them into plugins without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true), + Dependency(type: .target, reference: extB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .plugins, dstPath: "") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: extB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .frameworks, dstPath: "test") + } + } + + $0.context("watch2Extension") { + + let extA = Target( + name: "extA", + type: .watch2Extension, + platform: .macOS + ) + let extB = Target( + name: "extB", + type: .watch2Extension, + platform: .macOS + ) + + $0.it("embeds them into plugins without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true), + Dependency(type: .target, reference: extB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .plugins, dstPath: "") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: extB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .frameworks, dstPath: "test") + } + } + + $0.context("tvExtension") { + + let extA = Target( + name: "extA", + type: .tvExtension, + platform: .macOS + ) + let extB = Target( + name: "extB", + type: .tvExtension, + platform: .macOS + ) + + $0.it("embeds them into plugins without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true), + Dependency(type: .target, reference: extB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .plugins, dstPath: "") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: extB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .frameworks, dstPath: "test") + } + } + + $0.context("messagesApplication") { + + let appA = Target( + name: "appA", + type: .messagesApplication, + platform: .macOS + ) + let appB = Target( + name: "appB", + type: .messagesApplication, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: appA.name, embed: true), + Dependency(type: .target, reference: appB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [appA, appB]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: appA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: appB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [appA, appB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["appA.app"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("messagesExtension") { + + let extA = Target( + name: "extA", + type: .messagesExtension, + platform: .macOS + ) + let extB = Target( + name: "extB", + type: .messagesExtension, + platform: .macOS + ) + + $0.it("embeds them into plugins without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true), + Dependency(type: .target, reference: extB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .plugins, dstPath: "") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: extB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .frameworks, dstPath: "test") + } + } + + $0.context("stickerPack") { + + let extA = Target( + name: "extA", + type: .stickerPack, + platform: .macOS + ) + let extB = Target( + name: "extB", + type: .stickerPack, + platform: .macOS + ) + + $0.it("embeds them into plugins without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true), + Dependency(type: .target, reference: extB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .plugins, dstPath: "") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: extB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .frameworks, dstPath: "test") + } + } + + $0.context("xpcService") { + + let xpcA = Target( + name: "xpcA", + type: .xpcService, + platform: .macOS + ) + let xpcB = Target( + name: "xpcB", + type: .xpcService, + platform: .macOS + ) + + $0.it("embeds them into plugins without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: xpcA.name, embed: true), + Dependency(type: .target, reference: xpcB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [xpcA, xpcB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["xpcA.xpc"], toSubFolder: .productsDirectory, dstPath: "$(CONTENTS_FOLDER_PATH)/XPCServices") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: xpcA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: xpcB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [xpcA, xpcB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["xpcA.xpc"], toSubFolder: .frameworks, dstPath: "test") + } + } + + $0.context("ocUnitTestBundle") { + + let bundleA = Target( + name: "bundleA", + type: .ocUnitTestBundle, + platform: .macOS + ) + let bundleB = Target( + name: "bundleB", + type: .ocUnitTestBundle, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: bundleA.name, embed: true), + Dependency(type: .target, reference: bundleB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [bundleA, bundleB]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: bundleA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: bundleB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [bundleA, bundleB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["bundleA.octest"], toSubFolder: .frameworks, dstPath: "test") + } + } + + $0.context("xcodeExtension") { + + let extA = Target( + name: "extA", + type: .xcodeExtension, + platform: .macOS + ) + let extB = Target( + name: "extB", + type: .xcodeExtension, + platform: .macOS + ) + + $0.it("embeds them into plugins without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true), + Dependency(type: .target, reference: extB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .plugins, dstPath: "") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: extB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .frameworks, dstPath: "test") + } + } + + $0.context("instrumentsPackage") { + + let pkgA = Target( + name: "pkgA", + type: .instrumentsPackage, + platform: .macOS + ) + let pkgB = Target( + name: "pkgB", + type: .instrumentsPackage, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: pkgA.name, embed: true), + Dependency(type: .target, reference: pkgB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [pkgA, pkgB]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: pkgA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: pkgB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [pkgA, pkgB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["pkgA.instrpkg"], toSubFolder: .frameworks, dstPath: "test") + } + } + + $0.context("intentsServiceExtension") { + + let extA = Target( + name: "extA", + type: .intentsServiceExtension, + platform: .macOS + ) + let extB = Target( + name: "extB", + type: .intentsServiceExtension, + platform: .macOS + ) + + $0.it("embeds them into plugins without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true), + Dependency(type: .target, reference: extB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .plugins, dstPath: "") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: extB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .frameworks, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .frameworks, dstPath: "test") + } + } + + $0.context("appClip") { + + let clipA = Target( + name: "clipA", + type: .onDemandInstallCapableApplication, + platform: .macOS + ) + let clipB = Target( + name: "clipB", + type: .onDemandInstallCapableApplication, + platform: .macOS + ) + + $0.it("does embed them into products directory without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: clipA.name, embed: true), + Dependency(type: .target, reference: clipB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [clipA, clipB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["clipA.app"], toSubFolder: .productsDirectory, dstPath: "$(CONTENTS_FOLDER_PATH)/AppClips") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: clipA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: clipB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [clipA, clipB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["clipA.app"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("Metal Library") { + + let libraryA = Target( + name: "libraryA", + type: .metalLibrary, + platform: .macOS + ) + let libraryB = Target( + name: "libraryB", + type: .metalLibrary, + platform: .macOS + ) + + $0.it("does not embed them without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: libraryA.name, embed: true), + Dependency(type: .target, reference: libraryB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [libraryA, libraryB]) + + // then + try expect(pbxProject.copyFilesBuildPhases.count) == 0 + } + + $0.it("embeds them to custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: libraryA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: libraryB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [libraryA, libraryB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["libraryA.metallib"], toSubFolder: .plugins, dstPath: "test") + } + } + } + + $0.context("with framework dependencies") { + $0.it("embeds them into frameworks without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .framework, reference: "frameworkA.framework", embed: true), + Dependency(type: .framework, reference: "frameworkB.framework", embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: []) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["frameworkA.framework"], toSubFolder: .frameworks, dstPath: "") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .framework, reference: "frameworkA.framework", embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .framework, reference: "frameworkB.framework", embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: []) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["frameworkA.framework"], toSubFolder: .plugins, dstPath: "test") + } + + $0.it("generates single copy phase for multiple frameworks with same copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .framework, reference: "frameworkA.framework", embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .framework, reference: "frameworkB.framework", embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: []) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["frameworkA.framework", "frameworkB.framework"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("with sdk dependencies") { + + $0.it("embeds them into frameworks without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .sdk(root: nil), reference: "sdkA.framework", embed: true), + Dependency(type: .sdk(root: nil), reference: "sdkB.framework", embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: []) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["System/Library/Frameworks/sdkA.framework"], toSubFolder: .frameworks, dstPath: "") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .sdk(root: nil), reference: "sdkA.framework", embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .sdk(root: nil), reference: "sdkB.framework", embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: []) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["System/Library/Frameworks/sdkA.framework"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("with package dependencies") { + + let packages: [String: SwiftPackage] = [ + "RxSwift": .remote(url: "https://github.com/ReactiveX/RxSwift", versionRequirement: .upToNextMajorVersion("5.1.1")), + ] + + $0.it("embeds them into frameworks without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .package(product: "RxSwift"), reference: "RxSwift", embed: true), + Dependency(type: .package(product: "RxCocoa"), reference: "RxSwift", embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [], packages: packages) + + // then + try expectCopyPhase(in: pbxProject, withProductPaths: ["RxSwift"], toSubFolder: .frameworks, dstPath: "") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .package(product: "RxSwift"), reference: "RxSwift", embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .package(product: "RxCocoa"), reference: "RxSwift", embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [], packages: packages) + + // then + try expectCopyPhase(in: pbxProject, withProductPaths: ["RxSwift"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("with carthage dependencies") { + + $0.it("embeds them into frameworks without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .carthage(findFrameworks: false, linkType: .dynamic), reference: "frameworkA.framework", embed: true), + Dependency(type: .carthage(findFrameworks: false, linkType: .dynamic), reference: "frameworkB.framework", embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: []) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["frameworkA.framework"], toSubFolder: .frameworks, dstPath: "") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .carthage(findFrameworks: false, linkType: .dynamic), reference: "frameworkA.framework", embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .carthage(findFrameworks: false, linkType: .static), reference: "frameworkB.framework", embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: []) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["frameworkA.framework"], toSubFolder: .plugins, dstPath: "test") + } + } + + $0.context("with bundle dependencies") { + $0.it("embeds them into resources without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .bundle, reference: "bundleA.bundle", embed: true), + Dependency(type: .bundle, reference: "bundleB.bundle", embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: []) + + // then + /// XcodeGen ignores embed: false for bundles + try expectCopyPhase(in: pbxProject, withFilePaths: ["bundleA.bundle", "bundleB.bundle"], toSubFolder: .resources) + } + + $0.it("ignores custom copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .bundle, reference: "bundleA.bundle", embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .bundle, reference: "bundleB.bundle", embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: []) + + // then + /// XcodeGen ignores embed: false for bundles + try expectCopyPhase(in: pbxProject, withFilePaths: ["bundleA.bundle", "bundleB.bundle"], toSubFolder: .resources) + } + } + } + } } private extension PBXTarget { From a4d7a61a6805f62b6da9f7ffb5cdf13a18d16a40 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Thu, 15 Jul 2021 18:06:33 +0900 Subject: [PATCH 098/284] Fix broken codesign option for bundle dependency (#1104) * Fix missing codesign option for bundle dependency * Add codeSign: false test case for bundle dependency * Update CHANGELOG.md --- CHANGELOG.md | 4 + Sources/XcodeGenKit/PBXProjGenerator.swift | 5 +- .../AnotherProject.xcodeproj/project.pbxproj | 102 ++++++++++++++++ .../TestProject/AnotherProject/project.yml | 3 + .../Project.xcodeproj/project.pbxproj | 114 +++++++++++++++++- Tests/Fixtures/TestProject/project.yml | 1 + 6 files changed, 227 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bcbc98de..eb97619e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ ### Added - Allow specifying a `copy` setting for each dependency. [#1038](https://github.com/yonaskolb/XcodeGen/pull/1039) @JakubBednar +### Fixed + +- Fix broken codesign option for bundle dependency [#1104](https://github.com/yonaskolb/XcodeGen/pull/1104) @kateinoigakukun + ## 2.24.0 ### Added diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 033b0fe31..4496f548c 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -958,7 +958,10 @@ public class PBXProjGenerator { sourceTree: .buildProductsDir ) - let pbxBuildFile = PBXBuildFile(file: fileReference, settings: nil) + let pbxBuildFile = PBXBuildFile( + file: fileReference, + settings: embed ? getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true) : nil + ) pbxBuildFile.platformFilter = platform let buildFile = addObject(pbxBuildFile) copyBundlesReferences.append(buildFile) diff --git a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj index c0b561029..add10f0bc 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ 6023D61BF2C57E6AE09CE7A3 /* BundleX.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = BundleX.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 60D6679FB526839EAFEA2EEE /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = config.xcconfig; sourceTree = ""; }; D6340FC7DEBC81E0127BAFD6 /* ExternalTarget.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ExternalTarget.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F1EFFCA88BFC3A1DD2D89DA7 /* BundleY.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = BundleY.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXGroup section */ @@ -34,6 +35,7 @@ isa = PBXGroup; children = ( 6023D61BF2C57E6AE09CE7A3 /* BundleX.bundle */, + F1EFFCA88BFC3A1DD2D89DA7 /* BundleY.bundle */, D6340FC7DEBC81E0127BAFD6 /* ExternalTarget.framework */, ); name = Products; @@ -59,6 +61,20 @@ /* End PBXLegacyTarget section */ /* Begin PBXNativeTarget section */ + 201AC870383B8CD218AD0FAB /* BundleY */ = { + isa = PBXNativeTarget; + buildConfigurationList = EF9E2AA4073D3B2EC8195688 /* Build configuration list for PBXNativeTarget "BundleY" */; + buildPhases = ( + ); + buildRules = ( + ); + dependencies = ( + ); + name = BundleY; + productName = BundleY; + productReference = F1EFFCA88BFC3A1DD2D89DA7 /* BundleY.bundle */; + productType = "com.apple.product-type.bundle"; + }; 63A2D4898D974A06E85B07F8 /* BundleX */ = { isa = PBXNativeTarget; buildConfigurationList = 32C09717E388BCD9DB9E513C /* Build configuration list for PBXNativeTarget "BundleX" */; @@ -110,6 +126,7 @@ projectRoot = ""; targets = ( 63A2D4898D974A06E85B07F8 /* BundleX */, + 201AC870383B8CD218AD0FAB /* BundleY */, E76A5F5E363E470416D3B487 /* ExternalTarget */, A6D9FB94860C005F0B723B5F /* IncludedLegacy */, ); @@ -322,6 +339,18 @@ }; name = "Test Debug"; }; + 1CE986A8B593E707AB71BDBA /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; 270E1D32776D2D196D435FDA /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -570,6 +599,18 @@ }; name = "Production Debug"; }; + 58F418B6745A09C6479FDD6E /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; 5F14CE04E33ACD729A0EE6B6 /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -648,6 +689,18 @@ }; name = "Test Release"; }; + 816E80EA88CB645CE988138C /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; 9BD6CAD5463121A1C3FED138 /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -760,6 +813,42 @@ }; name = "Production Release"; }; + E7907C46C6282D78E009083B /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; + FB66976FF75B2B0B255D5AA4 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; + FD9323224BE5A91248B7BEF2 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -815,6 +904,19 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Production Debug"; }; + EF9E2AA4073D3B2EC8195688 /* Build configuration list for PBXNativeTarget "BundleY" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FD9323224BE5A91248B7BEF2 /* Production Debug */, + 1CE986A8B593E707AB71BDBA /* Production Release */, + 816E80EA88CB645CE988138C /* Staging Debug */, + 58F418B6745A09C6479FDD6E /* Staging Release */, + E7907C46C6282D78E009083B /* Test Debug */, + FB66976FF75B2B0B255D5AA4 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; /* End XCConfigurationList section */ }; rootObject = 1B166EB49192B73A9DD8E108 /* Project object */; diff --git a/Tests/Fixtures/TestProject/AnotherProject/project.yml b/Tests/Fixtures/TestProject/AnotherProject/project.yml index 65e729ede..3c0cc4867 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/project.yml +++ b/Tests/Fixtures/TestProject/AnotherProject/project.yml @@ -8,6 +8,9 @@ targets: BundleX: type: bundle platform: iOS + BundleY: + type: bundle + platform: iOS ExternalTarget: type: framework platform: iOS diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index edfa695ab..854a725f6 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -63,11 +63,12 @@ 339578307B9266AB3D7722D9 /* File2.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC56891DA7446EAC8C2F27EB /* File2.swift */; }; 3535891EC86283BB5064E7E1 /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 2E1E747C7BC434ADB80CC269 /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; 3788E1382B38DF4ACE3D2BB1 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3BBCA6F76E5F212E9C55FB78 /* BundleX.bundle in Copy Bundle Resources */ = {isa = PBXBuildFile; fileRef = 45C12576F5AA694DD0CE2132 /* BundleX.bundle */; }; + 3BBCA6F76E5F212E9C55FB78 /* BundleX.bundle in Copy Bundle Resources */ = {isa = PBXBuildFile; fileRef = 45C12576F5AA694DD0CE2132 /* BundleX.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 3C5134EE524310ACF7B7CD6E /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CAF6C55B555E3E1352645B6 /* ExtensionDelegate.swift */; }; 42BC5788871D1D838B253952 /* App_watchOS Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 447D59BE2E0993D7245EA247 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3797E591F302ECC0AA2FC607 /* Assets.xcassets */; }; 45E6702CD9C088FF1FC25F34 /* App_watchOS.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = A680BE9F68A255B0FB291AE6 /* App_watchOS.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 470D3493CDBFE56E2083A5FD /* BundleY.bundle in Copy Bundle Resources */ = {isa = PBXBuildFile; fileRef = E3958AB20082EA12D4D5E60C /* BundleY.bundle */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 47D1F439B8E6D287B3F3E8D1 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 47FC57B04A3AD83359F433EA /* StaticLibrary_ObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5A2B916A11DCC2565241359F /* StaticLibrary_ObjC.h */; }; 49A4B8937BB5520B36EA33F0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 814D72C2B921F60B759C2D4B /* Main.storyboard */; }; @@ -608,6 +609,7 @@ dstSubfolderSpec = 7; files = ( 3BBCA6F76E5F212E9C55FB78 /* BundleX.bundle in Copy Bundle Resources */, + 470D3493CDBFE56E2083A5FD /* BundleY.bundle in Copy Bundle Resources */, ); name = "Copy Bundle Resources"; runOnlyForDeploymentPostprocessing = 0; @@ -765,6 +767,7 @@ B76E17CE3574081D5BF45B44 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; BA040F1F7D6CA08878323A55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; BB178D03E75929F3F5B10C56 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; + BB677D970923F663D846D7E0 /* BundleY.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = BundleY.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; BC56891DA7446EAC8C2F27EB /* File2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = File2.swift; path = Group2/File2.swift; sourceTree = ""; }; BDCA996D141DD8A16B18D68F /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "GoogleService-Info.plist"; sourceTree = ""; }; BECEA4A483ADEB8158F640B3 /* Tool */ = {isa = PBXFileReference; includeInIndex = 0; path = Tool; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -787,6 +790,7 @@ D8A016580A3B8F72B820BFBF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; DAA7880242A9DE61E68026CC /* Folder */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Folder; sourceTree = SOURCE_ROOT; }; DFE6A6FAAFF701FE729293DE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + E3958AB20082EA12D4D5E60C /* BundleY.bundle */ = {isa = PBXFileReference; lastKnownFileType = wrapper.cfbundle; path = BundleY.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; E42335D1200CB7B8B91E962F /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = Base; path = Base.lproj/Localizable.stringsdict; sourceTree = ""; }; E43116070AFEF5D8C3A5A957 /* TestFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TestFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E55F45EACB0F382722D61C8D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -1168,6 +1172,7 @@ isa = PBXGroup; children = ( 45C12576F5AA694DD0CE2132 /* BundleX.bundle */, + E3958AB20082EA12D4D5E60C /* BundleY.bundle */, ); name = Bundles; sourceTree = ""; @@ -1264,6 +1269,7 @@ 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */, A680BE9F68A255B0FB291AE6 /* App_watchOS.app */, 84317819C92F78425870E483 /* BundleX.bundle */, + BB677D970923F663D846D7E0 /* BundleY.bundle */, 83B5EC7EF81F7E4B6F426D4E /* DriverKitDriver.dext */, E5E0A80CCE8F8DB662DCD2D0 /* EndpointSecuritySystemExtension.systemextension */, 7D700FA699849D2F95216883 /* EntitledApp.app */, @@ -1700,6 +1706,20 @@ productReference = A680BE9F68A255B0FB291AE6 /* App_watchOS.app */; productType = "com.apple.product-type.application.watchapp2"; }; + 271CAC331D24F4F7E12C819C /* BundleY */ = { + isa = PBXNativeTarget; + buildConfigurationList = DA49CF5A1AC4FC1A7EE979E8 /* Build configuration list for PBXNativeTarget "BundleY" */; + buildPhases = ( + ); + buildRules = ( + ); + dependencies = ( + ); + name = BundleY; + productName = BundleY; + productReference = BB677D970923F663D846D7E0 /* BundleY.bundle */; + productType = "com.apple.product-type.bundle"; + }; 307AE3FA155FFD09B74AE351 /* App_watchOS Extension */ = { isa = PBXNativeTarget; buildConfigurationList = 3F3C272D2EA61F6B88B80D44 /* Build configuration list for PBXNativeTarget "App_watchOS Extension" */; @@ -2199,6 +2219,7 @@ 208179651927D1138D19B5AD /* App_watchOS */, 307AE3FA155FFD09B74AE351 /* App_watchOS Extension */, DA40AB367B606CCE2FDD398D /* BundleX */, + 271CAC331D24F4F7E12C819C /* BundleY */, 428715FBC1D86458DA70CBDE /* DriverKitDriver */, 9F551F66949B55E8328EB995 /* EndpointSecuritySystemExtension */, B61ED4688789B071275E2B7A /* EntitledApp */, @@ -4155,6 +4176,19 @@ }; name = "Production Debug"; }; + 414544E2FA4DE102442A71CD /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.BundleY; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Release"; + }; 436FB4981A66822DAF6F22AC /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5005,6 +5039,19 @@ }; name = "Test Debug"; }; + 71529460FB00BCDF2064C57F /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.BundleY; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Debug"; + }; 72EDF2E14A4CE916F4E2B01B /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5190,6 +5237,19 @@ }; name = "Test Debug"; }; + 7D73A7FB339A39293BD2DB9E /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.BundleY; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Staging Release"; + }; 7E101F97604A0990174A46CD /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5442,6 +5502,19 @@ }; name = "Production Release"; }; + 924BB9ED8B14A02ABF88CC23 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.BundleY; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Production Debug"; + }; 92602C025633FBA848F91812 /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6090,6 +6163,19 @@ }; name = "Production Release"; }; + B227B91964080DEF6C426483 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.BundleY; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Debug"; + }; B24243F387A725EAFE802321 /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6296,6 +6382,19 @@ }; name = "Production Release"; }; + BA21E149424C2D03E5E50EC1 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.BundleY; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Test Release"; + }; BA5AD3137CD90C50E5E1BDA0 /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -8122,6 +8221,19 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Production Debug"; }; + DA49CF5A1AC4FC1A7EE979E8 /* Build configuration list for PBXNativeTarget "BundleY" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 924BB9ED8B14A02ABF88CC23 /* Production Debug */, + 414544E2FA4DE102442A71CD /* Production Release */, + 71529460FB00BCDF2064C57F /* Staging Debug */, + 7D73A7FB339A39293BD2DB9E /* Staging Release */, + B227B91964080DEF6C426483 /* Test Debug */, + BA21E149424C2D03E5E50EC1 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; ED1A174BA92C6E5172B519B7 /* Build configuration list for PBXNativeTarget "iMessageExtension" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 686471eb2..4ba1de245 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -136,6 +136,7 @@ targets: - target: iMessageApp - sdk: Contacts.framework - bundle: BundleX.bundle + - { bundle: BundleY.bundle, codeSign: false } - target: AnotherProject/ExternalTarget - target: App_Clip onlyCopyFilesOnInstall: true From b04688845a77da1f06e92aa9a3601c42ab10ee18 Mon Sep 17 00:00:00 2001 From: Dan Loman Date: Mon, 2 Aug 2021 18:08:55 -0500 Subject: [PATCH 099/284] [bug fix] Ensure fileTypes are mapped to JSON value (#1112) * Ensure fileTypes are mapped to JSON value * Add CHANGELOG entry --- CHANGELOG.md | 1 + Sources/ProjectSpec/SpecOptions.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb97619e2..a67c68467 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixed - Fix broken codesign option for bundle dependency [#1104](https://github.com/yonaskolb/XcodeGen/pull/1104) @kateinoigakukun +- Ensure fileTypes are mapped to JSON value [#1112](https://github.com/yonaskolb/XcodeGen/pull/1112) @namolnad ## 2.24.0 diff --git a/Sources/ProjectSpec/SpecOptions.swift b/Sources/ProjectSpec/SpecOptions.swift index c1f0645d4..f70139ef7 100644 --- a/Sources/ProjectSpec/SpecOptions.swift +++ b/Sources/ProjectSpec/SpecOptions.swift @@ -187,7 +187,7 @@ extension SpecOptions: JSONEncodable { "localPackagesGroup": localPackagesGroup, "preGenCommand": preGenCommand, "postGenCommand": postGenCommand, - "fileTypes": fileTypes + "fileTypes": fileTypes.mapValues { $0.toJSONValue() } ] if settingPresets != SpecOptions.settingPresetsDefault { From f1e888f228292c568c12cd9899c983d19e111a19 Mon Sep 17 00:00:00 2001 From: Adam Wolf Date: Tue, 10 Aug 2021 15:37:51 -0700 Subject: [PATCH 100/284] Fix Usage.md link to options section (#1115) This actually was meant to link in to ProjectSpec.md#options --- Docs/Usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/Usage.md b/Docs/Usage.md index a746650f4..c69ab3368 100644 --- a/Docs/Usage.md +++ b/Docs/Usage.md @@ -36,7 +36,7 @@ The values from [xcconfig files](#xcconfig-files) will then sit a level above th XcodeGen applies default settings to your project and targets similar to how Xcode creates them when you create a new project or target. Debug and Release settings will be applied to your project. Targets will also get specific settings depending on the platform and product type. ->You can change or disable how these setting presets are applied via the `options.settingPresets` which you can find more about in [Options](#options) +>You can change or disable how these setting presets are applied via the `options.settingPresets` which you can find more about in [Options](ProjectSpec.md#options) ### Settings The `project` and each `target` have a `settings` object that you can define. This can be a simple map of build settings or can provide build settings per `config` via `configs` or `base`. See [Settings](ProjectSpec.md#settings) for more details. From 12511afed82a3db1a9dbd814e835920c98d9914e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kry=C5=A1tof=20Mat=C4=9Bj?= Date: Tue, 14 Sep 2021 15:11:25 +0200 Subject: [PATCH 101/284] Fix platformFilter for package dependencies (#1123) --- CHANGELOG.md | 1 + Sources/XcodeGenKit/PBXProjGenerator.swift | 6 ++--- .../Project.xcodeproj/project.pbxproj | 27 +++++++++++++++++++ Tests/Fixtures/TestProject/project.yml | 7 +++++ .../PBXProjGeneratorTests.swift | 11 +++++--- 5 files changed, 46 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a67c68467..083704d34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Fix broken codesign option for bundle dependency [#1104](https://github.com/yonaskolb/XcodeGen/pull/1104) @kateinoigakukun - Ensure fileTypes are mapped to JSON value [#1112](https://github.com/yonaskolb/XcodeGen/pull/1112) @namolnad +- Fix platform filter for package dependecies [#1123](https://github.com/yonaskolb/XcodeGen/pull/1123) @raptorxcz ## 2.24.0 diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 4496f548c..c02f3a34d 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -925,9 +925,9 @@ public class PBXProjGenerator { let link = dependency.link ?? (target.type != .staticLibrary) if link { - let buildFile = addObject( - PBXBuildFile(product: packageDependency, settings: getDependencyFrameworkSettings(dependency: dependency)) - ) + let file = PBXBuildFile(product: packageDependency, settings: getDependencyFrameworkSettings(dependency: dependency)) + file.platformFilter = platform + let buildFile = addObject(file) targetFrameworkBuildFiles.append(buildFile) } else { let targetDependency = addObject( diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 854a725f6..c0344eb31 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -34,6 +34,7 @@ 09617AB755651FFEB2564CBC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F1A2F579A6F79C62DDA0571 /* AppDelegate.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; 0AB541AE3163B063E7012877 /* StaticLibrary_ObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5A2B916A11DCC2565241359F /* StaticLibrary_ObjC.h */; }; 0BDA156BEBFCB9E65910F838 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0D0E2466833FC2636B92C43D /* Swinject in Frameworks */ = {isa = PBXBuildFile; platformFilter = ios; productRef = D7917D10F77DA9D69937D493 /* Swinject */; }; 0F99AECCB4691803C791CDCE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2FC2A8A829CE71B1CF415FF7 /* Main.storyboard */; }; 15129B8D9ED000BDA1FEEC27 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23A2F16890ECF2EE3FED72AE /* AppDelegate.swift */; }; 1551370B0ACAC632E15C853B /* SwiftyJSON.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF47010E7368583405AA50CB /* SwiftyJSON.framework */; }; @@ -822,6 +823,7 @@ 2FAE950E8FF2E7C0F7FF1FE9 /* Framework.framework in Frameworks */, B142965C5AE9C6200BF65802 /* Result.framework in Frameworks */, B20617116B230DED1F7AF5E5 /* libStaticLibrary_ObjC.a in Frameworks */, + 0D0E2466833FC2636B92C43D /* Swinject in Frameworks */, 1551370B0ACAC632E15C853B /* SwiftyJSON.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1606,6 +1608,9 @@ 981D116D40DBA0407D0E0E94 /* PBXTargetDependency */, ); name = App_iOS; + packageProductDependencies = ( + D7917D10F77DA9D69937D493 /* Swinject */, + ); productName = App_iOS; productReference = B1C33BB070583BE3B0EC0E68 /* App_iOS.app */; productType = "com.apple.product-type.application"; @@ -2199,6 +2204,9 @@ en, ); mainGroup = 293D0FF827366B513839236A; + packageReferences = ( + 4EDA79334592CBBA0E507AD2 /* XCRemoteSwiftPackageReference "Swinject" */, + ); projectDirPath = ""; projectReferences = ( { @@ -8275,6 +8283,25 @@ }; /* End XCConfigurationList section */ +/* Begin XCRemoteSwiftPackageReference section */ + 4EDA79334592CBBA0E507AD2 /* XCRemoteSwiftPackageReference "Swinject" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/Swinject/Swinject"; + requirement = { + kind = exactVersion; + version = 2.8.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + D7917D10F77DA9D69937D493 /* Swinject */ = { + isa = XCSwiftPackageProductDependency; + package = 4EDA79334592CBBA0E507AD2 /* XCRemoteSwiftPackageReference "Swinject" */; + productName = Swinject; + }; +/* End XCSwiftPackageProductDependency section */ + /* Begin XCVersionGroup section */ 306796628DD52FA55E833B65 /* Model.xcdatamodeld */ = { isa = XCVersionGroup; diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 4ba1de245..85662468a 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -27,6 +27,10 @@ projectReferences: path: ./AnotherProject/AnotherProject.xcodeproj configFiles: Test Debug: Configs/config.xcconfig +packages: + Swinject: + url: https://github.com/Swinject/Swinject + version: 2.8.0 targets: Legacy: type: "" @@ -139,6 +143,9 @@ targets: - { bundle: BundleY.bundle, codeSign: false } - target: AnotherProject/ExternalTarget - target: App_Clip + - package: Swinject + product: Swinject + platformFilter: iOS onlyCopyFilesOnInstall: true scheme: testTargets: diff --git a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift index 359b6ce5f..f667ceb0e 100644 --- a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift @@ -357,18 +357,23 @@ class PBXProjGeneratorTests: XCTestCase { let dependency1 = Dependency(type: .target, reference: "TestAll", platformFilter: .all) let dependency2 = Dependency(type: .target, reference: "TestiOS", platformFilter: .iOS) let dependency3 = Dependency(type: .target, reference: "TestmacOS", platformFilter: .macOS) - let target = Target(name: "Test", type: .application, platform: .iOS, sources: ["Sources"], dependencies: [dependency1, dependency2, dependency3]) - let project = Project(basePath: directoryPath, name: "Test", targets: [target, target1, target2, target3]) + let dependency4 = Dependency(type: .package(product: "Swinject"), reference: "Swinject", platformFilter: .iOS) + let target = Target(name: "Test", type: .application, platform: .iOS, sources: ["Sources"], dependencies: [dependency1, dependency2, dependency3, dependency4]) + let swinjectPackage = SwiftPackage.remote(url: "https://github.com/Swinject/Swinject", versionRequirement: .exact("2.8.0")) + let project = Project(basePath: directoryPath, name: "Test", targets: [target, target1, target2, target3], packages: ["Swinject": swinjectPackage]) let pbxProj = try project.generatePbxProj() let targets = pbxProj.projects.first?.targets - let testTargetDependencies = pbxProj.projects.first?.targets.first(where: { $0.name == "Test" })?.dependencies + let testTarget = pbxProj.projects.first?.targets.first(where: { $0.name == "Test" }) + let testTargetDependencies = testTarget?.dependencies try expect(targets?.count) == 4 try expect(testTargetDependencies?.count) == 3 try expect(testTargetDependencies?[0].platformFilter).beNil() try expect(testTargetDependencies?[1].platformFilter) == "ios" try expect(testTargetDependencies?[2].platformFilter) == "maccatalyst" + try expect(testTarget?.frameworksBuildPhase()?.files?.count) == 1 + try expect(testTarget?.frameworksBuildPhase()?.files?[0].platformFilter) == "ios" } } } From c3d936c0c7d42f906d35dde41a2ee887f680b59a Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Thu, 23 Sep 2021 18:52:00 +1000 Subject: [PATCH 102/284] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 083704d34..063ef0987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.25.0 + ### Added - Allow specifying a `copy` setting for each dependency. [#1038](https://github.com/yonaskolb/XcodeGen/pull/1039) @JakubBednar @@ -11,6 +13,8 @@ - Ensure fileTypes are mapped to JSON value [#1112](https://github.com/yonaskolb/XcodeGen/pull/1112) @namolnad - Fix platform filter for package dependecies [#1123](https://github.com/yonaskolb/XcodeGen/pull/1123) @raptorxcz +[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.24.0...2.25.0) + ## 2.24.0 ### Added From 322262cff796d5314fcc62ebc3143dcd1ff7335e Mon Sep 17 00:00:00 2001 From: Yuya Oka Date: Thu, 23 Sep 2021 18:22:44 +0900 Subject: [PATCH 103/284] Update tuist/XcodeProj (#1125) * Update tuist/XcodeProj * Add changed entry --- CHANGELOG.md | 4 ++++ Package.resolved | 8 ++++---- Package.swift | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 063ef0987..14f36a1f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.24.0...2.25.0) +### Changed + +- Update XcodeProj to 8.2.0 [#1125](https://github.com/yonaskolb/XcodeGen/pull/1125) @nnsnodnb + ## 2.24.0 ### Added diff --git a/Package.resolved b/Package.resolved index 9c1119ed3..c6792473d 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/tadija/AEXML", "state": { "branch": null, - "revision": "8623e73b193386909566a9ca20203e33a09af142", - "version": "4.5.0" + "revision": "38f7d00b23ecd891e1ee656fa6aeebd6ba04ecc3", + "version": "4.6.1" } }, { @@ -78,8 +78,8 @@ "repositoryURL": "https://github.com/tuist/XcodeProj.git", "state": { "branch": null, - "revision": "0b18c3e7a10c241323397a80cb445051f4494971", - "version": "8.0.0" + "revision": "8e83191dba8bcbfc0be4d7c48bf1e02e7fedc88c", + "version": "8.2.0" } }, { diff --git a/Package.swift b/Package.swift index 899547eda..04715b575 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.0.0"), + .package(url: "https://github.com/tuist/XcodeProj.git", from: "8.2.0"), .package(url: "https://github.com/jakeheis/SwiftCLI.git", from: "6.0.0"), .package(url: "https://github.com/mxcl/Version", from: "2.0.0"), .package(url: "https://github.com/SwiftDocOrg/GraphViz.git", .exact("0.2.0")), From fa6c5c9173d03157b25e014fce1b613465989bb6 Mon Sep 17 00:00:00 2001 From: Michael Thole <57376542+mthole@users.noreply.github.com> Date: Thu, 23 Sep 2021 16:11:10 -0700 Subject: [PATCH 104/284] Fix Xcode 13 build (alternate PR to kick CI) (#1130) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix Xcode 13 build * Extend Xcode 12 workaround to Xcode 13 * Update CHANGELOG * Moved CHANGELOG into 'Next Version' section Co-authored-by: Kryštof Matěj --- .github/workflows/ci.yml | 4 ++-- CHANGELOG.md | 4 ++++ Package.resolved | 18 +++++++++--------- Package.swift | 6 +++--- .../TestProject/carthage_dynamic.xcconfig | 2 +- .../TestProject/carthage_static.xcconfig | 2 +- Tests/Fixtures/TestProject/fixtures.xcconfig | 2 +- ...nfig => xcode12_and_13_workaround.xcconfig} | 1 + 8 files changed, 22 insertions(+), 17 deletions(-) rename Tests/Fixtures/TestProject/{xcode12_workaround.xcconfig => xcode12_and_13_workaround.xcconfig} (76%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c396e3489..39508bc5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,11 +4,11 @@ on: pull_request: {} jobs: run: - runs-on: macOS-latest + runs-on: macos-11 name: Xcode ${{ matrix.xcode }} strategy: matrix: - xcode: ["12"] + xcode: ["12.5.1", "13.0"] steps: - uses: actions/checkout@master - name: Set Xcode diff --git a/CHANGELOG.md b/CHANGELOG.md index 14f36a1f6..908864e4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Fixed + +- Fix Xcode 13 build [#1130](https://github.com/yonaskolb/XcodeGen/issues/1127) @raptorxcz @mthole + ## 2.25.0 ### Added diff --git a/Package.resolved b/Package.resolved index c6792473d..4d75c7312 100644 --- a/Package.resolved +++ b/Package.resolved @@ -3,7 +3,7 @@ "pins": [ { "package": "AEXML", - "repositoryURL": "https://github.com/tadija/AEXML", + "repositoryURL": "https://github.com/tadija/AEXML.git", "state": { "branch": null, "revision": "38f7d00b23ecd891e1ee656fa6aeebd6ba04ecc3", @@ -33,8 +33,8 @@ "repositoryURL": "https://github.com/kylef/PathKit.git", "state": { "branch": null, - "revision": "73f8e9dca9b7a3078cb79128217dc8f2e585a511", - "version": "1.0.0" + "revision": "3bfd2737b700b9a36565a8c94f4ad2b050a5e574", + "version": "1.0.1" } }, { @@ -51,8 +51,8 @@ "repositoryURL": "https://github.com/kylef/Spectre.git", "state": { "branch": null, - "revision": "f79d4ecbf8bc4e1579fbd86c3e1d652fb6876c53", - "version": "0.9.2" + "revision": "26cc5e9ae0947092c7139ef7ba612e34646086c7", + "version": "0.10.1" } }, { @@ -60,8 +60,8 @@ "repositoryURL": "https://github.com/jakeheis/SwiftCLI.git", "state": { "branch": null, - "revision": "2816678bcc37f4833d32abeddbdf5e757fa891d8", - "version": "6.0.2" + "revision": "2e949055d9797c1a6bddcda0e58dada16cc8e970", + "version": "6.0.3" } }, { @@ -78,8 +78,8 @@ "repositoryURL": "https://github.com/tuist/XcodeProj.git", "state": { "branch": null, - "revision": "8e83191dba8bcbfc0be4d7c48bf1e02e7fedc88c", - "version": "8.2.0" + "revision": "446f3a0db73e141c7f57e26fcdb043096b1db52c", + "version": "8.3.1" } }, { diff --git a/Package.swift b/Package.swift index 04715b575..d4cc52018 100644 --- a/Package.swift +++ b/Package.swift @@ -11,13 +11,13 @@ let package = Package( .library(name: "ProjectSpec", targets: ["ProjectSpec"]), ], dependencies: [ - .package(url: "https://github.com/kylef/PathKit.git", from: "1.0.0"), + .package(url: "https://github.com/kylef/PathKit.git", from: "1.0.1"), .package(url: "https://github.com/jpsim/Yams.git", from: "4.0.0"), .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.2.0"), - .package(url: "https://github.com/jakeheis/SwiftCLI.git", from: "6.0.0"), + .package(url: "https://github.com/tuist/XcodeProj.git", from: "8.3.1"), + .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/Tests/Fixtures/TestProject/carthage_dynamic.xcconfig b/Tests/Fixtures/TestProject/carthage_dynamic.xcconfig index 1207c460d..fc72c48c0 100644 --- a/Tests/Fixtures/TestProject/carthage_dynamic.xcconfig +++ b/Tests/Fixtures/TestProject/carthage_dynamic.xcconfig @@ -1 +1 @@ -#include "xcode12_workaround.xcconfig" +#include "xcode12_and_13_workaround.xcconfig" diff --git a/Tests/Fixtures/TestProject/carthage_static.xcconfig b/Tests/Fixtures/TestProject/carthage_static.xcconfig index 5248a0506..f1b875b96 100644 --- a/Tests/Fixtures/TestProject/carthage_static.xcconfig +++ b/Tests/Fixtures/TestProject/carthage_static.xcconfig @@ -1,2 +1,2 @@ -#include "xcode12_workaround.xcconfig" +#include "xcode12_and_13_workaround.xcconfig" MACH_O_TYPE = staticlib diff --git a/Tests/Fixtures/TestProject/fixtures.xcconfig b/Tests/Fixtures/TestProject/fixtures.xcconfig index 1372a09ff..8f9d84d4c 100644 --- a/Tests/Fixtures/TestProject/fixtures.xcconfig +++ b/Tests/Fixtures/TestProject/fixtures.xcconfig @@ -1,4 +1,4 @@ -#include "xcode12_workaround.xcconfig" +#include "xcode12_and_13_workaround.xcconfig" // Common settings for fixtures CODE_SIGN_IDENTITY = diff --git a/Tests/Fixtures/TestProject/xcode12_workaround.xcconfig b/Tests/Fixtures/TestProject/xcode12_and_13_workaround.xcconfig similarity index 76% rename from Tests/Fixtures/TestProject/xcode12_workaround.xcconfig rename to Tests/Fixtures/TestProject/xcode12_and_13_workaround.xcconfig index 4585c89f8..d89990040 100644 --- a/Tests/Fixtures/TestProject/xcode12_workaround.xcconfig +++ b/Tests/Fixtures/TestProject/xcode12_and_13_workaround.xcconfig @@ -6,4 +6,5 @@ EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8 EXCLUDED_ARCHS_1200=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)) +EXCLUDED_ARCHS_1300=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)) EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS_$(XCODE_VERSION_MAJOR)) From abb18642bac70eafd2cdc98741719aa45f162cf9 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Fri, 24 Sep 2021 09:12:09 +1000 Subject: [PATCH 105/284] Update to 2.25.0 --- Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9f5dad1d1..795671190 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.24.0 +VERSION = 2.25.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 5b4d507c6..746e00258 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.24.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.25.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index b952f7af6..2de4bb426 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.24.0") +let version = Version("2.25.0") let cli = XcodeGenCLI(version: version) cli.execute() From c8b2a4ac8a495f984ce7a321afdba19a8e9d436d Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Fri, 24 Sep 2021 09:12:56 +1000 Subject: [PATCH 106/284] update changelog --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 908864e4e..1b271e332 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,6 @@ ## Next Version -### Fixed - -- Fix Xcode 13 build [#1130](https://github.com/yonaskolb/XcodeGen/issues/1127) @raptorxcz @mthole - ## 2.25.0 ### Added @@ -16,6 +12,7 @@ - Fix broken codesign option for bundle dependency [#1104](https://github.com/yonaskolb/XcodeGen/pull/1104) @kateinoigakukun - Ensure fileTypes are mapped to JSON value [#1112](https://github.com/yonaskolb/XcodeGen/pull/1112) @namolnad - Fix platform filter for package dependecies [#1123](https://github.com/yonaskolb/XcodeGen/pull/1123) @raptorxcz +- Fix Xcode 13 build [#1130](https://github.com/yonaskolb/XcodeGen/issues/1127) @raptorxcz @mthole [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.24.0...2.25.0) From 1d3412e1b60247aa615c077c9eee4549b566218e Mon Sep 17 00:00:00 2001 From: Yoshinori Imajo Date: Sun, 3 Oct 2021 09:57:24 +0900 Subject: [PATCH 107/284] Fix Graphviz on Mac URL in README. (#1134) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 746e00258..ca78aaf0d 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ To a file: xcodegen dump --type graphviz --file Graph.viz ``` -During implementation, `graphviz` formatting was validated using [GraphvizOnline](https://dreampuf.github.io/GraphvizOnline/), [WebGraphviz](http://www.webgraphviz.com), and [Graphviz on MacOS](graphviz.org). +During implementation, `graphviz` formatting was validated using [GraphvizOnline](https://dreampuf.github.io/GraphvizOnline/), [WebGraphviz](http://www.webgraphviz.com), and [Graphviz on MacOS](https://graphviz.org). ## Editing From 10fb43137b3d1f44e2d1d4fafa772a946bafb8c7 Mon Sep 17 00:00:00 2001 From: Paul Taykalo Date: Fri, 8 Oct 2021 01:20:19 +0300 Subject: [PATCH 108/284] Speed up search by using parallel Glob and Binary Search for including files checks (#1122) * Use binary searchi for Checking if path is included in included files * Do not run glob in parallel on Linux systems --- CHANGELOG.md | 4 + Sources/XcodeGenCore/ArrayExtensions.swift | 79 +++++++++++++++++++ Sources/XcodeGenCore/Glob.swift | 29 ++++--- Sources/XcodeGenKit/SourceGenerator.swift | 22 +++--- .../ArrayExtensionsTests.swift | 40 ++++++++++ 5 files changed, 155 insertions(+), 19 deletions(-) create mode 100644 Sources/XcodeGenCore/ArrayExtensions.swift create mode 100644 Tests/XcodeGenCoreTests/ArrayExtensionsTests.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b271e332..68b1b5e8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Changed + +- Speed up source inclusion checking for big projects [#1122](https://github.com/yonaskolb/XcodeGen/pull/1122) @PaulTaykalo + ## 2.25.0 ### Added diff --git a/Sources/XcodeGenCore/ArrayExtensions.swift b/Sources/XcodeGenCore/ArrayExtensions.swift new file mode 100644 index 000000000..52c87ff77 --- /dev/null +++ b/Sources/XcodeGenCore/ArrayExtensions.swift @@ -0,0 +1,79 @@ +import Foundation + +public extension Array { + + func parallelMap(transform: (Element) -> T) -> [T] { + var result = ContiguousArray(repeating: nil, count: count) + return result.withUnsafeMutableBufferPointer { buffer in + DispatchQueue.concurrentPerform(iterations: buffer.count) { idx in + buffer[idx] = transform(self[idx]) + } + return buffer.map { $0! } + } + } +} + +/// Holds a sorted array, created from specified sequence +/// This structure is needed for the cases, when some part of application requires array to be sorted, but don't trust any inputs :) +public struct SortedArray { + public let value: Array + public init(_ value: S) where S.Element == T { + self.value = value.sorted() + } +} + +public extension SortedArray { + /// Returns the first index in which an element of the collection satisfies the given predicate. + /// The collection assumed to be sorted. If collection is not have sorted values the result is undefined. + /// + /// The idea is to get first index of a function for which the given predicate evaluates to true. + /// + /// let values = [1,2,3,4,5] + /// let idx = values.firstIndexAssumingSorted(where: { $0 > 3 }) + /// + /// // false, false, false, true, true + /// // ^ + /// // therefore idx == 3 + /// + /// - Parameter predicate: A closure that takes an element as its argument + /// and returns a Boolean value that indicates whether the passed element + /// represents a match. + /// + /// - Returns: The index of the first element for which `predicate` returns + /// `true`. If no elements in the collection satisfy the given predicate, + /// returns `nil`. + /// + /// - Complexity: O(log(*n*)), where *n* is the length of the collection. + @inlinable + func firstIndex(where predicate: (T) throws -> Bool) rethrows -> Int? { + // Predicate should divide a collection to two pairs of values + // "bad" values for which predicate returns `false`` + // "good" values for which predicate return `true` + // false false false false false true true true + // ^ + // The idea is to get _first_ index which for which the predicate returns `true` + let lastIndex = value.count + + // The index that represents where bad values start + var badIndex = -1 + + // The index that represents where good values start + var goodIndex = lastIndex + var midIndex = (badIndex + goodIndex) / 2 + + while badIndex + 1 < goodIndex { + if try predicate(value[midIndex]) { + goodIndex = midIndex + } else { + badIndex = midIndex + } + midIndex = (badIndex + goodIndex) / 2 + } + + // We're out of bounds, no good items in array + if midIndex == lastIndex || goodIndex == lastIndex { + return nil + } + return goodIndex + } +} diff --git a/Sources/XcodeGenCore/Glob.swift b/Sources/XcodeGenCore/Glob.swift index b263cf5d3..596e986c7 100644 --- a/Sources/XcodeGenCore/Glob.swift +++ b/Sources/XcodeGenCore/Glob.swift @@ -89,15 +89,13 @@ public class Glob: Collection { } let patterns = behavior.supportsGlobstar ? expandGlobstar(pattern: adjustedPattern) : [adjustedPattern] - - for pattern in patterns { - var gt = glob_t() - if executeGlob(pattern: pattern, gt: >) { - populateFiles(gt: gt, includeFiles: includeFiles) - } - - globfree(>) - } + + #if os(macOS) + paths = patterns.parallelMap { paths(usingPattern: $0, includeFiles: includeFiles) }.flatMap { $0 } + #else + // Parallel invocations of Glob on Linux seems to be causing unexpected crashes + paths = patterns.map { paths(usingPattern: $0, includeFiles: includeFiles) }.flatMap { $0 } + #endif paths = Array(Set(paths)).sorted { lhs, rhs in lhs.compare(rhs) != ComparisonResult.orderedDescending @@ -209,7 +207,17 @@ public class Glob: Collection { isDirectoryCache.removeAll() } - private func populateFiles(gt: glob_t, includeFiles: Bool) { + private func paths(usingPattern pattern: String, includeFiles: Bool) -> [String] { + var gt = glob_t() + defer { globfree(>) } + if executeGlob(pattern: pattern, gt: >) { + return populateFiles(gt: gt, includeFiles: includeFiles) + } + return [] + } + + private func populateFiles(gt: glob_t, includeFiles: Bool) -> [String] { + var paths = [String]() let includeDirectories = behavior.includesDirectoriesInResults #if os(macOS) @@ -229,6 +237,7 @@ public class Glob: Collection { paths.append(path) } } + return paths } } diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index c3987b743..c7667cf6e 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -367,19 +367,23 @@ class SourceGenerator { } /// Checks whether the path is not in any default or TargetSource excludes - func isIncludedPath(_ path: Path, excludePaths: Set, includePaths: Set) -> Bool { - !defaultExcludedFiles.contains(where: { path.lastComponent.contains($0) }) + func isIncludedPath(_ path: Path, excludePaths: Set, includePaths: SortedArray) -> Bool { + return !defaultExcludedFiles.contains(where: { path.lastComponent == $0 }) && !(path.extension.map(defaultExcludedExtensions.contains) ?? false) && !excludePaths.contains(path) // If includes is empty, it's included. If it's not empty, the path either needs to match exactly, or it needs to be a direct parent of an included path. - && (includePaths.isEmpty || includePaths.contains(where: { includedFile in - if path == includedFile { return true } - return includedFile.description.contains(path.description) - })) + && (includePaths.value.isEmpty || _isIncludedPathSorted(path, sortedPaths: includePaths)) } + + private func _isIncludedPathSorted(_ path: Path, sortedPaths: SortedArray) -> Bool { + guard let idx = sortedPaths.firstIndex(where: { $0 >= path }) else { return false } + let foundPath = sortedPaths.value[idx] + return foundPath.description.hasPrefix(path.description) + } + /// Gets all the children paths that aren't excluded - private func getSourceChildren(targetSource: TargetSource, dirPath: Path, excludePaths: Set, includePaths: Set) throws -> [Path] { + private func getSourceChildren(targetSource: TargetSource, dirPath: Path, excludePaths: Set, includePaths: SortedArray) throws -> [Path] { try dirPath.children() .filter { if $0.isDirectory { @@ -408,7 +412,7 @@ class SourceGenerator { isBaseGroup: Bool, hasCustomParent: Bool, excludePaths: Set, - includePaths: Set, + includePaths: SortedArray, buildPhases: [Path: BuildPhaseSpec] ) throws -> (sourceFiles: [SourceFile], groups: [PBXGroup]) { @@ -634,7 +638,7 @@ class SourceGenerator { isBaseGroup: true, hasCustomParent: hasCustomParent, excludePaths: excludePaths, - includePaths: includePaths, + includePaths: SortedArray(includePaths), buildPhases: buildPhases ) diff --git a/Tests/XcodeGenCoreTests/ArrayExtensionsTests.swift b/Tests/XcodeGenCoreTests/ArrayExtensionsTests.swift new file mode 100644 index 000000000..f15831477 --- /dev/null +++ b/Tests/XcodeGenCoreTests/ArrayExtensionsTests.swift @@ -0,0 +1,40 @@ +import XCTest +@testable import XcodeGenCore + +class ArrayExtensionsTests: XCTestCase { + + func testSearchingForFirstIndex() { + let array = SortedArray([1, 2, 3, 4 ,5]) + XCTAssertEqual(array.firstIndex(where: { $0 > 2 }), 2) + } + + func testIndexCannotBeFound() { + let array = SortedArray([1, 2, 3, 4, 5]) + XCTAssertEqual(array.firstIndex(where: { $0 > 10 }), nil) + } + + func testEmptyArray() { + let array = SortedArray([Int]()) + XCTAssertEqual(array.firstIndex(where: { $0 > 0 }), nil) + } + + func testSearchingReturnsFirstIndexWhenMultipleElementsHaveSameValue() { + let array = SortedArray([1, 2, 3, 3 ,3]) + XCTAssertEqual(array.firstIndex(where: { $0 == 3 }), 2) + } +} + + +class SortedArrayTests: XCTestCase { + + func testSortingOnInitialization() { + let array = [1, 5, 4, 2] + let sortedArray = SortedArray(array) + XCTAssertEqual([1, 2, 4, 5], sortedArray.value) + } + + func testEmpty() { + XCTAssertEqual([Int](), SortedArray([Int]()).value) + } + +} From c62277f150a0275e37f9f42a08e4e915686e78c7 Mon Sep 17 00:00:00 2001 From: Kristopher Jackson Date: Thu, 6 Jan 2022 18:09:58 -0600 Subject: [PATCH 109/284] Added location option to test target (#1153) * Added location option to test target * Updated XcodeProj * Updated packages * Removed extra toJSONValue() * Update Docs/ProjectSpec.md Co-authored-by: Yonas Kolb * Update Sources/ProjectSpec/Scheme.swift Co-authored-by: Yonas Kolb * Update Sources/ProjectSpec/Scheme.swift Co-authored-by: Yonas Kolb * Removed optional location * Renamed SimulateLocation to Location * Removed Location struct and just pass location string directly * Added tests for location with a test target * Added example of location inside test target to project.yml * Removed extra test target and add location to existing target * Updated App_Scheme.xcscheme Co-authored-by: Yonas Kolb --- CHANGELOG.md | 4 ++++ Docs/ProjectSpec.md | 1 + Package.resolved | 4 ++-- Package.swift | 2 +- Sources/ProjectSpec/Scheme.swift | 9 ++++++++ Sources/XcodeGenKit/SchemeGenerator.swift | 22 ++++++++++++++++--- .../xcschemes/App_Scheme.xcscheme | 4 ++++ Tests/Fixtures/TestProject/project.yml | 1 + Tests/ProjectSpecTests/SpecLoadingTests.swift | 4 ++++ .../SchemeGeneratorTests.swift | 14 ++++++++++-- 10 files changed, 57 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68b1b5e8f..62f72d742 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Added + +- Added the option to specify a `location` in a test target [#1150](https://github.com/yonaskolb/XcodeGen/issues/1150) @KrisRJack + ### Changed - Speed up source inclusion checking for big projects [#1122](https://github.com/yonaskolb/XcodeGen/pull/1122) @PaulTaykalo diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index c99f14628..1874c94d5 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -834,6 +834,7 @@ A multiline script can be written using the various YAML multiline methods, for - [x] **name**: **String** - The name of the target - [ ] **parallelizable**: **Bool** - Whether to run tests in parallel. Defaults to false - [ ] **randomExecutionOrder**: **Bool** - Whether to run tests in a random order. Defaults to false +- [ ] **location**: **String** - GPX file or predefined value for simulating location. See [Simulate Location](#simulate-location) for location examples. - [ ] **skipped**: **Bool** - Whether to skip all of the test target tests. Defaults to false - [ ] **skippedTests**: **[String]** - List of tests in the test target to skip. Defaults to empty - [ ] **selectedTests**: **[String]** - List of tests in the test target to whitelist and select. Defaults to empty. This will override `skippedTests` if provided diff --git a/Package.resolved b/Package.resolved index 4d75c7312..e883890e9 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": "aa2a42c7a744ca18b5918771fdd6cf40f9753db5", + "version": "8.6.0" } }, { diff --git a/Package.swift b/Package.swift index d4cc52018..c1d72975f 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.6.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/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index ed921c89d..25ce697cc 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -184,6 +184,7 @@ public struct Scheme: Equatable { public var deleteScreenshotsWhenEachTestSucceeds: Bool public struct TestTarget: Equatable, ExpressibleByStringLiteral { + public static let randomExecutionOrderDefault = false public static let parallelizableDefault = false @@ -191,6 +192,7 @@ public struct Scheme: Equatable { public let targetReference: TargetReference public var randomExecutionOrder: Bool public var parallelizable: Bool + public var location: String? public var skipped: Bool public var skippedTests: [String] public var selectedTests: [String] @@ -199,6 +201,7 @@ public struct Scheme: Equatable { targetReference: TargetReference, randomExecutionOrder: Bool = randomExecutionOrderDefault, parallelizable: Bool = parallelizableDefault, + location: String? = nil, skipped: Bool = false, skippedTests: [String] = [], selectedTests: [String] = [] @@ -206,6 +209,7 @@ public struct Scheme: Equatable { self.targetReference = targetReference self.randomExecutionOrder = randomExecutionOrder self.parallelizable = parallelizable + self.location = location self.skipped = skipped self.skippedTests = skippedTests self.selectedTests = selectedTests @@ -216,6 +220,7 @@ public struct Scheme: Equatable { targetReference = try TargetReference(value) randomExecutionOrder = false parallelizable = false + location = nil skipped = false skippedTests = [] selectedTests = [] @@ -536,6 +541,7 @@ extension Scheme.Test.TestTarget: JSONObjectConvertible { targetReference = try TargetReference(jsonDictionary.json(atKeyPath: "name")) randomExecutionOrder = jsonDictionary.json(atKeyPath: "randomExecutionOrder") ?? Scheme.Test.TestTarget.randomExecutionOrderDefault parallelizable = jsonDictionary.json(atKeyPath: "parallelizable") ?? Scheme.Test.TestTarget.parallelizableDefault + location = jsonDictionary.json(atKeyPath: "location") ?? nil skipped = jsonDictionary.json(atKeyPath: "skipped") ?? false skippedTests = jsonDictionary.json(atKeyPath: "skippedTests") ?? [] selectedTests = jsonDictionary.json(atKeyPath: "selectedTests") ?? [] @@ -559,6 +565,9 @@ extension Scheme.Test.TestTarget: JSONEncodable { if parallelizable != Scheme.Test.TestTarget.parallelizableDefault { dict["parallelizable"] = parallelizable } + if let location = location { + dict["location"] = location + } if skipped { dict["skipped"] = skipped } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 67f681964..e5fa2d54b 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -187,12 +187,28 @@ public class SchemeGenerator { runPostActionsOnFailure: scheme.build.runPostActionsOnFailure ) - let testables = zip(testTargets, testBuildTargetEntries).map { testTarget, testBuilEntries in - XCScheme.TestableReference( + let testables: [XCScheme.TestableReference] = zip(testTargets, testBuildTargetEntries).map { testTarget, testBuildEntries in + + var locationScenarioReference: XCScheme.LocationScenarioReference? + if var location = testTarget.location { + + if location.contains(".gpx") { + var path = Path(components: [project.options.schemePathPrefix, location]) + path = path.simplifyingParentDirectoryReferences() + location = path.string + } + + let referenceType = location.contains(".gpx") ? "0" : "1" + locationScenarioReference = XCScheme.LocationScenarioReference(identifier: location, referenceType: referenceType) + + } + + return XCScheme.TestableReference( skipped: testTarget.skipped, parallelizable: testTarget.parallelizable, randomExecutionOrdering: testTarget.randomExecutionOrder, - buildableReference: testBuilEntries.buildableReference, + buildableReference: testBuildEntries.buildableReference, + locationScenarioReference: locationScenarioReference, skippedTests: testTarget.skippedTests.map(XCScheme.TestItem.init), selectedTests: testTarget.selectedTests.map(XCScheme.TestItem.init), useTestSelectionWhitelist: !testTarget.selectedTests.isEmpty ? true : nil diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme index 47aae2213..5aa4973cb 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme @@ -53,6 +53,10 @@ BlueprintName = "App_iOS_Tests" ReferencedContainer = "container:Project.xcodeproj"> + + diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 85662468a..ff6d045c5 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -426,6 +426,7 @@ schemes: - name: App_iOS_Tests parallelizable: true randomExecutionOrder: true + location: New York, NY, USA customLLDBInit: ${SRCROOT}/.lldbinit targetTemplates: MyTemplate: diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 2282a8fa1..d1c0e6c68 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -790,6 +790,7 @@ class SpecLoadingTests: XCTestCase { "name": "ExternalProject/Target2", "parallelizable": true, "skipped": true, + "location": "test.gpx", "randomExecutionOrder": true, "skippedTests": ["Test/testExample()"], ], @@ -836,6 +837,7 @@ class SpecLoadingTests: XCTestCase { targetReference: "ExternalProject/Target2", randomExecutionOrder: true, parallelizable: true, + location: "test.gpx", skipped: true, skippedTests: ["Test/testExample()"] ), @@ -856,6 +858,7 @@ class SpecLoadingTests: XCTestCase { [ "name": "ExternalProject/Target2", "parallelizable": true, + "location": "New York, NY, USA", "randomExecutionOrder": true, "selectedTests": ["Test/testExample()"], ], @@ -877,6 +880,7 @@ class SpecLoadingTests: XCTestCase { targetReference: "ExternalProject/Target2", randomExecutionOrder: true, parallelizable: true, + location: "New York, NY, USA", selectedTests: ["Test/testExample()"] ), ] diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index 3c27b8a91..b78a61774 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -49,11 +49,14 @@ class SchemeGeneratorTests: XCTestCase { let preAction = Scheme.ExecutionAction(name: "Script", script: "echo Starting", settingsTarget: app.name) let simulateLocation = Scheme.SimulateLocation(allow: true, defaultLocation: "New York, NY, USA") let storeKitConfiguration = "Configuration.storekit" - let scheme = Scheme( + let scheme = try Scheme( name: "MyScheme", build: Scheme.Build(targets: [buildTarget], preActions: [preAction]), run: Scheme.Run(config: "Debug", askForAppToLaunch: true, launchAutomaticallySubstyle: "2", simulateLocation: simulateLocation, storeKitConfiguration: storeKitConfiguration, customLLDBInit: "/sample/.lldbinit"), - test: Scheme.Test(config: "Debug", customLLDBInit: "/test/.lldbinit"), + test: Scheme.Test(config: "Debug", targets: [ + Scheme.Test.TestTarget(targetReference: TargetReference(framework.name), location: "test.gpx"), + Scheme.Test.TestTarget(targetReference: TargetReference(framework.name), location: "New York, NY, USA") + ], customLLDBInit: "/test/.lldbinit"), profile: Scheme.Profile(config: "Release", askForAppToLaunch: true) ) let project = Project( @@ -109,6 +112,13 @@ class SchemeGeneratorTests: XCTestCase { try expect(xcscheme.launchAction?.customLLDBInitFile) == "/sample/.lldbinit" try expect(xcscheme.testAction?.customLLDBInitFile) == "/test/.lldbinit" try expect(xcscheme.testAction?.systemAttachmentLifetime).to.beNil() + + try expect(xcscheme.testAction?.testables[0].locationScenarioReference?.referenceType) == "0" + try expect(xcscheme.testAction?.testables[0].locationScenarioReference?.identifier) == "../test.gpx" + + try expect(xcscheme.testAction?.testables[1].locationScenarioReference?.referenceType) == "1" + try expect(xcscheme.testAction?.testables[1].locationScenarioReference?.identifier) == "New York, NY, USA" + } let frameworkTarget = Scheme.BuildTarget(target: .local(framework.name), buildTypes: [.archiving]) From 62b9bea413b3d016108d1e5a65dcf953303c1e3b Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Mon, 7 Feb 2022 09:25:24 +1100 Subject: [PATCH 110/284] ignore vscode --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index caf10c284..1f55464ba 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ xcuserdata *.xcuserstate XcodeGen.xcodeproj xcodegen.zip +.vscode/launch.json From 9bd8ad1e4ae19de6c77e4f326e6a67dc8badec41 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Mon, 7 Feb 2022 09:27:20 +1100 Subject: [PATCH 111/284] Update to 2.26.0 --- CHANGELOG.md | 4 ++++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62f72d742..ab73aaf2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.26.0 + ### Added - Added the option to specify a `location` in a test target [#1150](https://github.com/yonaskolb/XcodeGen/issues/1150) @KrisRJack @@ -10,6 +12,8 @@ - Speed up source inclusion checking for big projects [#1122](https://github.com/yonaskolb/XcodeGen/pull/1122) @PaulTaykalo +[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.25.0...2.26.0) + ## 2.25.0 ### Added diff --git a/Makefile b/Makefile index 795671190..f3dd42b2a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.25.0 +VERSION = 2.26.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index ca78aaf0d..6b036a520 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.25.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.26.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 2de4bb426..8ba636bf8 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.25.0") +let version = Version("2.26.0") let cli = XcodeGenCLI(version: version) cli.execute() From d218ada92fbcd68127c240418968c3893f70714e Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Wed, 9 Feb 2022 11:30:23 +1100 Subject: [PATCH 112/284] fix archive if repo path has spaces --- Makefile | 2 +- scripts/archive.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f3dd42b2a..aa515b3d4 100644 --- a/Makefile +++ b/Makefile @@ -46,4 +46,4 @@ brew: brew bump-formula-pr --url=$(RELEASE_TAR) XcodeGen archive: build - ./scripts/archive.sh $(EXECUTABLE_PATH) + ./scripts/archive.sh "$(EXECUTABLE_PATH)" diff --git a/scripts/archive.sh b/scripts/archive.sh index ad3355072..0a9ebb585 100755 --- a/scripts/archive.sh +++ b/scripts/archive.sh @@ -10,7 +10,7 @@ LICENSE=LICENSE # copy mkdir -p $BINDIR -cp -f $1 $BINDIR +cp -f "$1" $BINDIR mkdir -p $SHAREDIR cp -R SettingPresets $SHAREDIR/SettingPresets From a10c7c4c24f6f5b6acccafb7a5bb57a33068a8a7 Mon Sep 17 00:00:00 2001 From: Vladislav Lisyanskiy Date: Sun, 6 Mar 2022 10:32:35 +0300 Subject: [PATCH 113/284] Fixed Glob crash (#1181) --- CHANGELOG.md | 4 ++++ Sources/XcodeGenCore/Atomic.swift | 27 +++++++++++++++++++++++++++ Sources/XcodeGenCore/Glob.swift | 2 +- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 Sources/XcodeGenCore/Atomic.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index ab73aaf2b..c5394630a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Fixed + +- Fixed crash caused by a simultaneous write during a glob processing [#1177](https://github.com/yonaskolb/XcodeGen/issues/1177) @tr1ckyf0x + ## 2.26.0 ### Added diff --git a/Sources/XcodeGenCore/Atomic.swift b/Sources/XcodeGenCore/Atomic.swift new file mode 100644 index 000000000..c7911ca42 --- /dev/null +++ b/Sources/XcodeGenCore/Atomic.swift @@ -0,0 +1,27 @@ +// +// Atomic.swift +// +// +// Created by Vladislav Lisianskii on 23.02.2022. +// + +import Foundation + +@propertyWrapper +struct Atomic { + private let queue = DispatchQueue(label: "com.xcodegencore.atomic") + private var value: Value + + init(wrappedValue: Value) { + self.value = wrappedValue + } + + var wrappedValue: Value { + get { + return queue.sync { value } + } + set { + queue.sync { value = newValue } + } + } +} diff --git a/Sources/XcodeGenCore/Glob.swift b/Sources/XcodeGenCore/Glob.swift index 596e986c7..e3025eab7 100644 --- a/Sources/XcodeGenCore/Glob.swift +++ b/Sources/XcodeGenCore/Glob.swift @@ -57,7 +57,7 @@ public class Glob: Collection { public static let defaultBlacklistedDirectories = ["node_modules", "Pods"] - private var isDirectoryCache = [String: Bool]() + @Atomic private var isDirectoryCache = [String: Bool]() public let behavior: Behavior public let blacklistedDirectories: [String] From 3b5ca91b76bbd482e602ffd902872d14a8e11074 Mon Sep 17 00:00:00 2001 From: Gabriel Lanata Date: Wed, 16 Mar 2022 21:56:03 -0700 Subject: [PATCH 114/284] Add coverage targets for target schemes (#1189) * Changes * Tests and docs * Update fixtures * Update CHANGELOG.md Co-authored-by: Yonas Kolb Co-authored-by: Yonas Kolb --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 4 ++++ Sources/ProjectSpec/TargetScheme.swift | 17 +++++++++++++++++ Sources/XcodeGenKit/SchemeGenerator.swift | 1 + .../xcschemes/App_iOS Production.xcscheme | 11 ++++++++++- .../xcschemes/App_iOS Staging.xcscheme | 11 ++++++++++- .../xcschemes/App_iOS Test.xcscheme | 11 ++++++++++- Tests/Fixtures/TestProject/project.yml | 2 ++ Tests/ProjectSpecTests/ProjectSpecTests.swift | 1 + Tests/ProjectSpecTests/SpecLoadingTests.swift | 2 ++ .../SchemeGeneratorTests.swift | 19 +++++++++++++++++++ 11 files changed, 77 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5394630a..0093bf6b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### Added - Added the option to specify a `location` in a test target [#1150](https://github.com/yonaskolb/XcodeGen/issues/1150) @KrisRJack +- Added `coverageTargets` for target test schemes. This enables to gather code coverage for specific targets. [#1189](https://github.com/yonaskolb/XcodeGen/pull/1189) @gabriellanata ### Changed diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 1874c94d5..700fb8009 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 +- [ ] **coverageTargets**: **[String]** - a list of targets to gather code coverage. Each entry can either be a simple string, or a string using [Project Reference](#project-reference) - [ ] **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. @@ -691,6 +692,9 @@ targets: - Staging - Production gatherCoverageData: true + coverageTargets: + - MyTarget1 + - ExternalTarget/OtherTarget1 commandLineArguments: "-MyEnabledArg": true "-MyDisabledArg": false diff --git a/Sources/ProjectSpec/TargetScheme.swift b/Sources/ProjectSpec/TargetScheme.swift index 1beedb6a9..289bf5e30 100644 --- a/Sources/ProjectSpec/TargetScheme.swift +++ b/Sources/ProjectSpec/TargetScheme.swift @@ -11,6 +11,7 @@ public struct TargetScheme: Equatable { public var testTargets: [Scheme.Test.TestTarget] public var configVariants: [String] public var gatherCoverageData: Bool + public var coverageTargets: [TargetReference] public var storeKitConfiguration: String? public var language: String? public var region: String? @@ -26,6 +27,7 @@ public struct TargetScheme: Equatable { testTargets: [Scheme.Test.TestTarget] = [], configVariants: [String] = [], gatherCoverageData: Bool = gatherCoverageDataDefault, + coverageTargets: [TargetReference] = [], storeKitConfiguration: String? = nil, language: String? = nil, region: String? = nil, @@ -40,6 +42,7 @@ public struct TargetScheme: Equatable { self.testTargets = testTargets self.configVariants = configVariants self.gatherCoverageData = gatherCoverageData + self.coverageTargets = coverageTargets self.storeKitConfiguration = storeKitConfiguration self.language = language self.region = region @@ -69,6 +72,19 @@ extension TargetScheme: JSONObjectConvertible { } else { testTargets = [] } + + if let targets = jsonDictionary["coverageTargets"] as? [Any] { + coverageTargets = try targets.compactMap { target in + if let string = target as? String { + return try TargetReference(string) + } else { + return nil + } + } + } else { + coverageTargets = [] + } + configVariants = jsonDictionary.json(atKeyPath: "configVariants") ?? [] gatherCoverageData = jsonDictionary.json(atKeyPath: "gatherCoverageData") ?? TargetScheme.gatherCoverageDataDefault storeKitConfiguration = jsonDictionary.json(atKeyPath: "storeKitConfiguration") @@ -88,6 +104,7 @@ extension TargetScheme: JSONEncodable { public func toJSONValue() -> Any { var dict: [String: Any] = [ "configVariants": configVariants, + "coverageTargets": coverageTargets.map { $0.reference }, "commandLineArguments": commandLineArguments, "testTargets": testTargets.map { $0.toJSONValue() }, "environmentVariables": environmentVariables.map { $0.toJSONValue() }, diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index e5fa2d54b..fa008bb7b 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -413,6 +413,7 @@ extension Scheme { test: .init( config: debugConfig, gatherCoverageData: targetScheme.gatherCoverageData, + coverageTargets: targetScheme.coverageTargets, disableMainThreadChecker: targetScheme.disableMainThreadChecker, commandLineArguments: targetScheme.commandLineArguments, targets: targetScheme.testTargets, diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme index d06a2910a..479690500 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme @@ -28,7 +28,7 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" codeCoverageEnabled = "YES" - onlyGenerateCoverageForSpecifiedTargets = "NO" + onlyGenerateCoverageForSpecifiedTargets = "YES" shouldUseLaunchSchemeArgsEnv = "NO" disableMainThreadChecker = "YES"> @@ -72,6 +72,15 @@ isEnabled = "YES"> + + + + @@ -72,6 +72,15 @@ isEnabled = "YES"> + + + + @@ -72,6 +72,15 @@ isEnabled = "YES"> + + + + Date: Thu, 17 Mar 2022 15:57:22 +1100 Subject: [PATCH 115/284] Update CHANGELOG.md --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0093bf6b7..2f6917e69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Added + +- Added `coverageTargets` for target test schemes. This enables to gather code coverage for specific targets. [#1189](https://github.com/yonaskolb/XcodeGen/pull/1189) @gabriellanata + ### Fixed - Fixed crash caused by a simultaneous write during a glob processing [#1177](https://github.com/yonaskolb/XcodeGen/issues/1177) @tr1ckyf0x @@ -11,7 +15,6 @@ ### Added - Added the option to specify a `location` in a test target [#1150](https://github.com/yonaskolb/XcodeGen/issues/1150) @KrisRJack -- Added `coverageTargets` for target test schemes. This enables to gather code coverage for specific targets. [#1189](https://github.com/yonaskolb/XcodeGen/pull/1189) @gabriellanata ### Changed From 7b9d95ab4cb73b1fc206914fbeed7ee75e2f4f73 Mon Sep 17 00:00:00 2001 From: Evan Coleman Date: Sat, 19 Mar 2022 23:19:23 -0400 Subject: [PATCH 116/284] Skip compile sources for watch apps (#1185) * Skip compile sources build phase for watch2 apps if empty * add changelog entry * Fix tests Co-authored-by: Yonas Kolb --- CHANGELOG.md | 9 +++++---- Sources/ProjectSpec/XCProjExtensions.swift | 4 ++-- .../TestProject/Project.xcodeproj/project.pbxproj | 8 -------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f6917e69..21de2b776 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,14 @@ ## Next Version -### Added - -- Added `coverageTargets` for target test schemes. This enables to gather code coverage for specific targets. [#1189](https://github.com/yonaskolb/XcodeGen/pull/1189) @gabriellanata - ### Fixed - Fixed crash caused by a simultaneous write during a glob processing [#1177](https://github.com/yonaskolb/XcodeGen/issues/1177) @tr1ckyf0x +- Skip generating empty compile sources build phases for watch apps [#1185](https://github.com/yonaskolb/XcodeGen/issues/1185) @evandcoleman + +### Added + +- Added `coverageTargets` for target test schemes. This enables to gather code coverage for specific targets. [#1189](https://github.com/yonaskolb/XcodeGen/pull/1189) @gabriellanata ## 2.26.0 diff --git a/Sources/ProjectSpec/XCProjExtensions.swift b/Sources/ProjectSpec/XCProjExtensions.swift index bf3d36d21..9bee91be9 100644 --- a/Sources/ProjectSpec/XCProjExtensions.swift +++ b/Sources/ProjectSpec/XCProjExtensions.swift @@ -48,8 +48,8 @@ extension PBXProductType { public var canSkipCompileSourcesBuildPhase: Bool { switch self { - case .bundle, .stickerPack, .messagesApplication: - // Bundles, sticker packs and simple messages applications without sources should not include a + case .bundle, .watch2App, .stickerPack, .messagesApplication: + // Bundles, watch apps, sticker packs and simple messages applications without sources should not include a // compile sources build phase. Doing so can cause Xcode to produce an error on build. return true default: diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index c0344eb31..2f440618d 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -1697,7 +1697,6 @@ isa = PBXNativeTarget; buildConfigurationList = 6B5C5F08C0EF06457756E379 /* Build configuration list for PBXNativeTarget "App_watchOS" */; buildPhases = ( - 91C895DE8170C96A75D29426 /* Sources */, B7B71FA7D279029BF7A7FC7C /* Resources */, C765431E5FF4B02F59DE79B0 /* Embed App Extensions */, ); @@ -2706,13 +2705,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 91C895DE8170C96A75D29426 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; 96BB43F4706B031DA45166E8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; From e77caa8a4052b394d09948801dc5883f0a325e16 Mon Sep 17 00:00:00 2001 From: Christian Huck Date: Sun, 20 Mar 2022 04:20:37 +0100 Subject: [PATCH 117/284] add .gyb as an accepted source file (#1191) * add .gyb to source files * Update CHANGELOG.md Co-authored-by: Christian Huck --- CHANGELOG.md | 2 ++ Sources/ProjectSpec/FileType.swift | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21de2b776..3672aee2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ - Added `coverageTargets` for target test schemes. This enables to gather code coverage for specific targets. [#1189](https://github.com/yonaskolb/XcodeGen/pull/1189) @gabriellanata +- Fixed issue where .gyb files could not be added to source file list [#1191]((https://github.com/yonaskolb/XcodeGen/issues/1191) @hakkurishian + ## 2.26.0 ### Added diff --git a/Sources/ProjectSpec/FileType.swift b/Sources/ProjectSpec/FileType.swift index 372bc79d8..d106b2857 100644 --- a/Sources/ProjectSpec/FileType.swift +++ b/Sources/ProjectSpec/FileType.swift @@ -75,6 +75,7 @@ extension FileType { // sources "swift": FileType(buildPhase: .sources), + "gyb": FileType(buildPhase: .sources), "m": FileType(buildPhase: .sources), "mm": FileType(buildPhase: .sources), "cpp": FileType(buildPhase: .sources), From 146eaadaf3aed2242d71c8531a38c153520d7fa9 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Sun, 20 Mar 2022 14:20:53 +1100 Subject: [PATCH 118/284] Update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3672aee2c..d9af32ed9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,6 @@ ### Added - Added `coverageTargets` for target test schemes. This enables to gather code coverage for specific targets. [#1189](https://github.com/yonaskolb/XcodeGen/pull/1189) @gabriellanata - - Fixed issue where .gyb files could not be added to source file list [#1191]((https://github.com/yonaskolb/XcodeGen/issues/1191) @hakkurishian ## 2.26.0 From 245f17117abe10a4d823c917fbed7dceaff1a851 Mon Sep 17 00:00:00 2001 From: "freddi(Yuki Aki)" Date: Sun, 20 Mar 2022 12:27:29 +0900 Subject: [PATCH 119/284] Support test target for local Swift Package (#1169) * support local Swift Package test case into test scheme * update test * add test * update CHABGELOG.md * Update CHANGELOG.md * revert resolved package test * Update Sources/XcodeGenKit/SchemeGenerator.swift Co-authored-by: Kohki Miki * make TargetReference convert from new JSON format * add .package for location of target reference * receive target reference format at target of scheme * update test * update XcodeProj * add test and fix small bugs * update docs * support multiple style of coverageTargets * add edge case of parsing test targets * fix docs * Update Docs/ProjectSpec.md Co-authored-by: Yonas Kolb * create TestableTargetReference for not making API complex * fix code format * fix parameter name to Testable Target Reference * support directly writing key of Testable Target Reference * fix compile error in build Co-authored-by: Kohki Miki Co-authored-by: Yonas Kolb --- CHANGELOG.md | 2 + Docs/ProjectSpec.md | 22 +++- Sources/ProjectSpec/Project.swift | 4 + Sources/ProjectSpec/Scheme.swift | 47 ++++++-- Sources/ProjectSpec/SpecValidation.swift | 18 +++ Sources/ProjectSpec/SpecValidationError.swift | 3 + Sources/ProjectSpec/TargetReference.swift | 4 +- Sources/ProjectSpec/TargetScheme.swift | 7 +- Sources/ProjectSpec/TestTargeReference.swift | 112 ++++++++++++++++++ Sources/XcodeGenKit/SchemeGenerator.swift | 29 ++++- .../xcshareddata/xcschemes/App.xcscheme | 20 ++++ Tests/Fixtures/SPM/project.yml | 7 +- .../SchemeGeneratorTests.swift | 37 +++++- 13 files changed, 284 insertions(+), 28 deletions(-) create mode 100644 Sources/ProjectSpec/TestTargeReference.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index d9af32ed9..eca47f8e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Change Log ## Next Version +#### Added +- Support test target for local Swift Package [#1074](https://github.com/yonaskolb/XcodeGen/pull/1074) @freddi-kit ### Fixed diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 700fb8009..70562385a 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -828,14 +828,22 @@ A multiline script can be written using the various YAML multiline methods, for ### Test Action - [ ] **gatherCoverageData**: **Bool** - a boolean that indicates if this scheme should gather coverage data. This defaults to false -- [ ] **coverageTargets**: **[String]** - a list of targets to gather code coverage. Each entry can either be a simple string, or a string using [Project Reference](#project-reference) +- [ ] **coverageTargets**: **[[Testable Target Reference](#testable-target-reference)]** - a list of targets to gather code coverage. Each entry can also either be a simple string, a string using [Project Reference](#project-reference) or [Testable Target Reference](#testable-target-reference) - [ ] **targets**: **[[Test Target](#test-target)]** - a list of targets to test. Each entry can either be a simple string, or a [Test Target](#test-target) - [ ] **customLLDBInit**: **String** - the absolute path to the custom `.lldbinit` file - [ ] **captureScreenshotsAutomatically**: **Bool** - indicates whether screenshots should be captured automatically while UI Testing. This defaults to true. - [ ] **deleteScreenshotsWhenEachTestSucceeds**: **Bool** - whether successful UI tests should cause automatically-captured screenshots to be deleted. If `captureScreenshotsAutomatically` is false, this value is ignored. This defaults to true. #### Test Target -- [x] **name**: **String** - The name of the target +A target can be one of a 2 types: + +- **name**: **String** - The name of the target. +- **target**: **[Testable Target Reference](#testable-target-reference)** - The information of the target. You can specify more detailed information than `name:`. + +As syntax suger, you can also specify **[Testable Target Reference](#testable-target-reference)** without `target`. + +#### Other Parameters + - [ ] **parallelizable**: **Bool** - Whether to run tests in parallel. Defaults to false - [ ] **randomExecutionOrder**: **Bool** - Whether to run tests in a random order. Defaults to false - [ ] **location**: **String** - GPX file or predefined value for simulating location. See [Simulate Location](#simulate-location) for location examples. @@ -843,6 +851,12 @@ A multiline script can be written using the various YAML multiline methods, for - [ ] **skippedTests**: **[String]** - List of tests in the test target to skip. Defaults to empty - [ ] **selectedTests**: **[String]** - List of tests in the test target to whitelist and select. Defaults to empty. This will override `skippedTests` if provided +#### Testable Target Reference +A Testable Target Reference can be one of 3 types: +- `package: {local-swift-package-name}/{target-name}`: Name of local swift package and its target. +- `local: {target-name}`: Name of local target. +- `project: {project-reference-name}/{target-name}`: Name of local swift package and its target. + ### Archive Action - [ ] **customArchiveName**: **String** - the custom name to give to the archive @@ -902,12 +916,16 @@ schemes: coverageTargets: - MyTarget1 - ExternalTarget/OtherTarget1 + - package: LocalPackage/TestTarget targets: - Tester1 - name: Tester2 parallelizable: true randomExecutionOrder: true skippedTests: [Test/testExample()] + - package: APIClient/APIClientTests + parallelizable: true + randomExecutionOrder: true environmentVariables: - variable: TEST_ENV_VAR value: VALUE diff --git a/Sources/ProjectSpec/Project.swift b/Sources/ProjectSpec/Project.swift index 2d6842dcf..972daa01c 100644 --- a/Sources/ProjectSpec/Project.swift +++ b/Sources/ProjectSpec/Project.swift @@ -83,6 +83,10 @@ public struct Project: BuildSettingsContainer { targetsMap[targetName] } + public func getPackage(_ packageName: String) -> SwiftPackage? { + packages[packageName] + } + public func getAggregateTarget(_ targetName: String) -> AggregateTarget? { aggregateTargetsMap[targetName] } diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index 25ce697cc..73c762d62 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -169,7 +169,7 @@ public struct Scheme: Equatable { public var config: String? public var gatherCoverageData: Bool - public var coverageTargets: [TargetReference] + public var coverageTargets: [TestableTargetReference] public var disableMainThreadChecker: Bool public var commandLineArguments: [String: Bool] public var targets: [TestTarget] @@ -189,7 +189,7 @@ public struct Scheme: Equatable { public static let parallelizableDefault = false public var name: String { targetReference.name } - public let targetReference: TargetReference + public let targetReference: TestableTargetReference public var randomExecutionOrder: Bool public var parallelizable: Bool public var location: String? @@ -198,7 +198,7 @@ public struct Scheme: Equatable { public var selectedTests: [String] public init( - targetReference: TargetReference, + targetReference: TestableTargetReference, randomExecutionOrder: Bool = randomExecutionOrderDefault, parallelizable: Bool = parallelizableDefault, location: String? = nil, @@ -217,7 +217,7 @@ public struct Scheme: Equatable { public init(stringLiteral value: String) { do { - targetReference = try TargetReference(value) + targetReference = try TestableTargetReference(value) randomExecutionOrder = false parallelizable = false location = nil @@ -233,7 +233,7 @@ public struct Scheme: Equatable { public init( config: String, gatherCoverageData: Bool = gatherCoverageDataDefault, - coverageTargets: [TargetReference] = [], + coverageTargets: [TestableTargetReference] = [], disableMainThreadChecker: Bool = disableMainThreadCheckerDefault, randomExecutionOrder: Bool = false, parallelizable: Bool = false, @@ -331,10 +331,10 @@ public struct Scheme: Equatable { } public struct BuildTarget: Equatable, Hashable { - public var target: TargetReference + public var target: TestableTargetReference public var buildTypes: [BuildType] - public init(target: TargetReference, buildTypes: [BuildType] = BuildType.all) { + public init(target: TestableTargetReference, buildTypes: [BuildType] = BuildType.all) { self.target = target self.buildTypes = buildTypes } @@ -465,13 +465,28 @@ extension Scheme.Test: JSONObjectConvertible { public init(jsonDictionary: JSONDictionary) throws { config = jsonDictionary.json(atKeyPath: "config") gatherCoverageData = jsonDictionary.json(atKeyPath: "gatherCoverageData") ?? Scheme.Test.gatherCoverageDataDefault - coverageTargets = try (jsonDictionary.json(atKeyPath: "coverageTargets") ?? []).map { try TargetReference($0) } + + if let coverages = jsonDictionary["coverageTargets"] as? [Any] { + coverageTargets = try coverages.compactMap { target in + if let string = target as? String { + return try TestableTargetReference(string) + } else if let dictionary = target as? JSONDictionary, + let target: TestableTargetReference = try? .init(jsonDictionary: dictionary) { + return target + } else { + return nil + } + } + } else { + coverageTargets = [] + } + disableMainThreadChecker = jsonDictionary.json(atKeyPath: "disableMainThreadChecker") ?? Scheme.Test.disableMainThreadCheckerDefault commandLineArguments = jsonDictionary.json(atKeyPath: "commandLineArguments") ?? [:] if let targets = jsonDictionary["targets"] as? [Any] { self.targets = try targets.compactMap { target in if let string = target as? String { - return try TestTarget(targetReference: TargetReference(string)) + return try TestTarget(targetReference: TestableTargetReference(string)) } else if let dictionary = target as? JSONDictionary { return try TestTarget(jsonDictionary: dictionary) } else { @@ -538,7 +553,17 @@ extension Scheme.Test: JSONEncodable { extension Scheme.Test.TestTarget: JSONObjectConvertible { public init(jsonDictionary: JSONDictionary) throws { - targetReference = try TargetReference(jsonDictionary.json(atKeyPath: "name")) + if let name: String = jsonDictionary.json(atKeyPath: "name") { + targetReference = try TestableTargetReference(name) + } else if let local: String = jsonDictionary.json(atKeyPath: "local") { + self.targetReference = TestableTargetReference.local(local) + } else if let project: String = jsonDictionary.json(atKeyPath: "project") { + self.targetReference = TestableTargetReference.project(project) + } else if let package: String = jsonDictionary.json(atKeyPath: "package") { + self.targetReference = TestableTargetReference.package(package) + } else { + self.targetReference = try jsonDictionary.json(atKeyPath: "target") + } randomExecutionOrder = jsonDictionary.json(atKeyPath: "randomExecutionOrder") ?? Scheme.Test.TestTarget.randomExecutionOrderDefault parallelizable = jsonDictionary.json(atKeyPath: "parallelizable") ?? Scheme.Test.TestTarget.parallelizableDefault location = jsonDictionary.json(atKeyPath: "location") ?? nil @@ -694,7 +719,7 @@ extension Scheme.Build: JSONObjectConvertible { } else { buildTypes = BuildType.all } - let target = try TargetReference(targetRepr) + let target = try TestableTargetReference(targetRepr) targets.append(Scheme.BuildTarget(target: target, buildTypes: buildTypes)) } self.targets = targets.sorted { $0.target.name < $1.target.name } diff --git a/Sources/ProjectSpec/SpecValidation.swift b/Sources/ProjectSpec/SpecValidation.swift index fd1049c6e..01caca589 100644 --- a/Sources/ProjectSpec/SpecValidation.swift +++ b/Sources/ProjectSpec/SpecValidation.swift @@ -119,6 +119,10 @@ extension Project { for testTarget in scheme.testTargets { if getTarget(testTarget.name) == nil { + // For test case of local Swift Package + if case .package(let name) = testTarget.targetReference.location, getPackage(name) != nil { + continue + } errors.append(.invalidTargetSchemeTest(target: target.name, testTarget: testTarget.name)) } } @@ -243,4 +247,18 @@ extension Project { return nil } } + + /// Returns a descriptive error if the given target reference was invalid otherwise `nil`. + private func validationError(for testableTargetReference: TestableTargetReference, in scheme: Scheme, action: String) -> SpecValidationError.ValidationError? { + switch testableTargetReference.location { + case .local where getProjectTarget(testableTargetReference.name) == nil: + return .invalidSchemeTarget(scheme: scheme.name, target: testableTargetReference.name, action: action) + case .project(let project) where getProjectReference(project) == nil: + return .invalidProjectReference(scheme: scheme.name, reference: project) + case .package(let package) where getPackage(package) == nil: + return .invalidLocalPackage(package) + case .local, .project, .package: + return nil + } + } } diff --git a/Sources/ProjectSpec/SpecValidationError.swift b/Sources/ProjectSpec/SpecValidationError.swift index c19486526..f4025bbf8 100644 --- a/Sources/ProjectSpec/SpecValidationError.swift +++ b/Sources/ProjectSpec/SpecValidationError.swift @@ -20,6 +20,7 @@ public struct SpecValidationError: Error, CustomStringConvertible { case invalidSchemeTarget(scheme: String, target: String, action: String) case invalidSchemeConfig(scheme: String, config: String) case invalidSwiftPackage(name: String, target: String) + case invalidPackageDependencyReference(name: String) case invalidLocalPackage(String) case invalidConfigFile(configFile: String, config: String) case invalidBuildSettingConfig(String) @@ -69,6 +70,8 @@ public struct SpecValidationError: Error, CustomStringConvertible { return "Target \(target.quoted) has an invalid package dependency \(name.quoted)" case let .invalidLocalPackage(path): return "Invalid local package \(path.quoted)" + case let .invalidPackageDependencyReference(name): + return "Package reference \(name) must be specified as package dependency, not target" case let .missingConfigForTargetScheme(target, configType): return "Target \(target.quoted) is missing a config of type \(configType.rawValue) to generate its scheme" case let .missingDefaultConfig(name): diff --git a/Sources/ProjectSpec/TargetReference.swift b/Sources/ProjectSpec/TargetReference.swift index 1a64e258a..22da0a2e1 100644 --- a/Sources/ProjectSpec/TargetReference.swift +++ b/Sources/ProjectSpec/TargetReference.swift @@ -46,8 +46,8 @@ extension TargetReference: CustomStringConvertible { public var reference: String { switch location { case .local: return name - case .project(let projectPath): - return "\(projectPath)/\(name)" + case .project(let root): + return "\(root)/\(name)" } } diff --git a/Sources/ProjectSpec/TargetScheme.swift b/Sources/ProjectSpec/TargetScheme.swift index 289bf5e30..136fd7965 100644 --- a/Sources/ProjectSpec/TargetScheme.swift +++ b/Sources/ProjectSpec/TargetScheme.swift @@ -62,9 +62,10 @@ extension TargetScheme: JSONObjectConvertible { if let targets = jsonDictionary["testTargets"] as? [Any] { testTargets = try targets.compactMap { target in if let string = target as? String { - return .init(targetReference: try TargetReference(string)) - } else if let dictionary = target as? JSONDictionary { - return try .init(jsonDictionary: dictionary) + return .init(targetReference: try TestableTargetReference(string)) + } else if let dictionary = target as? JSONDictionary, + let target: Scheme.Test.TestTarget = try? .init(jsonDictionary: dictionary) { + return target } else { return nil } diff --git a/Sources/ProjectSpec/TestTargeReference.swift b/Sources/ProjectSpec/TestTargeReference.swift new file mode 100644 index 000000000..17ea557bb --- /dev/null +++ b/Sources/ProjectSpec/TestTargeReference.swift @@ -0,0 +1,112 @@ +import Foundation +import JSONUtilities + +public struct TestableTargetReference: Hashable { + public var name: String + public var location: Location + + public var targetReference: TargetReference { + switch location { + case .local: + return TargetReference(name: name, location: .local) + case .project(let projectName): + return TargetReference(name: name, location: .project(projectName)) + case .package: + fatalError("Package target is only available for testable") + } + } + + public enum Location: Hashable { + case local + case project(String) + case package(String) + } + + public init(name: String, location: Location) { + self.name = name + self.location = location + } +} + +extension TestableTargetReference { + public init(_ string: String) throws { + let paths = string.split(separator: "/") + switch paths.count { + case 2: + location = .project(String(paths[0])) + name = String(paths[1]) + case 1: + location = .local + name = String(paths[0]) + default: + throw SpecParsingError.invalidTargetReference(string) + } + } + + public static func local(_ name: String) -> TestableTargetReference { + TestableTargetReference(name: name, location: .local) + } + + public static func project(_ name: String) -> TestableTargetReference { + let paths = name.split(separator: "/") + return TestableTargetReference(name: String(paths[1]), location: .project(String(paths[0]))) + } + + public static func package(_ name: String) -> TestableTargetReference { + let paths = name.split(separator: "/") + return TestableTargetReference(name: String(paths[1]), location: .package(String(paths[0]))) + } +} + +extension TestableTargetReference: ExpressibleByStringLiteral { + public init(stringLiteral value: String) { + try! self.init(value) + } +} + +extension TestableTargetReference: CustomStringConvertible { + public var reference: String { + switch location { + case .local: return name + case .project(let root), .package(let root): + return "\(root)/\(name)" + } + } + + public var description: String { + reference + } +} + +extension TestableTargetReference: JSONObjectConvertible { + + public init(jsonDictionary: JSONDictionary) throws { + if let project: String = jsonDictionary.json(atKeyPath: "project") { + let paths = project.split(separator: "/") + name = String(paths[1]) + location = .project(String(paths[0])) + } else if let project: String = jsonDictionary.json(atKeyPath: "package") { + let paths = project.split(separator: "/") + name = String(paths[1]) + location = .package(String(paths[0])) + } else { + name = try jsonDictionary.json(atKeyPath: "local") + location = .local + } + } +} + +extension TestableTargetReference: JSONEncodable { + public func toJSONValue() -> Any { + var dictionary: JSONDictionary = [:] + switch self.location { + case .package(let packageName): + dictionary["package"] = "\(packageName)/\(name)" + case .project(let projectName): + dictionary["project"] = "\(projectName)/\(name)" + case .local: + dictionary["local"] = name + } + return dictionary + } +} diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index fa008bb7b..e980b9948 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -136,9 +136,27 @@ public class SchemeGenerator { blueprintName: target.name ) } + + func getBuildableTestableReference(_ target: TestableTargetReference) throws -> XCScheme.BuildableReference { + switch target.location { + case .package(let packageName): + guard let package = self.project.getPackage(packageName), + case .local(let path) = package else { + throw SchemeGenerationError.missingPackage(packageName) + } + return XCScheme.BuildableReference( + referencedContainer: "container:\(path)", + blueprintIdentifier: target.name, + buildableName: target.name, + blueprintName: target.name + ) + default: + return try getBuildableReference(target.targetReference) + } + } func getBuildEntry(_ buildTarget: Scheme.BuildTarget) throws -> XCScheme.BuildAction.Entry { - let buildableReference = try getBuildableReference(buildTarget.target) + let buildableReference = try getBuildableTestableReference(buildTarget.target) return XCScheme.BuildAction.Entry(buildableReference: buildableReference, buildFor: buildTarget.buildTypes) } @@ -216,7 +234,7 @@ public class SchemeGenerator { } let coverageBuildableTargets = try scheme.test?.coverageTargets.map { - try getBuildableReference($0) + try getBuildableTestableReference($0) } ?? [] let testCommandLineArgs = scheme.test.map { XCScheme.CommandLineArguments($0.commandLineArguments) } @@ -375,6 +393,7 @@ public class SchemeGenerator { enum SchemeGenerationError: Error, CustomStringConvertible { case missingTarget(TargetReference, projectPath: String) + case missingPackage(String) case missingProject(String) case missingBuildTargets(String) @@ -386,6 +405,8 @@ enum SchemeGenerationError: Error, CustomStringConvertible { return "Unable to find project reference named \"\(project)\" in project.yml" case .missingBuildTargets(let name): return "Unable to find at least one build target in scheme \"\(name)\"" + case .missingPackage(let package): + return "Unable to find swift package named \"\(package)\" in project.yml" } } } @@ -436,14 +457,14 @@ extension Scheme { } private static func buildTargets(for target: Target, project: Project) -> [BuildTarget] { - let buildTarget = Scheme.BuildTarget(target: TargetReference.local(target.name)) + let buildTarget = Scheme.BuildTarget(target: TestableTargetReference.local(target.name)) switch target.type { case .watchApp, .watch2App: let hostTarget = project.targets .first { projectTarget in projectTarget.dependencies.contains { $0.reference == target.name } } - .map { BuildTarget(target: TargetReference.local($0.name)) } + .map { BuildTarget(target: TestableTargetReference.local($0.name)) } return hostTarget.map { [buildTarget, $0] } ?? [buildTarget] default: return [buildTarget] diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme b/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme index ed6efd9af..ff4048c2f 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme @@ -30,6 +30,26 @@ onlyGenerateCoverageForSpecifiedTargets = "NO" shouldUseLaunchSchemeArgsEnv = "YES"> + + + + + + + + Date: Sun, 20 Mar 2022 14:28:41 +1100 Subject: [PATCH 120/284] Update CHANGELOG.md --- CHANGELOG.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eca47f8e8..1ec079a8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,19 +1,18 @@ # Change Log ## Next Version + #### Added + - Support test target for local Swift Package [#1074](https://github.com/yonaskolb/XcodeGen/pull/1074) @freddi-kit +- Added `coverageTargets` for target test schemes. This enables to gather code coverage for specific targets. [#1189](https://github.com/yonaskolb/XcodeGen/pull/1189) @gabriellanata +- Fixed issue where .gyb files could not be added to source file list [#1191]((https://github.com/yonaskolb/XcodeGen/issues/1191) @hakkurishian ### Fixed - Fixed crash caused by a simultaneous write during a glob processing [#1177](https://github.com/yonaskolb/XcodeGen/issues/1177) @tr1ckyf0x - Skip generating empty compile sources build phases for watch apps [#1185](https://github.com/yonaskolb/XcodeGen/issues/1185) @evandcoleman -### Added - -- Added `coverageTargets` for target test schemes. This enables to gather code coverage for specific targets. [#1189](https://github.com/yonaskolb/XcodeGen/pull/1189) @gabriellanata -- Fixed issue where .gyb files could not be added to source file list [#1191]((https://github.com/yonaskolb/XcodeGen/issues/1191) @hakkurishian - ## 2.26.0 ### Added From d7accac686cbb6b271d118a0b743784a1d6b1ca8 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Sun, 20 Mar 2022 14:30:49 +1100 Subject: [PATCH 121/284] Update to 2.27.0 --- CHANGELOG.md | 4 ++++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ec079a8d..2d32e9bc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.27.0 + #### Added - Support test target for local Swift Package [#1074](https://github.com/yonaskolb/XcodeGen/pull/1074) @freddi-kit @@ -13,6 +15,8 @@ - Fixed crash caused by a simultaneous write during a glob processing [#1177](https://github.com/yonaskolb/XcodeGen/issues/1177) @tr1ckyf0x - Skip generating empty compile sources build phases for watch apps [#1185](https://github.com/yonaskolb/XcodeGen/issues/1185) @evandcoleman +[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.26.0...2.27.0) + ## 2.26.0 ### Added diff --git a/Makefile b/Makefile index aa515b3d4..c03ff6741 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.26.0 +VERSION = 2.27.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 6b036a520..f7ada854a 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.26.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.27.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 8ba636bf8..fee309772 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.26.0") +let version = Version("2.27.0") let cli = XcodeGenCLI(version: version) cli.execute() From f6cdd090c22622c3e2254da167099e3980e9bd89 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Sun, 20 Mar 2022 14:44:14 +1100 Subject: [PATCH 122/284] use new TestableTargetReference in TargetScheme.coverageTargets --- Docs/ProjectSpec.md | 4 ++-- Sources/ProjectSpec/TargetScheme.swift | 9 ++++++--- Tests/XcodeGenKitTests/SchemeGeneratorTests.swift | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 70562385a..b9e5b2e67 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -653,7 +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 -- [ ] **coverageTargets**: **[String]** - a list of targets to gather code coverage. Each entry can either be a simple string, or a string using [Project Reference](#project-reference) +- [ ] **coverageTargets**: **[[Testable Target Reference](#testable-target-reference) - a list of targets to gather code coverage. Each entry can either be a simple string, a string using [Project Reference](#project-reference) or [Testable Target Reference](#testable-target-reference) - [ ] **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. @@ -828,7 +828,7 @@ A multiline script can be written using the various YAML multiline methods, for ### Test Action - [ ] **gatherCoverageData**: **Bool** - a boolean that indicates if this scheme should gather coverage data. This defaults to false -- [ ] **coverageTargets**: **[[Testable Target Reference](#testable-target-reference)]** - a list of targets to gather code coverage. Each entry can also either be a simple string, a string using [Project Reference](#project-reference) or [Testable Target Reference](#testable-target-reference) +- [ ] **coverageTargets**: **[[Testable Target Reference](#testable-target-reference)]** - a list of targets to gather code coverage. Each entry can either be a simple string, a string using [Project Reference](#project-reference) or [Testable Target Reference](#testable-target-reference) - [ ] **targets**: **[[Test Target](#test-target)]** - a list of targets to test. Each entry can either be a simple string, or a [Test Target](#test-target) - [ ] **customLLDBInit**: **String** - the absolute path to the custom `.lldbinit` file - [ ] **captureScreenshotsAutomatically**: **Bool** - indicates whether screenshots should be captured automatically while UI Testing. This defaults to true. diff --git a/Sources/ProjectSpec/TargetScheme.swift b/Sources/ProjectSpec/TargetScheme.swift index 136fd7965..9eb7f2792 100644 --- a/Sources/ProjectSpec/TargetScheme.swift +++ b/Sources/ProjectSpec/TargetScheme.swift @@ -11,7 +11,7 @@ public struct TargetScheme: Equatable { public var testTargets: [Scheme.Test.TestTarget] public var configVariants: [String] public var gatherCoverageData: Bool - public var coverageTargets: [TargetReference] + public var coverageTargets: [TestableTargetReference] public var storeKitConfiguration: String? public var language: String? public var region: String? @@ -27,7 +27,7 @@ public struct TargetScheme: Equatable { testTargets: [Scheme.Test.TestTarget] = [], configVariants: [String] = [], gatherCoverageData: Bool = gatherCoverageDataDefault, - coverageTargets: [TargetReference] = [], + coverageTargets: [TestableTargetReference] = [], storeKitConfiguration: String? = nil, language: String? = nil, region: String? = nil, @@ -77,7 +77,10 @@ extension TargetScheme: JSONObjectConvertible { if let targets = jsonDictionary["coverageTargets"] as? [Any] { coverageTargets = try targets.compactMap { target in if let string = target as? String { - return try TargetReference(string) + return try TestableTargetReference(string) + } else if let dictionary = target as? JSONDictionary, + let target: TestableTargetReference = try? .init(jsonDictionary: dictionary) { + return target } else { return nil } diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index 3257f3808..2d8202095 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -331,7 +331,7 @@ class SchemeGeneratorTests: XCTestCase { target.scheme = try TargetScheme( gatherCoverageData: true, coverageTargets: [ - TargetReference(framework.name), + TestableTargetReference(framework.name), ] ) From 8530da5d0027f1f2f85adce259802f564895c83d Mon Sep 17 00:00:00 2001 From: Maxim Bunkov Date: Tue, 22 Mar 2022 04:24:41 +0500 Subject: [PATCH 123/284] fix(carthage): shell login (#1179) * fix(carthage): shell login * tests(fixtures): update fixtures * tests(changelog): update changelog --- CHANGELOG.md | 1 + Sources/XcodeGenKit/PBXProjGenerator.swift | 2 +- .../Fixtures/TestProject/Project.xcodeproj/project.pbxproj | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d32e9bc4..0f749d9fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ - Ensure fileTypes are mapped to JSON value [#1112](https://github.com/yonaskolb/XcodeGen/pull/1112) @namolnad - Fix platform filter for package dependecies [#1123](https://github.com/yonaskolb/XcodeGen/pull/1123) @raptorxcz - Fix Xcode 13 build [#1130](https://github.com/yonaskolb/XcodeGen/issues/1127) @raptorxcz @mthole +- Fix Monterey MacOS shell version, shell login flag for environments [#1167](https://github.com/yonaskolb/XcodeGen/issues/1167) @bimawa [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.24.0...2.25.0) diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index c02f3a34d..990dd9e10 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -1130,7 +1130,7 @@ public class PBXProjGenerator { name: "Carthage", inputPaths: inputPaths, outputPaths: outputPaths, - shellPath: "/bin/sh", + shellPath: "/bin/sh -l", shellScript: "\(carthageExecutable) copy-frameworks\n" ) ) diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 2f440618d..f9df6bf94 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -2383,7 +2383,7 @@ "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Result.framework", ); runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; + shellPath = "/bin/sh -l"; shellScript = "carthage copy-frameworks\n"; }; 3D0637F4554EAD6FA48105BF /* MyScript */ = { @@ -2472,7 +2472,7 @@ "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Result.framework", ); runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; + shellPath = "/bin/sh -l"; shellScript = "carthage copy-frameworks\n"; }; BA454AAC926EDFCDA9226CBC /* MyScript */ = { @@ -2545,7 +2545,7 @@ "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Result.framework", ); runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; + shellPath = "/bin/sh -l"; shellScript = "carthage copy-frameworks\n"; }; /* End PBXShellScriptBuildPhase section */ From 5350e26cd5a2b08414877ebcf4a92f4095954e60 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 22 Mar 2022 10:25:44 +1100 Subject: [PATCH 124/284] Update CHANGELOG.md --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f749d9fb..37195e8eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Fixed + +- Fix Monterey macOS shell version, shell login flag for environments [#1167](https://github.com/yonaskolb/XcodeGen/issues/1167) @bimawa + ## 2.27.0 #### Added @@ -40,7 +44,6 @@ - Ensure fileTypes are mapped to JSON value [#1112](https://github.com/yonaskolb/XcodeGen/pull/1112) @namolnad - Fix platform filter for package dependecies [#1123](https://github.com/yonaskolb/XcodeGen/pull/1123) @raptorxcz - Fix Xcode 13 build [#1130](https://github.com/yonaskolb/XcodeGen/issues/1127) @raptorxcz @mthole -- Fix Monterey MacOS shell version, shell login flag for environments [#1167](https://github.com/yonaskolb/XcodeGen/issues/1167) @bimawa [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.24.0...2.25.0) From be0c3c39268ff403303450f3695a1eb611bbecb1 Mon Sep 17 00:00:00 2001 From: John Connolly Date: Thu, 24 Mar 2022 17:26:06 -0700 Subject: [PATCH 125/284] Added ability to use custom location for local Swift packages (#1175) * Added xcodePath functionality * Added xcodePath functionality * Renamed Xcode path to group * Updated change log and added fixture tests --- CHANGELOG.md | 3 ++ Docs/ProjectSpec.md | 4 +++ Sources/ProjectSpec/Project.swift | 2 +- Sources/ProjectSpec/SpecValidation.swift | 2 +- Sources/ProjectSpec/SwiftPackage.swift | 11 +++--- .../XcodeGenCLI/Commands/ProjectCommand.swift | 4 +-- Sources/XcodeGenKit/PBXProjGenerator.swift | 4 +-- Sources/XcodeGenKit/SchemeGenerator.swift | 2 +- Sources/XcodeGenKit/SourceGenerator.swift | 22 ++++++++---- .../SPM/SPM.xcodeproj/project.pbxproj | 19 +++++----- Tests/Fixtures/SPM/project.yml | 2 ++ Tests/ProjectSpecTests/ProjectSpecTests.swift | 2 +- Tests/ProjectSpecTests/SpecLoadingTests.swift | 10 +++--- .../ProjectGeneratorTests.swift | 35 +++++++++++++++++-- .../SchemeGeneratorTests.swift | 4 +-- 15 files changed, 90 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37195e8eb..71209a3fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Next Version +#### Added +- Support for specifying custom group locations for SPM packages. [#1173](https://github.com/yonaskolb/XcodeGen/issues/1173) @John-Connolly + ### Fixed - Fix Monterey macOS shell version, shell login flag for environments [#1167](https://github.com/yonaskolb/XcodeGen/issues/1167) @bimawa diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index b9e5b2e67..936c2fa5f 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -993,6 +993,7 @@ Swift packages are defined at a project level, and then linked to individual tar ### Local Package - [x] **path**: **String** - the path to the package in local. The path must be directory with a `Package.swift`. +- [ ] **group** : **String**- Optional path that specifies the location where the package will live in your xcode project. ```yml packages: @@ -1004,6 +1005,9 @@ packages: from: 0.5.0 RxClient: path: ../RxClient + AppFeature: + path: ../Packages + group: Domains/AppFeature ``` ## Project Reference diff --git a/Sources/ProjectSpec/Project.swift b/Sources/ProjectSpec/Project.swift index 972daa01c..f015d55f5 100644 --- a/Sources/ProjectSpec/Project.swift +++ b/Sources/ProjectSpec/Project.swift @@ -193,7 +193,7 @@ extension Project { packages.merge(localPackages.reduce(into: [String: SwiftPackage]()) { // Project name will be obtained by resolved abstractpath's lastComponent for dealing with some path case, like "../" let packageName = (basePath + Path($1).normalize()).lastComponent - $0[packageName] = .local(path: $1) + $0[packageName] = .local(path: $1, group: nil) } ) } diff --git a/Sources/ProjectSpec/SpecValidation.swift b/Sources/ProjectSpec/SpecValidation.swift index 01caca589..bf814ead4 100644 --- a/Sources/ProjectSpec/SpecValidation.swift +++ b/Sources/ProjectSpec/SpecValidation.swift @@ -54,7 +54,7 @@ extension Project { } for (name, package) in packages { - if case let .local(path) = package, !(basePath + Path(path).normalize()).exists { + if case let .local(path, _) = package, !(basePath + Path(path).normalize()).exists { errors.append(.invalidLocalPackage(name)) } } diff --git a/Sources/ProjectSpec/SwiftPackage.swift b/Sources/ProjectSpec/SwiftPackage.swift index 254882323..216a60617 100644 --- a/Sources/ProjectSpec/SwiftPackage.swift +++ b/Sources/ProjectSpec/SwiftPackage.swift @@ -10,7 +10,7 @@ public enum SwiftPackage: Equatable { static let githubPrefix = "https://github.com/" case remote(url: String, versionRequirement: VersionRequirement) - case local(path: String) + case local(path: String, group: String?) public var isLocal: Bool { if case .local = self { @@ -23,8 +23,10 @@ public enum SwiftPackage: Equatable { extension SwiftPackage: JSONObjectConvertible { public init(jsonDictionary: JSONDictionary) throws { - if let path: String = jsonDictionary.json(atKeyPath: "path") { - self = .local(path: path) + if let path: String = jsonDictionary.json(atKeyPath: "path"), let customLocation: String = jsonDictionary.json(atKeyPath: "group") { + self = .local(path: path, group: customLocation) + } else if let path: String = jsonDictionary.json(atKeyPath: "path") { + self = .local(path: path, group: nil) } else { let versionRequirement: VersionRequirement = try VersionRequirement(jsonDictionary: jsonDictionary) try Self.validateVersion(versionRequirement: versionRequirement) @@ -90,8 +92,9 @@ extension SwiftPackage: JSONEncodable { dictionary["revision"] = revision } return dictionary - case .local(let path): + case let .local(path, group): dictionary["path"] = path + dictionary["group"] = group } return dictionary diff --git a/Sources/XcodeGenCLI/Commands/ProjectCommand.swift b/Sources/XcodeGenCLI/Commands/ProjectCommand.swift index c47967784..e20b82ea0 100644 --- a/Sources/XcodeGenCLI/Commands/ProjectCommand.swift +++ b/Sources/XcodeGenCLI/Commands/ProjectCommand.swift @@ -28,9 +28,9 @@ class ProjectCommand: Command { } func execute() throws { - + let projectSpecPath = (spec ?? "project.yml").absolute() - + if !projectSpecPath.exists { throw GenerationError.missingProjectSpec(projectSpecPath) } diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 990dd9e10..20ffcfb0e 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -168,8 +168,8 @@ public class PBXProjGenerator { let packageReference = XCRemoteSwiftPackageReference(repositoryURL: url, versionRequirement: versionRequirement) packageReferences[name] = packageReference addObject(packageReference) - case let .local(path): - try sourceGenerator.createLocalPackage(path: Path(path)) + case let .local(path, group): + try sourceGenerator.createLocalPackage(path: Path(path), group: group.map { Path($0) }) } } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index e980b9948..b96077243 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -141,7 +141,7 @@ public class SchemeGenerator { switch target.location { case .package(let packageName): guard let package = self.project.getPackage(packageName), - case .local(let path) = package else { + case let .local(path, _) = package else { throw SchemeGenerationError.missingPackage(packageName) } return XCScheme.BuildableReference( diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index c7667cf6e..fab9d3fe6 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -53,16 +53,22 @@ class SourceGenerator { return object } - func createLocalPackage(path: Path) throws { - - if localPackageGroup == nil { + func createLocalPackage(path: Path, group: Path?) throws { + var pbxGroup: PBXGroup? + + if let location = group { + let fullLocationPath = project.basePath + location + pbxGroup = getGroup(path: fullLocationPath, mergingChildren: [], createIntermediateGroups: true, hasCustomParent: false, isBaseGroup: true) + } + + if localPackageGroup == nil && group == nil { let groupName = project.options.localPackagesGroup ?? "Packages" localPackageGroup = addObject(PBXGroup(sourceTree: .sourceRoot, name: groupName)) rootGroups.insert(localPackageGroup!) } - + let absolutePath = project.basePath + path.normalize() - + // Get the local package's relative path from the project root let fileReferencePath = try? absolutePath.relativePath(from: projectDirectory ?? project.basePath).string @@ -74,7 +80,11 @@ class SourceGenerator { path: fileReferencePath ) ) - localPackageGroup!.children.append(fileReference) + if let pbxGroup = pbxGroup { + pbxGroup.children.append(fileReference) + } else { + localPackageGroup!.children.append(fileReference) + } } /// Collects an array complete of all `SourceFile` objects that make up the target based on the provided `TargetSource` definitions. diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index 0f9810390..234e31cfe 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 23C6626698DE560017A89F2F /* XcodeGen in Frameworks */ = {isa = PBXBuildFile; productRef = 6F7DEA2D82649EDF903FBDBD /* XcodeGen */; }; 2DA7998902987953B119E4CE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26F7EFEE613987D1E1258A60 /* AppDelegate.swift */; }; 3986ED6965842721C46C0452 /* SwiftRoaringDynamic in Frameworks */ = {isa = PBXBuildFile; productRef = DC73B269C8B0C0BF6912842C /* SwiftRoaringDynamic */; }; 4CC663B42B270404EF5FD037 /* libStaticLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CAB5625F6FEA668410ED5482 /* libStaticLibrary.a */; }; @@ -58,8 +59,8 @@ 61C17B77601A9D1B7895AB42 /* StaticLibrary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StaticLibrary.swift; sourceTree = ""; }; 7970A2253B14A9B27C307FAC /* SPMTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPMTests.swift; sourceTree = ""; }; A9601593D0AD02931266A4E5 /* App.xctestplan */ = {isa = PBXFileReference; path = App.xctestplan; sourceTree = ""; }; - C1DE9A872F470EAA65B9B0B0 /* XcodeGen */ = {isa = PBXFileReference; lastKnownFileType = folder; name = XcodeGen; path = ../../..; sourceTree = SOURCE_ROOT; }; CAB5625F6FEA668410ED5482 /* libStaticLibrary.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary.a; sourceTree = BUILT_PRODUCTS_DIR; }; + ED284AB7C13DCC0A95DAA680 /* XcodeGen */ = {isa = PBXFileReference; lastKnownFileType = folder; name = XcodeGen; path = ../../..; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -70,6 +71,7 @@ CE46CBA5671B951B546C8673 /* Codability in Frameworks */, 3986ED6965842721C46C0452 /* SwiftRoaringDynamic in Frameworks */, 4CC663B42B270404EF5FD037 /* libStaticLibrary.a in Frameworks */, + 23C6626698DE560017A89F2F /* XcodeGen in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -83,6 +85,7 @@ 26F7EFEE613987D1E1258A60 /* AppDelegate.swift */, 4E22B8BCC18A29EFE1DE3BE4 /* Assets.xcassets */, 464ACF8D8F2D9F219BCFD3E7 /* Info.plist */, + ED284AB7C13DCC0A95DAA680 /* XcodeGen */, ); path = SPM; sourceTree = ""; @@ -98,7 +101,6 @@ 218F6C96DF9E182F526258CF = { isa = PBXGroup; children = ( - AD0F3623091EEA8D1EA3DFF8 /* Packages */, 17DD374CC81D710476AFF41C /* SPM */, CF3BD77AEAA56553289456BA /* SPMTests */, 1FA59BFD192FB5A68D5F587C /* StaticLibrary */, @@ -116,14 +118,6 @@ name = Products; sourceTree = ""; }; - AD0F3623091EEA8D1EA3DFF8 /* Packages */ = { - isa = PBXGroup; - children = ( - C1DE9A872F470EAA65B9B0B0 /* XcodeGen */, - ); - name = Packages; - sourceTree = SOURCE_ROOT; - }; CF3BD77AEAA56553289456BA /* SPMTests */ = { isa = PBXGroup; children = ( @@ -193,6 +187,7 @@ packageProductDependencies = ( 16E6FE01D5BD99F78D4A17E2 /* Codability */, DC73B269C8B0C0BF6912842C /* SwiftRoaringDynamic */, + 6F7DEA2D82649EDF903FBDBD /* XcodeGen */, ); productName = App; productReference = 097F2DB5622B591E21BC3C73 /* App.app */; @@ -596,6 +591,10 @@ isa = XCSwiftPackageProductDependency; productName = XcodeGen; }; + 6F7DEA2D82649EDF903FBDBD /* XcodeGen */ = { + isa = XCSwiftPackageProductDependency; + productName = XcodeGen; + }; AF233B61592982A7F6431FC6 /* Codability */ = { isa = XCSwiftPackageProductDependency; package = 5BA91390AE78D2EE15C60091 /* XCRemoteSwiftPackageReference "Codability" */; diff --git a/Tests/Fixtures/SPM/project.yml b/Tests/Fixtures/SPM/project.yml index 61d8e70bd..818f66ff9 100644 --- a/Tests/Fixtures/SPM/project.yml +++ b/Tests/Fixtures/SPM/project.yml @@ -8,6 +8,7 @@ packages: majorVersion: 1.0.4 XcodeGen: path: ../../.. #XcodeGen itself + group: SPM targets: App: type: application @@ -24,6 +25,7 @@ targets: product: SwiftRoaringDynamic embed: true - target: StaticLibrary + - package: XcodeGen Tests: type: bundle.unit-test platform: iOS diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index d0e74bcd8..cf8d50083 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -126,7 +126,7 @@ class ProjectSpecTests: XCTestCase { project.settings = invalidSettings project.configFiles = ["invalidConfig": "invalidConfigFile"] project.fileGroups = ["invalidFileGroup"] - project.packages = ["invalidLocalPackage": .local(path: "invalidLocalPackage")] + project.packages = ["invalidLocalPackage": .local(path: "invalidLocalPackage", group: nil)] project.settingGroups = ["settingGroup1": Settings( configSettings: ["invalidSettingGroupConfig": [:]], groups: ["invalidSettingGroupSettingGroup"] diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index dbf361e46..5cc3afe50 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -1227,9 +1227,10 @@ class SpecLoadingTests: XCTestCase { "package6": .remote(url: "package.git", versionRequirement: .range(from: "1.2.0", to: "1.2.5")), "package7": .remote(url: "package.git", versionRequirement: .exact("1.2.2")), "package8": .remote(url: "package.git", versionRequirement: .upToNextMajorVersion("4.0.0-beta.5")), - "package9": .local(path: "package/package"), + "package9": .local(path: "package/package", group: nil), "package10": .remote(url: "https://github.com/yonaskolb/XcodeGen", versionRequirement: .exact("1.2.2")), - "XcodeGen": .local(path: "../XcodeGen"), + "XcodeGen": .local(path: "../XcodeGen", group: nil), + "package11": .local(path: "../XcodeGen", group: "Packages/Feature"), ], options: .init(localPackagesGroup: "MyPackages")) let dictionary: [String: Any] = [ @@ -1248,6 +1249,7 @@ class SpecLoadingTests: XCTestCase { "package8": ["url": "package.git", "majorVersion": "4.0.0-beta.5"], "package9": ["path": "package/package"], "package10": ["github": "yonaskolb/XcodeGen", "exactVersion": "1.2.2"], + "package11": ["path": "../XcodeGen", "group": "Packages/Feature"], ], "localPackages": ["../XcodeGen"], ] @@ -1257,8 +1259,8 @@ class SpecLoadingTests: XCTestCase { $0.it("parses old local package format") { let project = Project(name: "spm", packages: [ - "XcodeGen": .local(path: "../XcodeGen"), - "Yams": .local(path: "Yams"), + "XcodeGen": .local(path: "../XcodeGen", group: nil), + "Yams": .local(path: "Yams", group: nil), ], options: .init(localPackagesGroup: "MyPackages")) let dictionary: [String: Any] = [ diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 8b3d71ec9..168bf4017 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -1271,7 +1271,7 @@ class ProjectGeneratorTests: XCTestCase { let project = Project(name: "test", targets: [app], packages: [ "XcodeGen": .remote(url: "http://github.com/yonaskolb/XcodeGen", versionRequirement: .branch("master")), "Codability": .remote(url: "http://github.com/yonaskolb/Codability", versionRequirement: .exact("1.0.0")), - "Yams": .local(path: "../Yams"), + "Yams": .local(path: "../Yams", group: nil), ], options: .init(localPackagesGroup: "MyPackages")) let pbxProject = try project.generatePbxProj(specValidate: false) @@ -1304,7 +1304,38 @@ class ProjectGeneratorTests: XCTestCase { ] ) - let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen")]) + let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen", group: nil)]) + + let pbxProject = try project.generatePbxProj(specValidate: false) + let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) + let localPackageFile = try unwrap(pbxProject.fileReferences.first(where: { $0.path == "../XcodeGen" })) + try expect(localPackageFile.lastKnownFileType) == "folder" + + let frameworkPhases = nativeTarget.buildPhases.compactMap { $0 as? PBXFrameworksBuildPhase } + + guard let frameworkPhase = frameworkPhases.first else { + return XCTFail("frameworkPhases should have more than one") + } + + guard let file = frameworkPhase.files?.first else { + return XCTFail("frameworkPhase should have file") + } + + try expect(file.product?.productName) == "XcodeGen" + } + + + $0.it("generates local swift packages with custom xcode path") { + let app = Target( + name: "MyApp", + type: .application, + platform: .iOS, + dependencies: [ + Dependency(type: .package(product: nil), reference: "XcodeGen"), + ] + ) + + let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen", group: "Packages/Feature")]) let pbxProject = try project.generatePbxProj(specValidate: false) let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index 2d8202095..c1d2f1591 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -404,7 +404,7 @@ class SchemeGeneratorTests: XCTestCase { name: "test", targets: [framework], schemes: [scheme], - packages: ["XcodeGen": .local(path: "../")], + packages: ["XcodeGen": .local(path: "../", group: nil)], projectReferences: [ ProjectReference(name: "TestProject", path: externalProject.string), ] @@ -493,7 +493,7 @@ class SchemeGeneratorTests: XCTestCase { let project = Project( name: "ios_test", targets: [app], - packages: ["XcodeGen": .local(path: "../")] + packages: ["XcodeGen": .local(path: "../", group: nil)] ) let xcodeProject = try project.generateXcodeProject() let xcscheme = try unwrap(xcodeProject.sharedData?.schemes.first) From 50aa8c51ccdfb2469e749a972fa1f7d7381038f5 Mon Sep 17 00:00:00 2001 From: Vladislav Lisyanskiy Date: Thu, 31 Mar 2022 09:15:58 +0400 Subject: [PATCH 126/284] Fixed segmentation fault crash (#1198) * Fixed glob segmentation fault * Renamed AtomicDictionary to ThreadSafeDictionary * Refactored ThreadSafeDictionary * ThreadSafeDictionary replaced with ThreadSafeContainer * Removed reader/writer * ThreadSafeContainer replaced with Atomic --- CHANGELOG.md | 1 + Sources/XcodeGenCore/Atomic.swift | 37 +++++++++++++++++---- Sources/XcodeGenCore/Glob.swift | 8 +++-- Tests/XcodeGenCoreTests/AtomicTests.swift | 39 +++++++++++++++++++++++ 4 files changed, 77 insertions(+), 8 deletions(-) create mode 100644 Tests/XcodeGenCoreTests/AtomicTests.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index 71209a3fa..153ea944b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixed - Fix Monterey macOS shell version, shell login flag for environments [#1167](https://github.com/yonaskolb/XcodeGen/issues/1167) @bimawa +- Fixed crash caused by a simultaneous write during a glob processing [#1177](https://github.com/yonaskolb/XcodeGen/issues/1177) @tr1ckyf0x ## 2.27.0 diff --git a/Sources/XcodeGenCore/Atomic.swift b/Sources/XcodeGenCore/Atomic.swift index c7911ca42..b3b1b2940 100644 --- a/Sources/XcodeGenCore/Atomic.swift +++ b/Sources/XcodeGenCore/Atomic.swift @@ -8,20 +8,45 @@ import Foundation @propertyWrapper -struct Atomic { - private let queue = DispatchQueue(label: "com.xcodegencore.atomic") +public final class Atomic { + private var value: Value - init(wrappedValue: Value) { + private let queue = DispatchQueue( + label: "com.xcodegencore.atomic.\(UUID().uuidString)", + qos: .utility, + attributes: .concurrent, + autoreleaseFrequency: .inherit, + target: .global() + ) + + public init(wrappedValue: Value) { self.value = wrappedValue } - var wrappedValue: Value { + public var wrappedValue: Value { get { - return queue.sync { value } + queue.sync { value } } set { - queue.sync { value = newValue } + queue.async(flags: .barrier) { [weak self] in + self?.value = newValue + } + } + } + + /// Allows us to get the actual `Atomic` instance with the $ + /// prefix. + public var projectedValue: Atomic { + return self + } + + /// Modifies the protected value using `closure`. + public func with( + _ closure: (inout Value) throws -> R + ) rethrows -> R { + try queue.sync(flags: .barrier) { + try closure(&value) } } } diff --git a/Sources/XcodeGenCore/Glob.swift b/Sources/XcodeGenCore/Glob.swift index e3025eab7..4cee0a801 100644 --- a/Sources/XcodeGenCore/Glob.swift +++ b/Sources/XcodeGenCore/Glob.swift @@ -198,13 +198,17 @@ public class Glob: Collection { var isDirectoryBool = ObjCBool(false) let isDirectory = FileManager.default.fileExists(atPath: path, isDirectory: &isDirectoryBool) && isDirectoryBool.boolValue - isDirectoryCache[path] = isDirectory + $isDirectoryCache.with { isDirectoryCache in + isDirectoryCache[path] = isDirectory + } return isDirectory } private func clearCaches() { - isDirectoryCache.removeAll() + $isDirectoryCache.with { isDirectoryCache in + isDirectoryCache.removeAll() + } } private func paths(usingPattern pattern: String, includeFiles: Bool) -> [String] { diff --git a/Tests/XcodeGenCoreTests/AtomicTests.swift b/Tests/XcodeGenCoreTests/AtomicTests.swift new file mode 100644 index 000000000..470aeca35 --- /dev/null +++ b/Tests/XcodeGenCoreTests/AtomicTests.swift @@ -0,0 +1,39 @@ +// +// AtomicTests.swift +// +// +// Created by Vladislav Lisianskii on 27.03.2022. +// + +import XCTest +@testable import XcodeGenCore + +final class AtomicTests: XCTestCase { + + @Atomic private var atomicDictionary = [String: Int]() + + func testSimultaneousWriteOrder() { + let group = DispatchGroup() + + for index in (0..<100) { + group.enter() + DispatchQueue.global().async { + self.$atomicDictionary.with { atomicDictionary in + atomicDictionary["\(index)"] = index + } + group.leave() + } + } + + group.notify(queue: .main, execute: { + var expectedValue = [String: Int]() + for index in (0..<100) { + expectedValue["\(index)"] = index + } + XCTAssertEqual( + self.atomicDictionary, + expectedValue + ) + }) + } +} From 17e7b0327870c1df4d479eb09c351e5d91bf66bb Mon Sep 17 00:00:00 2001 From: Alvar Hansen Date: Thu, 31 Mar 2022 08:16:31 +0300 Subject: [PATCH 127/284] Run target source pattern matching in parallel (#1197) As this transform closure does not access anything outside of its closure and does not mutate any singletons, then it seems to be safe to run this mapping in parallel. --- CHANGELOG.md | 4 ++++ Sources/XcodeGenKit/SourceGenerator.swift | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 153ea944b..84003cb84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ - Fix Monterey macOS shell version, shell login flag for environments [#1167](https://github.com/yonaskolb/XcodeGen/issues/1167) @bimawa - Fixed crash caused by a simultaneous write during a glob processing [#1177](https://github.com/yonaskolb/XcodeGen/issues/1177) @tr1ckyf0x +### Changed + +- Run target source pattern matching in parallel [#1197](https://github.com/yonaskolb/XcodeGen/pull/1197) @alvarhansen + ## 2.27.0 #### Added diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index fab9d3fe6..e788ef09d 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -359,7 +359,7 @@ class SourceGenerator { let rootSourcePath = project.basePath + targetSource.path return Set( - patterns.map { pattern in + patterns.parallelMap { pattern in guard !pattern.isEmpty else { return [] } return Glob(pattern: "\(rootSourcePath)/\(pattern)") .map { Path($0) } From 4fbdc9da35c433f54971bd875e5c405b7b223f14 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Thu, 31 Mar 2022 16:22:09 +1100 Subject: [PATCH 128/284] Update to 2.28.0 --- Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c03ff6741..467033559 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.27.0 +VERSION = 2.28.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index f7ada854a..8966c4c0e 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.27.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.28.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index fee309772..f64962f9e 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.27.0") +let version = Version("2.28.0") let cli = XcodeGenCLI(version: version) cli.execute() From 322c5658f3427e25bdca673759e9938ec179d761 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Thu, 31 Mar 2022 16:24:02 +1100 Subject: [PATCH 129/284] update changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84003cb84..b23923836 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,10 @@ ## Next Version +## 2.28.0 + #### Added + - Support for specifying custom group locations for SPM packages. [#1173](https://github.com/yonaskolb/XcodeGen/issues/1173) @John-Connolly ### Fixed @@ -14,6 +17,8 @@ - Run target source pattern matching in parallel [#1197](https://github.com/yonaskolb/XcodeGen/pull/1197) @alvarhansen +[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.27.0...2.28.0) + ## 2.27.0 #### Added From 958ae1b744c6ecf96a04f7ca6ddea9a5e730defa Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Thu, 31 Mar 2022 16:41:05 +1100 Subject: [PATCH 130/284] simplify changelog PR links Github now makes these links in more contexts --- CHANGELOG.md | 850 +++++++++++++++++++++++++-------------------------- 1 file changed, 425 insertions(+), 425 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b23923836..6e1de9098 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,16 +6,16 @@ #### Added -- Support for specifying custom group locations for SPM packages. [#1173](https://github.com/yonaskolb/XcodeGen/issues/1173) @John-Connolly +- Support for specifying custom group locations for SPM packages. #1173 @John-Connolly ### Fixed -- Fix Monterey macOS shell version, shell login flag for environments [#1167](https://github.com/yonaskolb/XcodeGen/issues/1167) @bimawa -- Fixed crash caused by a simultaneous write during a glob processing [#1177](https://github.com/yonaskolb/XcodeGen/issues/1177) @tr1ckyf0x +- Fix Monterey macOS shell version, shell login flag for environments #1167 @bimawa +- Fixed crash caused by a simultaneous write during a glob processing #1177 @tr1ckyf0x ### Changed -- Run target source pattern matching in parallel [#1197](https://github.com/yonaskolb/XcodeGen/pull/1197) @alvarhansen +- Run target source pattern matching in parallel #1197 @alvarhansen [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.27.0...2.28.0) @@ -23,14 +23,14 @@ #### Added -- Support test target for local Swift Package [#1074](https://github.com/yonaskolb/XcodeGen/pull/1074) @freddi-kit -- Added `coverageTargets` for target test schemes. This enables to gather code coverage for specific targets. [#1189](https://github.com/yonaskolb/XcodeGen/pull/1189) @gabriellanata -- Fixed issue where .gyb files could not be added to source file list [#1191]((https://github.com/yonaskolb/XcodeGen/issues/1191) @hakkurishian +- Support test target for local Swift Package #1074 @freddi-kit +- Added `coverageTargets` for target test schemes. This enables to gather code coverage for specific targets. #1189 @gabriellanata +- Fixed issue where .gyb files could not be added to source file list #1191 @hakkurishian ### Fixed -- Fixed crash caused by a simultaneous write during a glob processing [#1177](https://github.com/yonaskolb/XcodeGen/issues/1177) @tr1ckyf0x -- Skip generating empty compile sources build phases for watch apps [#1185](https://github.com/yonaskolb/XcodeGen/issues/1185) @evandcoleman +- Fixed crash caused by a simultaneous write during a glob processing #1177 @tr1ckyf0x +- Skip generating empty compile sources build phases for watch apps #1185 @evandcoleman [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.26.0...2.27.0) @@ -38,43 +38,43 @@ ### Added -- Added the option to specify a `location` in a test target [#1150](https://github.com/yonaskolb/XcodeGen/issues/1150) @KrisRJack +- Added the option to specify a `location` in a test target #1150 @KrisRJack ### Changed -- Speed up source inclusion checking for big projects [#1122](https://github.com/yonaskolb/XcodeGen/pull/1122) @PaulTaykalo +- Speed up source inclusion checking for big projects #1122 @PaulTaykalo [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.25.0...2.26.0) ## 2.25.0 ### Added -- Allow specifying a `copy` setting for each dependency. [#1038](https://github.com/yonaskolb/XcodeGen/pull/1039) @JakubBednar +- Allow specifying a `copy` setting for each dependency. #1038 @JakubBednar ### Fixed -- Fix broken codesign option for bundle dependency [#1104](https://github.com/yonaskolb/XcodeGen/pull/1104) @kateinoigakukun -- Ensure fileTypes are mapped to JSON value [#1112](https://github.com/yonaskolb/XcodeGen/pull/1112) @namolnad -- Fix platform filter for package dependecies [#1123](https://github.com/yonaskolb/XcodeGen/pull/1123) @raptorxcz -- Fix Xcode 13 build [#1130](https://github.com/yonaskolb/XcodeGen/issues/1127) @raptorxcz @mthole +- Fix broken codesign option for bundle dependency #1104 @kateinoigakukun +- Ensure fileTypes are mapped to JSON value #1112 @namolnad +- Fix platform filter for package dependecies #1123 @raptorxcz +- Fix Xcode 13 build #1130 @raptorxcz @mthole [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.24.0...2.25.0) ### Changed -- Update XcodeProj to 8.2.0 [#1125](https://github.com/yonaskolb/XcodeGen/pull/1125) @nnsnodnb +- Update XcodeProj to 8.2.0 #1125 @nnsnodnb ## 2.24.0 ### Added -- Added support for DocC Catalogs [#1091](https://github.com/yonaskolb/XcodeGen/pull/1091) @brevansio -- Added support for "driver-extension" and "system-extension" product types [#1092](https://github.com/yonaskolb/XcodeGen/issues/1092) @vgorloff -- Add support for conditionally linking dependencies for specific platforms [#1087](https://github.com/yonaskolb/XcodeGen/pull/1087) @daltonclaybrook -- Add ability to specify UI testing screenshot behavior in test schemes [#942](https://github.com/yonaskolb/XcodeGen/pull/942) @daltonclaybrook +- Added support for DocC Catalogs #1091 @brevansio +- Added support for "driver-extension" and "system-extension" product types #1092 @vgorloff +- Add support for conditionally linking dependencies for specific platforms #1087 @daltonclaybrook +- Add ability to specify UI testing screenshot behavior in test schemes #942 @daltonclaybrook ### Changed -- **Breaking**: Rename the `platform` field on `Dependency` to `platformFilter` [#1087](https://github.com/yonaskolb/XcodeGen/pull/1087) @daltonclaybrook +- **Breaking**: Rename the `platform` field on `Dependency` to `platformFilter` #1087 @daltonclaybrook [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.23.1...2.24.0) @@ -82,450 +82,450 @@ ### Changed - Reverted "Change FRAMEWORK_SEARCH_PATH for xcframeworks (#1015)", introduced in 2.20.0. XCFrameworks need to be - referenced directly in the project for Xcode's build system to extract the appropriate frameworks [#1081](https://github.com/yonaskolb/XcodeGen/pull/1081) @elliottwilliams + referenced directly in the project for Xcode's build system to extract the appropriate frameworks #1081 @elliottwilliams [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.23.0...2.23.1) ## 2.23.0 #### Added -- Added ability to set custom platform for dependency [#934](https://github.com/yonaskolb/XcodeGen/pull/934) @raptorxcz +- Added ability to set custom platform for dependency #934 @raptorxcz #### Fixed -- Added `()` to config variant trimming charater set to fix scheme config variant lookups for some configs like `Debug (Development)` that broke in 2.22.0 [#1078](https://github.com/yonaskolb/XcodeGen/pull/1078) @DavidWoohyunLee -- Fixed Linux builds on Swift 5.4 [#1083](https://github.com/yonaskolb/XcodeGen/pull/1083) @yonaskolb +- Added `()` to config variant trimming charater set to fix scheme config variant lookups for some configs like `Debug (Development)` that broke in 2.22.0 #1078 @DavidWoohyunLee +- Fixed Linux builds on Swift 5.4 #1083 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.22.0...2.23.0) ## 2.22.0 #### Added -- Support `runPostActionsOnFailure` for running build post scripts on failing build [#1075](https://github.com/yonaskolb/XcodeGen/pull/1075) @freddi-kit +- Support `runPostActionsOnFailure` for running build post scripts on failing build #1075 @freddi-kit #### Changed -- Xcode no longer alerts to project changes after regeneration, due to internal workspace not regenerating if identical [#1072](https://github.com/yonaskolb/XcodeGen/pull/1072) @yonaskolb +- Xcode no longer alerts to project changes after regeneration, due to internal workspace not regenerating if identical #1072 @yonaskolb #### Fixed -- Fixed no such module `DOT` error when package is used as a dependency [#1067](https://github.com/yonaskolb/XcodeGen/pull/1067) @yanamura -- Fixed scheme config variant lookups for some configs like `ProdDebug` and `Prod-Debug` that broke in 2.21.0 [#1070](https://github.com/yonaskolb/XcodeGen/pull/1070) @yonaskolb +- Fixed no such module `DOT` error when package is used as a dependency #1067 @yanamura +- Fixed scheme config variant lookups for some configs like `ProdDebug` and `Prod-Debug` that broke in 2.21.0 #1070 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.21.0...2.22.0) ## 2.21.0 #### Added -- Support weak link for Swift Package Dependency [#1064](https://github.com/yonaskolb/XcodeGen/pull/1064) @freddi-kit +- Support weak link for Swift Package Dependency #1064 @freddi-kit #### Changed -- Carthage frameworks are no longer embedded for "order-only" target dependencies. This avoid redundant embeds in situations where a target's sources _import_ a Carthage framework but do not have a binary dependency on it (like a test target which runs in a host app). [#1041](https://github.com/yonaskolb/XcodeGen/pull/1041) @elliottwilliams +- Carthage frameworks are no longer embedded for "order-only" target dependencies. This avoid redundant embeds in situations where a target's sources _import_ a Carthage framework but do not have a binary dependency on it (like a test target which runs in a host app). #1041 @elliottwilliams #### Fixed -- The `Core` target is renamed to avoid collisions with other packages. [#1057](https://github.com/yonaskolb/XcodeGen/pull/1057) @elliottwilliams -- Lookup scheme config variants by whole words, fixing incorrect assignment in names that contain subtrings of each other (eg PreProd and Prod) [#976](https://github.com/yonaskolb/XcodeGen/pull/976) @stefanomondino +- The `Core` target is renamed to avoid collisions with other packages. #1057 @elliottwilliams +- Lookup scheme config variants by whole words, fixing incorrect assignment in names that contain subtrings of each other (eg PreProd and Prod) #976 @stefanomondino [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.20.0...2.21.0) ## 2.20.0 #### Added -- Allow specifying a `github` name like `JohnSundell/Ink` instead of a full `url` for Swift Packages [#1029](https://github.com/yonaskolb/XcodeGen/pull/1029) @yonaskolb +- Allow specifying a `github` name like `JohnSundell/Ink` instead of a full `url` for Swift Packages #1029 @yonaskolb - Added explicity `LastUpgradeCheck` and `LastUpgradeVersion` override support so it's possible to override these properties without using the `project.xcodeVersion`. [1013](https://github.com/yonaskolb/XcodeGen/pull/1013) @Andre113 -- Added `macroExpansion` for `run` in `schemes` [#1036](https://github.com/yonaskolb/XcodeGen/pull/1036) @freddi-kit -- Added `askForAppToLaunch` for `profile` in `schemes` [#1035](https://github.com/yonaskolb/XcodeGen/pull/1035) @freddi-kit -- Added support for selectedTests in schemes `Test` configuration. [#913](https://github.com/yonaskolb/XcodeGen/pull/913) @ooodin +- Added `macroExpansion` for `run` in `schemes` #1036 @freddi-kit +- Added `askForAppToLaunch` for `profile` in `schemes` #1035 @freddi-kit +- Added support for selectedTests in schemes `Test` configuration. #913 @ooodin #### Fixed -- Fixed regression on `.storekit` configuration files' default build phase. [#1026](https://github.com/yonaskolb/XcodeGen/pull/1026) @jcolicchio -- Fixed framework search paths when using `.xcframework`s. [#1015](https://github.com/yonaskolb/XcodeGen/pull/1015) @FranzBusch -- Fixed bug where schemes without a build target would crash instead of displaying an error [#1040](https://github.com/yonaskolb/XcodeGen/pull/1040) @dalemyers -- Fixed files with names ending in **Info.plist** (such as **GoogleServices-Info.plist**) from being omitted from the Copy Resources build phase. Now, only the resolved info plist file for each specific target is omitted. [#1027](https://github.com/yonaskolb/XcodeGen/pull/1027) @liamnichols +- Fixed regression on `.storekit` configuration files' default build phase. #1026 @jcolicchio +- Fixed framework search paths when using `.xcframework`s. #1015 @FranzBusch +- Fixed bug where schemes without a build target would crash instead of displaying an error #1040 @dalemyers +- Fixed files with names ending in **Info.plist** (such as **GoogleServices-Info.plist**) from being omitted from the Copy Resources build phase. Now, only the resolved info plist file for each specific target is omitted. #1027 @liamnichols #### Internal -- Build universal binaries for release. XcodeGen now runs natively on Apple Silicon. [#1024](https://github.com/yonaskolb/XcodeGen/pull/1024) @thii +- Build universal binaries for release. XcodeGen now runs natively on Apple Silicon. #1024 @thii [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.19.0...2.20.0) ## 2.19.0 #### Added -- Added support for building and running on Linux platforms. Tested for compatibility with Swift 5.3+ and Ubuntu 18.04. [#988](https://github.com/yonaskolb/XcodeGen/pull/988) @elliottwilliams -- Added `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. [#961](https://github.com/yonaskolb/XcodeGen/pull/961) @liamnichols -- Added `storeKitConfiguration` to allow specifying StoreKit Configuration in Scheme and TargetScheme, supporting either xcodeproj or xcworkspace via `schemePathPrefix` option. [#964](https://github.com/yonaskolb/XcodeGen/pull/964) @jcolicchio -- Added more detailed error message with method arguments. [#990](https://github.com/yonaskolb/XcodeGen/pull/990) @bannzai -- Added `basedOnDependencyAnalysis` to Project Spec Build Script to be able to choose not to skip the script. [#992](https://github.com/yonaskolb/XcodeGen/pull/992) @myihsan -- Added `BuildRule.runOncePerArchitecture` to allow running build rules once per architecture. [#950](https://github.com/yonaskolb/XcodeGen/pull/950) @sascha -- Added discovered dependency file for a build script [#1012](https://github.com/yonaskolb/XcodeGen/pull/1012) @polac24 @fggeraissate +- Added support for building and running on Linux platforms. Tested for compatibility with Swift 5.3+ and Ubuntu 18.04. #988 @elliottwilliams +- Added `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. #961 @liamnichols +- Added `storeKitConfiguration` to allow specifying StoreKit Configuration in Scheme and TargetScheme, supporting either xcodeproj or xcworkspace via `schemePathPrefix` option. #964 @jcolicchio +- Added more detailed error message with method arguments. #990 @bannzai +- Added `basedOnDependencyAnalysis` to Project Spec Build Script to be able to choose not to skip the script. #992 @myihsan +- Added `BuildRule.runOncePerArchitecture` to allow running build rules once per architecture. #950 @sascha +- Added discovered dependency file for a build script #1012 @polac24 @fggeraissate #### Changed -- **Breaking**: Info.plists with custom prefixes are no longer added to the Copy Bundle Resources build phase [#945](https://github.com/yonaskolb/XcodeGen/pull/945) @anivaros -- **Breaking**: `workingDirectory` of included legacy targets is now made relative to including project [#981](https://github.com/yonaskolb/XcodeGen/pull/981) @jcolicchio -- **Breaking**: Make `simulateLocation` respect `schemePathPrefix` option. [#973](https://github.com/yonaskolb/XcodeGen/pull/973) @jcolicchio +- **Breaking**: Info.plists with custom prefixes are no longer added to the Copy Bundle Resources build phase #945 @anivaros +- **Breaking**: `workingDirectory` of included legacy targets is now made relative to including project #981 @jcolicchio +- **Breaking**: Make `simulateLocation` respect `schemePathPrefix` option. #973 @jcolicchio #### Fixed -- Fixed error message output for `minimumXcodeGenVersion`. [#967](https://github.com/yonaskolb/XcodeGen/pull/967) @joshwalker -- Remove force-unwrapping causing crash for `LegacyTarget`s [#982](https://github.com/yonaskolb/XcodeGen/pull/982) @jcolicchio -- Fixed a race condition in an internal JSON decoder, which would occasionally fail with an error like `Parsing project spec failed: Error Domain=Unspecified error Code=0`. [#995](https://github.com/yonaskolb/XcodeGen/pull/995) @elliottwilliams -- Fixed issue where frameworks with `MACH_O_TYPE: staticlib` were being incorrectly embedded. [#1003](https://github.com/yonaskolb/XcodeGen/pull/1003) @mrabiciu +- Fixed error message output for `minimumXcodeGenVersion`. #967 @joshwalker +- Remove force-unwrapping causing crash for `LegacyTarget`s #982 @jcolicchio +- Fixed a race condition in an internal JSON decoder, which would occasionally fail with an error like `Parsing project spec failed: Error Domain=Unspecified error Code=0`. #995 @elliottwilliams +- Fixed issue where frameworks with `MACH_O_TYPE: staticlib` were being incorrectly embedded. #1003 @mrabiciu #### Internal -- Updated to Yams 4.0.0 [#984](https://github.com/yonaskolb/XcodeGen/pull/984) @swiftty +- Updated to Yams 4.0.0 #984 @swiftty [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.18.0...2.19.0) ## 2.18.0 #### Added -- Add `Scheme.Test.TestTarget.skipped` to allow skipping of an entire test target. [#916](https://github.com/yonaskolb/XcodeGen/pull/916) @codeman9 -- Added ability to set custom LLDBInit scripts for launch and test schemes [#929](https://github.com/yonaskolb/XcodeGen/pull/929) @polac24 -- Adds App Clip support. [#909](https://github.com/yonaskolb/XcodeGen/pull/909) @brentleyjones @dflems -- Application extension schemes now default to `launchAutomaticallySubstyle = 2` and the correct debugger and launcher identifiers [#932](https://github.com/yonaskolb/XcodeGen/pull/932) @brentleyjones -- Updated SettingsPresets to use new defaults from Xcode 12. [#953](https://github.com/yonaskolb/XcodeGen/pull/953) @liamnichols -- Enable Base Internationalization by default as per Xcode 12 behavior. [#954](https://github.com/yonaskolb/XcodeGen/issues/954) @liamnichols +- Add `Scheme.Test.TestTarget.skipped` to allow skipping of an entire test target. #916 @codeman9 +- Added ability to set custom LLDBInit scripts for launch and test schemes #929 @polac24 +- Adds App Clip support. #909 @brentleyjones @dflems +- Application extension schemes now default to `launchAutomaticallySubstyle = 2` and the correct debugger and launcher identifiers #932 @brentleyjones +- Updated SettingsPresets to use new defaults from Xcode 12. #953 @liamnichols +- Enable Base Internationalization by default as per Xcode 12 behavior. #954 @liamnichols #### Changed -- Change default project version to Xcode 12 [#960](https://github.com/yonaskolb/XcodeGen/pull/960) @yonaskolb +- Change default project version to Xcode 12 #960 @yonaskolb #### Internal -- Updates CI to run on Xcode 12. [#936](https://github.com/yonaskolb/XcodeGen/pull/936) [#960](https://github.com/yonaskolb/XcodeGen/pull/960) @dflems @yonaskolb +- Updates CI to run on Xcode 12. #936 @dflems @yonaskolb #### Fixed -- Select the first runnable build target, if present. [#957](https://github.com/yonaskolb/XcodeGen/pull/957) @codeman9 -- Allow SDK dependencies to be embedded. [#922](https://github.com/yonaskolb/XcodeGen/pull/922) @k-thorat -- Allow creating intermediary groups outside of the project directory. [#892](https://github.com/yonaskolb/XcodeGen/pull/892) @segiddins -- Fix appex's Runpath Search Paths under macOS target. [#952](https://github.com/yonaskolb/XcodeGen/pull/952) @rinsuki -- `onlyCopyFilesOnInstall` is extended for the Embed App Extensions build phase. [#948](https://github.com/yonaskolb/XcodeGen/pull/948) @RomanPodymov +- Select the first runnable build target, if present. #957 @codeman9 +- Allow SDK dependencies to be embedded. #922 @k-thorat +- Allow creating intermediary groups outside of the project directory. #892 @segiddins +- Fix appex's Runpath Search Paths under macOS target. #952 @rinsuki +- `onlyCopyFilesOnInstall` is extended for the Embed App Extensions build phase. #948 @RomanPodymov [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.17.0...2.18.0) ## 2.17.0 #### Added -- Added `options.fileTypes` which lets you set cross project defaults for certain file extensions [#914](https://github.com/yonaskolb/XcodeGen/pull/914) @yonaskolb -- Added `onlyCopyFilesOnInstall` option to targets for the Embed Files build phase. [#912](https://github.com/yonaskolb/XcodeGen/pull/912) @jsorge +- Added `options.fileTypes` which lets you set cross project defaults for certain file extensions #914 @yonaskolb +- Added `onlyCopyFilesOnInstall` option to targets for the Embed Files build phase. #912 @jsorge #### Fixed -- Treat all directories with known UTI as file wrapper. [#896](https://github.com/yonaskolb/XcodeGen/pull/896) @KhaosT -- Generated schemes for application extensions now contain `wasCreatedForAppExtension = YES`. [#898](https://github.com/yonaskolb/XcodeGen/issues/898) @muizidn -- Allow package dependencies to use `link: false` [#920](https://github.com/yonaskolb/XcodeGen/pull/920) @k-thorat -- Fixed issue computing relative paths. [#915](https://github.com/yonaskolb/XcodeGen/pull/915) @andrewreach +- Treat all directories with known UTI as file wrapper. #896 @KhaosT +- Generated schemes for application extensions now contain `wasCreatedForAppExtension = YES`. #898 @muizidn +- Allow package dependencies to use `link: false` #920 @k-thorat +- Fixed issue computing relative paths. #915 @andrewreach #### Internal -- Updated to XcodeProj 7.13.0 [#908](https://github.com/yonaskolb/XcodeGen/pull/908) @brentleyjones +- Updated to XcodeProj 7.13.0 #908 @brentleyjones [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.16.0...2.17.0) ## 2.16.0 #### Added -- Improve speed of metadata parsing and dependency resolution. [#803](https://github.com/yonaskolb/XcodeGen/pull/803) @michaeleisel -- Improve support for iOS sticker packs and add support for `launchAutomaticallySubstyle` to run schemes. [#824](https://github.com/yonaskolb/XcodeGen/pull/824) @scelis -- Add --project-root option to generate command. [#828](https://github.com/yonaskolb/XcodeGen/pull/828) @ileitch -- Add an ability to set an order of groups with `options.groupOrdering` [#613](https://github.com/yonaskolb/XcodeGen/pull/613) @Beniamiiin -- Add the ability to output a dependency graph in graphviz format [#852](https://github.com/yonaskolb/XcodeGen/pull/852) @jeffctown -- Adds uncluttering the project manifest dumped to YAML from empty values [#858](https://github.com/yonaskolb/XcodeGen/pull/858) @paciej00 -- Added ability to name the executable target when declaring schemes. [#869](https://github.com/yonaskolb/XcodeGen/pull/869) @elland -- Added ability to set executable to Ask to Launch. [#871](https://github.com/yonaskolb/XcodeGen/pull/871) @pinda +- Improve speed of metadata parsing and dependency resolution. #803 @michaeleisel +- Improve support for iOS sticker packs and add support for `launchAutomaticallySubstyle` to run schemes. #824 @scelis +- Add --project-root option to generate command. #828 @ileitch +- Add an ability to set an order of groups with `options.groupOrdering` #613 @Beniamiiin +- Add the ability to output a dependency graph in graphviz format #852 @jeffctown +- Adds uncluttering the project manifest dumped to YAML from empty values #858 @paciej00 +- Added ability to name the executable target when declaring schemes. #869 @elland +- Added ability to set executable to Ask to Launch. #871 @pinda #### Fixed -- Fixed issue when linking and embeding static frameworks: they should be linked and NOT embed. [#820](https://github.com/yonaskolb/XcodeGen/pull/820) @acecilia -- Fixed issue when generating projects for paths with a dot in the folder for swift sources. [#826](https://github.com/yonaskolb/XcodeGen/pull/826) @asifmohd -- Prefix static library target filenames with 'lib' to match Xcode. [#831](https://github.com/yonaskolb/XcodeGen/pull/831), [#842](https://github.com/yonaskolb/XcodeGen/pull/842) @ileitch -- Fixed duplicate addition of carthage static frameworks. [#829](https://github.com/yonaskolb/XcodeGen/pull/829) @funzin -- Fix handling of SWIFT_INSTALL_OBJC_HEADER when its value is YES/NO. [#827](https://github.com/yonaskolb/XcodeGen/pull/827) @ileitch -- Set `preActions` and `postActions` on the `build` action of a TargetScheme instead of the other actions. [#823](https://github.com/yonaskolb/XcodeGen/pull/823) @brentleyjones -- Prevent test targets from being set as a scheme's launch action [#835](https://github.com/yonaskolb/XcodeGen/pull/835) @brentleyjones -- Implicitly include bundles in the Copy Bundle Resources build phase. [#838](https://github.com/yonaskolb/XcodeGen/pull/838) @skirchmeier -- Fixed dumping a project manifest which contains an array of project references [#840](https://github.com/yonaskolb/XcodeGen/pull/840) @paciej00 -- Generate correct PBXTargetDependency for external targets. [#843](https://github.com/yonaskolb/XcodeGen/pull/843) @ileitch -- Fix linking of multiple products from the same Swift Package [#830](https://github.com/yonaskolb/XcodeGen/pull/830) @toshi0383 -- Don't deduplicate files in `include` with different path but same name. [#849](https://github.com/yonaskolb/XcodeGen/pull/849) @akkyie -- Don't link transitive static carthage libraries. [#853](https://github.com/yonaskolb/XcodeGen/pull/853) @akkyie -- Optimize simplifying paths for faster project generation. [#857](https://github.com/yonaskolb/XcodeGen/pull/857) @akkyie -- Fixed issue where wrapper folders may not include correctly in the generated project. [#862](https://github.com/yonaskolb/XcodeGen/pull/862) @KhaosT -- Compile `xcmappingmodel` files instead of copying bundle resources. [#834](https://github.com/yonaskolb/XcodeGen/pull/834) @jcolicchio -- Fixed issue where `Complie Sources` build phase is generated for resource bundles even when they have no files to compile [#878](https://github.com/yonaskolb/XcodeGen/pull/878) @nkukushkin +- Fixed issue when linking and embeding static frameworks: they should be linked and NOT embed. #820 @acecilia +- Fixed issue when generating projects for paths with a dot in the folder for swift sources. #826 @asifmohd +- Prefix static library target filenames with 'lib' to match Xcode. #831 @ileitch +- Fixed duplicate addition of carthage static frameworks. #829 @funzin +- Fix handling of SWIFT_INSTALL_OBJC_HEADER when its value is YES/NO. #827 @ileitch +- Set `preActions` and `postActions` on the `build` action of a TargetScheme instead of the other actions. #823 @brentleyjones +- Prevent test targets from being set as a scheme's launch action #835 @brentleyjones +- Implicitly include bundles in the Copy Bundle Resources build phase. #838 @skirchmeier +- Fixed dumping a project manifest which contains an array of project references #840 @paciej00 +- Generate correct PBXTargetDependency for external targets. #843 @ileitch +- Fix linking of multiple products from the same Swift Package #830 @toshi0383 +- Don't deduplicate files in `include` with different path but same name. #849 @akkyie +- Don't link transitive static carthage libraries. #853 @akkyie +- Optimize simplifying paths for faster project generation. #857 @akkyie +- Fixed issue where wrapper folders may not include correctly in the generated project. #862 @KhaosT +- Compile `xcmappingmodel` files instead of copying bundle resources. #834 @jcolicchio +- Fixed issue where `Complie Sources` build phase is generated for resource bundles even when they have no files to compile #878 @nkukushkin [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.15.1...2.16.0) ## 2.15.1 #### Fixed -- Fixed issue which caused watch app schemes to be generated incorrectly, preventing these apps from launching. [#798](https://github.com/yonaskolb/XcodeGen/pull/798) @daltonclaybrook -- Added build presets for the target type `framework.static`. [#819](https://github.com/yonaskolb/XcodeGen/pull/819) @acecilia -- Fixed XcodeProj resolution and updated to 7.10.0 [#822](https://github.com/yonaskolb/XcodeGen/pull/822) @soffes +- Fixed issue which caused watch app schemes to be generated incorrectly, preventing these apps from launching. #798 @daltonclaybrook +- Added build presets for the target type `framework.static`. #819 @acecilia +- Fixed XcodeProj resolution and updated to 7.10.0 #822 @soffes [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.15.0...2.15.1) ## 2.15.0 #### Added -- Add support for local Swift Packages in `packages` using `path`. [#808](https://github.com/yonaskolb/XcodeGen/pull/808) @freddi-kit -- Add `buildImplicitDependencies` as an option on `TargetScheme`. [#810](https://github.com/yonaskolb/XcodeGen/pull/810) @evandcoleman +- Add support for local Swift Packages in `packages` using `path`. #808 @freddi-kit +- Add `buildImplicitDependencies` as an option on `TargetScheme`. #810 @evandcoleman #### Fixed -- Fixed resolving path to local Swift Packages [#796](https://github.com/yonaskolb/XcodeGen/pull/796) @freddi-kit -- Added ability to stop on every main thread checker issue on Run schemes and TargetSchemes [#799](https://github.com/yonaskolb/XcodeGen/pull/799) @ionutivan -- Avoid copying ObjC interface header when SWIFT_INSTALL_OBJC_HEADER=false. [#805](https://github.com/yonaskolb/XcodeGen/pull/805) @kateinoigakukun +- Fixed resolving path to local Swift Packages #796 @freddi-kit +- Added ability to stop on every main thread checker issue on Run schemes and TargetSchemes #799 @ionutivan +- Avoid copying ObjC interface header when SWIFT_INSTALL_OBJC_HEADER=false. #805 @kateinoigakukun [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.14.0...2.15.0) ## 2.14.0 #### Added -- Add ability to embed and code sign Swift package dependencies with dynamic products. [#788](https://github.com/yonaskolb/XcodeGen/pull/788) @alexruperez +- Add ability to embed and code sign Swift package dependencies with dynamic products. #788 @alexruperez #### Fixed -- Revert "Add Base to known regions even if one doesn't exist" [#791](https://github.com/yonaskolb/XcodeGen/pull/792) @bryansum -- Set `defaultConfigurationName` for every target which is defined in a project. [#787](https://github.com/yonaskolb/XcodeGen/pull/787) @ken0nek -- Set `TEST_TARGET_NAME` only when a project has UITest bundle. [#792](https://github.com/yonaskolb/XcodeGen/pull/792) @ken0nek -- Set xcodeproj path in project.xcworkspace/contents.xcworkspacedata [#793](https://github.com/yonaskolb/XcodeGen/pull/793) @ken0nek +- Revert "Add Base to known regions even if one doesn't exist" #791 @bryansum +- Set `defaultConfigurationName` for every target which is defined in a project. #787 @ken0nek +- Set `TEST_TARGET_NAME` only when a project has UITest bundle. #792 @ken0nek +- Set xcodeproj path in project.xcworkspace/contents.xcworkspacedata #793 @ken0nek [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.13.1...2.14.0) ## 2.13.1 #### Fixed -- Validate scheme test action and test coverage target references before generating. [#775](https://github.com/yonaskolb/XcodeGen/pull/775) @liamnichols -- Fixed parsing prerelease identifiers in Swift package versions [#779](https://github.com/yonaskolb/XcodeGen/pull/779) @yonaskolb -- Fixed using legacy targets as dependencies [#778](https://github.com/yonaskolb/XcodeGen/pull/778) @yonaskolb +- Validate scheme test action and test coverage target references before generating. #775 @liamnichols +- Fixed parsing prerelease identifiers in Swift package versions #779 @yonaskolb +- Fixed using legacy targets as dependencies #778 @yonaskolb #### Internal -- Updated to XcodeProj 7.8.0 [#777](https://github.com/yonaskolb/XcodeGen/pull/777) @yonaskolb -- Use https://github.com/mxcl/Version [#779](https://github.com/yonaskolb/XcodeGen/pull/779) @yonaskolb +- Updated to XcodeProj 7.8.0 #777 @yonaskolb +- Use https://github.com/mxcl/Version #779 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.13.0...2.13.1) ## 2.13.0 #### Added -- Support External Target References via subprojects. [#701](https://github.com/yonaskolb/XcodeGen/pull/701) @evandcoleman +- Support External Target References via subprojects. #701 @evandcoleman #### Fixed -- Fixed compilation as library by locking down XcodeProj version [#767](https://github.com/yonaskolb/XcodeGen/pull/767) @yonaskolb -- Stabilized sorting of groups with duplicate names/paths. [#671](https://github.com/yonaskolb/XcodeGen/pull/671) @ChristopherRogers -- Moved `Copy Bundle Resources` to after `Link with Libraries` build phase [#768](https://github.com/yonaskolb/XcodeGen/pull/768) @yonaskolb +- Fixed compilation as library by locking down XcodeProj version #767 @yonaskolb +- Stabilized sorting of groups with duplicate names/paths. #671 @ChristopherRogers +- Moved `Copy Bundle Resources` to after `Link with Libraries` build phase #768 @yonaskolb #### Internal -- Updated to XcodeProj 7.7.0 [#767](https://github.com/yonaskolb/XcodeGen/pull/767) @yonaskolb +- Updated to XcodeProj 7.7.0 #767 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.12.0...2.13.0) ## 2.12.0 #### Added -- Added pre and post command options. Useful for running `pod install` in combination with `--use-cache` [#759](https://github.com/yonaskolb/XcodeGen/pull/759) @yonaskolb -- Support for language and region settings on a target basis [#728](https://github.com/yonaskolb/XcodeGen/pull/728) @FranzBusch -- Added option to generate only Info.plist files with `--only-plists` [#739](https://github.com/yonaskolb/XcodeGen/pull/739) @namolnad -- Added the option to specify a `simulateLocation` in a scheme [#722](https://github.com/yonaskolb/XcodeGen/issues/722) @basvankuijck -- Support for On Demand Resources tags [#753](https://github.com/yonaskolb/XcodeGen/pull/753) @sipao +- Added pre and post command options. Useful for running `pod install` in combination with `--use-cache` #759 @yonaskolb +- Support for language and region settings on a target basis #728 @FranzBusch +- Added option to generate only Info.plist files with `--only-plists` #739 @namolnad +- Added the option to specify a `simulateLocation` in a scheme #722 @basvankuijck +- Support for On Demand Resources tags #753 @sipao #### Fixed -- Fixed resolving a relative path for `projectReference.path` [#740](https://github.com/yonaskolb/XcodeGen/pull/740) @kateinoigakukun -- Don't add framework dependency's directory to `FRAMEWORK_SEARCH_PATHS` if it is implicit [#744](https://github.com/yonaskolb/XcodeGen/pull/744) @ikesyo @yutailang0119 -- Fixed resolving relative path passed to `XcodeProj` [#751](https://github.com/yonaskolb/XcodeGen/pull/751) @PycKamil -- Prefer configurations named "Debug" or "Release" for default scheme build configurations [#752](https://github.com/yonaskolb/XcodeGen/pull/752) @john-flanagan -- Added an extra check for package versions. [#755](https://github.com/yonaskolb/XcodeGen/pull/755) @basvankuijck +- Fixed resolving a relative path for `projectReference.path` #740 @kateinoigakukun +- Don't add framework dependency's directory to `FRAMEWORK_SEARCH_PATHS` if it is implicit #744 @ikesyo @yutailang0119 +- Fixed resolving relative path passed to `XcodeProj` #751 @PycKamil +- Prefer configurations named "Debug" or "Release" for default scheme build configurations #752 @john-flanagan +- Added an extra check for package versions. #755 @basvankuijck #### Internal -- Update to SwiftCLI 6.0 and use the new property wrappers [#749](https://github.com/yonaskolb/XcodeGen/pull/749) @yonaskolb +- Update to SwiftCLI 6.0 and use the new property wrappers #749 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.11.0...2.12.0) ## 2.11.0 #### Added -- Add Carthage static framework dependencies support. [#688](https://github.com/yonaskolb/XcodeGen/pull/688) @giginet -- Added `xcodegen dump` command [#710](https://github.com/yonaskolb/XcodeGen/pull/710) @yonaskolb -- Added `--no-env` option to disable environment variables expansion [#704](https://github.com/yonaskolb/XcodeGen/pull/704) @rcari -- Added custom group support for target sources [#621](https://github.com/yonaskolb/XcodeGen/pull/621) @sroebert @rcari -- Added new dependency type, `bundle`. This allows targets to copy bundles from other projects [#616](https://github.com/yonaskolb/XcodeGen/pull/616) @bsmith11 +- Add Carthage static framework dependencies support. #688 @giginet +- Added `xcodegen dump` command #710 @yonaskolb +- Added `--no-env` option to disable environment variables expansion #704 @rcari +- Added custom group support for target sources #621 @sroebert @rcari +- Added new dependency type, `bundle`. This allows targets to copy bundles from other projects #616 @bsmith11 #### Fixed -- Improved variable expansion runtime [#704](https://github.com/yonaskolb/XcodeGen/pull/704) @rcari -- Fixed missing headers for static framework targets [#705](https://github.com/yonaskolb/XcodeGen/pull/705) @wag-miles -- Using more file types from XcodeProj for PBXFileReferences resulting in less project diffs [#715](https://github.com/yonaskolb/XcodeGen/pull/715) @yonaskolb -- Fixed localized `*.intentdefinition` not being added to build source phases [#720](https://github.com/yonaskolb/XcodeGen/pull/720) @giginet -- Fixed `selectedLauncherIdentifier` not being set `Xcode.IDEFoundation.Launcher.PosixSpawn` when `debugEnabled: false` is defined in test action [#725](https://github.com/yonaskolb/XcodeGen/pull/725) @ken0nek -- Fixed unnecessary dependencies related to SwiftPM [#726](https://github.com/yonaskolb/XcodeGen/pull/726) @tid-kijyun +- Improved variable expansion runtime #704 @rcari +- Fixed missing headers for static framework targets #705 @wag-miles +- Using more file types from XcodeProj for PBXFileReferences resulting in less project diffs #715 @yonaskolb +- Fixed localized `*.intentdefinition` not being added to build source phases #720 @giginet +- Fixed `selectedLauncherIdentifier` not being set `Xcode.IDEFoundation.Launcher.PosixSpawn` when `debugEnabled: false` is defined in test action #725 @ken0nek +- Fixed unnecessary dependencies related to SwiftPM #726 @tid-kijyun #### Changed -- Deprecated `$old_form` variables in favor of `${new_form}` variables [#704](https://github.com/yonaskolb/XcodeGen/pull/704) @rcari -- Updated XcodeProj to 7.4.0 [#709](https://github.com/yonaskolb/XcodeGen/pull/709) [#715](https://github.com/yonaskolb/XcodeGen/pull/715) @yonaskolb -- Updated to Swift 5.1 [#714](https://github.com/yonaskolb/XcodeGen/pull/714) @yonaskolb +- Deprecated `$old_form` variables in favor of `${new_form}` variables #704 @rcari +- Updated XcodeProj to 7.4.0 #709 @yonaskolb +- Updated to Swift 5.1 #714 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.10.1...2.11.0) ## 2.10.1 #### Fixed -- Add Base to knownRegions even if one doesn't exist [#694](https://github.com/yonaskolb/XcodeGen/pull/694) @bryansum -- Fixed missing `onlyGenerateCoverageForSpecifiedTargets` issue [#700](https://github.com/yonaskolb/XcodeGen/pull/700) @kateinoigakukun -- Fixed regression on dependencies `link` flag [#703](https://github.com/yonaskolb/XcodeGen/pull/703) @rcari +- Add Base to knownRegions even if one doesn't exist #694 @bryansum +- Fixed missing `onlyGenerateCoverageForSpecifiedTargets` issue #700 @kateinoigakukun +- Fixed regression on dependencies `link` flag #703 @rcari [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.10.0...2.10.1) ## 2.10.0 #### Added -- Support Target Reference to another project. [#655](https://github.com/yonaskolb/XcodeGen/pull/655) @kateinoigakukun -- Added `coverageTargets` for test target. This enables to gather code coverage for specific targets. [#656](https://github.com/yonaskolb/XcodeGen/pull/656) @kateinoigakukun +- Support Target Reference to another project. #655 @kateinoigakukun +- Added `coverageTargets` for test target. This enables to gather code coverage for specific targets. #656 @kateinoigakukun #### Fixed -- Add base localisation by default even if no base localised files were found. Fixes warning in Xcode 11 [#685](https://github.com/yonaskolb/XcodeGen/pull/685) @yonaskolb -- Don't generate CFBundleExecutable in default generated Info.plist for `bundle` target types [#689](https://github.com/yonaskolb/XcodeGen/pull/689) @FranzBusch -- Fixed resolving relative paths with custom project destination [#681](https://github.com/yonaskolb/XcodeGen/pull/681) @giginet -- Fixed resolving relative paths for Info.plist [#683](https://github.com/yonaskolb/XcodeGen/pull/683) @giginet -- Fixed macOS unit test target TEST_HOST [#696](https://github.com/yonaskolb/XcodeGen/pull/696) @mjarvis +- Add base localisation by default even if no base localised files were found. Fixes warning in Xcode 11 #685 @yonaskolb +- Don't generate CFBundleExecutable in default generated Info.plist for `bundle` target types #689 @FranzBusch +- Fixed resolving relative paths with custom project destination #681 @giginet +- Fixed resolving relative paths for Info.plist #683 @giginet +- Fixed macOS unit test target TEST_HOST #696 @mjarvis #### Internal -- Restructure targets [#698](https://github.com/yonaskolb/XcodeGen/pull/698) @yonaskolb +- Restructure targets #698 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.9.0...2.10.0) ## 2.9.0 #### Added -- Added Scheme Templates [#672](https://github.com/yonaskolb/XcodeGen/pull/672) @bclymer +- Added Scheme Templates #672 @bclymer #### Fixed -- Fixed macOS unit test setting preset [#665](https://github.com/yonaskolb/XcodeGen/pull/665) @yonaskolb -- Add `rcproject` files to sources build phase instead of resources [#669](https://github.com/yonaskolb/XcodeGen/pull/669) @Qusic -- Prefer default configuration names for generated schemes [#673](https://github.com/yonaskolb/XcodeGen/pull/673) @giginet -- Fixed some resource files being placed to "Recovered References" group [#679](https://github.com/yonaskolb/XcodeGen/pull/679) @nivanchikov +- Fixed macOS unit test setting preset #665 @yonaskolb +- Add `rcproject` files to sources build phase instead of resources #669 @Qusic +- Prefer default configuration names for generated schemes #673 @giginet +- Fixed some resource files being placed to "Recovered References" group #679 @nivanchikov #### Internal -- Updated to SwiftCLI 5.3.2 [#667](https://github.com/yonaskolb/XcodeGen/pull/667) @giginet -- Fixed tests in case-sensitive file system [#670](https://github.com/yonaskolb/XcodeGen/pull/670) @Qusic +- Updated to SwiftCLI 5.3.2 #667 @giginet +- Fixed tests in case-sensitive file system #670 @Qusic [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.8.0...2.9.0) ## 2.8.0 #### Added -- Added support for Swift Package dependencies [#624](https://github.com/yonaskolb/XcodeGen/pull/624) @yonaskolb -- Added `includes` to `sources` for a Target. This follows the same glob-style as `excludes` but functions as a way to only include files that match a specified pattern. Useful if you only want a certain file type, for example specifying `**/*.swift`. [#637](https://github.com/yonaskolb/XcodeGen/pull/637) @bclymer -- Support `dylib` SDK. [#650](https://github.com/yonaskolb/XcodeGen/pull/650) @kateinoigakukun -- Added `language` and `region` options for `run` and `test` scheme [#654](https://github.com/yonaskolb/XcodeGen/pull/654) @kateinoigakukun -- Added `debugEnabled` option for `run` and `test` scheme [#657](https://github.com/yonaskolb/XcodeGen/pull/657) @kateinoigakukun +- Added support for Swift Package dependencies #624 @yonaskolb +- Added `includes` to `sources` for a Target. This follows the same glob-style as `excludes` but functions as a way to only include files that match a specified pattern. Useful if you only want a certain file type, for example specifying `**/*.swift`. #637 @bclymer +- Support `dylib` SDK. #650 @kateinoigakukun +- Added `language` and `region` options for `run` and `test` scheme #654 @kateinoigakukun +- Added `debugEnabled` option for `run` and `test` scheme #657 @kateinoigakukun #### Fixed -- Expand template variable in Array of Any [#651](https://github.com/yonaskolb/XcodeGen/pull/651) @kateinoigakukun -- Significantly improve performance when running with a large number files. [#658](https://github.com/yonaskolb/XcodeGen/pull/658) @kateinoigakukun -- Removed some more diffs between the generated .pbxproj and when Xcode resaves it [#663](https://github.com/yonaskolb/XcodeGen/pull/663) @yonaskolb +- Expand template variable in Array of Any #651 @kateinoigakukun +- Significantly improve performance when running with a large number files. #658 @kateinoigakukun +- Removed some more diffs between the generated .pbxproj and when Xcode resaves it #663 @yonaskolb #### Internal -- Removed needless `Array` initialization. [#661](https://github.com/yonaskolb/XcodeGen/pull/661) @RomanPodymov -- Updated to XcodeProj 7.1.0 [#624](https://github.com/yonaskolb/XcodeGen/pull/624) @yonaskolb +- Removed needless `Array` initialization. #661 @RomanPodymov +- Updated to XcodeProj 7.1.0 #624 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.7.0...2.8.0) ## 2.7.0 #### Added -- Added Bash 4 style recursive globbing (`**/*`) in target sources `excludes` [#636](https://github.com/yonaskolb/XcodeGen/pull/636) @bclymer -- Added ability to disable main thread checker in Schemes [#601](https://github.com/yonaskolb/XcodeGen/pull/601) @wag-miles +- Added Bash 4 style recursive globbing (`**/*`) in target sources `excludes` #636 @bclymer +- Added ability to disable main thread checker in Schemes #601 @wag-miles #### Fixed -- Fixed included specs that were referenced multiple times from duplicating content [#599](https://github.com/yonaskolb/XcodeGen/pull/599) @haritowa -- Fixed `.orig` files being added to the project [#627](https://github.com/yonaskolb/XcodeGen/pull/627) @keith +- Fixed included specs that were referenced multiple times from duplicating content #599 @haritowa +- Fixed `.orig` files being added to the project #627 @keith #### Changed -- Allow linking of dependencies into static libraries when `link` is set to true [#635](https://github.com/yonaskolb/XcodeGen/pull/635) @kateinoigakukun +- Allow linking of dependencies into static libraries when `link` is set to true #635 @kateinoigakukun [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.6.0...2.7.0) ## 2.6.0 #### Added -- Added ability to skip tests [#582](https://github.com/yonaskolb/XcodeGen/pull/582) @kadarandras -- Added ability to set `attributes` on build files [#583](https://github.com/yonaskolb/XcodeGen/pull/583) @min -- Allow using environment variables in the form of `${SOME_VARIABLE}`. This might be a **breaking** change when a target template attribute is also defined as an environment variable [#594](https://github.com/yonaskolb/XcodeGen/pull/594) @tomquist -- Added support for `watchapp2-container` and `framework.static` product types [#604](https://github.com/yonaskolb/XcodeGen/pull/604) @yonaskolb +- Added ability to skip tests #582 @kadarandras +- Added ability to set `attributes` on build files #583 @min +- Allow using environment variables in the form of `${SOME_VARIABLE}`. This might be a **breaking** change when a target template attribute is also defined as an environment variable #594 @tomquist +- Added support for `watchapp2-container` and `framework.static` product types #604 @yonaskolb #### Fixed -- Fixed `.pch` files being bundled as resources [#597](https://github.com/yonaskolb/XcodeGen/pull/597) @thii -- Fixed an issue that prevents watchOS Intents Extension from running correctly. [#571](https://github.com/yonaskolb/XcodeGen/pull/571) @KhaosT +- Fixed `.pch` files being bundled as resources #597 @thii +- Fixed an issue that prevents watchOS Intents Extension from running correctly. #571 @KhaosT #### Changed -- Updated the default `compatibilityVersion` project setting from `Xcode 9.3` to `Xcode 10.0` [#581](https://github.com/yonaskolb/XcodeGen/pull/581) @acecilia -- Updated to XcodeProj 7.0.0. Note that the length of generated UUIDs has changed [#604](https://github.com/yonaskolb/XcodeGen/pull/604) @yonaskolb +- Updated the default `compatibilityVersion` project setting from `Xcode 9.3` to `Xcode 10.0` #581 @acecilia +- Updated to XcodeProj 7.0.0. Note that the length of generated UUIDs has changed #604 @yonaskolb #### Internal -- Added ability to encode ProjectSpec [#545](https://github.com/yonaskolb/XcodeGen/pull/545) @ryohey +- Added ability to encode ProjectSpec #545 @ryohey [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.5.0...2.6.0) ## 2.5.0 #### Added -- Added support for `app-extension.intents-service` target type [#536](https://github.com/yonaskolb/XcodeGen/pull/536) @yonaskolb -- Added support for custom `root` in `sdk` dependency [#562](https://github.com/yonaskolb/XcodeGen/pull/562) @raptorxcz +- Added support for `app-extension.intents-service` target type #536 @yonaskolb +- Added support for custom `root` in `sdk` dependency #562 @raptorxcz #### Changed -- Updated to xcodeproj 6.7.0 including its performance improvements [#536](https://github.com/yonaskolb/XcodeGen/pull/536) @yonaskolb -- Updated default generated settings for Xcode 10.2 [#555](https://github.com/yonaskolb/XcodeGen/pull/555) @yonaskolb -- Changed order of file generation so that plists are now generated before the project, so they will be included in the projects files [#544](https://github.com/yonaskolb/XcodeGen/issues/544) @tomquist +- Updated to xcodeproj 6.7.0 including its performance improvements #536 @yonaskolb +- Updated default generated settings for Xcode 10.2 #555 @yonaskolb +- Changed order of file generation so that plists are now generated before the project, so they will be included in the projects files #544 @tomquist - Updated Yams to 2.0.0 @yonaskolb #### Fixed -- Fixed groups from sources outside a project spec's directory from being flattened. [#550](https://github.com/yonaskolb/XcodeGen/pull/550) @sroebert -- Fixed `optional` file sources not being added to the project [#557](https://github.com/yonaskolb/XcodeGen/pull/557) @yonaskolb -- Fixed Carthage dependencies being incorrectly embedded in WatchKit app bundles instead of a WatchKit app extension [#558](https://github.com/yonaskolb/XcodeGen/pull/558) @KhaosT +- Fixed groups from sources outside a project spec's directory from being flattened. #550 @sroebert +- Fixed `optional` file sources not being added to the project #557 @yonaskolb +- Fixed Carthage dependencies being incorrectly embedded in WatchKit app bundles instead of a WatchKit app extension #558 @KhaosT [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.4.0...2.5.0) ## 2.4.0 #### Fixed: -- Fixed installation when building in Swift 5 [#549](https://github.com/yonaskolb/XcodeGen/pull/549) @yonaskolb +- Fixed installation when building in Swift 5 #549 @yonaskolb #### Changed -- Updated to Swift 5 and dropped Swift 4.2 [#549](https://github.com/yonaskolb/XcodeGen/pull/549) @yonaskolb +- Updated to Swift 5 and dropped Swift 4.2 #549 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.3.0...2.4.0) ## 2.3.0 #### Added -- Added ability to automatically find all the frameworks for Carthage dependencies via the global `options.findCarthageFrameworks` or dependency specfic `dependency.findFrameworks`. See the [Carthage](Docs/Usage.md#carthage) usage docs for more info [#506](https://github.com/yonaskolb/XcodeGen/pull/506) [#543](https://github.com/yonaskolb/XcodeGen/pull/543) @rpassis @yonaskolb -- Added support for nested target templates [#534](https://github.com/yonaskolb/XcodeGen/pull/534) @tomquist -- Added ability to define `templateAttributes` within a target to be able to parameterize templates. [#533](https://github.com/yonaskolb/XcodeGen/pull/533) @tomquist -- Added ability to set `link` to false in framework dependencies [#532](https://github.com/yonaskolb/XcodeGen/pull/532) @dimatosaurus +- Added ability to automatically find all the frameworks for Carthage dependencies via the global `options.findCarthageFrameworks` or dependency specfic `dependency.findFrameworks`. See the [Carthage](Docs/Usage.md#carthage) usage docs for more info #506 @rpassis @yonaskolb +- Added support for nested target templates #534 @tomquist +- Added ability to define `templateAttributes` within a target to be able to parameterize templates. #533 @tomquist +- Added ability to set `link` to false in framework dependencies #532 @dimatosaurus - Added `missingConfigFiles` to `options.disabledValidations` to optionally skip checking for the existence of config files. -- Added ability to define a per-platform `deploymentTarget` for Multi-Platform targets. [#510](https://github.com/yonaskolb/XcodeGen/pull/510) @ainopara +- Added ability to define a per-platform `deploymentTarget` for Multi-Platform targets. #510 @ainopara #### Changed -- **DEPRECATION**: Placeholders `$target_name` and `$platform` have been deprecated in favour of `${target_name}` and `${platform}`. Support for the old placeholders will be removed in a future version [#533](https://github.com/yonaskolb/XcodeGen/pull/533) @tomquist +- **DEPRECATION**: Placeholders `$target_name` and `$platform` have been deprecated in favour of `${target_name}` and `${platform}`. Support for the old placeholders will be removed in a future version #533 @tomquist #### Fixed -- Sources outside a project spec's directory will be correctly referenced as relative paths in the project file. [#524](https://github.com/yonaskolb/XcodeGen/pull/524) -- Fixed error when `optional` directory source is missing [#527](https://github.com/yonaskolb/XcodeGen/pull/527) @yonaskolb -- Fixed excludes within included spec [#535](https://github.com/yonaskolb/XcodeGen/pull/535) @yonaskolb -- Fixed paths in target templates within included files not being relative [#537](https://github.com/yonaskolb/XcodeGen/pull/537) @yonaskolb -- Fix multi-platform target templates [#541](https://github.com/yonaskolb/XcodeGen/pull/541) @yonaskolb -- Fixed sources in an included target not being relative when the sources are mix of string and dictionaries [#542](https://github.com/yonaskolb/XcodeGen/pull/542) @yonaskolb +- Sources outside a project spec's directory will be correctly referenced as relative paths in the project file. #524 +- Fixed error when `optional` directory source is missing #527 @yonaskolb +- Fixed excludes within included spec #535 @yonaskolb +- Fixed paths in target templates within included files not being relative #537 @yonaskolb +- Fix multi-platform target templates #541 @yonaskolb +- Fixed sources in an included target not being relative when the sources are mix of string and dictionaries #542 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.2.0...2.3.0) ## 2.2.0 #### Added -- Added ability to generate empty directories via `options.generateEmptyDirectories` [#480](https://github.com/yonaskolb/XcodeGen/pull/480) @Beniamiiin -- Added support for the `instrumentsPackage` product type [#482](https://github.com/yonaskolb/XcodeGen/pull/482) @ksulliva -- Added support for `inputFileLists` and `outputFileLists` within project build scripts [#500](https://github.com/yonaskolb/XcodeGen/pull/500) @lukewakeford -- Added support for a `$target_name` replacement string within target templates [#504](https://github.com/yonaskolb/XcodeGen/pull/504) @yonaskolb -- Added `createIntermediateGroups` to individual Target Sources which overrides the top level option [#505](https://github.com/yonaskolb/XcodeGen/pull/505) @yonaskolb +- Added ability to generate empty directories via `options.generateEmptyDirectories` #480 @Beniamiiin +- Added support for the `instrumentsPackage` product type #482 @ksulliva +- Added support for `inputFileLists` and `outputFileLists` within project build scripts #500 @lukewakeford +- Added support for a `$target_name` replacement string within target templates #504 @yonaskolb +- Added `createIntermediateGroups` to individual Target Sources which overrides the top level option #505 @yonaskolb #### Changed -- **BREAKING**: All the paths within `include` files are now relative to that file and not the root spec. This can be disabled with a `relativePaths: false` on the include. See the [documentation](https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#include) for more details [#489](https://github.com/yonaskolb/XcodeGen/pull/489) @ellneal -- Updated the Xcode compatibility version from 3.2 to 9.3 [#497](https://github.com/yonaskolb/XcodeGen/pull/497) @yonaskolb -- Exact matches to config names in build settings won't partial apply to other configs [#503](https://github.com/yonaskolb/XcodeGen/pull/503) @yonaskolb +- **BREAKING**: All the paths within `include` files are now relative to that file and not the root spec. This can be disabled with a `relativePaths: false` on the include. See the [documentation](https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#include) for more details #489 @ellneal +- Updated the Xcode compatibility version from 3.2 to 9.3 #497 @yonaskolb +- Exact matches to config names in build settings won't partial apply to other configs #503 @yonaskolb - UUIDs in the project are standard and don't contain any type prefixes anymore #### Fixed -- Fixed `--project` argument not taking effect [#487](https://github.com/yonaskolb/XcodeGen/pull/487) @monowerker -- Fixed Sticker Packs from generating an empty Source file phase which caused in error in the new build system [#492](https://github.com/yonaskolb/XcodeGen/pull/492) @rpassis -- Fixed generated schemes for tool targets not setting the executable [#496](https://github.com/yonaskolb/XcodeGen/pull/496) @yonaskolb +- Fixed `--project` argument not taking effect #487 @monowerker +- Fixed Sticker Packs from generating an empty Source file phase which caused in error in the new build system #492 @rpassis +- Fixed generated schemes for tool targets not setting the executable #496 @yonaskolb - Fixed resolving Carthage dependencies for iOS app with watchOS target. [465](https://github.com/yonaskolb/XcodeGen/pull/465) @raptorxcz [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.1.0...2.2.0) @@ -533,48 +533,48 @@ ## 2.1.0 #### Added -- Added an experiment new caching feature. Pass `--use-cache` to opt in. This will read and write from a cache file to prevent unnecessarily generating the project. Give it a try as it may become the default in a future release [#412](https://github.com/yonaskolb/XcodeGen/pull/412) @yonaskolb +- Added an experiment new caching feature. Pass `--use-cache` to opt in. This will read and write from a cache file to prevent unnecessarily generating the project. Give it a try as it may become the default in a future release #412 @yonaskolb #### Changed - Changed spelling of build phases to **preBuildPhase** and **postBuildPhase**. The older names are deprecated but still work [402](https://github.com/yonaskolb/XcodeGen/pull/402) @brentleyjones -- Moved generation to a specific subcommand `xcodegen generate`. Simple `xcodegen` will continue to work for now [#437](https://github.com/yonaskolb/XcodeGen/pull/437) @yonaskolb -- If `INFOPLIST_FILE` has been set on a target, then an `info` path won't ovewrite it [#443](https://github.com/yonaskolb/XcodeGen/pull/443) @feischl97 +- Moved generation to a specific subcommand `xcodegen generate`. Simple `xcodegen` will continue to work for now #437 @yonaskolb +- If `INFOPLIST_FILE` has been set on a target, then an `info` path won't ovewrite it #443 @feischl97 #### Fixed -- Fixed XPC Service package type in generated `Info.plist` [#435](https://github.com/yonaskolb/XcodeGen/pull/435) @alvarhansen +- Fixed XPC Service package type in generated `Info.plist` #435 @alvarhansen - Fixed phase ordering for modulemap and static libary header Copy File phases. [402](https://github.com/yonaskolb/XcodeGen/pull/402) @brentleyjones -- Fixed intermittent errors when running multiple `xcodegen`s concurrently [#450](https://github.com/yonaskolb/XcodeGen/pull/450) @bryansum -- Fixed `--project` argument not working [#437](https://github.com/yonaskolb/XcodeGen/pull/437) @yonaskolb -- Fixed unit tests not hooking up to host applications properly by default. They now generate a `TEST_HOST` and a `TestTargetID` [#452](https://github.com/yonaskolb/XcodeGen/pull/452) @yonaskolb -- Fixed static libraries not including external frameworks in their search paths [#454](https://github.com/yonaskolb/XcodeGen/pull/454) @brentleyjones -- Add `.intentdefinition` files to sources build phase instead of resources [#442](https://github.com/yonaskolb/XcodeGen/pull/442) @yonaskolb -- Add `mlmodel` files to sources build phase instead of resources [#457](https://github.com/yonaskolb/XcodeGen/pull/457) @dwb357 +- Fixed intermittent errors when running multiple `xcodegen`s concurrently #450 @bryansum +- Fixed `--project` argument not working #437 @yonaskolb +- Fixed unit tests not hooking up to host applications properly by default. They now generate a `TEST_HOST` and a `TestTargetID` #452 @yonaskolb +- Fixed static libraries not including external frameworks in their search paths #454 @brentleyjones +- Add `.intentdefinition` files to sources build phase instead of resources #442 @yonaskolb +- Add `mlmodel` files to sources build phase instead of resources #457 @dwb357 [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.0.0...2.1.0) ## 2.0.0 #### Added -- Added `weak` linking setting for dependencies [#411](https://github.com/yonaskolb/XcodeGen/pull/411) @alvarhansen -- Added `info` to targets for generating an `Info.plist` [#415](https://github.com/yonaskolb/XcodeGen/pull/415) @yonaskolb -- Added `entitlements` to targets for generating an `.entitlement` file [#415](https://github.com/yonaskolb/XcodeGen/pull/415) @yonaskolb -- Added `sdk` dependency type for linking system frameworks and libs [#430](https://github.com/yonaskolb/XcodeGen/pull/430) @yonaskolb -- Added `parallelizable` and `randomExecutionOrder` to `Scheme` test targets in an expanded form [#434](https://github.com/yonaskolb/XcodeGen/pull/434) @yonaskolb -- Validate incorrect config setting definitions [#431](https://github.com/yonaskolb/XcodeGen/pull/431) @yonaskolb -- Automatically set project `SDKROOT` if there is only a single platform within the project [#433](https://github.com/yonaskolb/XcodeGen/pull/433) @yonaskolb +- Added `weak` linking setting for dependencies #411 @alvarhansen +- Added `info` to targets for generating an `Info.plist` #415 @yonaskolb +- Added `entitlements` to targets for generating an `.entitlement` file #415 @yonaskolb +- Added `sdk` dependency type for linking system frameworks and libs #430 @yonaskolb +- Added `parallelizable` and `randomExecutionOrder` to `Scheme` test targets in an expanded form #434 @yonaskolb +- Validate incorrect config setting definitions #431 @yonaskolb +- Automatically set project `SDKROOT` if there is only a single platform within the project #433 @yonaskolb #### Changed -- Performance improvements for large projects [#388](https://github.com/yonaskolb/XcodeGen/pull/388) [#417](https://github.com/yonaskolb/XcodeGen/pull/417) [#416](https://github.com/yonaskolb/XcodeGen/pull/416) @yonaskolb @kastiglione -- Upgraded to xcodeproj 6 [#388](https://github.com/yonaskolb/XcodeGen/pull/388) @yonaskolb -- Upgraded to Swift 4.2 [#388](https://github.com/yonaskolb/XcodeGen/pull/388) @yonaskolb -- Remove iOS codesigning sdk restriction in setting preset [#414](https://github.com/yonaskolb/XcodeGen/pull/414) @yonaskolb -- Changed default project version to Xcode 10.0 and default Swift version to 4.2 [#423](https://github.com/yonaskolb/XcodeGen/pull/423) @yonaskolb -- Added ability to not link Carthage frameworks [#432](https://github.com/yonaskolb/XcodeGen/pull/432) @yonaskolb +- Performance improvements for large projects #388 @yonaskolb @kastiglione +- Upgraded to xcodeproj 6 #388 @yonaskolb +- Upgraded to Swift 4.2 #388 @yonaskolb +- Remove iOS codesigning sdk restriction in setting preset #414 @yonaskolb +- Changed default project version to Xcode 10.0 and default Swift version to 4.2 #423 @yonaskolb +- Added ability to not link Carthage frameworks #432 @yonaskolb #### Fixed -- Fixed code signing issues [#414](https://github.com/yonaskolb/XcodeGen/pull/414) @yonaskolb -- Fixed `TargetSource.headerVisibility` not being set in initializer [#419](https://github.com/yonaskolb/XcodeGen/pull/419) @jerrymarino -- Fixed crash when using Xcode Legacy targets as dependencies [#427](https://github.com/yonaskolb/XcodeGen/pull/427) @dflems +- Fixed code signing issues #414 @yonaskolb +- Fixed `TargetSource.headerVisibility` not being set in initializer #419 @jerrymarino +- Fixed crash when using Xcode Legacy targets as dependencies #427 @dflems [Commits](https://github.com/yonaskolb/XcodeGen/compare/1.11.2...2.0.0) @@ -583,13 +583,13 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project will not be deterministic. This will be fixed in an upcoming release with an update to xcodeproj 6.0 #### Fixed -- Fixed release builds in Swift 4.2 [#404](https://github.com/yonaskolb/XcodeGen/pull/404) @pepibumur -- Fixed default settings for macOS unit-tests [#387](https://github.com/yonaskolb/XcodeGen/pull/387) @frankdilo -- Fixed Copy Headers phase ordering for Xcode 10 [#401](https://github.com/yonaskolb/XcodeGen/pull/401) @brentleyjones -- Fixed generated schemes on aggregate targets [#394](https://github.com/yonaskolb/XcodeGen/pull/394) @vgorloff +- Fixed release builds in Swift 4.2 #404 @pepibumur +- Fixed default settings for macOS unit-tests #387 @frankdilo +- Fixed Copy Headers phase ordering for Xcode 10 #401 @brentleyjones +- Fixed generated schemes on aggregate targets #394 @vgorloff #### Changed -- Added `en` as default value for knownRegions [#390](https://github.com/yonaskolb/XcodeGen/pull/390) @Saik0s +- Added `en` as default value for knownRegions #390 @Saik0s - Update `PathKit`, `Spectre`, `Yams` and `xcodeproj` dependencies [Commits](https://github.com/yonaskolb/XcodeGen/compare/1.11.1...1.11.2) @@ -597,43 +597,43 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 1.11.1 #### Fixed -- Fixed `FRAMEWORK_SEARCH_PATHS` for `framework` dependency paths with spaces [#382](https://github.com/yonaskolb/XcodeGen/pull/382) @brentleyjones -- Fixed aggregate targets not being found with `transitivelyLinkDependencies` [#383](https://github.com/yonaskolb/XcodeGen/pull/383) @brentleyjones +- Fixed `FRAMEWORK_SEARCH_PATHS` for `framework` dependency paths with spaces #382 @brentleyjones +- Fixed aggregate targets not being found with `transitivelyLinkDependencies` #383 @brentleyjones [Commits](https://github.com/yonaskolb/XcodeGen/compare/1.11.0...1.11.1) ## 1.11.0 #### Added -- Added `showEnvVars` to build scripts to disable printing the environment [#351](https://github.com/yonaskolb/XcodeGen/pull/351) @keith -- Added `requiresObjCLinking` to `target` [#354](https://github.com/yonaskolb/XcodeGen/pull/354) @brentleyjones -- Added `targetTemplates` [#355](https://github.com/yonaskolb/XcodeGen/pull/355) @yonaskolb -- Added `aggregateTargets` [#353](https://github.com/yonaskolb/XcodeGen/pull/353) [#381](https://github.com/yonaskolb/XcodeGen/pull/381) @yonaskolb -- Added `options.groupSortPosition` [#356](https://github.com/yonaskolb/XcodeGen/pull/356) @yonaskolb -- Added ability to specify `copyFiles` build phase for sources [#345](https://github.com/yonaskolb/XcodeGen/pull/345) @brentleyjones -- Added ability to specify a `minimumXcodeGenVersion` [#349](https://github.com/yonaskolb/XcodeGen/pull/349) @brentleyjones -- Added `customArchiveName` and `revealArchiveInOrganizer` to `archive` [#367](https://github.com/yonaskolb/XcodeGen/pull/367) @sxua +- Added `showEnvVars` to build scripts to disable printing the environment #351 @keith +- Added `requiresObjCLinking` to `target` #354 @brentleyjones +- Added `targetTemplates` #355 @yonaskolb +- Added `aggregateTargets` #353 @yonaskolb +- Added `options.groupSortPosition` #356 @yonaskolb +- Added ability to specify `copyFiles` build phase for sources #345 @brentleyjones +- Added ability to specify a `minimumXcodeGenVersion` #349 @brentleyjones +- Added `customArchiveName` and `revealArchiveInOrganizer` to `archive` #367 @sxua #### Fixed -- Sort files using localizedStandardCompare [#341](https://github.com/yonaskolb/XcodeGen/pull/341) @rohitpal440 -- Use the latest `xcdatamodel` when sorted by version [#341](https://github.com/yonaskolb/XcodeGen/pull/341) @rohitpal440 -- Fixed compiler flags being set on non source files in mixed build phase target sources [#347](https://github.com/yonaskolb/XcodeGen/pull/347) @brentleyjones -- Fixed `options.xcodeVersion` not being parsed [#348](https://github.com/yonaskolb/XcodeGen/pull/348) @brentleyjones -- Fixed non-application targets using `carthage copy-frameworks` [#361](https://github.com/yonaskolb/XcodeGen/pull/361) @brentleyjones -- Set `xcdatamodel` based on `xccurrentversion` if available [#364](https://github.com/yonaskolb/XcodeGen/pull/364) @rpassis -- XPC Services are now correctly copied [#368](https://github.com/yonaskolb/XcodeGen/pull/368) @brentley -- Fixed `.metal` files being added to resources [#380](https://github.com/yonaskolb/XcodeGen/pull/380) @vgorloff +- Sort files using localizedStandardCompare #341 @rohitpal440 +- Use the latest `xcdatamodel` when sorted by version #341 @rohitpal440 +- Fixed compiler flags being set on non source files in mixed build phase target sources #347 @brentleyjones +- Fixed `options.xcodeVersion` not being parsed #348 @brentleyjones +- Fixed non-application targets using `carthage copy-frameworks` #361 @brentleyjones +- Set `xcdatamodel` based on `xccurrentversion` if available #364 @rpassis +- XPC Services are now correctly copied #368 @brentley +- Fixed `.metal` files being added to resources #380 @vgorloff #### Changed -- Improved linking for `static.library` targets [#352](https://github.com/yonaskolb/XcodeGen/pull/352) @brentleyjones -- Changed default group sorting to be after files [#356](https://github.com/yonaskolb/XcodeGen/pull/356) @yonaskolb -- Moved `Frameworks` and `Products` top level groups to bottom [#356](https://github.com/yonaskolb/XcodeGen/pull/356) @yonaskolb -- `modulemap` files are automatically copied to the products directory for static library targets [#346](https://github.com/yonaskolb/XcodeGen/pull/346) @brentleyjones -- Public header files are automatically copied to the products directory for static library targets [#365](https://github.com/yonaskolb/XcodeGen/pull/365) @brentleyjones -- Swift Objective-C Interface Header files are automatically copied to the products directory for static library targets [#366](https://github.com/yonaskolb/XcodeGen/pull/366) @brentleyjones -- `FRAMEWORK_SEARCH_PATHS` are adjusted for `framework` dependencies [#373](https://github.com/yonaskolb/XcodeGen/pull/373) @brentley -- `library.static` targets have `SKIP_INSTALL` set to `YES` [#358](https://github.com/yonaskolb/XcodeGen/pull/358) @brentley -- Copy files phases have descriptive names [#360](https://github.com/yonaskolb/XcodeGen/pull/360) @brentley +- Improved linking for `static.library` targets #352 @brentleyjones +- Changed default group sorting to be after files #356 @yonaskolb +- Moved `Frameworks` and `Products` top level groups to bottom #356 @yonaskolb +- `modulemap` files are automatically copied to the products directory for static library targets #346 @brentleyjones +- Public header files are automatically copied to the products directory for static library targets #365 @brentleyjones +- Swift Objective-C Interface Header files are automatically copied to the products directory for static library targets #366 @brentleyjones +- `FRAMEWORK_SEARCH_PATHS` are adjusted for `framework` dependencies #373 @brentley +- `library.static` targets have `SKIP_INSTALL` set to `YES` #358 @brentley +- Copy files phases have descriptive names #360 @brentley #### Internal - Moved brew formula to homebrew core @@ -644,7 +644,7 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 1.10.3 #### Fixed -- Fixed Mint installations finding `SettingPresets` [#338](https://github.com/yonaskolb/XcodeGen/pull/338) @yonaskolb +- Fixed Mint installations finding `SettingPresets` #338 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/1.10.2...1.10.3) @@ -658,72 +658,72 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 1.10.1 #### Fixed -- Fixed `transitivelyLinkDependencies` typo [#332](https://github.com/yonaskolb/XcodeGen/pull/332) @brentleyjones -- Fixed framework target dependencies not being code signed by default [#332](https://github.com/yonaskolb/XcodeGen/pull/332) @yonaskolb +- Fixed `transitivelyLinkDependencies` typo #332 @brentleyjones +- Fixed framework target dependencies not being code signed by default #332 @yonaskolb #### Changed -- Code sign all dependencies by default except target executables [#332](https://github.com/yonaskolb/XcodeGen/pull/332) @yonaskolb +- Code sign all dependencies by default except target executables #332 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/1.10.0...1.10.1) ## 1.10.0 #### Added -- Added build rule support [#306](https://github.com/yonaskolb/XcodeGen/pull/306) @yonaskolb -- Added support for frameworks in sources [#308](https://github.com/yonaskolb/XcodeGen/pull/308) @keith -- Added ability to automatically embed transient dependencies. Controlled with `transitivelyLinkDependencies` [#327](https://github.com/yonaskolb/XcodeGen/pull/327) @brentleyjones +- Added build rule support #306 @yonaskolb +- Added support for frameworks in sources #308 @keith +- Added ability to automatically embed transient dependencies. Controlled with `transitivelyLinkDependencies` #327 @brentleyjones #### Changed - Upgraded to Swift 4.1 -- Improved Carthage dependency lookup performance with many targets [#298](https://github.com/yonaskolb/XcodeGen/pull/298) @keith -- By default don't CodeSignOnCopy `target` dependencies. This can still be controlled with `Dependency.codeSign` [#324](https://github.com/yonaskolb/XcodeGen/pull/324) @yonaskolb +- Improved Carthage dependency lookup performance with many targets #298 @keith +- By default don't CodeSignOnCopy `target` dependencies. This can still be controlled with `Dependency.codeSign` #324 @yonaskolb #### Fixed -- Fixed PBXBuildFile and PBXFileReference being incorrectly generated for Legacy targets [#296](https://github.com/yonaskolb/XcodeGen/pull/296) @sascha -- Fixed required sources build phase not being generated if there are no sources [#307](https://github.com/yonaskolb/XcodeGen/pull/307) @yonaskolb -- Fixed install script in binary release [#303](https://github.com/yonaskolb/XcodeGen/pull/303) @alvarhansen -- Removed `ENABLE_TESTABILITY` from framework setting presets [#299](https://github.com/yonaskolb/XcodeGen/pull/299) @allu22 -- Fixed homebrew installation [#297](https://github.com/yonaskolb/XcodeGen/pull/297) @vhbit -- `cc` files are now automatically recognized as source files [#317](https://github.com/yonaskolb/XcodeGen/pull/317) @maicki -- Fixed `commandLineArguments` not parsing when they had dots in them [#323](https://github.com/yonaskolb/XcodeGen/pull/323) @yonaskolb -- Fixed excluding directories that only have sub directories [#326](https://github.com/yonaskolb/XcodeGen/pull/326) @brentleyjones +- Fixed PBXBuildFile and PBXFileReference being incorrectly generated for Legacy targets #296 @sascha +- Fixed required sources build phase not being generated if there are no sources #307 @yonaskolb +- Fixed install script in binary release #303 @alvarhansen +- Removed `ENABLE_TESTABILITY` from framework setting presets #299 @allu22 +- Fixed homebrew installation #297 @vhbit +- `cc` files are now automatically recognized as source files #317 @maicki +- Fixed `commandLineArguments` not parsing when they had dots in them #323 @yonaskolb +- Fixed excluding directories that only have sub directories #326 @brentleyjones - Made `PBXContainerItemProxy` ID more deterministic -- Fixed generated framework schemes from being executable [#328](https://github.com/yonaskolb/XcodeGen/pull/328) @brentleyjones +- Fixed generated framework schemes from being executable #328 @brentleyjones [Commits](https://github.com/yonaskolb/XcodeGen/compare/1.9.0...1.10.0) ## 1.9.0 #### Added -- Scheme pre and post actions can now be added to `target.scheme` [#280](https://github.com/yonaskolb/XcodeGen/pull/280) @yonaskolb -- Individual files can now be added to `fileGroups` [#293](https://github.com/yonaskolb/XcodeGen/pull/293) @yonaskolb +- Scheme pre and post actions can now be added to `target.scheme` #280 @yonaskolb +- Individual files can now be added to `fileGroups` #293 @yonaskolb #### Changed - Updated to `xcproj` 4.3.0 for Xcode 9.3 updates -- Update default Xcode version to 9.3 including new settings [#284](https://github.com/yonaskolb/XcodeGen/pull/284) @LinusU -- **Breaking for ProjectSpec library users** Changed `ProjectSpec` to `Project` and `ProjectSpec.Options` to `SpecOptions` [#281](https://github.com/yonaskolb/XcodeGen/pull/281) @jerrymarino +- Update default Xcode version to 9.3 including new settings #284 @LinusU +- **Breaking for ProjectSpec library users** Changed `ProjectSpec` to `Project` and `ProjectSpec.Options` to `SpecOptions` #281 @jerrymarino #### Fixed -- Fixed manual build phase of `none` not being applied to folders [#288](https://github.com/yonaskolb/XcodeGen/pull/288) @yonaskolb -- Quoted values now correctly get parsed as strings [#282](https://github.com/yonaskolb/XcodeGen/pull/282) @yonaskolb -- Fixed adding a root source folder when `createIntermediateGroups` is on [#291](https://github.com/yonaskolb/XcodeGen/pull/291) @yonaskolb -- Fixed Homebrew installations issues on some machines [#289](https://github.com/yonaskolb/XcodeGen/pull/289) @vhbit -- Fixed files that are added as root sources from having invalid parent groups outside the project directory [#293](https://github.com/yonaskolb/XcodeGen/pull/293) @yonaskolb +- Fixed manual build phase of `none` not being applied to folders #288 @yonaskolb +- Quoted values now correctly get parsed as strings #282 @yonaskolb +- Fixed adding a root source folder when `createIntermediateGroups` is on #291 @yonaskolb +- Fixed Homebrew installations issues on some machines #289 @vhbit +- Fixed files that are added as root sources from having invalid parent groups outside the project directory #293 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/1.8.0...1.9.0) ## 1.8.0 #### Added -- Added Project `defaultConfig` [#269](https://github.com/yonaskolb/XcodeGen/pull/269) @keith -- Added Target `attributes` [#276](https://github.com/yonaskolb/XcodeGen/pull/276) @yonaskolb -- Automatically set `DevelopmentTeam` and `ProvisioningStyle` within `TargetAttributes` if relevant build settings are defined [#277](https://github.com/yonaskolb/XcodeGen/pull/277) @yonaskolb +- Added Project `defaultConfig` #269 @keith +- Added Target `attributes` #276 @yonaskolb +- Automatically set `DevelopmentTeam` and `ProvisioningStyle` within `TargetAttributes` if relevant build settings are defined #277 @yonaskolb #### Fixed -- Fixed default `LD_RUNPATH_SEARCH_PATHS` for app extensions [#272](https://github.com/yonaskolb/XcodeGen/pull/272) @LinusU +- Fixed default `LD_RUNPATH_SEARCH_PATHS` for app extensions #272 @LinusU #### Internal -- Make `LegacyTarget` init public [#264](https://github.com/yonaskolb/XcodeGen/pull/264) @jerrymarino +- Make `LegacyTarget` init public #264 @jerrymarino - Upgrade to *xcproj* to 4.2.0, *Yams* to 0.6.0 and *PathKit* to 0.9.1 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/1.7.0...1.8.0) @@ -732,113 +732,113 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil #### Added -- Added support for scheme environment variables [#239](https://github.com/yonaskolb/XcodeGen/pull/239) [#254](https://github.com/yonaskolb/XcodeGen/pull/254) [#259](https://github.com/yonaskolb/XcodeGen/pull/259) @turekj @toshi0383 -- Added `carthageExecutablePath` option [#244](https://github.com/yonaskolb/XcodeGen/pull/244) @akkyie -- Added `parallelizeBuild` and `buildImplicitDependencies` to Schemes [#241](https://github.com/yonaskolb/XcodeGen/pull/241) @rahul-malik +- Added support for scheme environment variables #239 @turekj @toshi0383 +- Added `carthageExecutablePath` option #244 @akkyie +- Added `parallelizeBuild` and `buildImplicitDependencies` to Schemes #241 @rahul-malik @yonaskolb -- Added support for Core Data `xcdatamodeld` files [#249](https://github.com/yonaskolb/XcodeGen/pull/249) @yonaskolb -- Projects are now generated atomically by writing to a temporary directory first [#250](https://github.com/yonaskolb/XcodeGen/pull/250) @yonaskolb -- Added script for adding precompiled binary to releases [#246](https://github.com/yonaskolb/XcodeGen/pull/246) @toshi0383 -- Added optional `headerVisibilty` to target source. This still defaults to public [#252](https://github.com/yonaskolb/XcodeGen/pull/252) @yonaskolb +- Added support for Core Data `xcdatamodeld` files #249 @yonaskolb +- Projects are now generated atomically by writing to a temporary directory first #250 @yonaskolb +- Added script for adding precompiled binary to releases #246 @toshi0383 +- Added optional `headerVisibilty` to target source. This still defaults to public #252 @yonaskolb - Releases now include a pre-compiled binary and setting presets, including an install script #### Fixed -- Fixed Mint installation from reading setting presets [#248](https://github.com/yonaskolb/XcodeGen/pull/248) @yonaskolb -- Fixed setting `buildPhase` on a `folder` source. This allows for a folder of header files [#254](https://github.com/yonaskolb/XcodeGen/pull/254) @toshi0383 -- Carthage dependencies are not automatically embedded into test targets [#256](https://github.com/yonaskolb/XcodeGen/pull/256) @yonaskolb -- Carthage dependencies now respect the `embed` property [#256](https://github.com/yonaskolb/XcodeGen/pull/256) @yonaskolb -- iMessage extensions now have proper setting presets in regards to app icon and runtime search paths [#255](https://github.com/yonaskolb/XcodeGen/pull/255) @yonaskolb -- Excluded files are not added within .lproj directories [#238](https://github.com/yonaskolb/XcodeGen/pull/238) @toshi0383 +- Fixed Mint installation from reading setting presets #248 @yonaskolb +- Fixed setting `buildPhase` on a `folder` source. This allows for a folder of header files #254 @toshi0383 +- Carthage dependencies are not automatically embedded into test targets #256 @yonaskolb +- Carthage dependencies now respect the `embed` property #256 @yonaskolb +- iMessage extensions now have proper setting presets in regards to app icon and runtime search paths #255 @yonaskolb +- Excluded files are not added within .lproj directories #238 @toshi0383 [Commits](https://github.com/yonaskolb/XcodeGen/compare/1.6.0...1.7.0) ## 1.6.0 #### Added -- Added scheme pre-actions and post-actions [#231](https://github.com/yonaskolb/XcodeGen/pull/231) @kastiglione -- Added `options.disabledValidations` including `missingConfigs` to disable project validation errors [#220](https://github.com/yonaskolb/XcodeGen/pull/220) @keith -- Generate UI Test Target Attributes [#221](https://github.com/yonaskolb/XcodeGen/pull/221) @anreitersimon +- Added scheme pre-actions and post-actions #231 @kastiglione +- Added `options.disabledValidations` including `missingConfigs` to disable project validation errors #220 @keith +- Generate UI Test Target Attributes #221 @anreitersimon #### Fixed -- Filter out duplicate source files [#217](https://github.com/yonaskolb/XcodeGen/pull/217) @allu22 -- Fixed how `lastKnownFileType` and `explicitFileType` were generated across platforms [#115](https://github.com/yonaskolb/XcodeGen/pull/115) @toshi0383 +- Filter out duplicate source files #217 @allu22 +- Fixed how `lastKnownFileType` and `explicitFileType` were generated across platforms #115 @toshi0383 - Removed a few cases of project diffs when opening the project in Xcode @yonaskolb - Fixed Swift not being embedded by default in watch apps @yonaskolb #### Changed -- Change arrays to strings in setting presets [#218](https://github.com/yonaskolb/XcodeGen/pull/218) @allu22 -- Updated to xcproj 4.0 [#227](https://github.com/yonaskolb/XcodeGen/pull/227) +- Change arrays to strings in setting presets #218 @allu22 +- Updated to xcproj 4.0 #227 [Commits](https://github.com/yonaskolb/XcodeGen/compare/1.5.0...1.6.0) ## 1.5.0 #### Added -- added support for `gatherCoverageData` flag in target schemes [#170](https://github.com/yonaskolb/XcodeGen/pull/170) @alexruperez -- added support for `commandLineOptions` in target schemes [#172](https://github.com/yonaskolb/XcodeGen/pull/172) @rahul-malik -- added Project spec as a SwiftPM library for reuse in other projects [#164](https://github.com/yonaskolb/XcodeGen/pull/164) @soffes -- added `implicit` option for framework dependencies [#166](https://github.com/yonaskolb/XcodeGen/pull/166) @sbarow -- added `--quite` option to CLI [#167](https://github.com/yonaskolb/XcodeGen/pull/167) @soffes -- can now print version with `-v` in addition to `--version` [#174](https://github.com/yonaskolb/XcodeGen/pull/174) @kastiglione -- added support for legacy targets [#175](https://github.com/yonaskolb/XcodeGen/pull/175) @bkase -- added support for indentation options [#190](https://github.com/yonaskolb/XcodeGen/pull/190) @bkase -- added source excludes [#135](https://github.com/yonaskolb/XcodeGen/pull/135) [#161](https://github.com/yonaskolb/XcodeGen/pull/161) [#190](https://github.com/yonaskolb/XcodeGen/pull/190) @peymankh @ -- added `options.xcodeVersion` [#197](https://github.com/yonaskolb/XcodeGen/pull/197) @yonaskolb @peymankh -- add test targets to Scheme [#195](https://github.com/yonaskolb/XcodeGen/pull/195) @vhbit -- add option to make a source file optional incase it will be generated later [#200](https://github.com/yonaskolb/XcodeGen/pull/200) @vhbit -- finalize Scheme spec [#201](https://github.com/yonaskolb/XcodeGen/pull/201) @yonaskolb -- added `buildPhase` setting to target source for overriding the guessed build phase of files [#206](https://github.com/yonaskolb/XcodeGen/pull/206) @yonaskolb -- added `deploymentTarget` setting to project and target [#205](https://github.com/yonaskolb/XcodeGen/pull/205) @yonaskolb +- added support for `gatherCoverageData` flag in target schemes #170 @alexruperez +- added support for `commandLineOptions` in target schemes #172 @rahul-malik +- added Project spec as a SwiftPM library for reuse in other projects #164 @soffes +- added `implicit` option for framework dependencies #166 @sbarow +- added `--quite` option to CLI #167 @soffes +- can now print version with `-v` in addition to `--version` #174 @kastiglione +- added support for legacy targets #175 @bkase +- added support for indentation options #190 @bkase +- added source excludes #135 @peymankh @ +- added `options.xcodeVersion` #197 @yonaskolb @peymankh +- add test targets to Scheme #195 @vhbit +- add option to make a source file optional incase it will be generated later #200 @vhbit +- finalize Scheme spec #201 @yonaskolb +- added `buildPhase` setting to target source for overriding the guessed build phase of files #206 @yonaskolb +- added `deploymentTarget` setting to project and target #205 @yonaskolb #### Changed - huge performance improvements when writing the project file due to changes in xcproj - updated dependencies - minor logging changes - updated Project Spec documentation -- scan for `Info.plist` lazely [#194](https://github.com/yonaskolb/XcodeGen/pull/194) @kastiglione -- change setting presets so that icon settings only get applied to application targets [#204](https://github.com/yonaskolb/XcodeGen/pull/204) @yonaskolb -- changed scheme build targets format [#203](https://github.com/yonaskolb/XcodeGen/pull/203) @yonaskolb -- when specifying a `--spec` argument, the default for the `--project` path is now the directory containing the spec [#211](https://github.com/yonaskolb/XcodeGen/pull/211) @yonaskolb +- scan for `Info.plist` lazely #194 @kastiglione +- change setting presets so that icon settings only get applied to application targets #204 @yonaskolb +- changed scheme build targets format #203 @yonaskolb +- when specifying a `--spec` argument, the default for the `--project` path is now the directory containing the spec #211 @yonaskolb #### Fixed -- fixed shell scripts escaping quotes twice [#186](https://github.com/yonaskolb/XcodeGen/pull/186) @allu22 -- fixed `createIntermediateGroups` when using a relative spec path [#184](https://github.com/yonaskolb/XcodeGen/pull/184) @kastiglione -- fixed command line arguments for test and profile from being overridden [#199](https://github.com/yonaskolb/XcodeGen/pull/199) @vhbit +- fixed shell scripts escaping quotes twice #186 @allu22 +- fixed `createIntermediateGroups` when using a relative spec path #184 @kastiglione +- fixed command line arguments for test and profile from being overridden #199 @vhbit - fixed files deep within a hierarchy having the path for a name -- fixed source files from being duplicated if referenced with different casing [#212](https://github.com/yonaskolb/XcodeGen/pull/212) @yonaskolb -- fixed target product name not being written. Fixes integration with R.swift [#213](https://github.com/yonaskolb/XcodeGen/pull/213) @yonaskolb +- fixed source files from being duplicated if referenced with different casing #212 @yonaskolb +- fixed target product name not being written. Fixes integration with R.swift #213 @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/1.4.0...1.5.0) ## 1.4.0 #### Added -- added `--version` flag [#112](https://github.com/yonaskolb/XcodeGen/pull/112) @mironal -- added support for adding individual file sources [#106](https://github.com/yonaskolb/XcodeGen/pull/106) [#133](https://github.com/yonaskolb/XcodeGen/pull/133) [#142](https://github.com/yonaskolb/XcodeGen/pull/142) [#139](https://github.com/yonaskolb/XcodeGen/pull/139) @bkase -- added source compiler flag support [#121](https://github.com/yonaskolb/XcodeGen/pull/121) @bkase -- added `ProjectSpec.options.createIntermediateGroups` [#108](https://github.com/yonaskolb/XcodeGen/pull/108) @bkase -- added better json loading support [#127](https://github.com/yonaskolb/XcodeGen/pull/127) @rahul-malik -- added source `name` for customizing names of source directories and file [#146](https://github.com/yonaskolb/XcodeGen/pull/146) @yonaskolb -- added folder reference source support via a new `type` property [#151](https://github.com/yonaskolb/XcodeGen/pull/151) @yonaskolb -- added `ProjectSpec.options.developmentLanguage` [#155](https://github.com/yonaskolb/XcodeGen/pull/155) @yonaskolb +- added `--version` flag #112 @mironal +- added support for adding individual file sources #106 @bkase +- added source compiler flag support #121 @bkase +- added `ProjectSpec.options.createIntermediateGroups` #108 @bkase +- added better json loading support #127 @rahul-malik +- added source `name` for customizing names of source directories and file #146 @yonaskolb +- added folder reference source support via a new `type` property #151 @yonaskolb +- added `ProjectSpec.options.developmentLanguage` #155 @yonaskolb #### Changed -- updated to xcproj 1.2.0 [#113](https://github.com/yonaskolb/XcodeGen/pull/113) @yonaskolb -- build settings from presets will be removed if they are provided in `xcconfig` files [#77](https://github.com/yonaskolb/XcodeGen/pull/77) @toshi0383 -- all files and groups are sorted by type and then alphabetically [#144](https://github.com/yonaskolb/XcodeGen/pull/144) @yonaskolb -- target sources can now have an expanded form [#119](https://github.com/yonaskolb/XcodeGen/pull/119) @yonaskolb -- empty build phases are now not generated [#149](https://github.com/yonaskolb/XcodeGen/pull/149) @yonaskolb -- make UUIDs more deterministic [#154](https://github.com/yonaskolb/XcodeGen/pull/154) @yonaskolb +- updated to xcproj 1.2.0 #113 @yonaskolb +- build settings from presets will be removed if they are provided in `xcconfig` files #77 @toshi0383 +- all files and groups are sorted by type and then alphabetically #144 @yonaskolb +- target sources can now have an expanded form #119 @yonaskolb +- empty build phases are now not generated #149 @yonaskolb +- make UUIDs more deterministic #154 @yonaskolb #### Fixed -- only add headers to frameworks and libraries [#118](https://github.com/yonaskolb/XcodeGen/pull/118) @ryohey -- fixed localized files with the same name [#126](https://github.com/yonaskolb/XcodeGen/pull/126) @ryohey -- fix intermediate sources [#144](https://github.com/yonaskolb/XcodeGen/pull/144) @yonaskolb -- fix cyclical target dependencies not working [#147](https://github.com/yonaskolb/XcodeGen/pull/147) @yonaskolb -- fix directory bundles not being added properly when referenced directly [#148](https://github.com/yonaskolb/XcodeGen/pull/1478) @yonaskolb -- made `mm`, `c` and `S` file be parsed as source files [#120](https://github.com/yonaskolb/XcodeGen/pull/120) [#125](https://github.com/yonaskolb/XcodeGen/pull/125) [#138](https://github.com/yonaskolb/XcodeGen/pull/138) @bkase @enmiller -- fix the generation of localized variant groups if there is no `Base.lproj` [#157](https://github.com/yonaskolb/XcodeGen/pull/157) @ryohey -- all localizations found are added to a projects known regions [#157](https://github.com/yonaskolb/XcodeGen/pull/157) @ryohey +- only add headers to frameworks and libraries #118 @ryohey +- fixed localized files with the same name #126 @ryohey +- fix intermediate sources #144 @yonaskolb +- fix cyclical target dependencies not working #147 @yonaskolb +- fix directory bundles not being added properly when referenced directly #148 @yonaskolb +- made `mm`, `c` and `S` file be parsed as source files #120 @bkase @enmiller +- fix the generation of localized variant groups if there is no `Base.lproj` #157 @ryohey +- all localizations found are added to a projects known regions #157 @ryohey #### Internal - refactoring @@ -850,26 +850,26 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 1.3.0 #### Added -- generate output files for Carthage copy-frameworks script [#84](https://github.com/yonaskolb/XcodeGen/pull/84) @mironal -- added options.settingPreset to choose which setting presets get applied [#100](https://github.com/yonaskolb/XcodeGen/pull/101) @yonaskolb -- added `link` option for target dependencies [#109](https://github.com/yonaskolb/XcodeGen/pull/109) @keith +- generate output files for Carthage copy-frameworks script #84 @mironal +- added options.settingPreset to choose which setting presets get applied #100 @yonaskolb +- added `link` option for target dependencies #109 @keith #### Changed -- updated to xcproj 0.4.1 [#85](https://github.com/yonaskolb/XcodeGen/pull/85) @enmiller -- don't copy base settings if config type has been left out [#100](https://github.com/yonaskolb/XcodeGen/pull/100) @yonaskolb -- generate localised files under a single variant group [#70](https://github.com/yonaskolb/XcodeGen/pull/70) @ryohey -- don't apply common project settings to configs with no type [#100](https://github.com/yonaskolb/XcodeGen/pull/100) @yonaskolb -- config references in settings can now be partially matched and are case insensitive [#111](https://github.com/yonaskolb/XcodeGen/pull/111) @yonaskolb +- updated to xcproj 0.4.1 #85 @enmiller +- don't copy base settings if config type has been left out #100 @yonaskolb +- generate localised files under a single variant group #70 @ryohey +- don't apply common project settings to configs with no type #100 @yonaskolb +- config references in settings can now be partially matched and are case insensitive #111 @yonaskolb - other small internal changes @yonaskolb #### Fixed -- embed Carthage frameworks for macOS [#82](https://github.com/yonaskolb/XcodeGen/pull/82) @toshi0383 -- fixed copying of watchOS app resources [#96](https://github.com/yonaskolb/XcodeGen/pull/96) @keith -- automatically ignore more file types for a target's sources (entitlements, gpx, apns) [#94](https://github.com/yonaskolb/XcodeGen/pull/94) @keith -- change make build to a PHONY task [#98](https://github.com/yonaskolb/XcodeGen/pull/98) @keith -- allow copying of resource files from dependant targets [#95](https://github.com/yonaskolb/XcodeGen/pull/95) @keith -- fixed library linking [#93](https://github.com/yonaskolb/XcodeGen/pull/93) @keith -- fixed duplicate carthage file references [#107](https://github.com/yonaskolb/XcodeGen/pull/107) @yonaskolb +- embed Carthage frameworks for macOS #82 @toshi0383 +- fixed copying of watchOS app resources #96 @keith +- automatically ignore more file types for a target's sources (entitlements, gpx, apns) #94 @keith +- change make build to a PHONY task #98 @keith +- allow copying of resource files from dependant targets #95 @keith +- fixed library linking #93 @keith +- fixed duplicate carthage file references #107 @yonaskolb - an error is now shown if you try and generate a target scheme and don't have debug and release builds @yonaskolb [Commits](https://github.com/yonaskolb/XcodeGen/compare/1.2.4...1.3.0) @@ -889,8 +889,8 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 1.2.3 #### Fixed -- Fixed wrong carthage directory name reference for macOS [#74](https://github.com/yonaskolb/XcodeGen/pull/74) @toshi0383 -- Removed unnecessary `carthage copy-frameworks` for macOS app target [#76](https://github.com/yonaskolb/XcodeGen/pull/76) @toshi0383 +- Fixed wrong carthage directory name reference for macOS #74 @toshi0383 +- Removed unnecessary `carthage copy-frameworks` for macOS app target #76 @toshi0383 - Added some missing default settings for framework targets. `SKIP_INSTALL: YES` fixes archiving - Filter out nulls from setting presets if specifying an empty string @@ -912,17 +912,17 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil #### Added - `include` now supports a single string as well as a list -- add support setting xcconfig files on a project with `configFiles` [#64](https://github.com/yonaskolb/XcodeGen/pull/64) -- add `fileGroups` to project spec for adding groups of files that aren't target source files [#64](https://github.com/yonaskolb/XcodeGen/pull/64) +- add support setting xcconfig files on a project with `configFiles` #64 +- add `fileGroups` to project spec for adding groups of files that aren't target source files #64 - better output (more info, emoji, colors) -- add `options.bundleIdPrefix` for autogenerating `PRODUCT_BUNDLE_IDENTIFIER` [#67](https://github.com/yonaskolb/XcodeGen/pull/67) -- add `:REPLACE` syntax when merging `include` [#68](https://github.com/yonaskolb/XcodeGen/pull/68) +- add `options.bundleIdPrefix` for autogenerating `PRODUCT_BUNDLE_IDENTIFIER` #67 +- add `:REPLACE` syntax when merging `include` #68 - add `mint` installation support #### Fixed - fixed homebrew installation -- fixed target xcconfig files not working via `configFiles` [#64](https://github.com/yonaskolb/XcodeGen/pull/64) -- look for `INFOPLIST_FILE` setting in project and xcconfig files before adding it automatically. It was just looking in target settings before [#64](https://github.com/yonaskolb/XcodeGen/pull/64) +- fixed target xcconfig files not working via `configFiles` #64 +- look for `INFOPLIST_FILE` setting in project and xcconfig files before adding it automatically. It was just looking in target settings before #64 - exit with error on failure [Commits](https://github.com/yonaskolb/XcodeGen/compare/1.1.0...1.2.0) @@ -946,16 +946,16 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 1.0.0 #### Added -- Swift 4 support [#52](https://github.com/yonaskolb/XcodeGen/pull/52) -- Support for C and C++ files [#48](https://github.com/yonaskolb/XcodeGen/pull/48) by @antoniocasero +- Swift 4 support #52 +- Support for C and C++ files #48 by @antoniocasero - Xcode 9 default settings #### Fixed -- fixed empty string in YAML not being parsed properly [#50](https://github.com/yonaskolb/XcodeGen/pull/50) by @antoniocasero +- fixed empty string in YAML not being parsed properly #50 by @antoniocasero #### Changed -- updated to xcodeproj 0.1.2 [#56](https://github.com/yonaskolb/XcodeGen/pull/56) -- **BREAKING**: changed target definitions from list to map [#54](https://github.com/yonaskolb/XcodeGen/pull/54) See [Project Spec](docs/ProjectSpec.md) +- updated to xcodeproj 0.1.2 #56 +- **BREAKING**: changed target definitions from list to map #54 [Commits](https://github.com/yonaskolb/XcodeGen/compare/0.6.1...1.0.0) @@ -963,18 +963,18 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 0.6.1 #### Added -- Ability to set PBXProject attributes [#45](https://github.com/yonaskolb/XcodeGen/pull/45) +- Ability to set PBXProject attributes #45 #### Changed - Don't bother linking target frameworks for target dependencies. -- Move code signing default settings from all iOS targets to iOS application targets, via Product + Platform setting preset files [#46](https://github.com/yonaskolb/XcodeGen/pull/46) +- Move code signing default settings from all iOS targets to iOS application targets, via Product + Platform setting preset files #46 [Commits](https://github.com/yonaskolb/XcodeGen/compare/0.6.0...0.6.1) ## 0.6.0 #### Added -- Allow a project spec to include other project specs [#44](https://github.com/yonaskolb/XcodeGen/pull/44) +- Allow a project spec to include other project specs #44 #### Changed - Changed default spec path to `project.yml` @@ -987,16 +987,16 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil #### Fixed - Fix embedded framework dependencies - Add `CODE_SIGN_IDENTITY[sdk=iphoneos*]` back to iOS targets -- Fix build scripts with "" generating invalid projects [#43](https://github.com/yonaskolb/XcodeGen/pull/43) +- Fix build scripts with "" generating invalid projects #43 [Commits](https://github.com/yonaskolb/XcodeGen/compare/0.5.0...0.5.1) ## 0.5.0 #### Added -- Added multi platform targets [#35](https://github.com/yonaskolb/XcodeGen/pull/35) -- Automatically generate platform specific `FRAMEWORK_SEARCH_PATHS` for Carthage dependencies [#38](https://github.com/yonaskolb/XcodeGen/pull/38) -- Automatically find Info.plist and set `INFOPLIST_FILE` build setting if it doesn't exist on a target [#40](https://github.com/yonaskolb/XcodeGen/pull/40) -- Add options for controlling embedding of dependencies [#37](https://github.com/yonaskolb/XcodeGen/pull/37) +- Added multi platform targets #35 +- Automatically generate platform specific `FRAMEWORK_SEARCH_PATHS` for Carthage dependencies #38 +- Automatically find Info.plist and set `INFOPLIST_FILE` build setting if it doesn't exist on a target #40 +- Add options for controlling embedding of dependencies #37 #### Fixed - Fixed localized files not being added to a target's resources @@ -1010,23 +1010,23 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 0.4.0 ##### Added -- Homebrew support [#16](https://github.com/yonaskolb/XcodeGen/pull/16) by @pepibumur -- Added `runOnlyWhenInstalling` to build scripts [#32](https://github.com/yonaskolb/XcodeGen/pull/32) -- Added `carthageBuildPath` option [#34](https://github.com/yonaskolb/XcodeGen/pull/34) +- Homebrew support #16 by @pepibumur +- Added `runOnlyWhenInstalling` to build scripts #32 +- Added `carthageBuildPath` option #34 #### Fixed - Fixed installations of XcodeGen not applying build setting presets for configs, products, and platforms, due to missing resources #### Changed -- Upgraded to https://github.com/swift-xcode/xcodeproj 0.1.1 [#33](https://github.com/yonaskolb/XcodeGen/pull/33) +- Upgraded to https://github.com/swift-xcode/xcodeproj 0.1.1 #33 [Commits](https://github.com/yonaskolb/XcodeGen/compare/0.3.0...0.4.0) ## 0.3.0 - Extensions and Scheme Tests #### Added -- Support for app extension dependencies, using the same `target: MyExtension` syntax [#19](https://github.com/yonaskolb/XcodeGen/pull/19) -- Added test targets to generated target schemes via `Target.scheme.testTargets` [#21](https://github.com/yonaskolb/XcodeGen/pull/21) +- Support for app extension dependencies, using the same `target: MyExtension` syntax #19 +- Added test targets to generated target schemes via `Target.scheme.testTargets` #21 #### Changed - Updated xcodeproj to 0.0.9 @@ -1042,7 +1042,7 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 0.2.0 - Build scripts #### Added -- Added Target build scripts with `Target.prebuildScripts` and `Target.postbuildScripts` [#17](https://github.com/yonaskolb/XcodeGen/pull/17) +- Added Target build scripts with `Target.prebuildScripts` and `Target.postbuildScripts` #17 - Support for absolute paths in target sources, run script files, and config files - Add validation for incorrect `Target.configFiles` From fd8aa8faf9918e8bb1b3e591d71bb23c378643f3 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Thu, 31 Mar 2022 16:43:32 +1100 Subject: [PATCH 131/284] simplify changelog and remove commit links github can compare diffs --- CHANGELOG.md | 123 +-------------------------------------------------- 1 file changed, 1 insertion(+), 122 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e1de9098..3b8d9cac6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,8 +17,6 @@ - Run target source pattern matching in parallel #1197 @alvarhansen -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.27.0...2.28.0) - ## 2.27.0 #### Added @@ -32,8 +30,6 @@ - Fixed crash caused by a simultaneous write during a glob processing #1177 @tr1ckyf0x - Skip generating empty compile sources build phases for watch apps #1185 @evandcoleman -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.26.0...2.27.0) - ## 2.26.0 ### Added @@ -44,8 +40,6 @@ - Speed up source inclusion checking for big projects #1122 @PaulTaykalo -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.25.0...2.26.0) - ## 2.25.0 ### Added @@ -58,8 +52,6 @@ - Fix platform filter for package dependecies #1123 @raptorxcz - Fix Xcode 13 build #1130 @raptorxcz @mthole -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.24.0...2.25.0) - ### Changed - Update XcodeProj to 8.2.0 #1125 @nnsnodnb @@ -76,16 +68,12 @@ ### Changed - **Breaking**: Rename the `platform` field on `Dependency` to `platformFilter` #1087 @daltonclaybrook -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.23.1...2.24.0) - ## 2.23.1 ### Changed - Reverted "Change FRAMEWORK_SEARCH_PATH for xcframeworks (#1015)", introduced in 2.20.0. XCFrameworks need to be referenced directly in the project for Xcode's build system to extract the appropriate frameworks #1081 @elliottwilliams -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.23.0...2.23.1) - ## 2.23.0 #### Added @@ -95,8 +83,6 @@ - Added `()` to config variant trimming charater set to fix scheme config variant lookups for some configs like `Debug (Development)` that broke in 2.22.0 #1078 @DavidWoohyunLee - Fixed Linux builds on Swift 5.4 #1083 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.22.0...2.23.0) - ## 2.22.0 #### Added @@ -109,8 +95,6 @@ - Fixed no such module `DOT` error when package is used as a dependency #1067 @yanamura - Fixed scheme config variant lookups for some configs like `ProdDebug` and `Prod-Debug` that broke in 2.21.0 #1070 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.21.0...2.22.0) - ## 2.21.0 #### Added @@ -123,8 +107,6 @@ - The `Core` target is renamed to avoid collisions with other packages. #1057 @elliottwilliams - Lookup scheme config variants by whole words, fixing incorrect assignment in names that contain subtrings of each other (eg PreProd and Prod) #976 @stefanomondino -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.20.0...2.21.0) - ## 2.20.0 #### Added @@ -143,8 +125,6 @@ #### Internal - Build universal binaries for release. XcodeGen now runs natively on Apple Silicon. #1024 @thii -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.19.0...2.20.0) - ## 2.19.0 #### Added @@ -170,8 +150,6 @@ #### Internal - Updated to Yams 4.0.0 #984 @swiftty -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.18.0...2.19.0) - ## 2.18.0 #### Added @@ -195,8 +173,6 @@ - Fix appex's Runpath Search Paths under macOS target. #952 @rinsuki - `onlyCopyFilesOnInstall` is extended for the Embed App Extensions build phase. #948 @RomanPodymov -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.17.0...2.18.0) - ## 2.17.0 #### Added @@ -212,8 +188,6 @@ #### Internal - Updated to XcodeProj 7.13.0 #908 @brentleyjones -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.16.0...2.17.0) - ## 2.16.0 #### Added @@ -245,8 +219,6 @@ - Compile `xcmappingmodel` files instead of copying bundle resources. #834 @jcolicchio - Fixed issue where `Complie Sources` build phase is generated for resource bundles even when they have no files to compile #878 @nkukushkin -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.15.1...2.16.0) - ## 2.15.1 #### Fixed @@ -254,8 +226,6 @@ - Added build presets for the target type `framework.static`. #819 @acecilia - Fixed XcodeProj resolution and updated to 7.10.0 #822 @soffes -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.15.0...2.15.1) - ## 2.15.0 #### Added @@ -267,8 +237,6 @@ - Added ability to stop on every main thread checker issue on Run schemes and TargetSchemes #799 @ionutivan - Avoid copying ObjC interface header when SWIFT_INSTALL_OBJC_HEADER=false. #805 @kateinoigakukun -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.14.0...2.15.0) - ## 2.14.0 #### Added @@ -280,8 +248,6 @@ - Set `TEST_TARGET_NAME` only when a project has UITest bundle. #792 @ken0nek - Set xcodeproj path in project.xcworkspace/contents.xcworkspacedata #793 @ken0nek -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.13.1...2.14.0) - ## 2.13.1 #### Fixed @@ -293,8 +259,6 @@ - Updated to XcodeProj 7.8.0 #777 @yonaskolb - Use https://github.com/mxcl/Version #779 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.13.0...2.13.1) - ## 2.13.0 #### Added @@ -308,8 +272,6 @@ #### Internal - Updated to XcodeProj 7.7.0 #767 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.12.0...2.13.0) - ## 2.12.0 #### Added @@ -329,8 +291,6 @@ #### Internal - Update to SwiftCLI 6.0 and use the new property wrappers #749 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.11.0...2.12.0) - ## 2.11.0 #### Added @@ -353,8 +313,6 @@ - Updated XcodeProj to 7.4.0 #709 @yonaskolb - Updated to Swift 5.1 #714 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.10.1...2.11.0) - ## 2.10.1 #### Fixed @@ -362,8 +320,6 @@ - Fixed missing `onlyGenerateCoverageForSpecifiedTargets` issue #700 @kateinoigakukun - Fixed regression on dependencies `link` flag #703 @rcari -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.10.0...2.10.1) - ## 2.10.0 #### Added @@ -380,8 +336,6 @@ #### Internal - Restructure targets #698 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.9.0...2.10.0) - ## 2.9.0 #### Added @@ -397,8 +351,6 @@ - Updated to SwiftCLI 5.3.2 #667 @giginet - Fixed tests in case-sensitive file system #670 @Qusic -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.8.0...2.9.0) - ## 2.8.0 #### Added @@ -417,8 +369,6 @@ - Removed needless `Array` initialization. #661 @RomanPodymov - Updated to XcodeProj 7.1.0 #624 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.7.0...2.8.0) - ## 2.7.0 #### Added @@ -432,8 +382,6 @@ #### Changed - Allow linking of dependencies into static libraries when `link` is set to true #635 @kateinoigakukun -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.6.0...2.7.0) - ## 2.6.0 #### Added @@ -453,8 +401,6 @@ #### Internal - Added ability to encode ProjectSpec #545 @ryohey -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.5.0...2.6.0) - ## 2.5.0 #### Added @@ -472,8 +418,6 @@ - Fixed `optional` file sources not being added to the project #557 @yonaskolb - Fixed Carthage dependencies being incorrectly embedded in WatchKit app bundles instead of a WatchKit app extension #558 @KhaosT -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.4.0...2.5.0) - ## 2.4.0 #### Fixed: @@ -482,8 +426,6 @@ #### Changed - Updated to Swift 5 and dropped Swift 4.2 #549 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.3.0...2.4.0) - ## 2.3.0 #### Added @@ -505,8 +447,6 @@ - Fix multi-platform target templates #541 @yonaskolb - Fixed sources in an included target not being relative when the sources are mix of string and dictionaries #542 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.2.0...2.3.0) - ## 2.2.0 #### Added @@ -528,8 +468,6 @@ - Fixed generated schemes for tool targets not setting the executable #496 @yonaskolb - Fixed resolving Carthage dependencies for iOS app with watchOS target. [465](https://github.com/yonaskolb/XcodeGen/pull/465) @raptorxcz -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.1.0...2.2.0) - ## 2.1.0 #### Added @@ -550,8 +488,6 @@ - Add `.intentdefinition` files to sources build phase instead of resources #442 @yonaskolb - Add `mlmodel` files to sources build phase instead of resources #457 @dwb357 -[Commits](https://github.com/yonaskolb/XcodeGen/compare/2.0.0...2.1.0) - ## 2.0.0 #### Added @@ -576,8 +512,6 @@ - Fixed `TargetSource.headerVisibility` not being set in initializer #419 @jerrymarino - Fixed crash when using Xcode Legacy targets as dependencies #427 @dflems -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.11.2...2.0.0) - ## 1.11.2 If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project will not be deterministic. This will be fixed in an upcoming release with an update to xcodeproj 6.0 @@ -592,16 +526,12 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Added `en` as default value for knownRegions #390 @Saik0s - Update `PathKit`, `Spectre`, `Yams` and `xcodeproj` dependencies -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.11.1...1.11.2) - ## 1.11.1 #### Fixed - Fixed `FRAMEWORK_SEARCH_PATHS` for `framework` dependency paths with spaces #382 @brentleyjones - Fixed aggregate targets not being found with `transitivelyLinkDependencies` #383 @brentleyjones -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.11.0...1.11.1) - ## 1.11.0 #### Added @@ -639,22 +569,16 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Moved brew formula to homebrew core - Added `CONTRIBUTING.md` -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.10.3...1.11.0) - ## 1.10.3 #### Fixed - Fixed Mint installations finding `SettingPresets` #338 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.10.2...1.10.3) - ## 1.10.2 #### Changed - Set `transitivelyLinkDependencies` to false by default -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.10.1...1.10.2) - ## 1.10.1 #### Fixed @@ -664,8 +588,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil #### Changed - Code sign all dependencies by default except target executables #332 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.10.0...1.10.1) - ## 1.10.0 #### Added @@ -690,8 +612,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Made `PBXContainerItemProxy` ID more deterministic - Fixed generated framework schemes from being executable #328 @brentleyjones -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.9.0...1.10.0) - ## 1.9.0 #### Added @@ -710,8 +630,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Fixed Homebrew installations issues on some machines #289 @vhbit - Fixed files that are added as root sources from having invalid parent groups outside the project directory #293 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.8.0...1.9.0) - ## 1.8.0 #### Added @@ -726,8 +644,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Make `LegacyTarget` init public #264 @jerrymarino - Upgrade to *xcproj* to 4.2.0, *Yams* to 0.6.0 and *PathKit* to 0.9.1 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.7.0...1.8.0) - ## 1.7.0 #### Added @@ -750,8 +666,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - iMessage extensions now have proper setting presets in regards to app icon and runtime search paths #255 @yonaskolb - Excluded files are not added within .lproj directories #238 @toshi0383 -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.6.0...1.7.0) - ## 1.6.0 #### Added @@ -769,8 +683,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Change arrays to strings in setting presets #218 @allu22 - Updated to xcproj 4.0 #227 -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.5.0...1.6.0) - ## 1.5.0 #### Added @@ -808,8 +720,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - fixed source files from being duplicated if referenced with different casing #212 @yonaskolb - fixed target product name not being written. Fixes integration with R.swift #213 @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.4.0...1.5.0) - ## 1.4.0 #### Added @@ -845,8 +755,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - more tests - added release scripts -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.3.0...1.4.0) - ## 1.3.0 #### Added @@ -872,8 +780,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - fixed duplicate carthage file references #107 @yonaskolb - an error is now shown if you try and generate a target scheme and don't have debug and release builds @yonaskolb -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.2.4...1.3.0) - ## 1.2.4 #### Fixed @@ -884,8 +790,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil #### Changed - update to xcproj 0.3.0 -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.2.3...1.2.4) - ## 1.2.3 #### Fixed @@ -894,8 +798,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Added some missing default settings for framework targets. `SKIP_INSTALL: YES` fixes archiving - Filter out nulls from setting presets if specifying an empty string -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.2.2...1.2.3) - ## 1.2.2 #### Added @@ -906,8 +808,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - fixed tvOS launch screen setting. `ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME` is now `LaunchImage` not `tvOS LaunchImage` -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.2.0...1.2.2) - ## 1.2.0 #### Added @@ -925,24 +825,18 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - look for `INFOPLIST_FILE` setting in project and xcconfig files before adding it automatically. It was just looking in target settings before #64 - exit with error on failure -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.1.0...1.2.0) - ## 1.1.0 #### Changed - set project version to Xcode 9 - `LastUpgradeVersion` attribute to `0900` - set default Swift version to 4.0 - `SWIFT_VERSION` build setting to `4.0` -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.0.1...1.1.0) - ### 1.0.1 ### Fixed - fixed incorrect default build script shell path - fixed install scripts -[Commits](https://github.com/yonaskolb/XcodeGen/compare/1.0.0...1.0.1) - ## 1.0.0 #### Added @@ -958,8 +852,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - **BREAKING**: changed target definitions from list to map #54 -[Commits](https://github.com/yonaskolb/XcodeGen/compare/0.6.1...1.0.0) - ## 0.6.1 #### Added @@ -969,8 +861,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Don't bother linking target frameworks for target dependencies. - Move code signing default settings from all iOS targets to iOS application targets, via Product + Platform setting preset files #46 -[Commits](https://github.com/yonaskolb/XcodeGen/compare/0.6.0...0.6.1) - ## 0.6.0 #### Added @@ -980,8 +870,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Changed default spec path to `project.yml` - Changed default project directory to the current directory instead of the spec file's directory -[Commits](https://github.com/yonaskolb/XcodeGen/compare/0.5.1...0.6.0) - ## 0.5.1 #### Fixed @@ -989,8 +877,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Add `CODE_SIGN_IDENTITY[sdk=iphoneos*]` back to iOS targets - Fix build scripts with "" generating invalid projects #43 -[Commits](https://github.com/yonaskolb/XcodeGen/compare/0.5.0...0.5.1) - ## 0.5.0 #### Added - Added multi platform targets #35 @@ -1005,8 +891,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Renamed Setting Presets to Setting Groups - Carthage group is now created under top level Frameworks group -[Commits](https://github.com/yonaskolb/XcodeGen/compare/0.4.0...0.5.0) - ## 0.4.0 ##### Added @@ -1020,8 +904,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil #### Changed - Upgraded to https://github.com/swift-xcode/xcodeproj 0.1.1 #33 -[Commits](https://github.com/yonaskolb/XcodeGen/compare/0.3.0...0.4.0) - ## 0.3.0 - Extensions and Scheme Tests #### Added @@ -1037,8 +919,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil #### Breaking changes - Changed `Target.generatedSchemes` to `Target.scheme.configVariants` -[Commits](https://github.com/yonaskolb/XcodeGen/compare/0.2...0.3.0) - ## 0.2.0 - Build scripts #### Added @@ -1049,7 +929,6 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil #### Fixed - Fixed some project objects sometimes having duplicate ids -[Commits](https://github.com/yonaskolb/XcodeGen/compare/0.1...0.2) - ## 0.1.0 First official release + From 047e9968d6e5308df73126d72cb42af8527a644c Mon Sep 17 00:00:00 2001 From: Yuya Hirayama Date: Tue, 5 Apr 2022 13:08:02 +0900 Subject: [PATCH 132/284] Fix docc support (#1202) * Update FileType.swift * Update SourceGeneratorTests.swift * Update fixture * Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ Sources/ProjectSpec/FileType.swift | 2 +- Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj | 2 ++ Tests/XcodeGenKitTests/SourceGeneratorTests.swift | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b8d9cac6..21fe20146 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +#### Fixed + +- Fixed an issue where DocC was not added to source file list #1202 @hiragram + ## 2.28.0 #### Added diff --git a/Sources/ProjectSpec/FileType.swift b/Sources/ProjectSpec/FileType.swift index d106b2857..9fa9729b9 100644 --- a/Sources/ProjectSpec/FileType.swift +++ b/Sources/ProjectSpec/FileType.swift @@ -89,6 +89,7 @@ extension FileType { "mlmodel": FileType(buildPhase: .sources), "rcproject": FileType(buildPhase: .sources), "iig": FileType(buildPhase: .sources), + "docc": FileType(buildPhase: .sources), // headers "h": FileType(buildPhase: .headers), @@ -113,6 +114,5 @@ extension FileType { "xcfilelist": FileType(buildPhase: BuildPhaseSpec.none), "apns": FileType(buildPhase: BuildPhaseSpec.none), "pch": FileType(buildPhase: BuildPhaseSpec.none), - "docc": FileType(buildPhase: BuildPhaseSpec.none), ] } diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index f9df6bf94..2e610aaf8 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -42,6 +42,7 @@ 1E03FC7312293997599C6435 /* Empty.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 068EDF47F0B087F6A4052AC0 /* Empty.h */; }; 1E2A4D61E96521FF7123D7B0 /* XPC Service.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 22237B8EBD9E6BE8EBC8735F /* XPC Service.xpc */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 1E457F55331FD2C3E8E00BE2 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 1F9168A43FD8E2FCC2699E14 /* Documentation.docc in Sources */ = {isa = PBXBuildFile; fileRef = B5C943D39DD7812CAB94B614 /* Documentation.docc */; settings = {COMPILER_FLAGS = "-Werror"; }; }; 210B49C23B9717C668B40C8C /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; 2116F89CF5A04EA0EFA30A89 /* TestProjectUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D88C6BF7355702B74396791 /* TestProjectUITests.swift */; }; 212BCB51DAF3212993DDD49E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D51CC8BCCBD68A90E90A3207 /* Assets.xcassets */; }; @@ -2655,6 +2656,7 @@ buildActionMask = 2147483647; files = ( 09617AB755651FFEB2564CBC /* AppDelegate.swift in Sources */, + 1F9168A43FD8E2FCC2699E14 /* Documentation.docc in Sources */, 666DEC173BC78C7641AB22EC /* File1.swift in Sources */, 339578307B9266AB3D7722D9 /* File2.swift in Sources */, F788A3FA1CE6489BC257C1C3 /* Model.xcdatamodeld in Sources */, diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index 3ef691027..e1121df7d 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -655,7 +655,7 @@ class SourceGeneratorTests: XCTestCase { try pbxProj.expectFileMissing(paths: ["C", "Settings.bundle", "Root.plist"]) try pbxProj.expectFileMissing(paths: ["C", "WithPeriod2.0"]) try pbxProj.expectFile(paths: ["C", "WithPeriod2.0", "file.swift"], buildPhase: .sources) - try pbxProj.expectFile(paths: ["C", "Documentation.docc"], buildPhase: BuildPhaseSpec.none) + try pbxProj.expectFile(paths: ["C", "Documentation.docc"], buildPhase: .sources) } $0.it("only omits the defined Info.plist from resource build phases but not other plists") { From e35f7df14d3884bf4cbd550aef1d8d60f9a14c11 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 10 May 2022 13:27:31 +1000 Subject: [PATCH 133/284] Add Test Plans (#716) * upgrade scheme and project versions * parse test plans * remove xctestplan from resources * generate test plan references in schemes * add test plan to fixture * non-mutable way of creating [XCScheme.TestPlanReference] * update fixture version * Add documentation * Add default test plan option # Conflicts: # Sources/ProjectSpec/Scheme.swift # Tests/Fixtures/paths_test/included_paths_test.yml # Tests/ProjectSpecTests/SpecLoadingTests.swift * Add test plan validation # Conflicts: # Tests/ProjectSpecTests/ProjectSpecTests.swift * Check for multiple default test plans * set first plan as default default plan * small tweaks * fix test plan path properties * add test plants to target scheme * docs * fix fixture test plan path * update changelog * added ability to disable test plan path validation Co-authored-by: Ota Mares --- CHANGELOG.md | 5 ++ Docs/ProjectSpec.md | 18 ++++++ Sources/ProjectSpec/FileType.swift | 1 + Sources/ProjectSpec/Project.swift | 1 + Sources/ProjectSpec/Scheme.swift | 33 +++++++++-- Sources/ProjectSpec/SpecOptions.swift | 1 + Sources/ProjectSpec/SpecValidation.swift | 16 ++++++ Sources/ProjectSpec/SpecValidationError.swift | 6 ++ Sources/ProjectSpec/Target.swift | 1 + Sources/ProjectSpec/TargetScheme.swift | 14 +++++ Sources/ProjectSpec/TestPlan.swift | 39 +++++++++++++ Sources/XcodeGenKit/SchemeGenerator.swift | 7 +++ Sources/XcodeGenKit/Version.swift | 4 +- .../Project.xcodeproj/project.pbxproj | 2 +- .../SPM/SPM.xcodeproj/project.pbxproj | 4 +- .../xcshareddata/xcschemes/App.xcscheme | 2 +- .../AnotherProject.xcodeproj/project.pbxproj | 2 +- .../TestProject/App_iOS/App_iOS.xctestplan | 45 +++++++++++++++ .../Project.xcodeproj/project.pbxproj | 4 +- .../xcshareddata/xcschemes/App_Clip.xcscheme | 2 +- .../xcschemes/App_Scheme.xcscheme | 8 ++- .../xcschemes/App_iOS Production.xcscheme | 2 +- .../xcschemes/App_iOS Staging.xcscheme | 2 +- .../xcschemes/App_iOS Test.xcscheme | 2 +- .../xcshareddata/xcschemes/App_macOS.xcscheme | 2 +- .../xcschemes/App_watchOS.xcscheme | 2 +- .../xcschemes/DriverKitDriver.xcscheme | 2 +- .../EndpointSecuritySystemExtension.xcscheme | 2 +- .../xcshareddata/xcschemes/Framework.xcscheme | 2 +- .../xcschemes/NetworkSystemExtension.xcscheme | 2 +- .../xcshareddata/xcschemes/Tool.xcscheme | 2 +- .../xcschemes/iMessageApp.xcscheme | 2 +- .../xcschemes/iMessageExtension.xcscheme | 2 +- Tests/Fixtures/TestProject/project.yml | 2 + .../paths_test/included_paths_test.yml | 17 +++++- .../TestProject.xcodeproj/project.pbxproj | 2 +- Tests/ProjectSpecTests/ProjectSpecTests.swift | 57 +++++++++++++++++++ Tests/ProjectSpecTests/SpecLoadingTests.swift | 23 +++++++- .../SchemeGeneratorTests.swift | 27 +++++++++ 39 files changed, 335 insertions(+), 32 deletions(-) create mode 100644 Sources/ProjectSpec/TestPlan.swift create mode 100644 Tests/Fixtures/TestProject/App_iOS/App_iOS.xctestplan diff --git a/CHANGELOG.md b/CHANGELOG.md index 21fe20146..543740ebb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Next Version +Some support for Xcode Test Plans has been added. For now test plans are not generated by XcodeGen and must be created in Xcode and checked in, and then referenced by path. If the test targets are added, removed or renamed, the test plans may need to be updated in Xcode + +#### Added +- Schemes and Target Schemes can now reference existing Test Plans under `{scheme}.test.testPlans` and `{target}.scheme.testPlans`, respectively. #716 @yonaskolb @omares + #### Fixed - Fixed an issue where DocC was not added to source file list #1202 @hiragram diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 936c2fa5f..85a3157ea 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -114,6 +114,7 @@ Note that target names can also be changed by adding a `name` property to a targ - [ ] **disabledValidations**: **[String]** - A list of validations that can be disabled if they're too strict for your use case. By default this is set to an empty array. Currently these are the available options: - `missingConfigs`: Disable errors for configurations in yaml files that don't exist in the project itself. This can be useful if you include the same yaml file in different projects - `missingConfigFiles`: Disable checking for the existence of configuration files. This can be useful for generating a project in a context where config files are not available. + - `missingTestPlans`: Disable checking if test plan paths exist. This can be useful if your test plans haven't been created yet. - [ ] **defaultConfig**: **String** - The default configuration for command line builds from Xcode. If the configuration provided here doesn't match one in your [configs](#configs) key, XcodeGen will fail. If you don't set this, the first configuration alphabetically will be chosen. - [ ] **groupSortPosition**: **String** - Where groups are sorted in relation to other files. Either: - `none` - sorted alphabetically with all the other files @@ -661,6 +662,7 @@ This is a convenience used to automatically generate schemes for a target based - [ ] **region**: **String** - a String that indicates the region used for running and testing. This defaults to nil - [ ] **commandLineArguments**: **[String:Bool]** - a dictionary from the argument name (`String`) to if it is enabled (`Bool`). These arguments will be added to the Test, Profile and Run scheme actions - [ ] **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. +- [ ] **testPlans**: **[[Test Plan](#test-plan)]** - List of test plan locations that will be referenced in the scheme. - [ ] **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 - [ ] **storeKitConfiguration**: **String** - specify storekit configuration to use during run. See [Options](#options). @@ -833,6 +835,7 @@ A multiline script can be written using the various YAML multiline methods, for - [ ] **customLLDBInit**: **String** - the absolute path to the custom `.lldbinit` file - [ ] **captureScreenshotsAutomatically**: **Bool** - indicates whether screenshots should be captured automatically while UI Testing. This defaults to true. - [ ] **deleteScreenshotsWhenEachTestSucceeds**: **Bool** - whether successful UI tests should cause automatically-captured screenshots to be deleted. If `captureScreenshotsAutomatically` is false, this value is ignored. This defaults to true. +- [ ] **testPlans**: **[[Test Plan](#test-plan)]** - List of test plan locations that will be referenced in the scheme. #### Test Target A target can be one of a 2 types: @@ -940,6 +943,21 @@ schemes: revealArchiveInOrganizer: false ``` +### Test Plan +For now test plans are not generated by XcodeGen and must be created in Xcode and checked in, and then referenced by path. If the test targets are added, removed or renamed, the test plans may need to be updated in Xcode. + +- [x] **path**: **String** - path that provides the `xctestplan` location. +- [ ] **defaultPlan**: **Bool** - a bool that defines if given plan is the default one. Defaults to false. If no default is set on any test plan, the first plan is set as the default. + +```yaml +schemes: + TestTarget: + test: + testPlans: + - path: app.xctestplan + defaultPlan: true +``` + ## Scheme Template This is a template that can be referenced from a normal scheme using the `templates` property. The properties of this template are the same as a [Scheme](#scheme). This functions identically in practice to [Target Template](#target-template). diff --git a/Sources/ProjectSpec/FileType.swift b/Sources/ProjectSpec/FileType.swift index 9fa9729b9..70ae76321 100644 --- a/Sources/ProjectSpec/FileType.swift +++ b/Sources/ProjectSpec/FileType.swift @@ -114,5 +114,6 @@ extension FileType { "xcfilelist": FileType(buildPhase: BuildPhaseSpec.none), "apns": FileType(buildPhase: BuildPhaseSpec.none), "pch": FileType(buildPhase: BuildPhaseSpec.none), + "xctestplan": FileType(buildPhase: BuildPhaseSpec.none), ] } diff --git a/Sources/ProjectSpec/Project.swift b/Sources/ProjectSpec/Project.swift index f015d55f5..bc82e9aa5 100644 --- a/Sources/ProjectSpec/Project.swift +++ b/Sources/ProjectSpec/Project.swift @@ -230,6 +230,7 @@ extension Project: PathContainer { .object("targets", Target.pathProperties), .object("targetTemplates", Target.pathProperties), .object("aggregateTargets", AggregateTarget.pathProperties), + .object("schemes", Scheme.pathProperties), .object("projectReferences", ProjectReference.pathProperties), ] } diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index 73c762d62..00ffafd19 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -123,7 +123,7 @@ public struct Scheme: Equatable { public var macroExpansion: String? public init( - config: String, + config: String? = nil, executable: String? = nil, commandLineArguments: [String: Bool] = [:], preActions: [ExecutionAction] = [], @@ -182,6 +182,7 @@ public struct Scheme: Equatable { public var customLLDBInit: String? public var captureScreenshotsAutomatically: Bool public var deleteScreenshotsWhenEachTestSucceeds: Bool + public var testPlans: [TestPlan] public struct TestTarget: Equatable, ExpressibleByStringLiteral { @@ -231,7 +232,7 @@ public struct Scheme: Equatable { } public init( - config: String, + config: String? = nil, gatherCoverageData: Bool = gatherCoverageDataDefault, coverageTargets: [TestableTargetReference] = [], disableMainThreadChecker: Bool = disableMainThreadCheckerDefault, @@ -242,6 +243,7 @@ public struct Scheme: Equatable { preActions: [ExecutionAction] = [], postActions: [ExecutionAction] = [], environmentVariables: [XCScheme.EnvironmentVariable] = [], + testPlans: [TestPlan] = [], language: String? = nil, region: String? = nil, debugEnabled: Bool = debugEnabledDefault, @@ -258,6 +260,7 @@ public struct Scheme: Equatable { self.preActions = preActions self.postActions = postActions self.environmentVariables = environmentVariables + self.testPlans = testPlans self.language = language self.region = region self.debugEnabled = debugEnabled @@ -287,7 +290,7 @@ public struct Scheme: Equatable { public var askForAppToLaunch: Bool? public init( - config: String, + config: String? = nil, commandLineArguments: [String: Bool] = [:], preActions: [ExecutionAction] = [], postActions: [ExecutionAction] = [], @@ -316,7 +319,7 @@ public struct Scheme: Equatable { public var preActions: [ExecutionAction] public var postActions: [ExecutionAction] public init( - config: String, + config: String? = nil, customArchiveName: String? = nil, revealArchiveInOrganizer: Bool = revealArchiveInOrganizerDefault, preActions: [ExecutionAction] = [], @@ -341,6 +344,17 @@ public struct Scheme: Equatable { } } +extension Scheme: PathContainer { + + static var pathProperties: [PathProperty] { + [ + .dictionary([ + .object("test", Test.pathProperties), + ]), + ] + } +} + protocol BuildAction: Equatable { var config: String? { get } } @@ -460,6 +474,15 @@ extension Scheme.Run: JSONEncodable { } } +extension Scheme.Test: PathContainer { + + static var pathProperties: [PathProperty] { + [ + .object("testPlans", TestPlan.pathProperties), + ] + } +} + extension Scheme.Test: JSONObjectConvertible { public init(jsonDictionary: JSONDictionary) throws { @@ -499,6 +522,7 @@ extension Scheme.Test: JSONObjectConvertible { preActions = jsonDictionary.json(atKeyPath: "preActions") ?? [] postActions = jsonDictionary.json(atKeyPath: "postActions") ?? [] environmentVariables = try XCScheme.EnvironmentVariable.parseAll(jsonDictionary: jsonDictionary) + testPlans = try (jsonDictionary.json(atKeyPath: "testPlans") ?? []).map { try TestPlan(jsonDictionary: $0) } language = jsonDictionary.json(atKeyPath: "language") region = jsonDictionary.json(atKeyPath: "region") debugEnabled = jsonDictionary.json(atKeyPath: "debugEnabled") ?? Scheme.Test.debugEnabledDefault @@ -516,6 +540,7 @@ extension Scheme.Test: JSONEncodable { "preActions": preActions.map { $0.toJSONValue() }, "postActions": postActions.map { $0.toJSONValue() }, "environmentVariables": environmentVariables.map { $0.toJSONValue() }, + "testPlans": testPlans.map { $0.toJSONValue() }, "config": config, "language": language, "region": region, diff --git a/Sources/ProjectSpec/SpecOptions.swift b/Sources/ProjectSpec/SpecOptions.swift index f70139ef7..a5df4e28d 100644 --- a/Sources/ProjectSpec/SpecOptions.swift +++ b/Sources/ProjectSpec/SpecOptions.swift @@ -41,6 +41,7 @@ public struct SpecOptions: Equatable { public enum ValidationType: String { case missingConfigs case missingConfigFiles + case missingTestPlans } public enum SettingPresets: String { diff --git a/Sources/ProjectSpec/SpecValidation.swift b/Sources/ProjectSpec/SpecValidation.swift index bf814ead4..c0141b100 100644 --- a/Sources/ProjectSpec/SpecValidation.swift +++ b/Sources/ProjectSpec/SpecValidation.swift @@ -126,6 +126,11 @@ extension Project { errors.append(.invalidTargetSchemeTest(target: target.name, testTarget: testTarget.name)) } } + + if !options.disabledValidations.contains(.missingTestPlans) { + let invalidTestPlans: [TestPlan] = scheme.testPlans.filter { !(basePath + $0.path).exists } + errors.append(contentsOf: invalidTestPlans.map{ .invalidTestPlan($0) }) + } } for script in target.buildScripts { @@ -205,6 +210,17 @@ extension Project { if let action = scheme.run, let config = action.config, getConfig(config) == nil { errors.append(.invalidSchemeConfig(scheme: scheme.name, config: config)) } + + if !options.disabledValidations.contains(.missingTestPlans) { + let invalidTestPlans: [TestPlan] = scheme.test?.testPlans.filter { !(basePath + $0.path).exists } ?? [] + errors.append(contentsOf: invalidTestPlans.map{ .invalidTestPlan($0) }) + } + + let defaultPlanCount = scheme.test?.testPlans.filter { $0.defaultPlan }.count ?? 0 + if (defaultPlanCount > 1) { + errors.append(.multipleDefaultTestPlans) + } + if let action = scheme.test, let config = action.config, getConfig(config) == nil { errors.append(.invalidSchemeConfig(scheme: scheme.name, config: config)) } diff --git a/Sources/ProjectSpec/SpecValidationError.swift b/Sources/ProjectSpec/SpecValidationError.swift index f4025bbf8..2cbf04473 100644 --- a/Sources/ProjectSpec/SpecValidationError.swift +++ b/Sources/ProjectSpec/SpecValidationError.swift @@ -33,6 +33,8 @@ public struct SpecValidationError: Error, CustomStringConvertible { case invalidPerConfigSettings case invalidProjectReference(scheme: String, reference: String) case invalidProjectReferencePath(ProjectReference) + case invalidTestPlan(TestPlan) + case multipleDefaultTestPlans public var description: String { switch self { @@ -82,6 +84,10 @@ public struct SpecValidationError: Error, CustomStringConvertible { return "Scheme \(scheme.quoted) has invalid project reference \(project.quoted)" case let .invalidProjectReferencePath(reference): return "Project reference \(reference.name) has a project file path that doesn't exist \"\(reference.path)\"" + case let .invalidTestPlan(testPlan): + return "Test plan path \"\(testPlan.path)\" doesn't exist" + case .multipleDefaultTestPlans: + return "Your test plans contain more than one default test plan" } } } diff --git a/Sources/ProjectSpec/Target.swift b/Sources/ProjectSpec/Target.swift index 60752f445..9736694ce 100644 --- a/Sources/ProjectSpec/Target.swift +++ b/Sources/ProjectSpec/Target.swift @@ -144,6 +144,7 @@ extension Target: PathContainer { .object("postCompileScripts", BuildScript.pathProperties), .object("postBuildScripts", BuildScript.pathProperties), .object("legacy", LegacyTarget.pathProperties), + .object("scheme", TargetScheme.pathProperties), ]), ] } diff --git a/Sources/ProjectSpec/TargetScheme.swift b/Sources/ProjectSpec/TargetScheme.swift index 9eb7f2792..59818a070 100644 --- a/Sources/ProjectSpec/TargetScheme.swift +++ b/Sources/ProjectSpec/TargetScheme.swift @@ -22,9 +22,11 @@ public struct TargetScheme: Equatable { public var environmentVariables: [XCScheme.EnvironmentVariable] public var preActions: [Scheme.ExecutionAction] public var postActions: [Scheme.ExecutionAction] + public var testPlans: [TestPlan] public init( testTargets: [Scheme.Test.TestTarget] = [], + testPlans: [TestPlan] = [], configVariants: [String] = [], gatherCoverageData: Bool = gatherCoverageDataDefault, coverageTargets: [TestableTargetReference] = [], @@ -40,6 +42,7 @@ public struct TargetScheme: Equatable { postActions: [Scheme.ExecutionAction] = [] ) { self.testTargets = testTargets + self.testPlans = testPlans self.configVariants = configVariants self.gatherCoverageData = gatherCoverageData self.coverageTargets = coverageTargets @@ -89,6 +92,7 @@ extension TargetScheme: JSONObjectConvertible { coverageTargets = [] } + testPlans = try (jsonDictionary.json(atKeyPath: "testPlans") ?? []).map { try TestPlan(jsonDictionary: $0) } configVariants = jsonDictionary.json(atKeyPath: "configVariants") ?? [] gatherCoverageData = jsonDictionary.json(atKeyPath: "gatherCoverageData") ?? TargetScheme.gatherCoverageDataDefault storeKitConfiguration = jsonDictionary.json(atKeyPath: "storeKitConfiguration") @@ -111,6 +115,7 @@ extension TargetScheme: JSONEncodable { "coverageTargets": coverageTargets.map { $0.reference }, "commandLineArguments": commandLineArguments, "testTargets": testTargets.map { $0.toJSONValue() }, + "testPlans": testPlans.map { $0.toJSONValue() }, "environmentVariables": environmentVariables.map { $0.toJSONValue() }, "preActions": preActions.map { $0.toJSONValue() }, "postActions": postActions.map { $0.toJSONValue() }, @@ -147,3 +152,12 @@ extension TargetScheme: JSONEncodable { return dict } } + +extension TargetScheme: PathContainer { + + static var pathProperties: [PathProperty] { + [ + .object("testPlans", TestPlan.pathProperties), + ] + } +} diff --git a/Sources/ProjectSpec/TestPlan.swift b/Sources/ProjectSpec/TestPlan.swift new file mode 100644 index 000000000..c3ebf0d49 --- /dev/null +++ b/Sources/ProjectSpec/TestPlan.swift @@ -0,0 +1,39 @@ +import Foundation +import JSONUtilities + +public struct TestPlan: Equatable { + public var path: String + public var defaultPlan: Bool + + public init(path: String, defaultPlan: Bool = false) { + self.defaultPlan = defaultPlan + self.path = path + } +} + + +extension TestPlan: JSONObjectConvertible { + + public init(jsonDictionary: JSONDictionary) throws { + path = try jsonDictionary.json(atKeyPath: "path") + defaultPlan = jsonDictionary.json(atKeyPath: "defaultPlan") ?? false + } +} + +extension TestPlan: JSONEncodable { + public func toJSONValue() -> Any { + [ + "path": path, + "defaultPlan": defaultPlan, + ] + } +} + +extension TestPlan: PathContainer { + + static var pathProperties: [PathProperty] { + [ + .string("path"), + ] + } +} diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index b96077243..60922f29e 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -245,10 +245,16 @@ public class SchemeGenerator { let launchVariables = scheme.run.flatMap { $0.environmentVariables.isEmpty ? nil : $0.environmentVariables } let profileVariables = scheme.profile.flatMap { $0.environmentVariables.isEmpty ? nil : $0.environmentVariables } + let defaultTestPlanIndex = scheme.test?.testPlans.firstIndex { $0.defaultPlan } ?? 0 + let testPlans = scheme.test?.testPlans.enumerated().map { index, testPlan in + XCScheme.TestPlanReference(reference: "container:\(testPlan.path)", default: defaultTestPlanIndex == index) + } ?? [] + let testAction = XCScheme.TestAction( buildConfiguration: scheme.test?.config ?? defaultDebugConfig.name, macroExpansion: buildableReference, testables: testables, + testPlans: testPlans.isEmpty ? nil : testPlans, preActions: scheme.test?.preActions.map(getExecutionAction) ?? [], postActions: scheme.test?.postActions.map(getExecutionAction) ?? [], selectedDebuggerIdentifier: (scheme.test?.debugEnabled ?? Scheme.Test.debugEnabledDefault) ? XCScheme.defaultDebugger : "", @@ -439,6 +445,7 @@ extension Scheme { commandLineArguments: targetScheme.commandLineArguments, targets: targetScheme.testTargets, environmentVariables: targetScheme.environmentVariables, + testPlans: targetScheme.testPlans, language: targetScheme.language, region: targetScheme.region ), diff --git a/Sources/XcodeGenKit/Version.swift b/Sources/XcodeGenKit/Version.swift index f94d42e26..fe1b24af8 100644 --- a/Sources/XcodeGenKit/Version.swift +++ b/Sources/XcodeGenKit/Version.swift @@ -8,11 +8,11 @@ extension Project { } var schemeVersion: String { - "1.3" + "1.7" } var compatibilityVersion: String { - "Xcode 10.0" + "Xcode 11.0" } var objectVersion: UInt { diff --git a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj index 1c1440059..b99951bd2 100644 --- a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj @@ -317,7 +317,7 @@ }; }; buildConfigurationList = D91E14E36EC0B415578456F2 /* Build configuration list for PBXProject "Project" */; - compatibilityVersion = "Xcode 10.0"; + compatibilityVersion = "Xcode 11.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index 234e31cfe..9efdbfe4f 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -11,7 +11,6 @@ 2DA7998902987953B119E4CE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26F7EFEE613987D1E1258A60 /* AppDelegate.swift */; }; 3986ED6965842721C46C0452 /* SwiftRoaringDynamic in Frameworks */ = {isa = PBXBuildFile; productRef = DC73B269C8B0C0BF6912842C /* SwiftRoaringDynamic */; }; 4CC663B42B270404EF5FD037 /* libStaticLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CAB5625F6FEA668410ED5482 /* libStaticLibrary.a */; }; - 578E78BC3627CF48FB2CE129 /* App.xctestplan in Resources */ = {isa = PBXBuildFile; fileRef = A9601593D0AD02931266A4E5 /* App.xctestplan */; }; 9AD886A88D3E4A1B5E900687 /* SPMTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7970A2253B14A9B27C307FAC /* SPMTests.swift */; }; 9C4AD0711D706FD3ED0E436D /* StaticLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61C17B77601A9D1B7895AB42 /* StaticLibrary.swift */; }; B89EA0F3859878A1DCF7BAFD /* SwiftRoaringDynamic in Embed Frameworks */ = {isa = PBXBuildFile; productRef = DC73B269C8B0C0BF6912842C /* SwiftRoaringDynamic */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -204,7 +203,7 @@ }; }; buildConfigurationList = 425866ADA259DB93FC4AF1E3 /* Build configuration list for PBXProject "SPM" */; - compatibilityVersion = "Xcode 10.0"; + compatibilityVersion = "Xcode 11.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -231,7 +230,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 578E78BC3627CF48FB2CE129 /* App.xctestplan in Resources */, E368431019ABC696E4FFC0CF /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme b/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme index ff4048c2f..a1a2a212e 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme @@ -1,7 +1,7 @@ + version = "1.7"> + version = "1.7"> + version = "1.7"> + + + + diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme index 479690500..36f91c749 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Production.xcscheme @@ -1,7 +1,7 @@ + version = "1.7"> + version = "1.7"> + version = "1.7"> + version = "1.7"> + version = "1.7"> + version = "1.7"> + version = "1.7"> + version = "1.7"> + version = "1.7"> + version = "1.7"> + version = "1.7"> Date: Tue, 10 May 2022 15:03:39 +1000 Subject: [PATCH 134/284] update xcodeproj (#1213) --- CHANGELOG.md | 5 +++++ Package.resolved | 4 ++-- Package.swift | 2 +- Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 543740ebb..4a693bfff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,17 @@ Some support for Xcode Test Plans has been added. For now test plans are not generated by XcodeGen and must be created in Xcode and checked in, and then referenced by path. If the test targets are added, removed or renamed, the test plans may need to be updated in Xcode #### Added + - Schemes and Target Schemes can now reference existing Test Plans under `{scheme}.test.testPlans` and `{target}.scheme.testPlans`, respectively. #716 @yonaskolb @omares #### Fixed - Fixed an issue where DocC was not added to source file list #1202 @hiragram +#### Changed + +- Updated XcodeProj to 8.7.1 #1213 @yonaskolb + ## 2.28.0 #### Added diff --git a/Package.resolved b/Package.resolved index e883890e9..613d2c8f0 100644 --- a/Package.resolved +++ b/Package.resolved @@ -78,8 +78,8 @@ "repositoryURL": "https://github.com/tuist/XcodeProj.git", "state": { "branch": null, - "revision": "aa2a42c7a744ca18b5918771fdd6cf40f9753db5", - "version": "8.6.0" + "revision": "c75c3acc25460195cfd203a04dde165395bf00e0", + "version": "8.7.1" } }, { diff --git a/Package.swift b/Package.swift index c1d72975f..bbdef9595 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.6.0"), + .package(url: "https://github.com/tuist/XcodeProj.git", from: "8.7.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/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 8ff7142d0..cc3fa31dc 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -766,7 +766,7 @@ B198242976C3395E31FE000A /* MessagesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagesViewController.swift; sourceTree = ""; }; B1C33BB070583BE3B0EC0E68 /* App_iOS.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = App_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; B221F5A689AD7D3AD52F56B8 /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; - B5C943D39DD7812CAB94B614 /* Documentation.docc */ = {isa = PBXFileReference; path = Documentation.docc; sourceTree = ""; }; + B5C943D39DD7812CAB94B614 /* Documentation.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = Documentation.docc; sourceTree = ""; }; B76E17CE3574081D5BF45B44 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; BA040F1F7D6CA08878323A55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; BB178D03E75929F3F5B10C56 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; From 29bcb9259136f04781ef5d736471f01357e43b04 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Tue, 10 May 2022 15:04:43 +1000 Subject: [PATCH 135/284] Update to 2.29.0 --- CHANGELOG.md | 2 ++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a693bfff..aa5408714 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.29.0 + Some support for Xcode Test Plans has been added. For now test plans are not generated by XcodeGen and must be created in Xcode and checked in, and then referenced by path. If the test targets are added, removed or renamed, the test plans may need to be updated in Xcode #### Added diff --git a/Makefile b/Makefile index 467033559..d5f6668c9 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.28.0 +VERSION = 2.29.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 8966c4c0e..b8088cbeb 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.28.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.29.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index f64962f9e..e80d7965f 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.28.0") +let version = Version("2.29.0") let cli = XcodeGenCLI(version: version) cli.execute() From a2348d0cfa32427599ff3ec351b59709e3f65f5c Mon Sep 17 00:00:00 2001 From: Mark Turner Date: Wed, 15 Jun 2022 04:33:42 +0100 Subject: [PATCH 136/284] Example of vscode usage as a development environment (#1218) --- Docs/Examples.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Docs/Examples.md b/Docs/Examples.md index 27159d966..b2120985c 100644 --- a/Docs/Examples.md +++ b/Docs/Examples.md @@ -11,3 +11,4 @@ These are a bunch of real world examples of XcodeGen project specs. Feel free to - [minvws/nl-covid19-notification-app-ios](https://github.com/minvws/nl-covid19-notification-app-ios/blob/master/project.yml) - [pvinis/react-native-xcodegen](https://github.com/pvinis/react-native-xcodegen/blob/master/templates) - [covid19cz/erouska-ios](https://github.com/covid19cz/erouska-ios/blob/develop/project.yml) +- [markst/hotreloading-vscode-ios](https://github.com/markst/hotreloading-vscode-ios) From f65dad76252a876eae19ce72ea3649f95401e084 Mon Sep 17 00:00:00 2001 From: JP Simard Date: Wed, 15 Jun 2022 23:54:28 -0400 Subject: [PATCH 137/284] Speed up SettingsBuilder (#1221) * Speed up SettingsBuilder It's unnecessary to build up a whole grouped dictionary only to check if all platforms are identical and then immediately discard the dictionary. Instead we can check if all targets match the first platform, which avoids creating a new dictionary but also allows bailing early as soon as a non-matching platform is found. Generating a large project (36MB json spec) on an M1 Max machine leads to a ~6% total speedup: 28.48s vs 30.07s. * Add changelog entry --- CHANGELOG.md | 4 ++++ Sources/XcodeGenKit/SettingsBuilder.swift | 12 +++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa5408714..b8200acb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Changed + +- Speed up generating build settings for large projects #1221 @jpsim + ## 2.29.0 Some support for Xcode Test Plans has been added. For now test plans are not generated by XcodeGen and must be created in Xcode and checked in, and then referenced by path. If the test targets are added, removed or renamed, the test plans may need to be updated in Xcode diff --git a/Sources/XcodeGenKit/SettingsBuilder.swift b/Sources/XcodeGenKit/SettingsBuilder.swift index 4ac1853c3..36a252db9 100644 --- a/Sources/XcodeGenKit/SettingsBuilder.swift +++ b/Sources/XcodeGenKit/SettingsBuilder.swift @@ -11,12 +11,10 @@ extension Project { var buildSettings: BuildSettings = [:] // set project SDKROOT is a single platform - if targets.count > 0 { - let platforms = Dictionary(grouping: targets) { $0.platform } - if platforms.count == 1 { - let platform = platforms.first!.key - buildSettings["SDKROOT"] = platform.sdkRoot - } + if let firstPlatform = targets.first?.platform, + targets.allSatisfy({ $0.platform == firstPlatform }) + { + buildSettings["SDKROOT"] = firstPlatform.sdkRoot } if let type = config.type, options.settingPresets.applyProject { @@ -31,7 +29,7 @@ extension Project { } } - // Prevent setting presets from overrwriting settings in project xcconfig files + // Prevent setting presets from overwriting settings in project xcconfig files if let configPath = configFiles[config.name] { buildSettings = removeConfigFileSettings(from: buildSettings, configPath: configPath) } From 19817f319272cbb3cb5d20992a0289a733191b19 Mon Sep 17 00:00:00 2001 From: Luca Bartoletti Date: Sat, 16 Jul 2022 07:46:31 +0100 Subject: [PATCH 138/284] Fix `watchapp2-container` product name (#1219) The correct name is `application.watchapp2-container` --- Docs/ProjectSpec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 85a3157ea..d29087426 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -274,6 +274,7 @@ This will provide default build settings for a certain product type. It can be a - `application.messages` - `application.watchapp` - `application.watchapp2` +- `application.watchapp2-container` - `app-extension` - `app-extension.intents-service` - `app-extension.messages` @@ -289,7 +290,6 @@ This will provide default build settings for a certain product type. It can be a - `framework.static` - `tool` - `tv-app-extension` -- `watchapp2-container` - `watchkit-extension` - `watchkit2-extension` - `xcode-extension` From c082bc0c7cf0181907921c27df0f12da796c0fc1 Mon Sep 17 00:00:00 2001 From: Aleksei Sapitskii <45671572+aleksproger@users.noreply.github.com> Date: Sat, 16 Jul 2022 09:46:42 +0300 Subject: [PATCH 139/284] Fix XcodeGen building after XcodeProj update to 8.8.0 (#1228) * Fix XcodeGen building after XcodeProj update to 8.8.0 **Reason** - XcodeProj has been updated and has API breaking changes **Content** - Added new enum case handling in `Linkage` - Renamed the enum case name for `XCWorkspaceDataFileRef.init` * add new product type to docs * update changelog Co-authored-by: Yonas Kolb --- CHANGELOG.md | 7 ++++- Docs/ProjectSpec.md | 1 + Package.resolved | 4 +-- Package.swift | 2 +- Sources/ProjectSpec/Linkage.swift | 3 +- Sources/XcodeGenKit/ProjectGenerator.swift | 2 +- .../xcshareddata/xcschemes/App.xcscheme | 22 +++++++-------- .../xcshareddata/xcschemes/App_Clip.xcscheme | 22 +++++++-------- .../xcschemes/App_Scheme.xcscheme | 28 +++++++++---------- .../xcschemes/App_iOS Production.xcscheme | 26 ++++++++--------- .../xcschemes/App_iOS Staging.xcscheme | 26 ++++++++--------- .../xcschemes/App_iOS Test.xcscheme | 26 ++++++++--------- .../xcshareddata/xcschemes/App_macOS.xcscheme | 8 +++--- .../xcschemes/App_watchOS.xcscheme | 12 ++++---- .../xcschemes/DriverKitDriver.xcscheme | 8 +++--- .../EndpointSecuritySystemExtension.xcscheme | 8 +++--- .../xcshareddata/xcschemes/Framework.xcscheme | 8 +++--- .../xcschemes/NetworkSystemExtension.xcscheme | 8 +++--- .../xcshareddata/xcschemes/Tool.xcscheme | 8 +++--- .../xcschemes/iMessageApp.xcscheme | 8 +++--- .../xcschemes/iMessageExtension.xcscheme | 12 ++++---- 21 files changed, 128 insertions(+), 121 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8200acb7..473f529bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,15 @@ ## Next Version -### Changed +### Added +- Added support for new target type `extensionkit-extension` in Xcode 14 #1228 @aleksproger +### Changed - Speed up generating build settings for large projects #1221 @jpsim +### Fixed +- Fix XcodeGen building as library after breaking XcodeProj update 8.8.0 #1228 @aleksproger + ## 2.29.0 Some support for Xcode Test Plans has been added. For now test plans are not generated by XcodeGen and must be created in Xcode and checked in, and then referenced by path. If the test targets are added, removed or renamed, the test plans may need to be updated in Xcode diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index d29087426..93edda1c6 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -283,6 +283,7 @@ This will provide default build settings for a certain product type. It can be a - `bundle.ocunit-test` - `bundle.ui-testing` - `bundle.unit-test` +- `extensionkit-extension` - `framework` - `instruments-package` - `library.dynamic` diff --git a/Package.resolved b/Package.resolved index 613d2c8f0..509ec1c4d 100644 --- a/Package.resolved +++ b/Package.resolved @@ -78,8 +78,8 @@ "repositoryURL": "https://github.com/tuist/XcodeProj.git", "state": { "branch": null, - "revision": "c75c3acc25460195cfd203a04dde165395bf00e0", - "version": "8.7.1" + "revision": "b6de1bfe021b861c94e7c83821b595083f74b997", + "version": "8.8.0" } }, { diff --git a/Package.swift b/Package.swift index bbdef9595..9d709baf7 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.7.0"), + .package(url: "https://github.com/tuist/XcodeProj.git", from: "8.8.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/Linkage.swift b/Sources/ProjectSpec/Linkage.swift index 0e134fa08..250f8207f 100644 --- a/Sources/ProjectSpec/Linkage.swift +++ b/Sources/ProjectSpec/Linkage.swift @@ -35,7 +35,8 @@ extension Target { .xcodeExtension, .xpcService, .systemExtension, - .driverExtension: + .driverExtension, + .extensionKitExtension: return .none case .framework, .xcFramework: // Check the MACH_O_TYPE for "Static Framework" diff --git a/Sources/XcodeGenKit/ProjectGenerator.swift b/Sources/XcodeGenKit/ProjectGenerator.swift index 65f3216ec..798b112f1 100644 --- a/Sources/XcodeGenKit/ProjectGenerator.swift +++ b/Sources/XcodeGenKit/ProjectGenerator.swift @@ -32,7 +32,7 @@ public class ProjectGenerator { } func generateWorkspace() throws -> XCWorkspace { - let selfReference = XCWorkspaceDataFileRef(location: .`self`("")) + let selfReference = XCWorkspaceDataFileRef(location: .current("")) let dataElement = XCWorkspaceDataElement.file(selfReference) let workspaceData = XCWorkspaceData(children: [dataElement]) return XCWorkspace(data: workspaceData) diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme b/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme index a1a2a212e..8e271576f 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme @@ -27,8 +27,17 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - onlyGenerateCoverageForSpecifiedTargets = "NO" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + + + @@ -51,15 +60,6 @@ - - - - diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme index 5634a004d..a82515872 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme @@ -27,8 +27,17 @@ buildConfiguration = "Production Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - onlyGenerateCoverageForSpecifiedTargets = "NO" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + + + @@ -51,15 +60,6 @@ - - - - diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme index c157cfbed..b4e470e1b 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme @@ -27,16 +27,25 @@ buildConfiguration = "Production Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - codeCoverageEnabled = "YES" - onlyGenerateCoverageForSpecifiedTargets = "NO" + customLLDBInitFile = "${SRCROOT}/.lldbinit" shouldUseLaunchSchemeArgsEnv = "YES" - customLLDBInitFile = "${SRCROOT}/.lldbinit"> + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + + + @@ -65,15 +74,6 @@ - - - - @@ -81,13 +81,13 @@ buildConfiguration = "Production Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + customLLDBInitFile = "${SRCROOT}/.lldbinit" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" - allowLocationSimulation = "YES" - customLLDBInitFile = "${SRCROOT}/.lldbinit"> + allowLocationSimulation = "YES"> + disableMainThreadChecker = "YES" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + @@ -53,15 +62,6 @@ - - - - diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Staging.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Staging.xcscheme index ca647df98..d68715c4c 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Staging.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Staging.xcscheme @@ -27,10 +27,19 @@ buildConfiguration = "Staging Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - codeCoverageEnabled = "YES" - onlyGenerateCoverageForSpecifiedTargets = "YES" shouldUseLaunchSchemeArgsEnv = "NO" - disableMainThreadChecker = "YES"> + disableMainThreadChecker = "YES" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + @@ -53,15 +62,6 @@ - - - - diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Test.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Test.xcscheme index cef83f897..38d23c89b 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Test.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_iOS Test.xcscheme @@ -27,10 +27,19 @@ buildConfiguration = "Test Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - codeCoverageEnabled = "YES" - onlyGenerateCoverageForSpecifiedTargets = "YES" shouldUseLaunchSchemeArgsEnv = "NO" - disableMainThreadChecker = "YES"> + disableMainThreadChecker = "YES" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + @@ -53,15 +62,6 @@ - - - - diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_macOS.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_macOS.xcscheme index 094f19bb0..b4c58b615 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_macOS.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_macOS.xcscheme @@ -27,10 +27,8 @@ buildConfiguration = "Production Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - onlyGenerateCoverageForSpecifiedTargets = "NO" - shouldUseLaunchSchemeArgsEnv = "YES"> - - + shouldUseLaunchSchemeArgsEnv = "YES" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_watchOS.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_watchOS.xcscheme index 3282fb2af..63ec7f6a8 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_watchOS.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_watchOS.xcscheme @@ -41,10 +41,8 @@ buildConfiguration = "Production Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - onlyGenerateCoverageForSpecifiedTargets = "NO" - shouldUseLaunchSchemeArgsEnv = "YES"> - - + shouldUseLaunchSchemeArgsEnv = "YES" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + @@ -68,8 +68,8 @@ debugServiceExtension = "internal" allowLocationSimulation = "YES"> + runnableDebuggingMode = "2" + BundleIdentifier = "com.apple.Carousel"> - - + shouldUseLaunchSchemeArgsEnv = "YES" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/EndpointSecuritySystemExtension.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/EndpointSecuritySystemExtension.xcscheme index 9657adfa5..be2f3dab4 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/EndpointSecuritySystemExtension.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/EndpointSecuritySystemExtension.xcscheme @@ -27,10 +27,8 @@ buildConfiguration = "Production Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - onlyGenerateCoverageForSpecifiedTargets = "NO" - shouldUseLaunchSchemeArgsEnv = "YES"> - - + shouldUseLaunchSchemeArgsEnv = "YES" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme index af66ac90f..d2be18573 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme @@ -46,12 +46,10 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" language = "ja" + shouldUseLaunchSchemeArgsEnv = "YES" region = "en" codeCoverageEnabled = "YES" - onlyGenerateCoverageForSpecifiedTargets = "NO" - shouldUseLaunchSchemeArgsEnv = "YES"> - - + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/NetworkSystemExtension.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/NetworkSystemExtension.xcscheme index 960e22426..81af9fc04 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/NetworkSystemExtension.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/NetworkSystemExtension.xcscheme @@ -27,10 +27,8 @@ buildConfiguration = "Production Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - onlyGenerateCoverageForSpecifiedTargets = "NO" - shouldUseLaunchSchemeArgsEnv = "YES"> - - + shouldUseLaunchSchemeArgsEnv = "YES" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme index bdde4cd53..4eea0b5b4 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Tool.xcscheme @@ -27,10 +27,8 @@ buildConfiguration = "Production Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - onlyGenerateCoverageForSpecifiedTargets = "NO" - shouldUseLaunchSchemeArgsEnv = "YES"> - - + shouldUseLaunchSchemeArgsEnv = "YES" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/iMessageApp.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/iMessageApp.xcscheme index 064fffc40..30a5fccf5 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/iMessageApp.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/iMessageApp.xcscheme @@ -27,10 +27,8 @@ buildConfiguration = "Production Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - onlyGenerateCoverageForSpecifiedTargets = "NO" - shouldUseLaunchSchemeArgsEnv = "YES"> - - + shouldUseLaunchSchemeArgsEnv = "YES" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme index ed530e2c9..5a9e872ba 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/iMessageExtension.xcscheme @@ -1,8 +1,8 @@ + wasCreatedForAppExtension = "YES" + version = "1.7"> - - + shouldUseLaunchSchemeArgsEnv = "YES" + onlyGenerateCoverageForSpecifiedTargets = "NO"> + + From c1d5c65ae48e70f7424cc2084904a688c0236d5d Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Sat, 16 Jul 2022 16:57:26 +1000 Subject: [PATCH 140/284] Update to 2.30.0 --- CHANGELOG.md | 2 ++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 473f529bc..924fe6c80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.30.0 + ### Added - Added support for new target type `extensionkit-extension` in Xcode 14 #1228 @aleksproger diff --git a/Makefile b/Makefile index d5f6668c9..95dd937ba 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.29.0 +VERSION = 2.30.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index b8088cbeb..742132d09 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.29.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.30.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index e80d7965f..9560bb756 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.29.0") +let version = Version("2.30.0") let cli = XcodeGenCLI(version: version) cli.execute() From da8aad004fab67da0ea3a126dc9791a65665bc36 Mon Sep 17 00:00:00 2001 From: matsuji Date: Thu, 21 Jul 2022 20:25:34 +0900 Subject: [PATCH 141/284] Add a new CopyFilesBuildPhase, "Embed ExtensionKit Extensions" (#1230) * Embed ExtensionKit Extensions * Fix explicitFileType for extensionKit * Update ChangeLog * Fix if statement structure * Add a new example extension to Tests/Fixtures/TestProject/ * Update Tests/Fixtures/TestProject/Project.xcodeproj * Comment out example for extension kit extension in Tests/Fixtures/TestProject/ * Update Tests/Fixtures/TestProject/Project.xcodeproj --- CHANGELOG.md | 2 + Sources/XcodeGenKit/PBXProjGenerator.swift | 24 +++++++--- Sources/XcodeGenKit/XCProjExtensions.swift | 6 ++- .../ExtensionKit Extension/EntryPoint.swift | 5 +++ .../ExtensionKit Extension/Info.plist | 11 +++++ .../ExtensionKit Extension/Intent.swift | 9 ++++ Tests/Fixtures/TestProject/project.yml | 9 ++++ .../ProjectGeneratorTests.swift | 44 +++++++++++++++++++ 8 files changed, 103 insertions(+), 7 deletions(-) create mode 100644 Tests/Fixtures/TestProject/ExtensionKit Extension/EntryPoint.swift create mode 100644 Tests/Fixtures/TestProject/ExtensionKit Extension/Info.plist create mode 100644 Tests/Fixtures/TestProject/ExtensionKit Extension/Intent.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index 924fe6c80..9beb6e1cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Change Log ## Next Version +### Added +- Added a new CopyFilesBuildPhase, "Embed ExtensionKit Extensions" #1230 @mtj0928 ## 2.30.0 diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 20ffcfb0e..60ebdfca3 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -128,8 +128,8 @@ public class PBXProjGenerator { var explicitFileType: String? var lastKnownFileType: String? - let fileType = Xcode.fileType(path: Path(target.filename)) - if target.platform == .macOS || target.platform == .watchOS || target.type == .framework { + let fileType = Xcode.fileType(path: Path(target.filename), productType: target.type) + if target.platform == .macOS || target.platform == .watchOS || target.type == .framework || target.type == .extensionKitExtension { explicitFileType = fileType } else { lastKnownFileType = fileType @@ -670,6 +670,7 @@ public class PBXProjGenerator { var copyWatchReferences: [PBXBuildFile] = [] var packageDependencies: [XCSwiftPackageProductDependency] = [] var extensions: [PBXBuildFile] = [] + var extensionKitExtensions: [PBXBuildFile] = [] var systemExtensions: [PBXBuildFile] = [] var appClips: [PBXBuildFile] = [] var carthageFrameworksToEmbed: [String] = [] @@ -736,8 +737,13 @@ public class PBXProjGenerator { // custom copy takes precedence customCopyDependenciesReferences.append(embedFile) } else if dependencyTarget.type.isExtension { - // embed app extension - extensions.append(embedFile) + if dependencyTarget.type == .extensionKitExtension { + // embed extension kit extension + extensionKitExtensions.append(embedFile) + } else { + // embed app extension + extensions.append(embedFile) + } } else if dependencyTarget.type.isSystemExtension { // embed system extension systemExtensions.append(embedFile) @@ -1156,13 +1162,21 @@ public class PBXProjGenerator { if !extensions.isEmpty { - let copyFilesPhase = addObject( + let copyFilesPhase = addObject( getPBXCopyFilesBuildPhase(dstSubfolderSpec: .plugins, name: "Embed App Extensions", files: extensions) ) buildPhases.append(copyFilesPhase) } + if !extensionKitExtensions.isEmpty { + + let copyFilesPhase = addObject( + getPBXCopyFilesBuildPhase(dstSubfolderSpec: .productsDirectory, dstPath: "$(EXTENSIONS_FOLDER_PATH)", name: "Embed ExtensionKit Extensions", files: extensionKitExtensions) + ) + buildPhases.append(copyFilesPhase) + } + if !systemExtensions.isEmpty { let copyFilesPhase = addObject( diff --git a/Sources/XcodeGenKit/XCProjExtensions.swift b/Sources/XcodeGenKit/XCProjExtensions.swift index dc03fe9d5..4247ce910 100644 --- a/Sources/XcodeGenKit/XCProjExtensions.swift +++ b/Sources/XcodeGenKit/XCProjExtensions.swift @@ -53,10 +53,12 @@ extension Dictionary { extension Xcode { - public static func fileType(path: Path) -> String? { + public static func fileType(path: Path, productType: PBXProductType? = nil) -> String? { guard let fileExtension = path.extension else { return nil } - switch fileExtension { + switch (fileExtension, productType) { // cases that aren't handled (yet) in XcodeProj. + case ("appex", .extensionKitExtension): + return "wrapper.extensionkit-extension" default: // fallback to XcodeProj defaults return Xcode.filetype(extension: fileExtension) diff --git a/Tests/Fixtures/TestProject/ExtensionKit Extension/EntryPoint.swift b/Tests/Fixtures/TestProject/ExtensionKit Extension/EntryPoint.swift new file mode 100644 index 000000000..0e665c55f --- /dev/null +++ b/Tests/Fixtures/TestProject/ExtensionKit Extension/EntryPoint.swift @@ -0,0 +1,5 @@ +import AppIntents + +@main +struct EntryPoint: AppIntentsExtension { +} diff --git a/Tests/Fixtures/TestProject/ExtensionKit Extension/Info.plist b/Tests/Fixtures/TestProject/ExtensionKit Extension/Info.plist new file mode 100644 index 000000000..8d15acbed --- /dev/null +++ b/Tests/Fixtures/TestProject/ExtensionKit Extension/Info.plist @@ -0,0 +1,11 @@ + + + + + EXAppExtensionAttributes + + EXExtensionPointIdentifier + com.apple.appintents-extension + + + diff --git a/Tests/Fixtures/TestProject/ExtensionKit Extension/Intent.swift b/Tests/Fixtures/TestProject/ExtensionKit Extension/Intent.swift new file mode 100644 index 000000000..0449c505c --- /dev/null +++ b/Tests/Fixtures/TestProject/ExtensionKit Extension/Intent.swift @@ -0,0 +1,9 @@ +import AppIntents + +struct Intent: AppIntent { + static var title: LocalizedStringResource = "Intent" + + func perform() async throws -> some IntentResult { + return .result() + } +} diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 5692e7e2c..7b6d4ea59 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -146,6 +146,9 @@ targets: - package: Swinject product: Swinject platformFilter: iOS +# https://github.com/yonaskolb/XcodeGen/issues/1232 +# After GitHub Actions start supporting Xcode 14, an example for extensionKit should be added. +# - target: ExtensionKitExtension onlyCopyFilesOnInstall: true scheme: testTargets: @@ -390,6 +393,12 @@ targets: sources: App_Clip_UITests dependencies: - target: App_Clip +# https://github.com/yonaskolb/XcodeGen/issues/1232 +# After GitHub Actions start supporting Xcode 14, an example for extensionKit should be added. +# ExtensionKitExtension: +# type: extensionkit-extension +# platform: iOS +# sources: ExtensionKit Extension schemes: Framework: diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 168bf4017..4ed5ae082 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -2094,6 +2094,50 @@ class ProjectGeneratorTests: XCTestCase { try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .executables, dstPath: "test") } } + + $0.context("extensionKit") { + + let extA = Target( + name: "extA", + type: .extensionKitExtension, + platform: .macOS + ) + let extB = Target( + name: "extB", + type: .extensionKitExtension, + platform: .macOS + ) + + $0.it("embeds them into plugins without copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true), + Dependency(type: .target, reference: extB.name, embed: false), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .productsDirectory, dstPath: "$(EXTENSIONS_FOLDER_PATH)") + } + + $0.it("embeds them into custom location with copy phase spec") { + + // given + let dependencies = [ + Dependency(type: .target, reference: extA.name, embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .productsDirectory, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .target, reference: extB.name, embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .productsDirectory, subpath: "test", phaseOrder: .postCompile)), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [extA, extB]) + + // then + try expectCopyPhase(in: pbxProject, withFilePaths: ["extA.appex"], toSubFolder: .productsDirectory, dstPath: "test") + } + } $0.context("commandLineTool") { From 24572daeb5daac32b68a68e4cc4ec301151ea73b Mon Sep 17 00:00:00 2001 From: Aleksei Sapitskii <45671572+aleksproger@users.noreply.github.com> Date: Sun, 24 Jul 2022 09:08:33 +0300 Subject: [PATCH 142/284] Added duplicate dependencies validation (#1234) **Reason** - More strict validation of added dependencies **Contents** - Added changelog entry - Added check for duplicates in validation stage - Added test --- CHANGELOG.md | 163 +++++++++++++++++- Sources/ProjectSpec/Dependency.swift | 2 +- Sources/ProjectSpec/SpecValidation.swift | 80 +++++---- Sources/ProjectSpec/SpecValidationError.swift | 3 + Tests/ProjectSpecTests/ProjectSpecTests.swift | 34 ++++ 5 files changed, 241 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9beb6e1cc..05019a753 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,18 +1,24 @@ # Change Log ## Next Version + ### Added + - Added a new CopyFilesBuildPhase, "Embed ExtensionKit Extensions" #1230 @mtj0928 +- Added duplicate dependencies validation #1234 @aleksproger ## 2.30.0 ### Added + - Added support for new target type `extensionkit-extension` in Xcode 14 #1228 @aleksproger ### Changed + - Speed up generating build settings for large projects #1221 @jpsim ### Fixed + - Fix XcodeGen building as library after breaking XcodeProj update 8.8.0 #1228 @aleksproger ## 2.29.0 @@ -35,7 +41,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen #### Added -- Support for specifying custom group locations for SPM packages. #1173 @John-Connolly +- Support for specifying custom group locations for SPM packages. #1173 @John-Connolly ### Fixed @@ -67,11 +73,12 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen ### Changed -- Speed up source inclusion checking for big projects #1122 @PaulTaykalo +- Speed up source inclusion checking for big projects #1122 @PaulTaykalo ## 2.25.0 ### Added + - Allow specifying a `copy` setting for each dependency. #1038 @JakubBednar ### Fixed @@ -95,50 +102,61 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Add ability to specify UI testing screenshot behavior in test schemes #942 @daltonclaybrook ### Changed + - **Breaking**: Rename the `platform` field on `Dependency` to `platformFilter` #1087 @daltonclaybrook ## 2.23.1 ### Changed + - Reverted "Change FRAMEWORK_SEARCH_PATH for xcframeworks (#1015)", introduced in 2.20.0. XCFrameworks need to be referenced directly in the project for Xcode's build system to extract the appropriate frameworks #1081 @elliottwilliams ## 2.23.0 #### Added + - Added ability to set custom platform for dependency #934 @raptorxcz #### Fixed + - Added `()` to config variant trimming charater set to fix scheme config variant lookups for some configs like `Debug (Development)` that broke in 2.22.0 #1078 @DavidWoohyunLee - Fixed Linux builds on Swift 5.4 #1083 @yonaskolb ## 2.22.0 #### Added + - Support `runPostActionsOnFailure` for running build post scripts on failing build #1075 @freddi-kit #### Changed + - Xcode no longer alerts to project changes after regeneration, due to internal workspace not regenerating if identical #1072 @yonaskolb #### Fixed + - Fixed no such module `DOT` error when package is used as a dependency #1067 @yanamura - Fixed scheme config variant lookups for some configs like `ProdDebug` and `Prod-Debug` that broke in 2.21.0 #1070 @yonaskolb ## 2.21.0 #### Added + - Support weak link for Swift Package Dependency #1064 @freddi-kit #### Changed + - Carthage frameworks are no longer embedded for "order-only" target dependencies. This avoid redundant embeds in situations where a target's sources _import_ a Carthage framework but do not have a binary dependency on it (like a test target which runs in a host app). #1041 @elliottwilliams #### Fixed + - The `Core` target is renamed to avoid collisions with other packages. #1057 @elliottwilliams - Lookup scheme config variants by whole words, fixing incorrect assignment in names that contain subtrings of each other (eg PreProd and Prod) #976 @stefanomondino ## 2.20.0 #### Added + - Allow specifying a `github` name like `JohnSundell/Ink` instead of a full `url` for Swift Packages #1029 @yonaskolb - Added explicity `LastUpgradeCheck` and `LastUpgradeVersion` override support so it's possible to override these properties without using the `project.xcodeVersion`. [1013](https://github.com/yonaskolb/XcodeGen/pull/1013) @Andre113 - Added `macroExpansion` for `run` in `schemes` #1036 @freddi-kit @@ -146,17 +164,20 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Added support for selectedTests in schemes `Test` configuration. #913 @ooodin #### Fixed + - Fixed regression on `.storekit` configuration files' default build phase. #1026 @jcolicchio - Fixed framework search paths when using `.xcframework`s. #1015 @FranzBusch - Fixed bug where schemes without a build target would crash instead of displaying an error #1040 @dalemyers - Fixed files with names ending in **Info.plist** (such as **GoogleServices-Info.plist**) from being omitted from the Copy Resources build phase. Now, only the resolved info plist file for each specific target is omitted. #1027 @liamnichols #### Internal + - Build universal binaries for release. XcodeGen now runs natively on Apple Silicon. #1024 @thii ## 2.19.0 #### Added + - Added support for building and running on Linux platforms. Tested for compatibility with Swift 5.3+ and Ubuntu 18.04. #988 @elliottwilliams - Added `useBaseInternationalization` to Project Spec Options to opt out of Base Internationalization. #961 @liamnichols - Added `storeKitConfiguration` to allow specifying StoreKit Configuration in Scheme and TargetScheme, supporting either xcodeproj or xcworkspace via `schemePathPrefix` option. #964 @jcolicchio @@ -166,22 +187,26 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Added discovered dependency file for a build script #1012 @polac24 @fggeraissate #### Changed + - **Breaking**: Info.plists with custom prefixes are no longer added to the Copy Bundle Resources build phase #945 @anivaros - **Breaking**: `workingDirectory` of included legacy targets is now made relative to including project #981 @jcolicchio - **Breaking**: Make `simulateLocation` respect `schemePathPrefix` option. #973 @jcolicchio #### Fixed + - Fixed error message output for `minimumXcodeGenVersion`. #967 @joshwalker - Remove force-unwrapping causing crash for `LegacyTarget`s #982 @jcolicchio - Fixed a race condition in an internal JSON decoder, which would occasionally fail with an error like `Parsing project spec failed: Error Domain=Unspecified error Code=0`. #995 @elliottwilliams - Fixed issue where frameworks with `MACH_O_TYPE: staticlib` were being incorrectly embedded. #1003 @mrabiciu #### Internal + - Updated to Yams 4.0.0 #984 @swiftty ## 2.18.0 #### Added + - Add `Scheme.Test.TestTarget.skipped` to allow skipping of an entire test target. #916 @codeman9 - Added ability to set custom LLDBInit scripts for launch and test schemes #929 @polac24 - Adds App Clip support. #909 @brentleyjones @dflems @@ -190,12 +215,15 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Enable Base Internationalization by default as per Xcode 12 behavior. #954 @liamnichols #### Changed + - Change default project version to Xcode 12 #960 @yonaskolb #### Internal + - Updates CI to run on Xcode 12. #936 @dflems @yonaskolb #### Fixed + - Select the first runnable build target, if present. #957 @codeman9 - Allow SDK dependencies to be embedded. #922 @k-thorat - Allow creating intermediary groups outside of the project directory. #892 @segiddins @@ -205,21 +233,25 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen ## 2.17.0 #### Added + - Added `options.fileTypes` which lets you set cross project defaults for certain file extensions #914 @yonaskolb - Added `onlyCopyFilesOnInstall` option to targets for the Embed Files build phase. #912 @jsorge #### Fixed + - Treat all directories with known UTI as file wrapper. #896 @KhaosT - Generated schemes for application extensions now contain `wasCreatedForAppExtension = YES`. #898 @muizidn - Allow package dependencies to use `link: false` #920 @k-thorat - Fixed issue computing relative paths. #915 @andrewreach #### Internal + - Updated to XcodeProj 7.13.0 #908 @brentleyjones ## 2.16.0 #### Added + - Improve speed of metadata parsing and dependency resolution. #803 @michaeleisel - Improve support for iOS sticker packs and add support for `launchAutomaticallySubstyle` to run schemes. #824 @scelis - Add --project-root option to generate command. #828 @ileitch @@ -230,6 +262,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Added ability to set executable to Ask to Launch. #871 @pinda #### Fixed + - Fixed issue when linking and embeding static frameworks: they should be linked and NOT embed. #820 @acecilia - Fixed issue when generating projects for paths with a dot in the folder for swift sources. #826 @asifmohd - Prefix static library target filenames with 'lib' to match Xcode. #831 @ileitch @@ -251,6 +284,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen ## 2.15.1 #### Fixed + - Fixed issue which caused watch app schemes to be generated incorrectly, preventing these apps from launching. #798 @daltonclaybrook - Added build presets for the target type `framework.static`. #819 @acecilia - Fixed XcodeProj resolution and updated to 7.10.0 #822 @soffes @@ -258,10 +292,12 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen ## 2.15.0 #### Added + - Add support for local Swift Packages in `packages` using `path`. #808 @freddi-kit - Add `buildImplicitDependencies` as an option on `TargetScheme`. #810 @evandcoleman #### Fixed + - Fixed resolving path to local Swift Packages #796 @freddi-kit - Added ability to stop on every main thread checker issue on Run schemes and TargetSchemes #799 @ionutivan - Avoid copying ObjC interface header when SWIFT_INSTALL_OBJC_HEADER=false. #805 @kateinoigakukun @@ -269,9 +305,11 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen ## 2.14.0 #### Added + - Add ability to embed and code sign Swift package dependencies with dynamic products. #788 @alexruperez #### Fixed + - Revert "Add Base to known regions even if one doesn't exist" #791 @bryansum - Set `defaultConfigurationName` for every target which is defined in a project. #787 @ken0nek - Set `TEST_TARGET_NAME` only when a project has UITest bundle. #792 @ken0nek @@ -280,30 +318,36 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen ## 2.13.1 #### Fixed + - Validate scheme test action and test coverage target references before generating. #775 @liamnichols - Fixed parsing prerelease identifiers in Swift package versions #779 @yonaskolb - Fixed using legacy targets as dependencies #778 @yonaskolb #### Internal + - Updated to XcodeProj 7.8.0 #777 @yonaskolb -- Use https://github.com/mxcl/Version #779 @yonaskolb +- Use #779 @yonaskolb ## 2.13.0 #### Added + - Support External Target References via subprojects. #701 @evandcoleman #### Fixed + - Fixed compilation as library by locking down XcodeProj version #767 @yonaskolb - Stabilized sorting of groups with duplicate names/paths. #671 @ChristopherRogers - Moved `Copy Bundle Resources` to after `Link with Libraries` build phase #768 @yonaskolb #### Internal + - Updated to XcodeProj 7.7.0 #767 @yonaskolb ## 2.12.0 #### Added + - Added pre and post command options. Useful for running `pod install` in combination with `--use-cache` #759 @yonaskolb - Support for language and region settings on a target basis #728 @FranzBusch - Added option to generate only Info.plist files with `--only-plists` #739 @namolnad @@ -311,6 +355,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Support for On Demand Resources tags #753 @sipao #### Fixed + - Fixed resolving a relative path for `projectReference.path` #740 @kateinoigakukun - Don't add framework dependency's directory to `FRAMEWORK_SEARCH_PATHS` if it is implicit #744 @ikesyo @yutailang0119 - Fixed resolving relative path passed to `XcodeProj` #751 @PycKamil @@ -318,11 +363,13 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Added an extra check for package versions. #755 @basvankuijck #### Internal + - Update to SwiftCLI 6.0 and use the new property wrappers #749 @yonaskolb ## 2.11.0 #### Added + - Add Carthage static framework dependencies support. #688 @giginet - Added `xcodegen dump` command #710 @yonaskolb - Added `--no-env` option to disable environment variables expansion #704 @rcari @@ -330,6 +377,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Added new dependency type, `bundle`. This allows targets to copy bundles from other projects #616 @bsmith11 #### Fixed + - Improved variable expansion runtime #704 @rcari - Fixed missing headers for static framework targets #705 @wag-miles - Using more file types from XcodeProj for PBXFileReferences resulting in less project diffs #715 @yonaskolb @@ -338,6 +386,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Fixed unnecessary dependencies related to SwiftPM #726 @tid-kijyun #### Changed + - Deprecated `$old_form` variables in favor of `${new_form}` variables #704 @rcari - Updated XcodeProj to 7.4.0 #709 @yonaskolb - Updated to Swift 5.1 #714 @yonaskolb @@ -345,6 +394,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen ## 2.10.1 #### Fixed + - Add Base to knownRegions even if one doesn't exist #694 @bryansum - Fixed missing `onlyGenerateCoverageForSpecifiedTargets` issue #700 @kateinoigakukun - Fixed regression on dependencies `link` flag #703 @rcari @@ -352,10 +402,12 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen ## 2.10.0 #### Added + - Support Target Reference to another project. #655 @kateinoigakukun - Added `coverageTargets` for test target. This enables to gather code coverage for specific targets. #656 @kateinoigakukun #### Fixed + - Add base localisation by default even if no base localised files were found. Fixes warning in Xcode 11 #685 @yonaskolb - Don't generate CFBundleExecutable in default generated Info.plist for `bundle` target types #689 @FranzBusch - Fixed resolving relative paths with custom project destination #681 @giginet @@ -363,26 +415,31 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Fixed macOS unit test target TEST_HOST #696 @mjarvis #### Internal + - Restructure targets #698 @yonaskolb ## 2.9.0 #### Added + - Added Scheme Templates #672 @bclymer #### Fixed + - Fixed macOS unit test setting preset #665 @yonaskolb - Add `rcproject` files to sources build phase instead of resources #669 @Qusic - Prefer default configuration names for generated schemes #673 @giginet - Fixed some resource files being placed to "Recovered References" group #679 @nivanchikov #### Internal + - Updated to SwiftCLI 5.3.2 #667 @giginet - Fixed tests in case-sensitive file system #670 @Qusic ## 2.8.0 #### Added + - Added support for Swift Package dependencies #624 @yonaskolb - Added `includes` to `sources` for a Target. This follows the same glob-style as `excludes` but functions as a way to only include files that match a specified pattern. Useful if you only want a certain file type, for example specifying `**/*.swift`. #637 @bclymer - Support `dylib` SDK. #650 @kateinoigakukun @@ -390,74 +447,89 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Added `debugEnabled` option for `run` and `test` scheme #657 @kateinoigakukun #### Fixed + - Expand template variable in Array of Any #651 @kateinoigakukun - Significantly improve performance when running with a large number files. #658 @kateinoigakukun - Removed some more diffs between the generated .pbxproj and when Xcode resaves it #663 @yonaskolb #### Internal + - Removed needless `Array` initialization. #661 @RomanPodymov - Updated to XcodeProj 7.1.0 #624 @yonaskolb ## 2.7.0 #### Added + - Added Bash 4 style recursive globbing (`**/*`) in target sources `excludes` #636 @bclymer - Added ability to disable main thread checker in Schemes #601 @wag-miles #### Fixed + - Fixed included specs that were referenced multiple times from duplicating content #599 @haritowa - Fixed `.orig` files being added to the project #627 @keith #### Changed + - Allow linking of dependencies into static libraries when `link` is set to true #635 @kateinoigakukun ## 2.6.0 #### Added + - Added ability to skip tests #582 @kadarandras - Added ability to set `attributes` on build files #583 @min - Allow using environment variables in the form of `${SOME_VARIABLE}`. This might be a **breaking** change when a target template attribute is also defined as an environment variable #594 @tomquist - Added support for `watchapp2-container` and `framework.static` product types #604 @yonaskolb #### Fixed + - Fixed `.pch` files being bundled as resources #597 @thii - Fixed an issue that prevents watchOS Intents Extension from running correctly. #571 @KhaosT #### Changed + - Updated the default `compatibilityVersion` project setting from `Xcode 9.3` to `Xcode 10.0` #581 @acecilia - Updated to XcodeProj 7.0.0. Note that the length of generated UUIDs has changed #604 @yonaskolb #### Internal + - Added ability to encode ProjectSpec #545 @ryohey ## 2.5.0 #### Added + - Added support for `app-extension.intents-service` target type #536 @yonaskolb - Added support for custom `root` in `sdk` dependency #562 @raptorxcz #### Changed + - Updated to xcodeproj 6.7.0 including its performance improvements #536 @yonaskolb - Updated default generated settings for Xcode 10.2 #555 @yonaskolb - Changed order of file generation so that plists are now generated before the project, so they will be included in the projects files #544 @tomquist - Updated Yams to 2.0.0 @yonaskolb #### Fixed + - Fixed groups from sources outside a project spec's directory from being flattened. #550 @sroebert - Fixed `optional` file sources not being added to the project #557 @yonaskolb - Fixed Carthage dependencies being incorrectly embedded in WatchKit app bundles instead of a WatchKit app extension #558 @KhaosT ## 2.4.0 -#### Fixed: +#### Fixed + - Fixed installation when building in Swift 5 #549 @yonaskolb #### Changed + - Updated to Swift 5 and dropped Swift 4.2 #549 @yonaskolb ## 2.3.0 #### Added + - Added ability to automatically find all the frameworks for Carthage dependencies via the global `options.findCarthageFrameworks` or dependency specfic `dependency.findFrameworks`. See the [Carthage](Docs/Usage.md#carthage) usage docs for more info #506 @rpassis @yonaskolb - Added support for nested target templates #534 @tomquist - Added ability to define `templateAttributes` within a target to be able to parameterize templates. #533 @tomquist @@ -466,9 +538,11 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Added ability to define a per-platform `deploymentTarget` for Multi-Platform targets. #510 @ainopara #### Changed + - **DEPRECATION**: Placeholders `$target_name` and `$platform` have been deprecated in favour of `${target_name}` and `${platform}`. Support for the old placeholders will be removed in a future version #533 @tomquist #### Fixed + - Sources outside a project spec's directory will be correctly referenced as relative paths in the project file. #524 - Fixed error when `optional` directory source is missing #527 @yonaskolb - Fixed excludes within included spec #535 @yonaskolb @@ -479,6 +553,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen ## 2.2.0 #### Added + - Added ability to generate empty directories via `options.generateEmptyDirectories` #480 @Beniamiiin - Added support for the `instrumentsPackage` product type #482 @ksulliva - Added support for `inputFileLists` and `outputFileLists` within project build scripts #500 @lukewakeford @@ -486,12 +561,14 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Added `createIntermediateGroups` to individual Target Sources which overrides the top level option #505 @yonaskolb #### Changed + - **BREAKING**: All the paths within `include` files are now relative to that file and not the root spec. This can be disabled with a `relativePaths: false` on the include. See the [documentation](https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#include) for more details #489 @ellneal - Updated the Xcode compatibility version from 3.2 to 9.3 #497 @yonaskolb - Exact matches to config names in build settings won't partial apply to other configs #503 @yonaskolb - UUIDs in the project are standard and don't contain any type prefixes anymore #### Fixed + - Fixed `--project` argument not taking effect #487 @monowerker - Fixed Sticker Packs from generating an empty Source file phase which caused in error in the new build system #492 @rpassis - Fixed generated schemes for tool targets not setting the executable #496 @yonaskolb @@ -500,14 +577,17 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen ## 2.1.0 #### Added + - Added an experiment new caching feature. Pass `--use-cache` to opt in. This will read and write from a cache file to prevent unnecessarily generating the project. Give it a try as it may become the default in a future release #412 @yonaskolb #### Changed + - Changed spelling of build phases to **preBuildPhase** and **postBuildPhase**. The older names are deprecated but still work [402](https://github.com/yonaskolb/XcodeGen/pull/402) @brentleyjones - Moved generation to a specific subcommand `xcodegen generate`. Simple `xcodegen` will continue to work for now #437 @yonaskolb - If `INFOPLIST_FILE` has been set on a target, then an `info` path won't ovewrite it #443 @feischl97 #### Fixed + - Fixed XPC Service package type in generated `Info.plist` #435 @alvarhansen - Fixed phase ordering for modulemap and static libary header Copy File phases. [402](https://github.com/yonaskolb/XcodeGen/pull/402) @brentleyjones - Fixed intermittent errors when running multiple `xcodegen`s concurrently #450 @bryansum @@ -520,6 +600,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen ## 2.0.0 #### Added + - Added `weak` linking setting for dependencies #411 @alvarhansen - Added `info` to targets for generating an `Info.plist` #415 @yonaskolb - Added `entitlements` to targets for generating an `.entitlement` file #415 @yonaskolb @@ -529,6 +610,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Automatically set project `SDKROOT` if there is only a single platform within the project #433 @yonaskolb #### Changed + - Performance improvements for large projects #388 @yonaskolb @kastiglione - Upgraded to xcodeproj 6 #388 @yonaskolb - Upgraded to Swift 4.2 #388 @yonaskolb @@ -537,6 +619,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen - Added ability to not link Carthage frameworks #432 @yonaskolb #### Fixed + - Fixed code signing issues #414 @yonaskolb - Fixed `TargetSource.headerVisibility` not being set in initializer #419 @jerrymarino - Fixed crash when using Xcode Legacy targets as dependencies #427 @dflems @@ -546,24 +629,28 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project will not be deterministic. This will be fixed in an upcoming release with an update to xcodeproj 6.0 #### Fixed + - Fixed release builds in Swift 4.2 #404 @pepibumur - Fixed default settings for macOS unit-tests #387 @frankdilo - Fixed Copy Headers phase ordering for Xcode 10 #401 @brentleyjones - Fixed generated schemes on aggregate targets #394 @vgorloff #### Changed + - Added `en` as default value for knownRegions #390 @Saik0s - Update `PathKit`, `Spectre`, `Yams` and `xcodeproj` dependencies ## 1.11.1 #### Fixed + - Fixed `FRAMEWORK_SEARCH_PATHS` for `framework` dependency paths with spaces #382 @brentleyjones - Fixed aggregate targets not being found with `transitivelyLinkDependencies` #383 @brentleyjones ## 1.11.0 #### Added + - Added `showEnvVars` to build scripts to disable printing the environment #351 @keith - Added `requiresObjCLinking` to `target` #354 @brentleyjones - Added `targetTemplates` #355 @yonaskolb @@ -574,6 +661,7 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Added `customArchiveName` and `revealArchiveInOrganizer` to `archive` #367 @sxua #### Fixed + - Sort files using localizedStandardCompare #341 @rohitpal440 - Use the latest `xcdatamodel` when sorted by version #341 @rohitpal440 - Fixed compiler flags being set on non source files in mixed build phase target sources #347 @brentleyjones @@ -584,6 +672,7 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Fixed `.metal` files being added to resources #380 @vgorloff #### Changed + - Improved linking for `static.library` targets #352 @brentleyjones - Changed default group sorting to be after files #356 @yonaskolb - Moved `Frameworks` and `Products` top level groups to bottom #356 @yonaskolb @@ -595,41 +684,49 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Copy files phases have descriptive names #360 @brentley #### Internal + - Moved brew formula to homebrew core - Added `CONTRIBUTING.md` ## 1.10.3 #### Fixed + - Fixed Mint installations finding `SettingPresets` #338 @yonaskolb ## 1.10.2 #### Changed + - Set `transitivelyLinkDependencies` to false by default ## 1.10.1 #### Fixed + - Fixed `transitivelyLinkDependencies` typo #332 @brentleyjones - Fixed framework target dependencies not being code signed by default #332 @yonaskolb #### Changed + - Code sign all dependencies by default except target executables #332 @yonaskolb ## 1.10.0 #### Added + - Added build rule support #306 @yonaskolb - Added support for frameworks in sources #308 @keith - Added ability to automatically embed transient dependencies. Controlled with `transitivelyLinkDependencies` #327 @brentleyjones #### Changed + - Upgraded to Swift 4.1 - Improved Carthage dependency lookup performance with many targets #298 @keith - By default don't CodeSignOnCopy `target` dependencies. This can still be controlled with `Dependency.codeSign` #324 @yonaskolb #### Fixed + - Fixed PBXBuildFile and PBXFileReference being incorrectly generated for Legacy targets #296 @sascha - Fixed required sources build phase not being generated if there are no sources #307 @yonaskolb - Fixed install script in binary release #303 @alvarhansen @@ -644,15 +741,18 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 1.9.0 #### Added + - Scheme pre and post actions can now be added to `target.scheme` #280 @yonaskolb - Individual files can now be added to `fileGroups` #293 @yonaskolb #### Changed + - Updated to `xcproj` 4.3.0 for Xcode 9.3 updates - Update default Xcode version to 9.3 including new settings #284 @LinusU - **Breaking for ProjectSpec library users** Changed `ProjectSpec` to `Project` and `ProjectSpec.Options` to `SpecOptions` #281 @jerrymarino #### Fixed + - Fixed manual build phase of `none` not being applied to folders #288 @yonaskolb - Quoted values now correctly get parsed as strings #282 @yonaskolb - Fixed adding a root source folder when `createIntermediateGroups` is on #291 @yonaskolb @@ -662,16 +762,19 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 1.8.0 #### Added + - Added Project `defaultConfig` #269 @keith - Added Target `attributes` #276 @yonaskolb - Automatically set `DevelopmentTeam` and `ProvisioningStyle` within `TargetAttributes` if relevant build settings are defined #277 @yonaskolb #### Fixed + - Fixed default `LD_RUNPATH_SEARCH_PATHS` for app extensions #272 @LinusU #### Internal + - Make `LegacyTarget` init public #264 @jerrymarino -- Upgrade to *xcproj* to 4.2.0, *Yams* to 0.6.0 and *PathKit* to 0.9.1 @yonaskolb +- Upgrade to _xcproj_ to 4.2.0, _Yams_ to 0.6.0 and _PathKit_ to 0.9.1 @yonaskolb ## 1.7.0 @@ -688,6 +791,7 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - Releases now include a pre-compiled binary and setting presets, including an install script #### Fixed + - Fixed Mint installation from reading setting presets #248 @yonaskolb - Fixed setting `buildPhase` on a `folder` source. This allows for a folder of header files #254 @toshi0383 - Carthage dependencies are not automatically embedded into test targets #256 @yonaskolb @@ -698,23 +802,27 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 1.6.0 #### Added + - Added scheme pre-actions and post-actions #231 @kastiglione - Added `options.disabledValidations` including `missingConfigs` to disable project validation errors #220 @keith - Generate UI Test Target Attributes #221 @anreitersimon #### Fixed + - Filter out duplicate source files #217 @allu22 - Fixed how `lastKnownFileType` and `explicitFileType` were generated across platforms #115 @toshi0383 - Removed a few cases of project diffs when opening the project in Xcode @yonaskolb - Fixed Swift not being embedded by default in watch apps @yonaskolb #### Changed + - Change arrays to strings in setting presets #218 @allu22 - Updated to xcproj 4.0 #227 ## 1.5.0 #### Added + - added support for `gatherCoverageData` flag in target schemes #170 @alexruperez - added support for `commandLineOptions` in target schemes #172 @rahul-malik - added Project spec as a SwiftPM library for reuse in other projects #164 @soffes @@ -732,6 +840,7 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - added `deploymentTarget` setting to project and target #205 @yonaskolb #### Changed + - huge performance improvements when writing the project file due to changes in xcproj - updated dependencies - minor logging changes @@ -742,6 +851,7 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - when specifying a `--spec` argument, the default for the `--project` path is now the directory containing the spec #211 @yonaskolb #### Fixed + - fixed shell scripts escaping quotes twice #186 @allu22 - fixed `createIntermediateGroups` when using a relative spec path #184 @kastiglione - fixed command line arguments for test and profile from being overridden #199 @vhbit @@ -752,6 +862,7 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 1.4.0 #### Added + - added `--version` flag #112 @mironal - added support for adding individual file sources #106 @bkase - added source compiler flag support #121 @bkase @@ -762,6 +873,7 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - added `ProjectSpec.options.developmentLanguage` #155 @yonaskolb #### Changed + - updated to xcproj 1.2.0 #113 @yonaskolb - build settings from presets will be removed if they are provided in `xcconfig` files #77 @toshi0383 - all files and groups are sorted by type and then alphabetically #144 @yonaskolb @@ -770,6 +882,7 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - make UUIDs more deterministic #154 @yonaskolb #### Fixed + - only add headers to frameworks and libraries #118 @ryohey - fixed localized files with the same name #126 @ryohey - fix intermediate sources #144 @yonaskolb @@ -780,6 +893,7 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - all localizations found are added to a projects known regions #157 @ryohey #### Internal + - refactoring - more tests - added release scripts @@ -787,11 +901,13 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 1.3.0 #### Added + - generate output files for Carthage copy-frameworks script #84 @mironal - added options.settingPreset to choose which setting presets get applied #100 @yonaskolb - added `link` option for target dependencies #109 @keith #### Changed + - updated to xcproj 0.4.1 #85 @enmiller - don't copy base settings if config type has been left out #100 @yonaskolb - generate localised files under a single variant group #70 @ryohey @@ -800,6 +916,7 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - other small internal changes @yonaskolb #### Fixed + - embed Carthage frameworks for macOS #82 @toshi0383 - fixed copying of watchOS app resources #96 @keith - automatically ignore more file types for a target's sources (entitlements, gpx, apns) #94 @keith @@ -812,16 +929,19 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 1.2.4 #### Fixed + - setting presets only apply `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES: YES` to applications - don't add carthage dependency to `copy-frameworks` script if `embed: false` - sort group children on APFS #### Changed + - update to xcproj 0.3.0 ## 1.2.3 #### Fixed + - Fixed wrong carthage directory name reference for macOS #74 @toshi0383 - Removed unnecessary `carthage copy-frameworks` for macOS app target #76 @toshi0383 - Added some missing default settings for framework targets. `SKIP_INSTALL: YES` fixes archiving @@ -830,16 +950,18 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 1.2.2 #### Added + - automatically set `TEST_TARGET_NAME` on UI test targets if one of the dependencies is an application target #### Fixed + - set `DYLIB_INSTALL_NAME_BASE` to `@rpath` in framework target presets - fixed tvOS launch screen setting. `ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME` is now `LaunchImage` not `tvOS LaunchImage` - ## 1.2.0 #### Added + - `include` now supports a single string as well as a list - add support setting xcconfig files on a project with `configFiles` #64 - add `fileGroups` to project spec for adding groups of files that aren't target source files #64 @@ -849,6 +971,7 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil - add `mint` installation support #### Fixed + - fixed homebrew installation - fixed target xcconfig files not working via `configFiles` #64 - look for `INFOPLIST_FILE` setting in project and xcconfig files before adding it automatically. It was just looking in target settings before #64 @@ -857,107 +980,129 @@ If XcodeGen is compiled with Swift 4.2, then UUID's in the generated project wil ## 1.1.0 #### Changed + - set project version to Xcode 9 - `LastUpgradeVersion` attribute to `0900` - set default Swift version to 4.0 - `SWIFT_VERSION` build setting to `4.0` ### 1.0.1 ### Fixed + - fixed incorrect default build script shell path - fixed install scripts ## 1.0.0 #### Added + - Swift 4 support #52 - Support for C and C++ files #48 by @antoniocasero - Xcode 9 default settings #### Fixed + - fixed empty string in YAML not being parsed properly #50 by @antoniocasero #### Changed + - updated to xcodeproj 0.1.2 #56 - **BREAKING**: changed target definitions from list to map #54 - ## 0.6.1 #### Added + - Ability to set PBXProject attributes #45 #### Changed + - Don't bother linking target frameworks for target dependencies. - Move code signing default settings from all iOS targets to iOS application targets, via Product + Platform setting preset files #46 ## 0.6.0 #### Added + - Allow a project spec to include other project specs #44 #### Changed + - Changed default spec path to `project.yml` - Changed default project directory to the current directory instead of the spec file's directory ## 0.5.1 #### Fixed + - Fix embedded framework dependencies - Add `CODE_SIGN_IDENTITY[sdk=iphoneos*]` back to iOS targets - Fix build scripts with "" generating invalid projects #43 ## 0.5.0 + #### Added + - Added multi platform targets #35 - Automatically generate platform specific `FRAMEWORK_SEARCH_PATHS` for Carthage dependencies #38 - Automatically find Info.plist and set `INFOPLIST_FILE` build setting if it doesn't exist on a target #40 - Add options for controlling embedding of dependencies #37 #### Fixed + - Fixed localized files not being added to a target's resources #### Changed + - Renamed Setting Presets to Setting Groups - Carthage group is now created under top level Frameworks group ## 0.4.0 ##### Added + - Homebrew support #16 by @pepibumur - Added `runOnlyWhenInstalling` to build scripts #32 - Added `carthageBuildPath` option #34 #### Fixed + - Fixed installations of XcodeGen not applying build setting presets for configs, products, and platforms, due to missing resources #### Changed -- Upgraded to https://github.com/swift-xcode/xcodeproj 0.1.1 #33 + +- Upgraded to 0.1.1 #33 ## 0.3.0 - Extensions and Scheme Tests #### Added + - Support for app extension dependencies, using the same `target: MyExtension` syntax #19 - Added test targets to generated target schemes via `Target.scheme.testTargets` #21 #### Changed + - Updated xcodeproj to 0.0.9 #### Fixed + - Fixed watch and messages apps not copying carthage dependencies #### Breaking changes + - Changed `Target.generatedSchemes` to `Target.scheme.configVariants` ## 0.2.0 - Build scripts #### Added + - Added Target build scripts with `Target.prebuildScripts` and `Target.postbuildScripts` #17 - Support for absolute paths in target sources, run script files, and config files - Add validation for incorrect `Target.configFiles` #### Fixed + - Fixed some project objects sometimes having duplicate ids ## 0.1.0 -First official release +First official release diff --git a/Sources/ProjectSpec/Dependency.swift b/Sources/ProjectSpec/Dependency.swift index 2037bd444..1c01a8d8f 100644 --- a/Sources/ProjectSpec/Dependency.swift +++ b/Sources/ProjectSpec/Dependency.swift @@ -56,7 +56,7 @@ public struct Dependency: Equatable { public static let `default` = dynamic } - public enum DependencyType: Equatable { + public enum DependencyType: Hashable { case target case framework case carthage(findFrameworks: Bool?, linkType: CarthageLinkType) diff --git a/Sources/ProjectSpec/SpecValidation.swift b/Sources/ProjectSpec/SpecValidation.swift index c0141b100..376c0153f 100644 --- a/Sources/ProjectSpec/SpecValidation.swift +++ b/Sources/ProjectSpec/SpecValidation.swift @@ -154,38 +154,16 @@ extension Project { } for target in targets { + var uniqueDependencies = Set() + for dependency in target.dependencies { - switch dependency.type { - case .target: - let dependencyTargetReference = try TargetReference(dependency.reference) - - switch dependencyTargetReference.location { - case .local: - if getProjectTarget(dependency.reference) == nil { - errors.append(.invalidTargetDependency(target: target.name, dependency: dependency.reference)) - } - case .project(let dependencyProjectName): - if getProjectReference(dependencyProjectName) == nil { - errors.append(.invalidTargetDependency(target: target.name, dependency: dependency.reference)) - } - } - case .sdk: - let path = Path(dependency.reference) - if !dependency.reference.contains("/") { - switch path.extension { - case "framework"?, - "tbd"?, - "dylib"?: - break - default: - errors.append(.invalidSDKDependency(target: target.name, dependency: dependency.reference)) - } - } - case .package: - if packages[dependency.reference] == nil { - errors.append(.invalidSwiftPackage(name: dependency.reference, target: target.name)) - } - default: break + let dependencyValidationErrors = try validate(dependency, in: target) + errors.append(contentsOf: dependencyValidationErrors) + + if uniqueDependencies.contains(dependency) { + errors.append(.duplicateDependencies(target: target.name, dependencyReference: dependency.reference)) + } else { + uniqueDependencies.insert(dependency) } } @@ -252,6 +230,46 @@ extension Project { } } + // Returns error if the given dependency from target is invalid. + private func validate(_ dependency: Dependency, in target: Target) throws -> [SpecValidationError.ValidationError] { + var errors: [SpecValidationError.ValidationError] = [] + + switch dependency.type { + case .target: + let dependencyTargetReference = try TargetReference(dependency.reference) + + switch dependencyTargetReference.location { + case .local: + if getProjectTarget(dependency.reference) == nil { + errors.append(.invalidTargetDependency(target: target.name, dependency: dependency.reference)) + } + case .project(let dependencyProjectName): + if getProjectReference(dependencyProjectName) == nil { + errors.append(.invalidTargetDependency(target: target.name, dependency: dependency.reference)) + } + } + case .sdk: + let path = Path(dependency.reference) + if !dependency.reference.contains("/") { + switch path.extension { + case "framework"?, + "tbd"?, + "dylib"?: + break + default: + errors.append(.invalidSDKDependency(target: target.name, dependency: dependency.reference)) + } + } + case .package: + if packages[dependency.reference] == nil { + errors.append(.invalidSwiftPackage(name: dependency.reference, target: target.name)) + } + default: break + } + + return errors + } + /// Returns a descriptive error if the given target reference was invalid otherwise `nil`. private func validationError(for targetReference: TargetReference, in scheme: Scheme, action: String) -> SpecValidationError.ValidationError? { switch targetReference.location { diff --git a/Sources/ProjectSpec/SpecValidationError.swift b/Sources/ProjectSpec/SpecValidationError.swift index 2cbf04473..eadfca3b9 100644 --- a/Sources/ProjectSpec/SpecValidationError.swift +++ b/Sources/ProjectSpec/SpecValidationError.swift @@ -35,6 +35,7 @@ public struct SpecValidationError: Error, CustomStringConvertible { case invalidProjectReferencePath(ProjectReference) case invalidTestPlan(TestPlan) case multipleDefaultTestPlans + case duplicateDependencies(target: String, dependencyReference: String) public var description: String { switch self { @@ -88,6 +89,8 @@ public struct SpecValidationError: Error, CustomStringConvertible { return "Test plan path \"\(testPlan.path)\" doesn't exist" case .multipleDefaultTestPlans: return "Your test plans contain more than one default test plan" + case let .duplicateDependencies(target, dependencyReference): + return "Target \(target.quoted) has the dependency \(dependencyReference.quoted) multiple times" } } } diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 65f9398eb..4024d68a3 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -142,6 +142,40 @@ class ProjectSpecTests: XCTestCase { try expectValidationError(project, .invalidBuildSettingConfig("invalidSettingGroupConfig")) } + $0.it("fails with duplicate dependencies") { + var project = baseProject + project.targets = [ + Target( + name: "target1", + type: .application, + platform: .iOS, + settings: invalidSettings, + dependencies: [ + Dependency(type: .target, reference: "dependency1"), + Dependency(type: .target, reference: "dependency1"), + Dependency(type: .framework, reference: "dependency2"), + Dependency(type: .framework, reference: "dependency2"), + ] + ), + Target( + name: "target2", + type: .framework, + platform: .iOS, + settings: invalidSettings, + dependencies: [ + Dependency(type: .framework, reference: "dependency3"), + Dependency(type: .target, reference: "dependency3"), + Dependency(type: .target, reference: "dependency4"), + Dependency(type: .target, reference: "dependency4"), + ] + ) + ] + + try expectValidationError(project, .duplicateDependencies(target: "target1", dependencyReference: "dependency1")) + try expectValidationError(project, .duplicateDependencies(target: "target1", dependencyReference: "dependency2")) + try expectValidationError(project, .duplicateDependencies(target: "target2", dependencyReference: "dependency4")) + } + $0.it("allows non-existent configurations") { var project = baseProject project.options = SpecOptions(disabledValidations: [.missingConfigs]) From de2a537ab4b6a88ee160b05b3c165ba42196586c Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Sun, 24 Jul 2022 16:10:15 +1000 Subject: [PATCH 143/284] Update to 2.31.0 --- CHANGELOG.md | 2 ++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05019a753..c0c7eea3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.31.0 + ### Added - Added a new CopyFilesBuildPhase, "Embed ExtensionKit Extensions" #1230 @mtj0928 diff --git a/Makefile b/Makefile index 95dd937ba..67a431638 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.30.0 +VERSION = 2.31.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 742132d09..71790bb2a 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.30.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.31.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 9560bb756..c58aaf2ff 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.30.0") +let version = Version("2.31.0") let cli = XcodeGenCLI(version: version) cli.execute() From ff552f38802d8b33b820bb09ccc71b5e79899379 Mon Sep 17 00:00:00 2001 From: antonsergeev88 Date: Sun, 31 Jul 2022 11:33:20 +0300 Subject: [PATCH 144/284] Handle mlmodelc as a single unit (#1237) * Handle mlmodelc as a single unit * Add mlmodelc support in changelog --- CHANGELOG.md | 4 ++++ Sources/ProjectSpec/FileType.swift | 1 + Tests/XcodeGenKitTests/SourceGeneratorTests.swift | 2 ++ 3 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0c7eea3f..a568b1e06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Added + +- Add support for `mlmodelc` files #1236 @antonsergeev88 + ## 2.31.0 ### Added diff --git a/Sources/ProjectSpec/FileType.swift b/Sources/ProjectSpec/FileType.swift index 70ae76321..c794b64e2 100644 --- a/Sources/ProjectSpec/FileType.swift +++ b/Sources/ProjectSpec/FileType.swift @@ -87,6 +87,7 @@ extension FileType { "intentdefinition": FileType(buildPhase: .sources), "metal": FileType(buildPhase: .sources), "mlmodel": FileType(buildPhase: .sources), + "mlmodelc": FileType(buildPhase: .resources), "rcproject": FileType(buildPhase: .sources), "iig": FileType(buildPhase: .sources), "docc": FileType(buildPhase: .sources), diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index e1121df7d..de033f509 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -589,6 +589,7 @@ class SourceGeneratorTests: XCTestCase { - file.xcassets - file.metal - file.mlmodel + - file.mlmodelc - Info.plist - Intent.intentdefinition - Configuration.storekit @@ -647,6 +648,7 @@ class SourceGeneratorTests: XCTestCase { try pbxProj.expectFile(paths: ["C", "Info.plist"], buildPhase: BuildPhaseSpec.none) try pbxProj.expectFile(paths: ["C", "file.metal"], buildPhase: .sources) try pbxProj.expectFile(paths: ["C", "file.mlmodel"], buildPhase: .sources) + try pbxProj.expectFile(paths: ["C", "file.mlmodelc"], buildPhase: .resources) try pbxProj.expectFile(paths: ["C", "Intent.intentdefinition"], buildPhase: .sources) try pbxProj.expectFile(paths: ["C", "Configuration.storekit"], buildPhase: .resources) try pbxProj.expectFile(paths: ["C", "Settings.bundle"], buildPhase: .resources) From 34f50d645e6a3b0d9930c2b105c00521bfe2c8cf Mon Sep 17 00:00:00 2001 From: Isaac Halvorson Date: Mon, 1 Aug 2022 17:27:14 -0500 Subject: [PATCH 145/284] Correct name of package in example yaml (#1240) Hey there, I just noticed that one of the example yaml snippets had the wrong package name specified. --- Docs/ProjectSpec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 93edda1c6..ec9fba852 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -1019,7 +1019,7 @@ packages: Yams: url: https://github.com/jpsim/Yams from: 2.0.0 - Yams: + Ink: github: JohnSundell/Ink from: 0.5.0 RxClient: From ac525a445e0a1420fbe56248e18f1f0d9826b1af Mon Sep 17 00:00:00 2001 From: Shinolr Date: Tue, 9 Aug 2022 22:32:33 +0800 Subject: [PATCH 146/284] remove redundant bracket (#1243) --- Docs/ProjectSpec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index ec9fba852..41741ee7a 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -729,7 +729,7 @@ This is used to override settings or run build scripts in specific targets ## Target Template -This is a template that can be referenced from a normal target using the `templates` property. The properties of this template are the same as a [Target](#target)]. +This is a template that can be referenced from a normal target using the `templates` property. The properties of this template are the same as a [Target](#target). Any instances of `${target_name}` within each template will be replaced by the final target name which references the template. Any attributes defined within a targets `templateAttributes` will be used to replace any attribute references in the template using the syntax `${attribute_name}`. From e9295f1ff3284facb103e8a4dbb025f5246d5327 Mon Sep 17 00:00:00 2001 From: Steven Sheldon Date: Thu, 11 Aug 2022 05:45:06 -0700 Subject: [PATCH 147/284] Fix profile action to not run frameworks (#1245) * Fix profile action to not run frameworks * Add PR number to changelog * Update CHANGELOG.md Co-authored-by: Yonas Kolb --- CHANGELOG.md | 4 ++++ Sources/XcodeGenKit/SchemeGenerator.swift | 3 ++- .../xcshareddata/xcschemes/Framework.xcscheme | 5 ++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a568b1e06..2d903f2ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - Add support for `mlmodelc` files #1236 @antonsergeev88 +### Fixed + +- Fix profile action for frameworks in Xcode 14 #1245 @SSheldon + ## 2.31.0 ### Added diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 60922f29e..d188c11aa 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -320,10 +320,11 @@ public class SchemeGenerator { ) let profileAction = XCScheme.ProfileAction( - buildableProductRunnable: runnables.profile, + buildableProductRunnable: shouldExecuteOnLaunch ? runnables.profile : nil, buildConfiguration: scheme.profile?.config ?? defaultReleaseConfig.name, preActions: scheme.profile?.preActions.map(getExecutionAction) ?? [], postActions: scheme.profile?.postActions.map(getExecutionAction) ?? [], + macroExpansion: shouldExecuteOnLaunch ? nil : buildableReference, shouldUseLaunchSchemeArgsEnv: scheme.profile?.shouldUseLaunchSchemeArgsEnv ?? true, askForAppToLaunch: scheme.profile?.askForAppToLaunch, commandlineArguments: profileCommandLineArgs, diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme index d2be18573..3f0af839d 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme @@ -100,8 +100,7 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> - + - + From 594c67fbe9df46d8e898be3e51ac02aae8fca853 Mon Sep 17 00:00:00 2001 From: "freddi(Yuki Aki)" Date: Fri, 12 Aug 2022 15:21:43 +0900 Subject: [PATCH 148/284] Add `enable` option for `include` to enable optional including for addtional spec (#1242) * add new option enable for include of spec * fix to see the environment variable when parsing include * add test for include with environment variable * fix how to parse boolean value * add spec about enable for include * add Change Log * fix the number of PR in changelog * fix include test to make more clear * fix test to focus enable option more * fix english error * fix to expand variable only one time * add new test case by setting environment object as NO --- CHANGELOG.md | 4 ++ Docs/ProjectSpec.md | 3 +- Sources/ProjectSpec/SpecFile.swift | 38 ++++++++++++------- Sources/ProjectSpec/SpecLoader.swift | 4 +- Tests/Fixtures/include_test.yml | 11 +++++- Tests/Fixtures/included_addtional.yml | 12 ++++++ Tests/PerformanceTests/PerformanceTests.swift | 4 +- Tests/ProjectSpecTests/SpecLoadingTests.swift | 36 +++++++++++++++++- 8 files changed, 90 insertions(+), 22 deletions(-) create mode 100644 Tests/Fixtures/included_addtional.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d903f2ed..64892bce3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ ### Added - Add support for `mlmodelc` files #1236 @antonsergeev88 +- Add `enable` option for `include` #1242 @freddi-kit + +### Fixed +- Fix checking environment variable in `include` #1242 @freddi-kit ### Fixed diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 41741ee7a..209655886 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -64,12 +64,13 @@ An include can be provided via a string (the path) or an object of the form: - [x] **path**: **String** - The path to the included file. - [ ] **relativePaths**: **Bool** - Dictates whether the included spec specifies paths relative to itself (the default) or the root spec file. - +- [ ] **enable**: **Bool** - Dictates whether the specified spec should be included or not. You can also specify it by environment variable. ```yaml include: - includedFile.yml - path: path/to/includedFile.yml relativePaths: false + enable: ${INCLUDE_ADDITIONAL_YAML} ``` By default specs are merged additively. That is for every value: diff --git a/Sources/ProjectSpec/SpecFile.swift b/Sources/ProjectSpec/SpecFile.swift index adf974711..6a1c59b43 100644 --- a/Sources/ProjectSpec/SpecFile.swift +++ b/Sources/ProjectSpec/SpecFile.swift @@ -1,6 +1,7 @@ import Foundation import JSONUtilities import PathKit +import Yams public struct SpecFile { public let basePath: Path @@ -13,17 +14,20 @@ public struct SpecFile { fileprivate struct Include { let path: Path let relativePaths: Bool + let enable: Bool static let defaultRelativePaths = true + static let defaultEnable = true init?(any: Any) { if let string = any as? String { path = Path(string) relativePaths = Include.defaultRelativePaths - } else if let dictionary = any as? JSONDictionary, - let path = dictionary["path"] as? String { + enable = Include.defaultEnable + } else if let dictionary = any as? JSONDictionary, let path = dictionary["path"] as? String { self.path = Path(path) - relativePaths = dictionary["relativePaths"] as? Bool ?? Include.defaultRelativePaths + relativePaths = Self.resolveBoolean(dictionary, key: "relativePaths") ?? Include.defaultRelativePaths + enable = Self.resolveBoolean(dictionary, key: "enable") ?? Include.defaultEnable } else { return nil } @@ -38,10 +42,14 @@ public struct SpecFile { return [] } } + + private static func resolveBoolean(_ dictionary: [String: Any], key: String) -> Bool? { + dictionary[key] as? Bool ?? (dictionary[key] as? NSString)?.boolValue + } } - public init(path: Path) throws { - try self.init(filePath: path, basePath: path.parent()) + public init(path: Path, variables: [String: String] = [:]) throws { + try self.init(filePath: path, basePath: path.parent(), variables: variables) } public init(filePath: Path, jsonDictionary: JSONDictionary, basePath: Path = "", relativePath: Path = "", subSpecs: [SpecFile] = []) { @@ -52,21 +60,23 @@ public struct SpecFile { self.filePath = filePath } - private init(include: Include, basePath: Path, relativePath: Path) throws { + private init(include: Include, basePath: Path, relativePath: Path, variables: [String: String]) throws { let basePath = include.relativePaths ? (basePath + relativePath) : (basePath + relativePath + include.path.parent()) let relativePath = include.relativePaths ? include.path.parent() : Path() - try self.init(filePath: include.path, basePath: basePath, relativePath: relativePath) + try self.init(filePath: include.path, basePath: basePath, variables: variables, relativePath: relativePath) } - private init(filePath: Path, basePath: Path, relativePath: Path = "") throws { + private init(filePath: Path, basePath: Path, variables: [String: String], relativePath: Path = "") throws { let path = basePath + relativePath + filePath.lastComponent - let jsonDictionary = try SpecFile.loadDictionary(path: path) + let jsonDictionary = try SpecFile.loadDictionary(path: path).expand(variables: variables) let includes = Include.parse(json: jsonDictionary["include"]) - let subSpecs: [SpecFile] = try includes.map { include in - try SpecFile(include: include, basePath: basePath, relativePath: relativePath) - } + let subSpecs: [SpecFile] = try includes + .filter(\.enable) + .map { include in + try SpecFile(include: include, basePath: basePath, relativePath: relativePath, variables: variables) + } self.init(filePath: filePath, jsonDictionary: jsonDictionary, basePath: basePath, relativePath: relativePath, subSpecs: subSpecs) } @@ -85,8 +95,8 @@ public struct SpecFile { } } - public func resolvedDictionary(variables: [String: String] = [:]) -> JSONDictionary { - resolvedDictionaryWithUniqueTargets().expand(variables: variables) + public func resolvedDictionary() -> JSONDictionary { + resolvedDictionaryWithUniqueTargets() } private func resolvedDictionaryWithUniqueTargets() -> JSONDictionary { diff --git a/Sources/ProjectSpec/SpecLoader.swift b/Sources/ProjectSpec/SpecLoader.swift index 142d3bf1d..d4493891a 100644 --- a/Sources/ProjectSpec/SpecLoader.swift +++ b/Sources/ProjectSpec/SpecLoader.swift @@ -16,8 +16,8 @@ public class SpecLoader { } public func loadProject(path: Path, projectRoot: Path? = nil, variables: [String: String] = [:]) throws -> Project { - let spec = try SpecFile(path: path) - let resolvedDictionary = spec.resolvedDictionary(variables: variables) + let spec = try SpecFile(path: path, variables: variables) + let resolvedDictionary = spec.resolvedDictionary() let project = try Project(basePath: projectRoot ?? spec.basePath, jsonDictionary: resolvedDictionary) self.project = project diff --git a/Tests/Fixtures/include_test.yml b/Tests/Fixtures/include_test.yml index 6affefa6d..1c24a731a 100644 --- a/Tests/Fixtures/include_test.yml +++ b/Tests/Fixtures/include_test.yml @@ -1,4 +1,11 @@ -include: [included.yml] +include: + - included.yml + - path: included_addtional.yml + enable: ${INCLUDE_ADDTIONAL_YAML} +packages: + Yams: + url: https://github.com/jpsim/Yams + majorVersion: 2.0.0 name: NewName settingGroups: test: @@ -19,3 +26,5 @@ targets: name: IncludedTargetNew platform: tvOS sources:REPLACE: NewSource + dependencies: + - package: Yams diff --git a/Tests/Fixtures/included_addtional.yml b/Tests/Fixtures/included_addtional.yml new file mode 100644 index 000000000..3623d2bea --- /dev/null +++ b/Tests/Fixtures/included_addtional.yml @@ -0,0 +1,12 @@ +name: Included_Addtional +settingGroups: + test: + MY_SETTING5: ADDTIONAL +packages: + SwiftPM: + url: https://github.com/apple/swift-package-manager + branch: swift-5.0-branch +targets: + IncludedTarget: + dependencies: + - package: SwiftPM diff --git a/Tests/PerformanceTests/PerformanceTests.swift b/Tests/PerformanceTests/PerformanceTests.swift index 294b1b9ce..6d2c5a2c4 100644 --- a/Tests/PerformanceTests/PerformanceTests.swift +++ b/Tests/PerformanceTests/PerformanceTests.swift @@ -15,8 +15,8 @@ class GeneratedPerformanceTests: XCTestCase { try dumpYamlDictionary(project.toJSONDictionary(), path: specPath) measure { - let spec = try! SpecFile(path: specPath) - _ = spec.resolvedDictionary(variables: ProcessInfo.processInfo.environment) + let spec = try! SpecFile(path: specPath, variables: ProcessInfo.processInfo.environment) + _ = spec.resolvedDictionary() } } diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 7bab9329d..0c9c96657 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -29,7 +29,7 @@ class SpecLoadingTests: XCTestCase { describe { $0.it("merges includes") { let path = fixturePath + "include_test.yml" - let project = try loadSpec(path: path) + let project = try loadSpec(path: path, variables: [:]) try expect(project.name) == "NewName" try expect(project.settingGroups) == [ @@ -38,7 +38,39 @@ class SpecLoadingTests: XCTestCase { "toReplace": Settings(dictionary: ["MY_SETTING2": "VALUE2"]), ] try expect(project.targets) == [ - Target(name: "IncludedTargetNew", type: .application, platform: .tvOS, sources: ["NewSource"]), + Target(name: "IncludedTargetNew", type: .application, platform: .tvOS, sources: ["NewSource"], dependencies: [Dependency(type: .package(product: nil), reference: "Yams")]), + Target(name: "NewTarget", type: .application, platform: .iOS, sources: ["template", "target"]), + ] + } + + $0.it("merges includes with addtional one") { + let path = fixturePath + "include_test.yml" + let project = try loadSpec(path: path, variables: ["INCLUDE_ADDTIONAL_YAML": "YES"]) + + try expect(project.name) == "NewName" + try expect(project.settingGroups) == [ + "test": Settings(dictionary: ["MY_SETTING1": "NEW VALUE", "MY_SETTING2": "VALUE2", "MY_SETTING3": "VALUE3", "MY_SETTING4": "${SETTING4}", "MY_SETTING5": "ADDTIONAL"]), + "new": Settings(dictionary: ["MY_SETTING": "VALUE"]), + "toReplace": Settings(dictionary: ["MY_SETTING2": "VALUE2"]), + ] + try expect(project.targets) == [ + Target(name: "IncludedTargetNew", type: .application, platform: .tvOS, sources: ["NewSource"], dependencies: [Dependency(type: .package(product: nil), reference: "SwiftPM"), Dependency(type: .package(product: nil), reference: "Yams")]), + Target(name: "NewTarget", type: .application, platform: .iOS, sources: ["template", "target"]), + ] + } + + $0.it("merges includes without addtional one by environemnt variable") { + let path = fixturePath + "include_test.yml" + let project = try loadSpec(path: path, variables: ["INCLUDE_ADDTIONAL_YAML": "NO"]) + + try expect(project.name) == "NewName" + try expect(project.settingGroups) == [ + "test": Settings(dictionary: ["MY_SETTING1": "NEW VALUE", "MY_SETTING2": "VALUE2", "MY_SETTING3": "VALUE3", "MY_SETTING4": "${SETTING4}"]), + "new": Settings(dictionary: ["MY_SETTING": "VALUE"]), + "toReplace": Settings(dictionary: ["MY_SETTING2": "VALUE2"]), + ] + try expect(project.targets) == [ + Target(name: "IncludedTargetNew", type: .application, platform: .tvOS, sources: ["NewSource"], dependencies: [Dependency(type: .package(product: nil), reference: "Yams")]), Target(name: "NewTarget", type: .application, platform: .iOS, sources: ["template", "target"]), ] } From ebf70f1a718e90eeeefeebd02e1e0af1e9463f5a Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Fri, 19 Aug 2022 00:53:34 +1000 Subject: [PATCH 149/284] Update to 2.32.0 --- CHANGELOG.md | 6 +++--- Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64892bce3..168e7458e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,16 +2,16 @@ ## Next Version +## 2.32.0 + ### Added - Add support for `mlmodelc` files #1236 @antonsergeev88 - Add `enable` option for `include` #1242 @freddi-kit -### Fixed -- Fix checking environment variable in `include` #1242 @freddi-kit - ### Fixed +- Fix checking environment variable in `include` #1242 @freddi-kit - Fix profile action for frameworks in Xcode 14 #1245 @SSheldon ## 2.31.0 diff --git a/Makefile b/Makefile index 67a431638..82db425cb 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.31.0 +VERSION = 2.32.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 71790bb2a..befe058cf 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.31.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.32.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index c58aaf2ff..31f102bae 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.31.0") +let version = Version("2.32.0") let cli = XcodeGenCLI(version: version) cli.execute() From 6f331720c90438070b67195f3b2327c96b8a1a2b Mon Sep 17 00:00:00 2001 From: Bobby Sudekum <1058624+bsudekum@users.noreply.github.com> Date: Fri, 9 Sep 2022 01:43:39 -0700 Subject: [PATCH 150/284] Add enableGPUFrameCaptureMode to Scheme (#1251) --- CHANGELOG.md | 4 ++ Docs/ProjectSpec.md | 1 + Sources/ProjectSpec/Scheme.swift | 42 +++++++++++++++++++ Sources/XcodeGenKit/SchemeGenerator.swift | 1 + .../xcschemes/App_Scheme.xcscheme | 1 + Tests/Fixtures/TestProject/project.yml | 1 + Tests/ProjectSpecTests/ProjectSpecTests.swift | 1 + Tests/ProjectSpecTests/SpecLoadingTests.swift | 2 + .../SchemeGeneratorTests.swift | 6 ++- 9 files changed, 57 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 168e7458e..c1869f391 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Added + +- Added support for `enableGPUFrameCaptureMode` #1251 @bsudekum + ## 2.32.0 ### Added diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 209655886..ad64977b8 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -804,6 +804,7 @@ The different actions share some properties: - [ ] **preActions**: **[[Execution Action](#execution-action)]** - Scripts that are run *before* the action - [ ] **postActions**: **[[Execution Action](#execution-action)]** - Scripts that are run *after* the action - [ ] **environmentVariables**: **[[Environment Variable](#environment-variable)]** or **[String:String]** - `run`, `test` and `profile` actions can define the environment variables. When passing a dictionary, every key-value entry maps to a corresponding variable that is enabled. +- [ ] **enableGPUFrameCaptureMode**: **GPUFrameCaptureMode** - Property value set for `GPU Frame Capture`. Possible values are `autoEnabled`, `metal`, `openGL`, `disabled`. Default is `autoEnabled`. - [ ] **disableMainThreadChecker**: **Bool** - `run` and `test` actions can define a boolean that indicates that 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 - [ ] **language**: **String** - `run` and `test` actions can define a language that is used for Application Language diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index 00ffafd19..1b166871f 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -109,6 +109,7 @@ public struct Scheme: Equatable { public var preActions: [ExecutionAction] public var postActions: [ExecutionAction] public var environmentVariables: [XCScheme.EnvironmentVariable] + public var enableGPUFrameCaptureMode: XCScheme.LaunchAction.GPUFrameCaptureMode public var disableMainThreadChecker: Bool public var stopOnEveryMainThreadCheckerIssue: Bool public var language: String? @@ -129,6 +130,7 @@ public struct Scheme: Equatable { preActions: [ExecutionAction] = [], postActions: [ExecutionAction] = [], environmentVariables: [XCScheme.EnvironmentVariable] = [], + enableGPUFrameCaptureMode: XCScheme.LaunchAction.GPUFrameCaptureMode = XCScheme.LaunchAction.defaultGPUFrameCaptureMode, disableMainThreadChecker: Bool = disableMainThreadCheckerDefault, stopOnEveryMainThreadCheckerIssue: Bool = stopOnEveryMainThreadCheckerIssueDefault, language: String? = nil, @@ -147,6 +149,7 @@ public struct Scheme: Equatable { self.postActions = postActions self.environmentVariables = environmentVariables self.disableMainThreadChecker = disableMainThreadChecker + self.enableGPUFrameCaptureMode = enableGPUFrameCaptureMode self.stopOnEveryMainThreadCheckerIssue = stopOnEveryMainThreadCheckerIssue self.language = language self.region = region @@ -408,6 +411,11 @@ extension Scheme.Run: JSONObjectConvertible { preActions = jsonDictionary.json(atKeyPath: "preActions") ?? [] postActions = jsonDictionary.json(atKeyPath: "postActions") ?? [] environmentVariables = try XCScheme.EnvironmentVariable.parseAll(jsonDictionary: jsonDictionary) + if let gpuFrameCaptureMode: String = jsonDictionary.json(atKeyPath: "enableGPUFrameCaptureMode") { + enableGPUFrameCaptureMode = XCScheme.LaunchAction.GPUFrameCaptureMode.fromJSONValue(gpuFrameCaptureMode) + } else { + enableGPUFrameCaptureMode = XCScheme.LaunchAction.defaultGPUFrameCaptureMode + } disableMainThreadChecker = jsonDictionary.json(atKeyPath: "disableMainThreadChecker") ?? Scheme.Run.disableMainThreadCheckerDefault stopOnEveryMainThreadCheckerIssue = jsonDictionary.json(atKeyPath: "stopOnEveryMainThreadCheckerIssue") ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault language = jsonDictionary.json(atKeyPath: "language") @@ -449,6 +457,10 @@ extension Scheme.Run: JSONEncodable { "macroExpansion": macroExpansion ] + if enableGPUFrameCaptureMode != XCScheme.LaunchAction.defaultGPUFrameCaptureMode { + dict["enableGPUFrameCaptureMode"] = enableGPUFrameCaptureMode.toJSONValue() + } + if disableMainThreadChecker != Scheme.Run.disableMainThreadCheckerDefault { dict["disableMainThreadChecker"] = disableMainThreadChecker } @@ -864,3 +876,33 @@ extension XCScheme.EnvironmentVariable: JSONEncodable { return dict } } + +extension XCScheme.LaunchAction.GPUFrameCaptureMode: JSONEncodable { + public func toJSONValue() -> Any { + switch self { + case .autoEnabled: + return "autoEnabled" + case .metal: + return "metal" + case .openGL: + return "openGL" + case .disabled: + return "disabled" + } + } + + static func fromJSONValue(_ string: String) -> XCScheme.LaunchAction.GPUFrameCaptureMode { + switch string { + case "autoEnabled": + return .autoEnabled + case "metal": + return .metal + case "openGL": + return .openGL + case "disabled": + return .disabled + default: + fatalError("Invalid enableGPUFrameCaptureMode value. Valid values are: autoEnabled, metal, openGL, disabled") + } + } +} diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index d188c11aa..ec888d35e 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -308,6 +308,7 @@ public class SchemeGenerator { askForAppToLaunch: scheme.run?.askForAppToLaunch, allowLocationSimulation: allowLocationSimulation, locationScenarioReference: locationScenarioReference, + enableGPUFrameCaptureMode: scheme.run?.enableGPUFrameCaptureMode ?? XCScheme.LaunchAction.defaultGPUFrameCaptureMode, disableMainThreadChecker: scheme.run?.disableMainThreadChecker ?? Scheme.Run.disableMainThreadCheckerDefault, stopOnEveryMainThreadCheckerIssue: scheme.run?.stopOnEveryMainThreadCheckerIssue ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault, commandlineArguments: launchCommandLineArgs, diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme index b4e470e1b..529d76e38 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme @@ -87,6 +87,7 @@ ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" + enableGPUFrameCaptureMode = "3" allowLocationSimulation = "YES"> diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 7b6d4ea59..fb052d3fa 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -428,6 +428,7 @@ schemes: allow: true defaultLocation: Honolulu, HI, USA customLLDBInit: ${SRCROOT}/.lldbinit + enableGPUFrameCaptureMode: "disabled" storeKitConfiguration: "App_iOS/Configuration.storekit" macroExpansion: App_iOS test: diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 4024d68a3..56df66f37 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -640,6 +640,7 @@ class ProjectSpecTests: XCTestCase { environmentVariables: [XCScheme.EnvironmentVariable(variable: "foo", value: "bar", enabled: false)], + enableGPUFrameCaptureMode: .openGL, launchAutomaticallySubstyle: "2", storeKitConfiguration: "Configuration.storekit"), test: Scheme.Test(config: "Config", diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 0c9c96657..5f7354ef7 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -823,6 +823,7 @@ class SpecLoadingTests: XCTestCase { "run": [ "config": "debug", "launchAutomaticallySubstyle": 2, + "enableGPUFrameCaptureMode": "disabled", "storeKitConfiguration": "Configuration.storekit", ], "test": [ @@ -873,6 +874,7 @@ class SpecLoadingTests: XCTestCase { let expectedRun = Scheme.Run( config: "debug", + enableGPUFrameCaptureMode: .disabled, launchAutomaticallySubstyle: "2", storeKitConfiguration: "Configuration.storekit" ) diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index e2c7ded6b..ef110faf6 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -52,7 +52,7 @@ class SchemeGeneratorTests: XCTestCase { let scheme = try Scheme( name: "MyScheme", build: Scheme.Build(targets: [buildTarget], preActions: [preAction]), - run: Scheme.Run(config: "Debug", askForAppToLaunch: true, launchAutomaticallySubstyle: "2", simulateLocation: simulateLocation, storeKitConfiguration: storeKitConfiguration, customLLDBInit: "/sample/.lldbinit"), + run: Scheme.Run(config: "Debug", enableGPUFrameCaptureMode: .metal, askForAppToLaunch: true, launchAutomaticallySubstyle: "2", simulateLocation: simulateLocation, storeKitConfiguration: storeKitConfiguration, customLLDBInit: "/sample/.lldbinit"), test: Scheme.Test(config: "Debug", targets: [ Scheme.Test.TestTarget(targetReference: TestableTargetReference(framework.name), location: "test.gpx"), Scheme.Test.TestTarget(targetReference: TestableTargetReference(framework.name), location: "New York, NY, USA") @@ -110,6 +110,7 @@ class SchemeGeneratorTests: XCTestCase { try expect(xcscheme.launchAction?.locationScenarioReference?.referenceType) == Scheme.SimulateLocation.ReferenceType.predefined.rawValue try expect(xcscheme.launchAction?.locationScenarioReference?.identifier) == "New York, NY, USA" try expect(xcscheme.launchAction?.customLLDBInitFile) == "/sample/.lldbinit" + try expect(xcscheme.launchAction?.enableGPUFrameCaptureMode) == .metal try expect(xcscheme.testAction?.customLLDBInitFile) == "/test/.lldbinit" try expect(xcscheme.testAction?.systemAttachmentLifetime).to.beNil() @@ -266,7 +267,7 @@ class SchemeGeneratorTests: XCTestCase { let scheme = Scheme( name: "TestScheme", build: Scheme.Build(targets: [buildTarget]), - run: Scheme.Run(config: "Debug", debugEnabled: false, simulateLocation: .init(allow: true, defaultLocation: "File.gpx"), storeKitConfiguration: "Configuration.storekit") + run: Scheme.Run(config: "Debug", enableGPUFrameCaptureMode: .metal, debugEnabled: false, simulateLocation: .init(allow: true, defaultLocation: "File.gpx"), storeKitConfiguration: "Configuration.storekit") ) let project = Project( name: "test", @@ -282,6 +283,7 @@ class SchemeGeneratorTests: XCTestCase { try expect(xcscheme.launchAction?.storeKitConfigurationFileReference?.identifier) == "../../Configuration.storekit" try expect(xcscheme.launchAction?.locationScenarioReference?.referenceType) == Scheme.SimulateLocation.ReferenceType.gpx.rawValue try expect(xcscheme.launchAction?.locationScenarioReference?.identifier) == "../../File.gpx" + try expect(xcscheme.launchAction?.enableGPUFrameCaptureMode) == .metal } $0.it("generate scheme without debugger - test") { From ed5ec74668180de55bd7f52e4a2e9e9ac333014a Mon Sep 17 00:00:00 2001 From: Craig Siemens Date: Wed, 28 Sep 2022 22:08:37 -0600 Subject: [PATCH 151/284] Added scheme generation for aggregate targets (#1250) * Updated SchemeGenerator to generate schemes for all projectTargets. * Added changelog entry --- CHANGELOG.md | 4 ++++ Sources/ProjectSpec/AggregateTarget.swift | 2 ++ Sources/ProjectSpec/ProjectTarget.swift | 2 ++ Sources/ProjectSpec/XCProjExtensions.swift | 2 +- Sources/XcodeGenKit/SchemeGenerator.swift | 18 +++++++++--------- 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1869f391..cb975bdb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - Added support for `enableGPUFrameCaptureMode` #1251 @bsudekum +### Fixed + +- Fix scheme not being generated for aggregate targets #1250 @CraigSiemens + ## 2.32.0 ### Added diff --git a/Sources/ProjectSpec/AggregateTarget.swift b/Sources/ProjectSpec/AggregateTarget.swift index b2964e5b8..3769e64ce 100644 --- a/Sources/ProjectSpec/AggregateTarget.swift +++ b/Sources/ProjectSpec/AggregateTarget.swift @@ -1,8 +1,10 @@ import Foundation import JSONUtilities +import XcodeProj public struct AggregateTarget: ProjectTarget { public var name: String + public var type: PBXProductType = .none public var targets: [String] public var settings: Settings public var buildScripts: [BuildScript] diff --git a/Sources/ProjectSpec/ProjectTarget.swift b/Sources/ProjectSpec/ProjectTarget.swift index 0411b0eb2..99fd1d77d 100644 --- a/Sources/ProjectSpec/ProjectTarget.swift +++ b/Sources/ProjectSpec/ProjectTarget.swift @@ -1,8 +1,10 @@ import Foundation +import XcodeProj public protocol ProjectTarget: BuildSettingsContainer { var name: String { get } + var type: PBXProductType { get } var buildScripts: [BuildScript] { get } var scheme: TargetScheme? { get } var attributes: [String: Any] { get } diff --git a/Sources/ProjectSpec/XCProjExtensions.swift b/Sources/ProjectSpec/XCProjExtensions.swift index 9bee91be9..91b4c91f9 100644 --- a/Sources/ProjectSpec/XCProjExtensions.swift +++ b/Sources/ProjectSpec/XCProjExtensions.swift @@ -90,7 +90,7 @@ extension Platform { } } -extension Target { +extension ProjectTarget { public var shouldExecuteOnLaunch: Bool { // This is different from `type.isExecutable`, because we don't want to "run" a test type.isApp || type.isExtension || type.isSystemExtension || type == .commandLineTool diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index ec888d35e..fb069c752 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -48,7 +48,7 @@ public class SchemeGenerator { xcschemes.append(xcscheme) } - for target in project.targets { + for target in project.projectTargets { if let targetScheme = target.scheme { if targetScheme.configVariants.isEmpty { let schemeName = target.name @@ -95,7 +95,7 @@ public class SchemeGenerator { return xcschemes } - public func generateScheme(_ scheme: Scheme, for target: Target? = nil) throws -> XCScheme { + public func generateScheme(_ scheme: Scheme, for target: ProjectTarget? = nil) throws -> XCScheme { func getBuildableReference(_ target: TargetReference) throws -> XCScheme.BuildableReference { let pbxProj: PBXProj @@ -179,7 +179,7 @@ public class SchemeGenerator { return XCScheme.ExecutionAction(scriptText: action.script, title: action.name, environmentBuildable: environmentBuildable) } - let schemeTarget: Target? + let schemeTarget: ProjectTarget? if let targetName = scheme.run?.executable { schemeTarget = project.getTarget(targetName) @@ -359,7 +359,7 @@ public class SchemeGenerator { ) } - private func launchAutomaticallySubstyle(for target: Target?) -> String? { + private func launchAutomaticallySubstyle(for target: ProjectTarget?) -> String? { if target?.type.isExtension == true { return "2" } else { @@ -367,7 +367,7 @@ public class SchemeGenerator { } } - private func makeProductRunnables(for target: Target?, buildableReference: XCScheme.BuildableReference) -> (launch: XCScheme.Runnable, profile: XCScheme.BuildableProductRunnable) { + private func makeProductRunnables(for target: ProjectTarget?, buildableReference: XCScheme.BuildableReference) -> (launch: XCScheme.Runnable, profile: XCScheme.BuildableProductRunnable) { let buildable = XCScheme.BuildableProductRunnable(buildableReference: buildableReference) if target?.type.isWatchApp == true { let remote = XCScheme.RemoteRunnable( @@ -381,7 +381,7 @@ public class SchemeGenerator { } } - private func selectedDebuggerIdentifier(for target: Target?, run: Scheme.Run?) -> String { + private func selectedDebuggerIdentifier(for target: ProjectTarget?, run: Scheme.Run?) -> String { if target?.type.canUseDebugLauncher != false && run?.debugEnabled ?? Scheme.Run.debugEnabledDefault { return XCScheme.defaultDebugger } else { @@ -389,7 +389,7 @@ public class SchemeGenerator { } } - private func selectedLauncherIdentifier(for target: Target?, run: Scheme.Run?) -> String { + private func selectedLauncherIdentifier(for target: ProjectTarget?, run: Scheme.Run?) -> String { if target?.type.canUseDebugLauncher != false && run?.debugEnabled ?? Scheme.Run.debugEnabledDefault { return XCScheme.defaultLauncher } else { @@ -420,7 +420,7 @@ enum SchemeGenerationError: Error, CustomStringConvertible { } extension Scheme { - public init(name: String, target: Target, targetScheme: TargetScheme, project: Project, debugConfig: String, releaseConfig: String) { + public init(name: String, target: ProjectTarget, targetScheme: TargetScheme, project: Project, debugConfig: String, releaseConfig: String) { self.init( name: name, build: .init( @@ -465,7 +465,7 @@ extension Scheme { ) } - private static func buildTargets(for target: Target, project: Project) -> [BuildTarget] { + private static func buildTargets(for target: ProjectTarget, project: Project) -> [BuildTarget] { let buildTarget = Scheme.BuildTarget(target: TestableTargetReference.local(target.name)) switch target.type { case .watchApp, .watch2App: From 435c19443a279c03e7c655f4738b98fe35592571 Mon Sep 17 00:00:00 2001 From: SofteqDG Date: Sat, 1 Oct 2022 11:23:09 +0300 Subject: [PATCH 152/284] Extend possible paths for SettingsPresets (#1135) * Search for presets in Bundle.main.resourcesPath dir (if exists) --- Sources/XcodeGenKit/SettingsBuilder.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/XcodeGenKit/SettingsBuilder.swift b/Sources/XcodeGenKit/SettingsBuilder.swift index 36a252db9..e4ae29f44 100644 --- a/Sources/XcodeGenKit/SettingsBuilder.swift +++ b/Sources/XcodeGenKit/SettingsBuilder.swift @@ -193,6 +193,10 @@ extension SettingsPresetFile { Path(#file).parent().parent().parent() + relativePath, ] + if let resourcePath = Bundle.main.resourcePath { + possibleSettingsPaths.append(Path(resourcePath) + relativePath) + } + if let symlink = try? (bundlePath + "xcodegen").symlinkDestination() { possibleSettingsPaths = [ symlink.parent() + relativePath, From 87d7c7e136caf6392738096dae0568355a0619e3 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Sat, 1 Oct 2022 20:50:18 +1000 Subject: [PATCH 153/284] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb975bdb0..ff6c09dc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added - Added support for `enableGPUFrameCaptureMode` #1251 @bsudekum +- Config setting presets can now also be loaded from the main bundle when bundling XcodeGenKit #1135 @SofteqDG ### Fixed From 3e9fd048efdaa746debe71f0a0d8a29e08fe42f9 Mon Sep 17 00:00:00 2001 From: Roland Date: Wed, 2 Nov 2022 07:42:22 +0100 Subject: [PATCH 154/284] allow multiple spec files to be provided to XcodeGen (#1270) * allow spec to be a comma separated list of specs instead of one * update readme and --spec command documentation * update Changelog * print project name --- CHANGELOG.md | 1 + README.md | 2 +- .../Commands/GenerateCommand.swift | 2 +- .../XcodeGenCLI/Commands/ProjectCommand.swift | 44 +++++++++++-------- 4 files changed, 29 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff6c09dc6..1c741eaf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Added support for `enableGPUFrameCaptureMode` #1251 @bsudekum - Config setting presets can now also be loaded from the main bundle when bundling XcodeGenKit #1135 @SofteqDG +- Added ability to generate multiple projects in one XcodeGen launch #1270 @skofgar ### Fixed diff --git a/README.md b/README.md index befe058cf..2bc909bd7 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ This will look for a project spec in the current directory called `project.yml` Options: -- **--spec**: An optional path to a `.yml` or `.json` project spec. Defaults to `project.yml` +- **--spec**: An optional path to a `.yml` or `.json` project spec. Defaults to `project.yml`. (It is also possible to link to multiple spec files by comma separating them. Note that all other flags will be the same.) - **--project**: An optional path to a directory where the project will be generated. By default this is the directory the spec lives in. - **--quiet**: Suppress informational and success messages. - **--use-cache**: Used to prevent unnecessarily generating the project. If this is set, then a cache file will be written to when a project is generated. If `xcodegen` is later run but the spec and all the files it contains are the same, the project won't be generated. diff --git a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift index bfea587e0..b786e5637 100644 --- a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift +++ b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift @@ -64,7 +64,7 @@ class GenerateCommand: ProjectCommand { do { let existingCacheFile: String = try cacheFilePath.read() if cacheFile.string == existingCacheFile { - info("Project has not changed since cache was written") + info("Project \(project.name) has not changed since cache was written") return } } catch { diff --git a/Sources/XcodeGenCLI/Commands/ProjectCommand.swift b/Sources/XcodeGenCLI/Commands/ProjectCommand.swift index e20b82ea0..894dbc5ba 100644 --- a/Sources/XcodeGenCLI/Commands/ProjectCommand.swift +++ b/Sources/XcodeGenCLI/Commands/ProjectCommand.swift @@ -12,8 +12,8 @@ class ProjectCommand: Command { let name: String let shortDescription: String - @Key("-s", "--spec", description: "The path to the project spec file. Defaults to project.yml") - var spec: Path? + @Key("-s", "--spec", description: "The path to the project spec file. Defaults to project.yml. (It is also possible to link to multiple spec files by comma separating them. Note that all other flags will be the same.)") + var spec: String? @Key("-r", "--project-root", description: "The path to the project root directory. Defaults to the directory containing the project spec.") var projectRoot: Path? @@ -29,24 +29,32 @@ class ProjectCommand: Command { func execute() throws { - let projectSpecPath = (spec ?? "project.yml").absolute() - - if !projectSpecPath.exists { - throw GenerationError.missingProjectSpec(projectSpecPath) + var projectSpecs: [Path] = [] + if let spec = spec { + projectSpecs = spec.components(separatedBy: ",").map { Path($0).absolute() } + } else { + projectSpecs = [ Path("project.yml").absolute() ] } - - let specLoader = SpecLoader(version: version) - let project: Project - - let variables: [String: String] = disableEnvExpansion ? [:] : ProcessInfo.processInfo.environment - - do { - project = try specLoader.loadProject(path: projectSpecPath, projectRoot: projectRoot, variables: variables) - } catch { - throw GenerationError.projectSpecParsingError(error) + + for projectSpecPath in projectSpecs { + if !projectSpecPath.exists { + throw GenerationError.missingProjectSpec(projectSpecPath) + } + + + let specLoader = SpecLoader(version: version) + let project: Project + + let variables: [String: String] = disableEnvExpansion ? [:] : ProcessInfo.processInfo.environment + + do { + project = try specLoader.loadProject(path: projectSpecPath, projectRoot: projectRoot, variables: variables) + } catch { + throw GenerationError.projectSpecParsingError(error) + } + + try execute(specLoader: specLoader, projectSpecPath: projectSpecPath, project: project) } - - try execute(specLoader: specLoader, projectSpecPath: projectSpecPath, project: project) } func execute(specLoader: SpecLoader, projectSpecPath: Path, project: Project) throws {} From e7f753785e6ee135e5ea77268d149e9cd10bb7ed Mon Sep 17 00:00:00 2001 From: Mathieu Olivari <1377279+ma-oli@users.noreply.github.com> Date: Thu, 3 Nov 2022 01:05:46 -0700 Subject: [PATCH 155/284] Fix includes related issues and improve their performances (#1275) * Fix recursive include path when relativePath is not set If relativePath is not set on a particular include, the first level of include will currently work, but starting at the second level of iteration, the computed include path will fail as relativePath will be appended over and over onto the filePath. We're fixing that recursion problem here and adding the corresponding tests to make sure it doesn't happen again. * Include projectRoot in include paths The projectRoot setting (when specified) is currently ignored when computing the include paths. We're fixing that in that commit. * Use memoization during recursive SpecFiles creation SpecFile objects are created by recursive through includes. On a large project with programatically generated SpecFile, it is not rare to have hundreds of SpecFiles, creating a large web of include dependencies. In such a case, it is not rare either for a particular SpecFile to be included by multiple other SpecFiles. When that happens, XcodeGen currently creates a SpecFile object every time a SpecFile gets included, which can lead to an exponential growth of includes. I have seen hundreds of files being turned into hundred of thousands of SpecFile object creations, which leads to an impractical XcodeGen run of tens of minutes. This change adds memoization during SpecFile recursion, in order to reuse the previously created SpecFiles, if available, instead of re-creating them. * Update CHANGELOG.md Add the following changes to the changelog: * b97bdc4 - Use memoization during recursive SpecFiles creation * a6b96ad - Include projectRoot in include paths * 557b074 - Fix recursive include path when relativePath is not set --- CHANGELOG.md | 3 ++ Sources/ProjectSpec/Project.swift | 9 ++++- Sources/ProjectSpec/SpecFile.swift | 39 ++++++++++++------- Sources/ProjectSpec/SpecLoader.swift | 3 +- .../legacy_included_paths_test.yml | 5 ++- .../legacy_paths_test/recursive_include.yml | 4 ++ Tests/PerformanceTests/PerformanceTests.swift | 5 ++- 7 files changed, 49 insertions(+), 19 deletions(-) create mode 100644 Tests/Fixtures/legacy_paths_test/recursive_include.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c741eaf0..b4af2736c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,13 @@ - Added support for `enableGPUFrameCaptureMode` #1251 @bsudekum - Config setting presets can now also be loaded from the main bundle when bundling XcodeGenKit #1135 @SofteqDG - Added ability to generate multiple projects in one XcodeGen launch #1270 @skofgar +- Use memoization during recursive SpecFiles creation. This provides a drastic performance boost with lots of recursive includes #1275 @ma-oli ### Fixed - Fix scheme not being generated for aggregate targets #1250 @CraigSiemens +- Fix recursive include path when relativePath is not set #1275 @ma-oli +- Include projectRoot in include paths #1275 @ma-oli ## 2.32.0 diff --git a/Sources/ProjectSpec/Project.swift b/Sources/ProjectSpec/Project.swift index bc82e9aa5..4b325eab9 100644 --- a/Sources/ProjectSpec/Project.swift +++ b/Sources/ProjectSpec/Project.swift @@ -155,7 +155,14 @@ extension Project: Equatable { extension Project { public init(path: Path) throws { - let spec = try SpecFile(path: path) + var cachedSpecFiles: [Path: SpecFile] = [:] + let spec = try SpecFile(filePath: path, basePath: path.parent(), cachedSpecFiles: &cachedSpecFiles) + try self.init(spec: spec) + } + + public init(path: Path, basePath: Path) throws { + var cachedSpecFiles: [Path: SpecFile] = [:] + let spec = try SpecFile(filePath: path, basePath: basePath, cachedSpecFiles: &cachedSpecFiles) try self.init(spec: spec) } diff --git a/Sources/ProjectSpec/SpecFile.swift b/Sources/ProjectSpec/SpecFile.swift index 6a1c59b43..7667a821c 100644 --- a/Sources/ProjectSpec/SpecFile.swift +++ b/Sources/ProjectSpec/SpecFile.swift @@ -48,8 +48,8 @@ public struct SpecFile { } } - public init(path: Path, variables: [String: String] = [:]) throws { - try self.init(filePath: path, basePath: path.parent(), variables: variables) + public init(path: Path, cachedSpecFiles: inout [Path: SpecFile], variables: [String: String] = [:]) throws { + try self.init(filePath: path, basePath: path.parent(), cachedSpecFiles: &cachedSpecFiles, variables: variables) } public init(filePath: Path, jsonDictionary: JSONDictionary, basePath: Path = "", relativePath: Path = "", subSpecs: [SpecFile] = []) { @@ -60,25 +60,29 @@ public struct SpecFile { self.filePath = filePath } - private init(include: Include, basePath: Path, relativePath: Path, variables: [String: String]) throws { - let basePath = include.relativePaths ? (basePath + relativePath) : (basePath + relativePath + include.path.parent()) + private init(include: Include, basePath: Path, relativePath: Path, cachedSpecFiles: inout [Path: SpecFile], variables: [String: String]) throws { + let basePath = include.relativePaths ? (basePath + relativePath) : basePath let relativePath = include.relativePaths ? include.path.parent() : Path() + let includePath = include.relativePaths ? basePath + relativePath + include.path.lastComponent : basePath + include.path - try self.init(filePath: include.path, basePath: basePath, variables: variables, relativePath: relativePath) + try self.init(filePath: includePath, basePath: basePath, cachedSpecFiles: &cachedSpecFiles, variables: variables, relativePath: relativePath) } - private init(filePath: Path, basePath: Path, variables: [String: String], relativePath: Path = "") throws { - let path = basePath + relativePath + filePath.lastComponent - let jsonDictionary = try SpecFile.loadDictionary(path: path).expand(variables: variables) - + public init(filePath: Path, basePath: Path, cachedSpecFiles: inout [Path: SpecFile], variables: [String: String] = [:], relativePath: Path = "") throws { + let jsonDictionary = try SpecFile.loadDictionary(path: filePath).expand(variables: variables) let includes = Include.parse(json: jsonDictionary["include"]) let subSpecs: [SpecFile] = try includes .filter(\.enable) .map { include in - try SpecFile(include: include, basePath: basePath, relativePath: relativePath, variables: variables) + if let specFile = cachedSpecFiles[filePath] { + return specFile + } else { + return try SpecFile(include: include, basePath: basePath, relativePath: relativePath, cachedSpecFiles: &cachedSpecFiles, variables: variables) + } } self.init(filePath: filePath, jsonDictionary: jsonDictionary, basePath: basePath, relativePath: relativePath, subSpecs: subSpecs) + cachedSpecFiles[filePath] = self } static func loadDictionary(path: Path) throws -> JSONDictionary { @@ -100,7 +104,8 @@ public struct SpecFile { } private func resolvedDictionaryWithUniqueTargets() -> JSONDictionary { - let resolvedSpec = resolvingPaths() + var cachedSpecFiles: [Path: SpecFile] = [:] + let resolvedSpec = resolvingPaths(cachedSpecFiles: &cachedSpecFiles) var value = Set() return resolvedSpec.mergedDictionary(set: &value) @@ -118,19 +123,25 @@ public struct SpecFile { .reduce([:]) { $1.merged(onto: $0) }) } - func resolvingPaths(relativeTo basePath: Path = Path()) -> SpecFile { + func resolvingPaths(cachedSpecFiles: inout [Path: SpecFile], relativeTo basePath: Path = Path()) -> SpecFile { + if let cachedSpecFile = cachedSpecFiles[filePath] { + return cachedSpecFile + } + let relativePath = (basePath + self.relativePath).normalize() guard relativePath != Path() else { return self } let jsonDictionary = Project.pathProperties.resolvingPaths(in: self.jsonDictionary, relativeTo: relativePath) - return SpecFile( + let specFile = SpecFile( filePath: filePath, jsonDictionary: jsonDictionary, relativePath: self.relativePath, - subSpecs: subSpecs.map { $0.resolvingPaths(relativeTo: relativePath) } + subSpecs: subSpecs.map { $0.resolvingPaths(cachedSpecFiles: &cachedSpecFiles, relativeTo: relativePath) } ) + cachedSpecFiles[filePath] = specFile + return specFile } } diff --git a/Sources/ProjectSpec/SpecLoader.swift b/Sources/ProjectSpec/SpecLoader.swift index d4493891a..555e13715 100644 --- a/Sources/ProjectSpec/SpecLoader.swift +++ b/Sources/ProjectSpec/SpecLoader.swift @@ -16,7 +16,8 @@ public class SpecLoader { } public func loadProject(path: Path, projectRoot: Path? = nil, variables: [String: String] = [:]) throws -> Project { - let spec = try SpecFile(path: path, variables: variables) + var cachedSpecFiles: [Path: SpecFile] = [:] + let spec = try SpecFile(filePath: path, basePath: projectRoot ?? path.parent(), cachedSpecFiles: &cachedSpecFiles, variables: variables) let resolvedDictionary = spec.resolvedDictionary() let project = try Project(basePath: projectRoot ?? spec.basePath, jsonDictionary: resolvedDictionary) diff --git a/Tests/Fixtures/legacy_paths_test/legacy_included_paths_test.yml b/Tests/Fixtures/legacy_paths_test/legacy_included_paths_test.yml index de8cce3c4..7156ff0f1 100644 --- a/Tests/Fixtures/legacy_paths_test/legacy_included_paths_test.yml +++ b/Tests/Fixtures/legacy_paths_test/legacy_included_paths_test.yml @@ -1,5 +1,8 @@ configFiles: IncludedConfig: config +include: + - path: legacy_paths_test/recursive_include.yml + relativePaths: false options: carthageBuildPath: carthage_build carthageExecutablePath: carthage_executable @@ -9,8 +12,6 @@ targets: platform: tvOS configFiles: Config: config - sources: - - source dependencies: - framework: Framework info: diff --git a/Tests/Fixtures/legacy_paths_test/recursive_include.yml b/Tests/Fixtures/legacy_paths_test/recursive_include.yml new file mode 100644 index 000000000..0da21bd99 --- /dev/null +++ b/Tests/Fixtures/legacy_paths_test/recursive_include.yml @@ -0,0 +1,4 @@ +targets: + IncludedTarget: + sources: + - source diff --git a/Tests/PerformanceTests/PerformanceTests.swift b/Tests/PerformanceTests/PerformanceTests.swift index 6d2c5a2c4..a241e3483 100644 --- a/Tests/PerformanceTests/PerformanceTests.swift +++ b/Tests/PerformanceTests/PerformanceTests.swift @@ -13,9 +13,12 @@ class GeneratedPerformanceTests: XCTestCase { let project = try Project.testProject(basePath: basePath) let specPath = basePath + "project.yaml" try dumpYamlDictionary(project.toJSONDictionary(), path: specPath) + var cachedSpecFiles: [Path: SpecFile] = [:] measure { - let spec = try! SpecFile(path: specPath, variables: ProcessInfo.processInfo.environment) + let spec = try! SpecFile(path: specPath, + cachedSpecFiles: &cachedSpecFiles, + variables: ProcessInfo.processInfo.environment) _ = spec.resolvedDictionary() } } From ad971a545a30f61d7fbc6cb62bde39b7e09c3918 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Wed, 7 Dec 2022 11:20:24 +1100 Subject: [PATCH 156/284] split variable --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 82db425cb..49dbddbee 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,8 @@ REPO = https://github.com/yonaskolb/$(TOOL_NAME) RELEASE_TAR = $(REPO)/archive/$(VERSION).tar.gz SHA = $(shell curl -L -s $(RELEASE_TAR) | shasum -a 256 | sed 's/ .*//') SWIFT_BUILD_FLAGS = --disable-sandbox -c release --arch arm64 --arch x86_64 -EXECUTABLE_PATH = $(shell swift build $(SWIFT_BUILD_FLAGS) --show-bin-path)/$(EXECUTABLE_NAME) +BUILD_PATH = $(shell swift build $(SWIFT_BUILD_FLAGS) --show-bin-path) +EXECUTABLE_PATH = $(BUILD_PATH)/$(EXECUTABLE_NAME) .PHONY: install build uninstall format_code brew release From b142998dbb979e2de53af96c37269c76e4c5c0b2 Mon Sep 17 00:00:00 2001 From: Kazumasa Shimomura Date: Fri, 9 Dec 2022 16:10:33 +0900 Subject: [PATCH 157/284] Update Yams to 5.0.1 (#1297) * Update yams * Update CHANGELOG.md --- CHANGELOG.md | 3 +++ Package.resolved | 4 ++-- Package.swift | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4af2736c..3f6dfa850 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ - Fix recursive include path when relativePath is not set #1275 @ma-oli - Include projectRoot in include paths #1275 @ma-oli +### Internal +- Updated to Yams 5.0.1 [#1297](https://github.com/yonaskolb/XcodeGen/pull/1297) @s2mr + ## 2.32.0 ### Added diff --git a/Package.resolved b/Package.resolved index 509ec1c4d..880cba3e4 100644 --- a/Package.resolved +++ b/Package.resolved @@ -87,8 +87,8 @@ "repositoryURL": "https://github.com/jpsim/Yams.git", "state": { "branch": null, - "revision": "9ff1cc9327586db4e0c8f46f064b6a82ec1566fa", - "version": "4.0.6" + "revision": "01835dc202670b5bb90d07f3eae41867e9ed29f6", + "version": "5.0.1" } } ] diff --git a/Package.swift b/Package.swift index 9d709baf7..80f07c216 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/kylef/PathKit.git", from: "1.0.1"), - .package(url: "https://github.com/jpsim/Yams.git", from: "4.0.0"), + .package(url: "https://github.com/jpsim/Yams.git", from: "5.0.0"), .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"), From a607d0a0d2faaaffac97c0b0fbf69675cbacca9e Mon Sep 17 00:00:00 2001 From: Kazumasa Shimomura Date: Fri, 9 Dec 2022 16:11:20 +0900 Subject: [PATCH 158/284] Delete ignored `try` keyword. (#1298) --- CHANGELOG.md | 1 + Tests/ProjectSpecTests/ProjectSpecTests.swift | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f6dfa850..b135a8329 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Fix scheme not being generated for aggregate targets #1250 @CraigSiemens - Fix recursive include path when relativePath is not set #1275 @ma-oli - Include projectRoot in include paths #1275 @ma-oli +- Delete ignored `try` keyword #1298 @s2mr ### Internal - Updated to Yams 5.0.1 [#1297](https://github.com/yonaskolb/XcodeGen/pull/1297) @s2mr diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 56df66f37..4a6e81cc2 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -409,7 +409,7 @@ class ProjectSpecTests: XCTestCase { platform: .iOS )] - let testPlan = try TestPlan(path: "does-not-exist.xctestplan") + let testPlan = TestPlan(path: "does-not-exist.xctestplan") let scheme = Scheme( name: "xctestplan-scheme", @@ -437,8 +437,8 @@ class ProjectSpecTests: XCTestCase { platform: .iOS )] - let testPlan1 = try TestPlan(path: "\(fixturePath.string)/TestProject/App_iOS/App_iOS.xctestplan", defaultPlan: true) - let testPlan2 = try TestPlan(path: "\(fixturePath.string)/TestProject/App_iOS/App_iOS.xctestplan", defaultPlan: true) + let testPlan1 = TestPlan(path: "\(fixturePath.string)/TestProject/App_iOS/App_iOS.xctestplan", defaultPlan: true) + let testPlan2 = TestPlan(path: "\(fixturePath.string)/TestProject/App_iOS/App_iOS.xctestplan", defaultPlan: true) let scheme = Scheme( name: "xctestplan-scheme", From fd24307120714d6e39c222213dff65e0d378006d Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Fri, 9 Dec 2022 21:26:46 +1100 Subject: [PATCH 159/284] add a dependency test case --- Sources/ProjectSpec/Config.swift | 2 +- Sources/ProjectSpec/Dependency.swift | 1 + Sources/ProjectSpec/SpecValidationError.swift | 2 +- Sources/ProjectSpec/TestPlan.swift | 2 +- Tests/ProjectSpecTests/ProjectSpecTests.swift | 47 ++++++++++++++++--- 5 files changed, 44 insertions(+), 10 deletions(-) diff --git a/Sources/ProjectSpec/Config.swift b/Sources/ProjectSpec/Config.swift index d5bb3996b..49e5d6d2d 100644 --- a/Sources/ProjectSpec/Config.swift +++ b/Sources/ProjectSpec/Config.swift @@ -13,7 +13,7 @@ public struct Config: Hashable { public static var defaultConfigs: [Config] = [Config(name: ConfigType.debug.name, type: .debug), Config(name: ConfigType.release.name, type: .release)] } -public enum ConfigType: String { +public enum ConfigType: String, Hashable { case debug case release diff --git a/Sources/ProjectSpec/Dependency.swift b/Sources/ProjectSpec/Dependency.swift index 1c01a8d8f..ba4068cb0 100644 --- a/Sources/ProjectSpec/Dependency.swift +++ b/Sources/ProjectSpec/Dependency.swift @@ -83,6 +83,7 @@ extension Dependency { extension Dependency: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(reference) + hasher.combine(type) } } diff --git a/Sources/ProjectSpec/SpecValidationError.swift b/Sources/ProjectSpec/SpecValidationError.swift index eadfca3b9..8a9832ac0 100644 --- a/Sources/ProjectSpec/SpecValidationError.swift +++ b/Sources/ProjectSpec/SpecValidationError.swift @@ -9,7 +9,7 @@ public struct SpecValidationError: Error, CustomStringConvertible { self.errors = errors } - public enum ValidationError: Error, CustomStringConvertible { + public enum ValidationError: Hashable, Error, CustomStringConvertible { case invalidXcodeGenVersion(minimumVersion: Version, version: Version) case invalidSDKDependency(target: String, dependency: String) case invalidTargetDependency(target: String, dependency: String) diff --git a/Sources/ProjectSpec/TestPlan.swift b/Sources/ProjectSpec/TestPlan.swift index c3ebf0d49..541b4e639 100644 --- a/Sources/ProjectSpec/TestPlan.swift +++ b/Sources/ProjectSpec/TestPlan.swift @@ -1,7 +1,7 @@ import Foundation import JSONUtilities -public struct TestPlan: Equatable { +public struct TestPlan: Hashable { public var path: String public var defaultPlan: Bool diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 4a6e81cc2..50e27c1f3 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -149,19 +149,21 @@ class ProjectSpecTests: XCTestCase { name: "target1", type: .application, platform: .iOS, - settings: invalidSettings, dependencies: [ Dependency(type: .target, reference: "dependency1"), Dependency(type: .target, reference: "dependency1"), Dependency(type: .framework, reference: "dependency2"), Dependency(type: .framework, reference: "dependency2"), + + // multiple package dependencies with different products should be allowed + Dependency(type: .package(product: "one"), reference: "package1"), + Dependency(type: .package(product: "two"), reference: "package1"), ] ), Target( name: "target2", type: .framework, platform: .iOS, - settings: invalidSettings, dependencies: [ Dependency(type: .framework, reference: "dependency3"), Dependency(type: .target, reference: "dependency3"), @@ -170,10 +172,11 @@ class ProjectSpecTests: XCTestCase { ] ) ] - try expectValidationError(project, .duplicateDependencies(target: "target1", dependencyReference: "dependency1")) try expectValidationError(project, .duplicateDependencies(target: "target1", dependencyReference: "dependency2")) try expectValidationError(project, .duplicateDependencies(target: "target2", dependencyReference: "dependency4")) + + try expectNoValidationError(project, .duplicateDependencies(target: "target1", dependencyReference: "package1")) } $0.it("allows non-existent configurations") { @@ -734,17 +737,47 @@ class ProjectSpecTests: XCTestCase { } } +private func expectValidationErrors(_ project: Project, _ expectedErrors: Set, file: String = #file, line: Int = #line) throws { + let expectedErrorString = expectedErrors + .map { $0.description } + .sorted() + .joined(separator: "\n") + do { + try project.validate() + if !expectedErrors.isEmpty { + throw failure("Supposed to fail with:\n\(expectedErrorString)", file: file, line: line) + } + } catch let error as SpecValidationError { + if Set(error.errors) != expectedErrors { + throw failure("Supposed to fail with:\n\(expectedErrorString)\nbut got:\n\(error.errors.map { $0.description }.sorted().joined(separator: "\n"))", file: file, line: line) + } + return + } catch { + throw failure("Supposed to fail with:\n\(expectedErrorString)", file: file, line: line) + } +} + private func expectValidationError(_ project: Project, _ expectedError: SpecValidationError.ValidationError, file: String = #file, line: Int = #line) throws { do { try project.validate() + throw failure("Supposed to fail with \"\(expectedError)\"", file: file, line: line) } catch let error as SpecValidationError { - if !error.errors - .contains(where: { $0.description == expectedError.description }) { + if !error.errors.contains(expectedError) { throw failure("Supposed to fail with:\n\(expectedError)\nbut got:\n\(error.errors.map { $0.description }.joined(separator: "\n"))", file: file, line: line) } - return } catch { throw failure("Supposed to fail with \"\(expectedError)\"", file: file, line: line) } - throw failure("Supposed to fail with \"\(expectedError)\"", file: file, line: line) +} + +private func expectNoValidationError(_ project: Project, _ error: SpecValidationError.ValidationError, file: String = #file, line: Int = #line) throws { + do { + try project.validate() + } catch let validationError as SpecValidationError { + if validationError.errors.contains(error) { + throw failure("Failed with:\n\(error.description)", file: file, line: line) + } + } catch { + throw failure("Failed with:\n\(error)", file: file, line: line) + } } From 3327c44ad74c1e04e0de1e8ecca0d7114a613765 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Fri, 9 Dec 2022 21:35:49 +1100 Subject: [PATCH 160/284] Update to 2.33.0 --- CHANGELOG.md | 6 ++++-- Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b135a8329..dbdb99582 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.33.0 + ### Added - Added support for `enableGPUFrameCaptureMode` #1251 @bsudekum @@ -14,10 +16,10 @@ - Fix scheme not being generated for aggregate targets #1250 @CraigSiemens - Fix recursive include path when relativePath is not set #1275 @ma-oli - Include projectRoot in include paths #1275 @ma-oli -- Delete ignored `try` keyword #1298 @s2mr ### Internal -- Updated to Yams 5.0.1 [#1297](https://github.com/yonaskolb/XcodeGen/pull/1297) @s2mr +- Updated to Yams 5.0.1 #1297 @s2mr +- Delete ignored `try` keyword #1298 @s2mr ## 2.32.0 diff --git a/Makefile b/Makefile index 49dbddbee..254c3ffef 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.32.0 +VERSION = 2.33.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 2bc909bd7..f19d77f33 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.32.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.33.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 31f102bae..cb3248696 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.32.0") +let version = Version("2.33.0") let cli = XcodeGenCLI(version: version) cli.execute() From 0500db212d27caf1f385daa1208dff764d93b3f4 Mon Sep 17 00:00:00 2001 From: Craig Siemens Date: Sun, 15 Jan 2023 23:57:43 -0700 Subject: [PATCH 161/284] Handle imports with same relative path (#1262) * Added test for when includes contain relative paths with the same name. * Updated mergedDictionary to handle includes with the same file path. * Removed the need to multiple places to pass in cachedSpecFiles. * Converts the projectRoot into a absolute path before loading a project. * Updated changelog. --- CHANGELOG.md | 4 ++ Sources/ProjectSpec/Project.swift | 9 +-- Sources/ProjectSpec/SpecFile.swift | 69 ++++++++++++------- Sources/ProjectSpec/SpecLoader.swift | 4 +- .../paths_test/included_paths_test.yml | 4 +- .../parent1/parent1.yml | 2 + .../parent1/same/same.yml | 2 + .../parent1/same/target1/target1.yml | 6 ++ .../parent2/parent2.yml | 2 + .../parent2/same/same.yml | 2 + .../parent2/same/target2/target2.yml | 6 ++ .../same_relative_path_test.yml | 12 ++++ Tests/PerformanceTests/PerformanceTests.swift | 2 - Tests/ProjectSpecTests/SpecLoadingTests.swift | 22 ++++++ 14 files changed, 108 insertions(+), 38 deletions(-) create mode 100644 Tests/Fixtures/paths_test/same_relative_path_test/parent1/parent1.yml create mode 100644 Tests/Fixtures/paths_test/same_relative_path_test/parent1/same/same.yml create mode 100644 Tests/Fixtures/paths_test/same_relative_path_test/parent1/same/target1/target1.yml create mode 100644 Tests/Fixtures/paths_test/same_relative_path_test/parent2/parent2.yml create mode 100644 Tests/Fixtures/paths_test/same_relative_path_test/parent2/same/same.yml create mode 100644 Tests/Fixtures/paths_test/same_relative_path_test/parent2/same/target2/target2.yml create mode 100644 Tests/Fixtures/paths_test/same_relative_path_test/same_relative_path_test.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index dbdb99582..a2cf2a350 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Fixed + +- Fix includes when the projectRoot is a realtive path #1262 @CraigSiemens + ## 2.33.0 ### Added diff --git a/Sources/ProjectSpec/Project.swift b/Sources/ProjectSpec/Project.swift index 4b325eab9..bc82e9aa5 100644 --- a/Sources/ProjectSpec/Project.swift +++ b/Sources/ProjectSpec/Project.swift @@ -155,14 +155,7 @@ extension Project: Equatable { extension Project { public init(path: Path) throws { - var cachedSpecFiles: [Path: SpecFile] = [:] - let spec = try SpecFile(filePath: path, basePath: path.parent(), cachedSpecFiles: &cachedSpecFiles) - try self.init(spec: spec) - } - - public init(path: Path, basePath: Path) throws { - var cachedSpecFiles: [Path: SpecFile] = [:] - let spec = try SpecFile(filePath: path, basePath: basePath, cachedSpecFiles: &cachedSpecFiles) + let spec = try SpecFile(path: path) try self.init(spec: spec) } diff --git a/Sources/ProjectSpec/SpecFile.swift b/Sources/ProjectSpec/SpecFile.swift index 7667a821c..18ea15628 100644 --- a/Sources/ProjectSpec/SpecFile.swift +++ b/Sources/ProjectSpec/SpecFile.swift @@ -4,11 +4,17 @@ import PathKit import Yams public struct SpecFile { + /// For the root spec, this is the folder containing the SpecFile. For subSpecs this is the path + /// to the folder of the parent spec that is including this SpecFile. public let basePath: Path - public let relativePath: Path public let jsonDictionary: JSONDictionary public let subSpecs: [SpecFile] + /// The relative path to use when resolving paths in the json dictionary. Is an empty path when + /// included with relativePaths disabled. + private let relativePath: Path + + /// The path to the file relative to the basePath. private let filePath: Path fileprivate struct Include { @@ -47,11 +53,21 @@ public struct SpecFile { dictionary[key] as? Bool ?? (dictionary[key] as? NSString)?.boolValue } } - - public init(path: Path, cachedSpecFiles: inout [Path: SpecFile], variables: [String: String] = [:]) throws { - try self.init(filePath: path, basePath: path.parent(), cachedSpecFiles: &cachedSpecFiles, variables: variables) + + /// Create a SpecFile for a Project + /// - Parameters: + /// - path: The absolute path to the spec file + /// - projectRoot: The root of the project to use as the base path. When nil, uses the parent + /// of the path. + public init(path: Path, projectRoot: Path? = nil, variables: [String: String] = [:]) throws { + let basePath = projectRoot ?? path.parent() + let filePath = try path.relativePath(from: basePath) + var cachedSpecFiles: [Path: SpecFile] = [:] + + try self.init(filePath: filePath, basePath: basePath, cachedSpecFiles: &cachedSpecFiles, variables: variables) } - + + /// Memberwise initializer for SpecFile public init(filePath: Path, jsonDictionary: JSONDictionary, basePath: Path = "", relativePath: Path = "", subSpecs: [SpecFile] = []) { self.basePath = basePath self.relativePath = relativePath @@ -63,26 +79,28 @@ public struct SpecFile { private init(include: Include, basePath: Path, relativePath: Path, cachedSpecFiles: inout [Path: SpecFile], variables: [String: String]) throws { let basePath = include.relativePaths ? (basePath + relativePath) : basePath let relativePath = include.relativePaths ? include.path.parent() : Path() - let includePath = include.relativePaths ? basePath + relativePath + include.path.lastComponent : basePath + include.path - try self.init(filePath: includePath, basePath: basePath, cachedSpecFiles: &cachedSpecFiles, variables: variables, relativePath: relativePath) + try self.init(filePath: include.path, basePath: basePath, cachedSpecFiles: &cachedSpecFiles, variables: variables, relativePath: relativePath) } - public init(filePath: Path, basePath: Path, cachedSpecFiles: inout [Path: SpecFile], variables: [String: String] = [:], relativePath: Path = "") throws { - let jsonDictionary = try SpecFile.loadDictionary(path: filePath).expand(variables: variables) + private init(filePath: Path, basePath: Path, cachedSpecFiles: inout [Path: SpecFile], variables: [String: String], relativePath: Path = "") throws { + let path = basePath + filePath + if let specFile = cachedSpecFiles[path] { + self = specFile + return + } + + let jsonDictionary = try SpecFile.loadDictionary(path: path).expand(variables: variables) + let includes = Include.parse(json: jsonDictionary["include"]) let subSpecs: [SpecFile] = try includes .filter(\.enable) .map { include in - if let specFile = cachedSpecFiles[filePath] { - return specFile - } else { - return try SpecFile(include: include, basePath: basePath, relativePath: relativePath, cachedSpecFiles: &cachedSpecFiles, variables: variables) - } + return try SpecFile(include: include, basePath: basePath, relativePath: relativePath, cachedSpecFiles: &cachedSpecFiles, variables: variables) } self.init(filePath: filePath, jsonDictionary: jsonDictionary, basePath: basePath, relativePath: relativePath, subSpecs: subSpecs) - cachedSpecFiles[filePath] = self + cachedSpecFiles[path] = self } static func loadDictionary(path: Path) throws -> JSONDictionary { @@ -107,24 +125,24 @@ public struct SpecFile { var cachedSpecFiles: [Path: SpecFile] = [:] let resolvedSpec = resolvingPaths(cachedSpecFiles: &cachedSpecFiles) - var value = Set() - return resolvedSpec.mergedDictionary(set: &value) + var mergedSpecPaths = Set() + return resolvedSpec.mergedDictionary(set: &mergedSpecPaths) } - func mergedDictionary(set mergedTargets: inout Set) -> JSONDictionary { - let name = filePath.description + private func mergedDictionary(set mergedSpecPaths: inout Set) -> JSONDictionary { + let path = basePath + filePath - guard !mergedTargets.contains(name) else { return [:] } - mergedTargets.insert(name) + guard mergedSpecPaths.insert(path).inserted else { return [:] } return jsonDictionary.merged(onto: subSpecs - .map { $0.mergedDictionary(set: &mergedTargets) } + .map { $0.mergedDictionary(set: &mergedSpecPaths) } .reduce([:]) { $1.merged(onto: $0) }) } - func resolvingPaths(cachedSpecFiles: inout [Path: SpecFile], relativeTo basePath: Path = Path()) -> SpecFile { - if let cachedSpecFile = cachedSpecFiles[filePath] { + private func resolvingPaths(cachedSpecFiles: inout [Path: SpecFile], relativeTo basePath: Path = Path()) -> SpecFile { + let path = basePath + filePath + if let cachedSpecFile = cachedSpecFiles[path] { return cachedSpecFile } @@ -137,10 +155,11 @@ public struct SpecFile { let specFile = SpecFile( filePath: filePath, jsonDictionary: jsonDictionary, + basePath: self.basePath, relativePath: self.relativePath, subSpecs: subSpecs.map { $0.resolvingPaths(cachedSpecFiles: &cachedSpecFiles, relativeTo: relativePath) } ) - cachedSpecFiles[filePath] = specFile + cachedSpecFiles[path] = specFile return specFile } } diff --git a/Sources/ProjectSpec/SpecLoader.swift b/Sources/ProjectSpec/SpecLoader.swift index 555e13715..fe93e8403 100644 --- a/Sources/ProjectSpec/SpecLoader.swift +++ b/Sources/ProjectSpec/SpecLoader.swift @@ -16,8 +16,8 @@ public class SpecLoader { } public func loadProject(path: Path, projectRoot: Path? = nil, variables: [String: String] = [:]) throws -> Project { - var cachedSpecFiles: [Path: SpecFile] = [:] - let spec = try SpecFile(filePath: path, basePath: projectRoot ?? path.parent(), cachedSpecFiles: &cachedSpecFiles, variables: variables) + let projectRoot = projectRoot?.absolute() + let spec = try SpecFile(path: path, projectRoot: projectRoot, variables: variables) let resolvedDictionary = spec.resolvedDictionary() let project = try Project(basePath: projectRoot ?? spec.basePath, jsonDictionary: resolvedDictionary) diff --git a/Tests/Fixtures/paths_test/included_paths_test.yml b/Tests/Fixtures/paths_test/included_paths_test.yml index f40bf5aed..a8d4fbb0e 100644 --- a/Tests/Fixtures/paths_test/included_paths_test.yml +++ b/Tests/Fixtures/paths_test/included_paths_test.yml @@ -1,4 +1,6 @@ -include: recursive_test/recursive_test.yml +include: + - recursive_test/recursive_test.yml + - same_relative_path_test/same_relative_path_test.yml configFiles: IncludedConfig: config projectReferences: diff --git a/Tests/Fixtures/paths_test/same_relative_path_test/parent1/parent1.yml b/Tests/Fixtures/paths_test/same_relative_path_test/parent1/parent1.yml new file mode 100644 index 000000000..745601f6e --- /dev/null +++ b/Tests/Fixtures/paths_test/same_relative_path_test/parent1/parent1.yml @@ -0,0 +1,2 @@ +include: +- same/same.yml diff --git a/Tests/Fixtures/paths_test/same_relative_path_test/parent1/same/same.yml b/Tests/Fixtures/paths_test/same_relative_path_test/parent1/same/same.yml new file mode 100644 index 000000000..57792c6f5 --- /dev/null +++ b/Tests/Fixtures/paths_test/same_relative_path_test/parent1/same/same.yml @@ -0,0 +1,2 @@ +include: +- target1/target1.yml diff --git a/Tests/Fixtures/paths_test/same_relative_path_test/parent1/same/target1/target1.yml b/Tests/Fixtures/paths_test/same_relative_path_test/parent1/same/target1/target1.yml new file mode 100644 index 000000000..9889fd2fb --- /dev/null +++ b/Tests/Fixtures/paths_test/same_relative_path_test/parent1/same/target1/target1.yml @@ -0,0 +1,6 @@ +targets: + target1: + type: framework + platform: macOS + sources: + - source diff --git a/Tests/Fixtures/paths_test/same_relative_path_test/parent2/parent2.yml b/Tests/Fixtures/paths_test/same_relative_path_test/parent2/parent2.yml new file mode 100644 index 000000000..745601f6e --- /dev/null +++ b/Tests/Fixtures/paths_test/same_relative_path_test/parent2/parent2.yml @@ -0,0 +1,2 @@ +include: +- same/same.yml diff --git a/Tests/Fixtures/paths_test/same_relative_path_test/parent2/same/same.yml b/Tests/Fixtures/paths_test/same_relative_path_test/parent2/same/same.yml new file mode 100644 index 000000000..39b16e6d4 --- /dev/null +++ b/Tests/Fixtures/paths_test/same_relative_path_test/parent2/same/same.yml @@ -0,0 +1,2 @@ +include: +- target2/target2.yml diff --git a/Tests/Fixtures/paths_test/same_relative_path_test/parent2/same/target2/target2.yml b/Tests/Fixtures/paths_test/same_relative_path_test/parent2/same/target2/target2.yml new file mode 100644 index 000000000..88e47edff --- /dev/null +++ b/Tests/Fixtures/paths_test/same_relative_path_test/parent2/same/target2/target2.yml @@ -0,0 +1,6 @@ +targets: + target2: + type: framework + platform: macOS + sources: + - source diff --git a/Tests/Fixtures/paths_test/same_relative_path_test/same_relative_path_test.yml b/Tests/Fixtures/paths_test/same_relative_path_test/same_relative_path_test.yml new file mode 100644 index 000000000..e87e1d46d --- /dev/null +++ b/Tests/Fixtures/paths_test/same_relative_path_test/same_relative_path_test.yml @@ -0,0 +1,12 @@ +include: +- parent1/parent1.yml +- parent2/parent2.yml +targets: + app: + type: application + platform: macOS + sources: + - source + dependencies: + - target: target1 + - target: target2 diff --git a/Tests/PerformanceTests/PerformanceTests.swift b/Tests/PerformanceTests/PerformanceTests.swift index a241e3483..bad966a8b 100644 --- a/Tests/PerformanceTests/PerformanceTests.swift +++ b/Tests/PerformanceTests/PerformanceTests.swift @@ -13,11 +13,9 @@ class GeneratedPerformanceTests: XCTestCase { let project = try Project.testProject(basePath: basePath) let specPath = basePath + "project.yaml" try dumpYamlDictionary(project.toJSONDictionary(), path: specPath) - var cachedSpecFiles: [Path: SpecFile] = [:] measure { let spec = try! SpecFile(path: specPath, - cachedSpecFiles: &cachedSpecFiles, variables: ProcessInfo.processInfo.environment) _ = spec.resolvedDictionary() } diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 5f7354ef7..4481d5d9d 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -162,6 +162,28 @@ class SpecLoadingTests: XCTestCase { postCompileScripts: [BuildScript(script: .path("paths_test/recursive_test/postCompileScript"))], postBuildScripts: [BuildScript(script: .path("paths_test/recursive_test/postBuildScript"))] ), + Target( + name: "app", + type: .application, + platform: .macOS, + sources: ["paths_test/same_relative_path_test/source"], + dependencies: [ + Dependency(type: .target, reference: "target1"), + Dependency(type: .target, reference: "target2") + ] + ), + Target( + name: "target1", + type: .framework, + platform: .macOS, + sources: ["paths_test/same_relative_path_test/parent1/same/target1/source"] + ), + Target( + name: "target2", + type: .framework, + platform: .macOS, + sources: ["paths_test/same_relative_path_test/parent2/same/target2/source"] + ) ] try expect(project.schemes) == [ From b6bc2a8d8810f732dee40ecbf40d19c89a0a4ccb Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Mon, 16 Jan 2023 17:58:33 +1100 Subject: [PATCH 162/284] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2cf2a350..98b796661 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Fixed -- Fix includes when the projectRoot is a realtive path #1262 @CraigSiemens +- Fix includes when the projectRoot is a relative path #1262 @CraigSiemens ## 2.33.0 From 15f31867318ffc824048e90e1184a0875060f9cd Mon Sep 17 00:00:00 2001 From: Casper Riboe Date: Mon, 16 Jan 2023 10:07:26 +0100 Subject: [PATCH 163/284] Renamed Embed step to 'Embed Foundation Extensions' (#1310) * Renamed Embed step * Add changelog entry * Add project diffs --- CHANGELOG.md | 4 ++ Sources/XcodeGenKit/PBXProjGenerator.swift | 2 +- .../Project.xcodeproj/project.pbxproj | 52 +++++++++---------- 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98b796661..4f6b72d51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Changed + +- Renamed build phase `Embed App Extensions` to `Embed Foundation Extensions` #1310 @casperriboe + ### Fixed - Fix includes when the projectRoot is a relative path #1262 @CraigSiemens diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 60ebdfca3..88d786f99 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -1163,7 +1163,7 @@ public class PBXProjGenerator { if !extensions.isEmpty { let copyFilesPhase = addObject( - getPBXCopyFilesBuildPhase(dstSubfolderSpec: .plugins, name: "Embed App Extensions", files: extensions) + getPBXCopyFilesBuildPhase(dstSubfolderSpec: .plugins, name: "Embed Foundation Extensions", files: extensions) ) buildPhases.append(copyFilesPhase) diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index cc3fa31dc..165747f15 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -43,6 +43,7 @@ 1E2A4D61E96521FF7123D7B0 /* XPC Service.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 22237B8EBD9E6BE8EBC8735F /* XPC Service.xpc */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 1E457F55331FD2C3E8E00BE2 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 1F9168A43FD8E2FCC2699E14 /* Documentation.docc in Sources */ = {isa = PBXBuildFile; fileRef = B5C943D39DD7812CAB94B614 /* Documentation.docc */; settings = {COMPILER_FLAGS = "-Werror"; }; }; + 204958B9AD868004CCE6B779 /* App_watchOS Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 210B49C23B9717C668B40C8C /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; 2116F89CF5A04EA0EFA30A89 /* TestProjectUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D88C6BF7355702B74396791 /* TestProjectUITests.swift */; }; 212BCB51DAF3212993DDD49E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D51CC8BCCBD68A90E90A3207 /* Assets.xcassets */; }; @@ -67,7 +68,6 @@ 3788E1382B38DF4ACE3D2BB1 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3BBCA6F76E5F212E9C55FB78 /* BundleX.bundle in Copy Bundle Resources */ = {isa = PBXBuildFile; fileRef = 45C12576F5AA694DD0CE2132 /* BundleX.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 3C5134EE524310ACF7B7CD6E /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CAF6C55B555E3E1352645B6 /* ExtensionDelegate.swift */; }; - 42BC5788871D1D838B253952 /* App_watchOS Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 447D59BE2E0993D7245EA247 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3797E591F302ECC0AA2FC607 /* Assets.xcassets */; }; 45E6702CD9C088FF1FC25F34 /* App_watchOS.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = A680BE9F68A255B0FB291AE6 /* App_watchOS.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 470D3493CDBFE56E2083A5FD /* BundleY.bundle in Copy Bundle Resources */ = {isa = PBXBuildFile; fileRef = E3958AB20082EA12D4D5E60C /* BundleY.bundle */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; @@ -82,7 +82,6 @@ 52AD3276E068EB3396A292BB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D8A016580A3B8F72B820BFBF /* Assets.xcassets */; }; 535A98A3E3B74E09891D977F /* TestFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E43116070AFEF5D8C3A5A957 /* TestFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 5447AD526B2A1FD4262E2B61 /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; - 54A255D331B04F08583F5417 /* iMessageExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = D629E142AB87C681D4EC90F7 /* iMessageExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 5748F702ADFB9D85D0F97862 /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; 58C18019E71E372F635A3FB4 /* MoreUnder.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA8718C7CD3BE86D9B1F5120 /* MoreUnder.swift */; }; 5D10822B0E7C33DD6979F656 /* Standalone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F5BD97AF0F94A15A5B7DDB7 /* Standalone.swift */; }; @@ -157,6 +156,7 @@ CCA17097382757012B58C17C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1BC32A813B80A53962A1F365 /* Assets.xcassets */; }; D5458D67C3596943114C3205 /* Standalone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F5BD97AF0F94A15A5B7DDB7 /* Standalone.swift */; }; D61BEABD5B26B2DE67D0C2EC /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; + D62AB3A85B32F353ABBD57BC /* iMessageExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = D629E142AB87C681D4EC90F7 /* iMessageExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; D8ED40ED61AD912385CFF5F0 /* StaticLibrary_ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D0C79A8C750EC0DE748C463 /* StaticLibrary_ObjC.m */; }; DD5FBFC3C1B2DB3D0D1CF210 /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B785B1161553A7DD6DA4255 /* NetworkExtension.framework */; }; E0B27599D701E6BB0223D0A8 /* FilterDataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16AA52945B70B1BF9E246350 /* FilterDataProvider.swift */; }; @@ -447,17 +447,6 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; - 2F0735A423E554B267BBA0A5 /* Embed App Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - 54A255D331B04F08583F5417 /* iMessageExtension.appex in Embed App Extensions */, - ); - name = "Embed App Extensions"; - runOnlyForDeploymentPostprocessing = 0; - }; 30A8F3568B05F3DB13D8B466 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -481,6 +470,17 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 661E0CEEEC2395C39375961F /* Embed Foundation Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 204958B9AD868004CCE6B779 /* App_watchOS Extension.appex in Embed Foundation Extensions */, + ); + name = "Embed Foundation Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; 6CB76DFA8662672C4245AF41 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -570,17 +570,6 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; - C765431E5FF4B02F59DE79B0 /* Embed App Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - 42BC5788871D1D838B253952 /* App_watchOS Extension.appex in Embed App Extensions */, - ); - name = "Embed App Extensions"; - runOnlyForDeploymentPostprocessing = 0; - }; CF6B94E7B2D2312582A526F5 /* Embed Dependencies */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -616,6 +605,17 @@ name = "Copy Bundle Resources"; runOnlyForDeploymentPostprocessing = 0; }; + EB212BCB1E2E1D2667233F98 /* Embed Foundation Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + D62AB3A85B32F353ABBD57BC /* iMessageExtension.appex in Embed Foundation Extensions */, + ); + name = "Embed Foundation Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; F8CDEFED6ED131A09041F995 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -1701,7 +1701,7 @@ buildConfigurationList = 6B5C5F08C0EF06457756E379 /* Build configuration list for PBXNativeTarget "App_watchOS" */; buildPhases = ( B7B71FA7D279029BF7A7FC7C /* Resources */, - C765431E5FF4B02F59DE79B0 /* Embed App Extensions */, + 661E0CEEEC2395C39375961F /* Embed Foundation Extensions */, ); buildRules = ( ); @@ -1908,7 +1908,7 @@ buildConfigurationList = 1FC6945BE13C2202A2BCA3BC /* Build configuration list for PBXNativeTarget "iMessageApp" */; buildPhases = ( 61001E265009194959C2CF36 /* Resources */, - 2F0735A423E554B267BBA0A5 /* Embed App Extensions */, + EB212BCB1E2E1D2667233F98 /* Embed Foundation Extensions */, ); buildRules = ( ); From 386de7375ec4758328e197492cc6fdff20827c30 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Mon, 16 Jan 2023 20:08:11 +1100 Subject: [PATCH 164/284] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f6b72d51..cc1a4db7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Changed -- Renamed build phase `Embed App Extensions` to `Embed Foundation Extensions` #1310 @casperriboe +- Renamed build phase `Embed App Extensions` to `Embed Foundation Extensions` to fix Xcode 14 warning #1310 @casperriboe ### Fixed From 6caacce3df86312381aaf9ed053fccd5155bd04f Mon Sep 17 00:00:00 2001 From: Hesham Salman Date: Sat, 21 Jan 2023 09:32:22 -0500 Subject: [PATCH 165/284] Fix typo in 'fixtures' (#1316) --- scripts/diff-fixtures.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/diff-fixtures.sh b/scripts/diff-fixtures.sh index d7a2f041a..5b5a7919f 100755 --- a/scripts/diff-fixtures.sh +++ b/scripts/diff-fixtures.sh @@ -3,7 +3,7 @@ set -e if [[ `git status --porcelain Tests/Fixtures` ]]; then echo "" - echo "⚠️ Generated fixturess have changed." + echo "⚠️ Generated fixtures have changed." echo "⚠️ If this is a valid change please run the tests and commit the updates." echo "" git --no-pager diff --color=always Tests/Fixtures From 9551979e54d95a979a615a696c0bfb0e5e18b43c Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 24 Jan 2023 13:08:09 +1100 Subject: [PATCH 166/284] Update RELEASE.md --- RELEASE.md | 1 - 1 file changed, 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index a481e4850..60e27d38d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -3,7 +3,6 @@ 1. Make sure `CHANGELOG.md` is up to date: - All relevant entries have been added with the PR link and author - The new version number is added at the top after `Master` - - The `Commits` link is at the bottom of the release 1. Update the version at the top of `Makefile` 1. Run `make release` 1. Push commit and tag to github From 366981ba2e4463638c34bc09d954a944ace69241 Mon Sep 17 00:00:00 2001 From: Hesham Salman Date: Tue, 24 Jan 2023 19:36:25 -0500 Subject: [PATCH 167/284] Support for `swiftcrossimport` folders (#1317) * Naive support for swiftcrossimport * Update SourceGenerator.swift * Add changelog entry * Update CHANGELOG.md * Add test fixture * Check-in generated diffs --- CHANGELOG.md | 1 + Sources/XcodeGenKit/SourceGenerator.swift | 7 + Sources/XcodeGenKit/XCProjExtensions.swift | 2 + .../Framework.swiftoverlay | 5 + .../CrossOverlayFramework/FrameworkFile.swift | 6 + .../CrossOverlayFramework/Info.plist | 24 + .../CrossOverlayFramework/MyFramework.h | 9 + .../Project.xcodeproj/project.pbxproj | 0 .../Project.xcodeproj/project.pbxproj | 830 +++++++++++++++++- Tests/Fixtures/TestProject/project.yml | 8 + 10 files changed, 885 insertions(+), 7 deletions(-) create mode 100644 Tests/Fixtures/TestProject/CrossOverlayFramework/CrossOverlayFramework.swiftcrossimport/Framework.swiftoverlay create mode 100644 Tests/Fixtures/TestProject/CrossOverlayFramework/FrameworkFile.swift create mode 100644 Tests/Fixtures/TestProject/CrossOverlayFramework/Info.plist create mode 100644 Tests/Fixtures/TestProject/CrossOverlayFramework/MyFramework.h create mode 100644 Tests/Fixtures/TestProject/CrossOverlayFramework/Project.xcodeproj/project.pbxproj diff --git a/CHANGELOG.md b/CHANGELOG.md index cc1a4db7a..e79374fa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Changed - Renamed build phase `Embed App Extensions` to `Embed Foundation Extensions` to fix Xcode 14 warning #1310 @casperriboe +- Added support for `swiftcrossimport` folders. #1317 @Iron-Ham ### Fixed diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index e788ef09d..c540e9718 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -279,6 +279,13 @@ class SourceGenerator { subpath: "include/$(PRODUCT_NAME)", phaseOrder: .preCompile )) + case "swiftcrossimport": + guard targetType == .framework else { return nil } + return .copyFiles(BuildPhaseSpec.CopyFilesSettings( + destination: .productsDirectory, + subpath: "$(PRODUCT_NAME).framework/Modules", + phaseOrder: .preCompile + )) default: return .resources } diff --git a/Sources/XcodeGenKit/XCProjExtensions.swift b/Sources/XcodeGenKit/XCProjExtensions.swift index 4247ce910..d6021668d 100644 --- a/Sources/XcodeGenKit/XCProjExtensions.swift +++ b/Sources/XcodeGenKit/XCProjExtensions.swift @@ -59,6 +59,8 @@ extension Xcode { // cases that aren't handled (yet) in XcodeProj. case ("appex", .extensionKitExtension): return "wrapper.extensionkit-extension" + case ("swiftcrossimport", _): + return "wrapper.swiftcrossimport" default: // fallback to XcodeProj defaults return Xcode.filetype(extension: fileExtension) diff --git a/Tests/Fixtures/TestProject/CrossOverlayFramework/CrossOverlayFramework.swiftcrossimport/Framework.swiftoverlay b/Tests/Fixtures/TestProject/CrossOverlayFramework/CrossOverlayFramework.swiftcrossimport/Framework.swiftoverlay new file mode 100644 index 000000000..f186c2740 --- /dev/null +++ b/Tests/Fixtures/TestProject/CrossOverlayFramework/CrossOverlayFramework.swiftcrossimport/Framework.swiftoverlay @@ -0,0 +1,5 @@ +%YAML 1.2 +--- +version: 1 +modules: + - name: _CrossOverlayFramework_Framework diff --git a/Tests/Fixtures/TestProject/CrossOverlayFramework/FrameworkFile.swift b/Tests/Fixtures/TestProject/CrossOverlayFramework/FrameworkFile.swift new file mode 100644 index 000000000..f003efd55 --- /dev/null +++ b/Tests/Fixtures/TestProject/CrossOverlayFramework/FrameworkFile.swift @@ -0,0 +1,6 @@ +import Foundation + +public struct FrameworkStruct { + + public init() {} +} diff --git a/Tests/Fixtures/TestProject/CrossOverlayFramework/Info.plist b/Tests/Fixtures/TestProject/CrossOverlayFramework/Info.plist new file mode 100644 index 000000000..37c17ea7f --- /dev/null +++ b/Tests/Fixtures/TestProject/CrossOverlayFramework/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.2 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Tests/Fixtures/TestProject/CrossOverlayFramework/MyFramework.h b/Tests/Fixtures/TestProject/CrossOverlayFramework/MyFramework.h new file mode 100644 index 000000000..739f2414b --- /dev/null +++ b/Tests/Fixtures/TestProject/CrossOverlayFramework/MyFramework.h @@ -0,0 +1,9 @@ +// +// MyFramework.h +// MyFramework +// +// Created by Yonas Kolb on 21/7/17. +// Copyright © 2017 Yonas Kolb. All rights reserved. +// + + diff --git a/Tests/Fixtures/TestProject/CrossOverlayFramework/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/CrossOverlayFramework/Project.xcodeproj/project.pbxproj new file mode 100644 index 000000000..e69de29bb diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 165747f15..590824f66 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -25,6 +25,9 @@ /* Begin PBXBuildFile section */ 01BFA2C4D9C5BBC72C015AA8 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 02F9D686CBA6068A8EE58026 /* StaticLibrary_ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D0C79A8C750EC0DE748C463 /* StaticLibrary_ObjC.m */; }; + 03FFCE664129864A8F167C2F /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E4CCE342955E0E934BE533 /* FrameworkFile.swift */; }; + 052D6B4572FBF002286865D7 /* CrossOverlayFramework.swiftcrossimport in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8DD7A61B07AD2F91BDECC255 /* CrossOverlayFramework.swiftcrossimport */; }; + 06F1750F0E45E4822F806523 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 576675973B56A96047CB4944 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0786F9C725AD215C4F915BB5 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 078FAAF5C2B851C7D5EA714F /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D296BB7355994040E197A1EE /* Result.framework */; }; 079B6E02AF21664AB08E621C /* TestProjectUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 587B9E9A3533E965CA602B76 /* TestProjectUITests.swift */; }; @@ -42,6 +45,7 @@ 1E03FC7312293997599C6435 /* Empty.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 068EDF47F0B087F6A4052AC0 /* Empty.h */; }; 1E2A4D61E96521FF7123D7B0 /* XPC Service.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 22237B8EBD9E6BE8EBC8735F /* XPC Service.xpc */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 1E457F55331FD2C3E8E00BE2 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 1EFFFE113C5E54A91148D3EB /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E4CCE342955E0E934BE533 /* FrameworkFile.swift */; }; 1F9168A43FD8E2FCC2699E14 /* Documentation.docc in Sources */ = {isa = PBXBuildFile; fileRef = B5C943D39DD7812CAB94B614 /* Documentation.docc */; settings = {COMPILER_FLAGS = "-Werror"; }; }; 204958B9AD868004CCE6B779 /* App_watchOS Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 210B49C23B9717C668B40C8C /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; @@ -74,6 +78,7 @@ 47D1F439B8E6D287B3F3E8D1 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 47FC57B04A3AD83359F433EA /* StaticLibrary_ObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5A2B916A11DCC2565241359F /* StaticLibrary_ObjC.h */; }; 49A4B8937BB5520B36EA33F0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 814D72C2B921F60B759C2D4B /* Main.storyboard */; }; + 4B862F11762F6BB54E97E401 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 576675973B56A96047CB4944 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4C1504A05321046B3ED7A839 /* Framework2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB055761199DF36DB0C629A6 /* Framework2.framework */; }; 4CB673A7C0C11E04F8544BDB /* Contacts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB2B6A77D39CD5602F2125F /* Contacts.framework */; }; 4DA7140FF84DBF39961F3409 /* NetworkSystemExtension.systemextension in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = 2049B6DD2AFE85F9DC9F3EB3 /* NetworkSystemExtension.systemextension */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; @@ -83,6 +88,7 @@ 535A98A3E3B74E09891D977F /* TestFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E43116070AFEF5D8C3A5A957 /* TestFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 5447AD526B2A1FD4262E2B61 /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; 5748F702ADFB9D85D0F97862 /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; + 57DC116CE5C9F93FBA529C2F /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 576675973B56A96047CB4944 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 58C18019E71E372F635A3FB4 /* MoreUnder.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA8718C7CD3BE86D9B1F5120 /* MoreUnder.swift */; }; 5D10822B0E7C33DD6979F656 /* Standalone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F5BD97AF0F94A15A5B7DDB7 /* Standalone.swift */; }; 5E0369B907E239D1E6884ECF /* TestFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E43116070AFEF5D8C3A5A957 /* TestFramework.framework */; }; @@ -98,7 +104,9 @@ 666DEC173BC78C7641AB22EC /* File1.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE1343F2238429D4DA9D830B /* File1.swift */; }; 66C3C5E3C13325F351A3008F /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = F2950763C4C568CC85021D18 /* module.modulemap */; }; 6B0BCD3573931F7BE133B301 /* TestProjectTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D132EA69984F32DA9DC727B6 /* TestProjectTests.swift */; }; + 6C02002A4EE169CEBEC7BA7F /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E4CCE342955E0E934BE533 /* FrameworkFile.swift */; }; 6E8F8303759824631C8D9DA3 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9E17D598D98065767A04740F /* Localizable.strings */; }; + 713F57A10C62F70058D7FB0A /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E4CCE342955E0E934BE533 /* FrameworkFile.swift */; }; 7148A4172BFA1CC22E6ED5DB /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 753001CDCEAA4C4E1AFF8E87 /* MainInterface.storyboard */; }; 71A2AAC5934BDC9EDB6F0D9E /* libStaticLibrary_ObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B221F5A689AD7D3AD52F56B8 /* libStaticLibrary_ObjC.a */; }; 747CAE14D196F5652E93353C /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 2E1E747C7BC434ADB80CC269 /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -141,6 +149,7 @@ B2D43A31C184E34EF9CB743C /* Framework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; B47F2629BFE5853767C8BB5E /* Contacts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB2B6A77D39CD5602F2125F /* Contacts.framework */; }; B49D3A51787E362DE4D0E78A /* SomeXPCService.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70A8E15C81E454DC950C59F0 /* SomeXPCService.xpc */; }; + B502EF8F7605CBD038298F23 /* CrossOverlayFramework.swiftcrossimport in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8DD7A61B07AD2F91BDECC255 /* CrossOverlayFramework.swiftcrossimport */; }; B9F3C9E77019EC3423A7F5D8 /* TestProjectTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87DF9DCA8399E3214A7E27CF /* TestProjectTests.swift */; }; BAA1C1E3828F5D43546AF997 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BB1B49A91B892152D68ED76 /* libc++.tbd */; }; BB06A57E259D0D2A001EA21F /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -154,10 +163,12 @@ C88598A49087A212990F4E8B /* ResourceFolder in Resources */ = {isa = PBXBuildFile; fileRef = 6B1603BA83AA0C7B94E45168 /* ResourceFolder */; }; CAE18A2194B57C830A297F83 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6680EFE4E908CDBDCE405C8 /* main.swift */; }; CCA17097382757012B58C17C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1BC32A813B80A53962A1F365 /* Assets.xcassets */; }; + D058D241BDF5FB0C919BBECA /* CrossOverlayFramework.swiftcrossimport in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8DD7A61B07AD2F91BDECC255 /* CrossOverlayFramework.swiftcrossimport */; }; D5458D67C3596943114C3205 /* Standalone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F5BD97AF0F94A15A5B7DDB7 /* Standalone.swift */; }; D61BEABD5B26B2DE67D0C2EC /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; D62AB3A85B32F353ABBD57BC /* iMessageExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = D629E142AB87C681D4EC90F7 /* iMessageExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; D8ED40ED61AD912385CFF5F0 /* StaticLibrary_ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D0C79A8C750EC0DE748C463 /* StaticLibrary_ObjC.m */; }; + DBCA8149E5C4183AB52B8D99 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 576675973B56A96047CB4944 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; DD5FBFC3C1B2DB3D0D1CF210 /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B785B1161553A7DD6DA4255 /* NetworkExtension.framework */; }; E0B27599D701E6BB0223D0A8 /* FilterDataProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16AA52945B70B1BF9E246350 /* FilterDataProvider.swift */; }; E1836941C13CC7F13650C317 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3ED831531AA349CCC19B258B /* Assets.xcassets */; }; @@ -172,6 +183,7 @@ F4D77E81B0539EA5F4F141A6 /* EndpointSecuritySystemExtension.systemextension in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = E5E0A80CCE8F8DB662DCD2D0 /* EndpointSecuritySystemExtension.systemextension */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; F5D71267BB5A326BDD69D532 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E55F45EACB0F382722D61C8D /* Assets.xcassets */; }; F6537CE373C94809E6653758 /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 2E1E747C7BC434ADB80CC269 /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; + F6734680031310575CDE9F23 /* CrossOverlayFramework.swiftcrossimport in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8DD7A61B07AD2F91BDECC255 /* CrossOverlayFramework.swiftcrossimport */; }; F7423E8738EECF04795C7601 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3F6BCB5FEFB16F1BA368059 /* InterfaceController.swift */; }; F788A3FA1CE6489BC257C1C3 /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 306796628DD52FA55E833B65 /* Model.xcdatamodeld */; settings = {COMPILER_FLAGS = "-Werror"; }; }; FB6DA0DB62C425066D51767E /* Driver.iig in Sources */ = {isa = PBXBuildFile; fileRef = 5A3A73F307648F58213E4EA1 /* Driver.iig */; }; @@ -413,6 +425,16 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ + 04D94C495E299B50EB0DC7C4 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(PRODUCT_NAME).framework/Modules"; + dstSubfolderSpec = 16; + files = ( + B502EF8F7605CBD038298F23 /* CrossOverlayFramework.swiftcrossimport in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 05D615CB74F875917AA8C9B0 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -447,6 +469,16 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + 096753D5DAA26D110F699A7F /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(PRODUCT_NAME).framework/Modules"; + dstSubfolderSpec = 16; + files = ( + F6734680031310575CDE9F23 /* CrossOverlayFramework.swiftcrossimport in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 30A8F3568B05F3DB13D8B466 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -570,6 +602,16 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + ADD98000970B8907F73BFD92 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(PRODUCT_NAME).framework/Modules"; + dstSubfolderSpec = 16; + files = ( + 052D6B4572FBF002286865D7 /* CrossOverlayFramework.swiftcrossimport in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; CF6B94E7B2D2312582A526F5 /* Embed Dependencies */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -594,6 +636,16 @@ name = "Embed System Extensions"; runOnlyForDeploymentPostprocessing = 0; }; + E1C04BDC65F3DC88D6D0473F /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(PRODUCT_NAME).framework/Modules"; + dstSubfolderSpec = 16; + files = ( + D058D241BDF5FB0C919BBECA /* CrossOverlayFramework.swiftcrossimport in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; E8BC0F358D693454E5027ECC /* Copy Bundle Resources */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -654,6 +706,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 0095836FE59395511E0CB4F0 /* CrossOverlayFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CrossOverlayFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 01E6934B571B91EAAFF0EDCB /* Resource.abc */ = {isa = PBXFileReference; path = Resource.abc; sourceTree = ""; }; 020E4DA91C9132845CAFDC5D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = ""; }; 039F208D1138598CE060F140 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; @@ -713,6 +766,7 @@ 4BF4D16042A80576D259160C /* Model 3.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Model 3.xcdatamodel"; sourceTree = ""; }; 5116B3B58070BCD09F1487BA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 553D289724905857912C7A1D /* outputList.xcfilelist */ = {isa = PBXFileReference; lastKnownFileType = text.xcfilelist; path = outputList.xcfilelist; sourceTree = ""; }; + 576675973B56A96047CB4944 /* MyFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyFramework.h; sourceTree = ""; }; 57FF8864B8EBAB5777DC12E6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 587B9E9A3533E965CA602B76 /* TestProjectUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectUITests.swift; sourceTree = ""; }; 59DA55A04FA2366B5D0BEEFF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -738,16 +792,20 @@ 7F1A2F579A6F79C62DDA0571 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7FDC16E1938AA114B67D87A9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; 814822136AF3C64428D69DD6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 81E4CCE342955E0E934BE533 /* FrameworkFile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrameworkFile.swift; sourceTree = ""; }; 83B5EC7EF81F7E4B6F426D4E /* DriverKitDriver.dext */ = {isa = PBXFileReference; explicitFileType = "wrapper.driver-extension"; includeInIndex = 0; path = DriverKitDriver.dext; sourceTree = BUILT_PRODUCTS_DIR; }; 84317819C92F78425870E483 /* BundleX.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = BundleX.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 86169DEEDEAF09AB89C8A31D /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; 87DF9DCA8399E3214A7E27CF /* TestProjectTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectTests.swift; sourceTree = ""; }; + 89EB41A001D8BF26431C5798 /* CrossOverlayFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CrossOverlayFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8AF20308873AEEEC4D8C45D1 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = wrapper.cfbundle; path = Settings.bundle; sourceTree = ""; }; 8C62E8644AC5070AFC737BCC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 8CAF6C55B555E3E1352645B6 /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = ""; }; 8CB86294FB939FE6E90932E1 /* libStaticLibrary_Swift.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary_Swift.a; sourceTree = BUILT_PRODUCTS_DIR; }; 8D88C6BF7355702B74396791 /* TestProjectUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectUITests.swift; sourceTree = ""; }; + 8DD7A61B07AD2F91BDECC255 /* CrossOverlayFramework.swiftcrossimport */ = {isa = PBXFileReference; lastKnownFileType = wrapper.swiftcrossimport; path = CrossOverlayFramework.swiftcrossimport; sourceTree = ""; }; + 8FE05BF7897ECFD58B7AC8B1 /* CrossOverlayFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CrossOverlayFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 93C033648A37D95027845BD3 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; 9528528C989D24FE3E6C533E /* App-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "App-Info.plist"; sourceTree = ""; }; 9A87A926D563773658FB87FE /* iMessageApp.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = iMessageApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -784,6 +842,7 @@ CA8718C7CD3BE86D9B1F5120 /* MoreUnder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoreUnder.swift; sourceTree = ""; }; CB77A637470A3CDA2BDDBE99 /* App_iOS_Tests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = App_iOS_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; D132EA69984F32DA9DC727B6 /* TestProjectTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectTests.swift; sourceTree = ""; }; + D21BB1B6FA5A025305B223BA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; D296BB7355994040E197A1EE /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; D51CC8BCCBD68A90E90A3207 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; D629E142AB87C681D4EC90F7 /* iMessageExtension.appex */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "wrapper.app-extension"; path = iMessageExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -793,6 +852,7 @@ D8A016580A3B8F72B820BFBF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; DAA7880242A9DE61E68026CC /* Folder */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Folder; sourceTree = SOURCE_ROOT; }; DFE6A6FAAFF701FE729293DE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + E0F31A9DE15B210D101AFC81 /* CrossOverlayFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CrossOverlayFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E3958AB20082EA12D4D5E60C /* BundleY.bundle */ = {isa = PBXFileReference; lastKnownFileType = wrapper.cfbundle; path = BundleY.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; E42335D1200CB7B8B91E962F /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = Base; path = Base.lproj/Localizable.stringsdict; sourceTree = ""; }; E43116070AFEF5D8C3A5A957 /* TestFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TestFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1035,6 +1095,7 @@ 795B8D70B674C850B57DD39D /* App_watchOS Extension */, 6DBE0EE90642BB3F6E58AD43 /* Configs */, 3F2E22B7AB20FA42CD205C2A /* CopyFiles */, + ED8625A7E716E1BA50AB88AB /* CrossOverlayFramework */, FCC084D4F8992BBC49983A38 /* CustomGroup */, 7979F5A04B370C36415EFB11 /* DriverKit Driver */, 99EF37D6DEE914E180236A91 /* EndpointSecurity Extension */, @@ -1275,6 +1336,10 @@ A680BE9F68A255B0FB291AE6 /* App_watchOS.app */, 84317819C92F78425870E483 /* BundleX.bundle */, BB677D970923F663D846D7E0 /* BundleY.bundle */, + 8FE05BF7897ECFD58B7AC8B1 /* CrossOverlayFramework.framework */, + E0F31A9DE15B210D101AFC81 /* CrossOverlayFramework.framework */, + 0095836FE59395511E0CB4F0 /* CrossOverlayFramework.framework */, + 89EB41A001D8BF26431C5798 /* CrossOverlayFramework.framework */, 83B5EC7EF81F7E4B6F426D4E /* DriverKitDriver.dext */, E5E0A80CCE8F8DB662DCD2D0 /* EndpointSecuritySystemExtension.systemextension */, 7D700FA699849D2F95216883 /* EntitledApp.app */, @@ -1382,6 +1447,17 @@ path = iOS; sourceTree = ""; }; + ED8625A7E716E1BA50AB88AB /* CrossOverlayFramework */ = { + isa = PBXGroup; + children = ( + 8DD7A61B07AD2F91BDECC255 /* CrossOverlayFramework.swiftcrossimport */, + 81E4CCE342955E0E934BE533 /* FrameworkFile.swift */, + D21BB1B6FA5A025305B223BA /* Info.plist */, + 576675973B56A96047CB4944 /* MyFramework.h */, + ); + path = CrossOverlayFramework; + sourceTree = ""; + }; EE78B4FBD0137D1975C47D76 /* App_macOS */ = { isa = PBXGroup; children = ( @@ -1490,6 +1566,22 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 942F7B856687815A6B056194 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 06F1750F0E45E4822F806523 /* MyFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A24F1A0AC15CAE82CD3EDFE2 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 4B862F11762F6BB54E97E401 /* MyFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; AEC8E1CFD02926FADE734D82 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -1498,6 +1590,22 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + C5BCD048B70E4D35B14AA8E9 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + DBCA8149E5C4183AB52B8D99 /* MyFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DA6BC7F9BB12AC09AB3AF202 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 57DC116CE5C9F93FBA529C2F /* MyFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; F21F013CBD830972394A3A13 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -1633,6 +1741,23 @@ productReference = BECEA4A483ADEB8158F640B3 /* Tool */; productType = "com.apple.product-type.tool"; }; + 0CE8BE7C80651629EC056066 /* CrossOverlayFramework_iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 641D1B2D88B93FAD0EA09187 /* Build configuration list for PBXNativeTarget "CrossOverlayFramework_iOS" */; + buildPhases = ( + 096753D5DAA26D110F699A7F /* CopyFiles */, + C5BCD048B70E4D35B14AA8E9 /* Headers */, + 84FEBA4F84620938800D12A4 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CrossOverlayFramework_iOS; + productName = CrossOverlayFramework_iOS; + productReference = 8FE05BF7897ECFD58B7AC8B1 /* CrossOverlayFramework.framework */; + productType = "com.apple.product-type.framework"; + }; 13E8C5AB873CEE21E18E552F /* StaticLibrary_ObjC_iOS */ = { isa = PBXNativeTarget; buildConfigurationList = 56BF985F253DD84AD7C37538 /* Build configuration list for PBXNativeTarget "StaticLibrary_ObjC_iOS" */; @@ -1727,6 +1852,23 @@ productReference = BB677D970923F663D846D7E0 /* BundleY.bundle */; productType = "com.apple.product-type.bundle"; }; + 2F4FEAEFD7EE82DC49D899FC /* CrossOverlayFramework_macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9C9913AAE0ABA99337F0C069 /* Build configuration list for PBXNativeTarget "CrossOverlayFramework_macOS" */; + buildPhases = ( + E1C04BDC65F3DC88D6D0473F /* CopyFiles */, + 942F7B856687815A6B056194 /* Headers */, + A87FBABC2AA10F8D044526BD /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CrossOverlayFramework_macOS; + productName = CrossOverlayFramework_macOS; + productReference = E0F31A9DE15B210D101AFC81 /* CrossOverlayFramework.framework */; + productType = "com.apple.product-type.framework"; + }; 307AE3FA155FFD09B74AE351 /* App_watchOS Extension */ = { isa = PBXNativeTarget; buildConfigurationList = 3F3C272D2EA61F6B88B80D44 /* Build configuration list for PBXNativeTarget "App_watchOS Extension" */; @@ -1744,6 +1886,23 @@ productReference = 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */; productType = "com.apple.product-type.watchkit2-extension"; }; + 3BF66A4668DFAF9338791F60 /* CrossOverlayFramework_tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = E3D23AF56C29471E48CA9A11 /* Build configuration list for PBXNativeTarget "CrossOverlayFramework_tvOS" */; + buildPhases = ( + 04D94C495E299B50EB0DC7C4 /* CopyFiles */, + DA6BC7F9BB12AC09AB3AF202 /* Headers */, + E9BE8745FD5B1ACBE43B9E0C /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CrossOverlayFramework_tvOS; + productName = CrossOverlayFramework_tvOS; + productReference = 0095836FE59395511E0CB4F0 /* CrossOverlayFramework.framework */; + productType = "com.apple.product-type.framework"; + }; 428715FBC1D86458DA70CBDE /* DriverKitDriver */ = { isa = PBXNativeTarget; buildConfigurationList = 412FA71CA97AD6851A1828DD /* Build configuration list for PBXNativeTarget "DriverKitDriver" */; @@ -2035,6 +2194,23 @@ productReference = 7D700FA699849D2F95216883 /* EntitledApp.app */; productType = "com.apple.product-type.application"; }; + C7F90FD0FAAF232B3E015D38 /* CrossOverlayFramework_watchOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = C483BD5456B09C276DE6EFC1 /* Build configuration list for PBXNativeTarget "CrossOverlayFramework_watchOS" */; + buildPhases = ( + ADD98000970B8907F73BFD92 /* CopyFiles */, + A24F1A0AC15CAE82CD3EDFE2 /* Headers */, + C975C5F0085D232AF63E0F3E /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CrossOverlayFramework_watchOS; + productName = CrossOverlayFramework_watchOS; + productReference = 89EB41A001D8BF26431C5798 /* CrossOverlayFramework.framework */; + productType = "com.apple.product-type.framework"; + }; CE7D183D3752B5B35D2D8E6D /* Framework2_iOS */ = { isa = PBXNativeTarget; buildConfigurationList = 9A0EF0B71AD44055E8749C42 /* Build configuration list for PBXNativeTarget "Framework2_iOS" */; @@ -2230,6 +2406,10 @@ 307AE3FA155FFD09B74AE351 /* App_watchOS Extension */, DA40AB367B606CCE2FDD398D /* BundleX */, 271CAC331D24F4F7E12C819C /* BundleY */, + 0CE8BE7C80651629EC056066 /* CrossOverlayFramework_iOS */, + 2F4FEAEFD7EE82DC49D899FC /* CrossOverlayFramework_macOS */, + 3BF66A4668DFAF9338791F60 /* CrossOverlayFramework_tvOS */, + C7F90FD0FAAF232B3E015D38 /* CrossOverlayFramework_watchOS */, 428715FBC1D86458DA70CBDE /* DriverKitDriver */, 9F551F66949B55E8328EB995 /* EndpointSecuritySystemExtension */, B61ED4688789B071275E2B7A /* EntitledApp */, @@ -2685,6 +2865,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 84FEBA4F84620938800D12A4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1EFFFE113C5E54A91148D3EB /* FrameworkFile.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 8A616537E6E1BEAB59E069C7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2766,6 +2954,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A87FBABC2AA10F8D044526BD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6C02002A4EE169CEBEC7BA7F /* FrameworkFile.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; AE7971E1CA54D23C264E6541 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2783,6 +2979,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + C975C5F0085D232AF63E0F3E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 713F57A10C62F70058D7FB0A /* FrameworkFile.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; D1F422E9C4DD531AA88418C9 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2807,6 +3011,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + E9BE8745FD5B1ACBE43B9E0C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 03FFCE664129864A8F167C2F /* FrameworkFile.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; EA88FE285DA490166635BE98 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -3159,6 +3371,30 @@ }; name = "Staging Release"; }; + 02E38E444E372E89E589E022 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-tvOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Debug"; + }; 02EB0C0230E6616EC8057F1C /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3691,6 +3927,70 @@ }; name = "Test Debug"; }; + 19BF18E6EAA8B30F894EAB4E /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-watchOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Release"; + }; + 1C63C4A728212D903E4F2CBB /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-iOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Release"; + }; + 1C644E47F1C539F2B95160B8 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-watchOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Debug"; + }; 1D61DC7F5309F4C8B7692D85 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3705,6 +4005,30 @@ }; name = "Test Release"; }; + 1FB2AFB2F45076B4A047499E /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-iOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Debug"; + }; 20803EC42C26E4EA13474E5A /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3975,6 +4299,30 @@ }; name = "Staging Debug"; }; + 321D6FAF1E7AA977008359C7 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-tvOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Debug"; + }; 3236B7B20520584116A96C0D /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3996,6 +4344,30 @@ }; name = "Production Release"; }; + 34ED16009A759D256D7ECB53 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-macOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Release"; + }; 366C92A637FDA940E6BCB591 /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -4250,15 +4622,35 @@ }; name = "Test Debug"; }; - 4621C6C8A78FBB1CF4078178 /* Production Release */ = { + 45FD151DC9928DE066A3B1AD /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-watchOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Release"; + }; + 4621C6C8A78FBB1CF4078178 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); INFOPLIST_FILE = "App_macOS/App-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4405,6 +4797,26 @@ }; name = "Production Release"; }; + 4D5DC2028DC046B8AF0B9B83 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-watchOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Debug"; + }; 4D86BBA6893D41140152B8CC /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5043,6 +5455,54 @@ }; name = "Test Debug"; }; + 6E93ACBBB608F386C0EB0F40 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-iOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Release"; + }; + 6FCE7B896519D4B364BD3A71 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-macOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Release"; + }; 71529460FB00BCDF2064C57F /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5424,6 +5884,30 @@ }; name = "Production Debug"; }; + 8705629C56ACC795F1DDB96D /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-macOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Debug"; + }; 8A380D322263800338FA5139 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5480,6 +5964,30 @@ }; name = "Test Debug"; }; + 8FEAEB3CB45479405F52D3AF /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-tvOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Release"; + }; 917341F64B3A9B883FE942AD /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5573,6 +6081,30 @@ }; name = "Production Debug"; }; + 94C7D2D3D0907DF146EFC13C /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-macOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Debug"; + }; 94ECCEFE29DB30C48B227A16 /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5595,6 +6127,30 @@ }; name = "Staging Release"; }; + 96130B9B35FEC2FEA00AFDB9 /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-macOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Release"; + }; 9666BFAAA42CE2DC7E368E7D /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5765,6 +6321,30 @@ }; name = "Staging Debug"; }; + 9E1F620F233A34DE80D84356 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-tvOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Release"; + }; 9E38571B33C3CE5CA10C8452 /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5950,6 +6530,30 @@ }; name = "Production Release"; }; + A9483E827FAD142F28A0E16D /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-iOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Debug"; + }; AA4F4236D960D3ACE683A815 /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6267,6 +6871,30 @@ }; name = "Staging Release"; }; + B4464446E556BA3E731D3D25 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-tvOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Release"; + }; B5E1584A197C52FC47245FC8 /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6302,6 +6930,26 @@ }; name = "Test Release"; }; + B8CC52B6DC03DACD9B1309E0 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-watchOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Staging Debug"; + }; B928E061A126AC8D17D81D1E /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6738,6 +7386,30 @@ }; name = "Test Debug"; }; + C9D8E28D29695DF97266F229 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-tvOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Debug"; + }; CA08CB7E7DBBC99CDC7F2C2E /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6805,6 +7477,30 @@ }; name = "Staging Release"; }; + CF25791E297417E38800A521 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-macOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Debug"; + }; CF7D27DBBF0667D789D53D29 /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6986,6 +7682,26 @@ }; name = "Production Debug"; }; + DE81296F5A364B236643A3B9 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-watchOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Release"; + }; DF558E25A4E143219DF4AA51 /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -7009,6 +7725,30 @@ }; name = "Staging Debug"; }; + E0DF26EA764106961DEC59C9 /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-iOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Test Debug"; + }; E24703CFCCBD727B3FE08F51 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -7240,6 +7980,30 @@ }; name = "Staging Release"; }; + E5EB6CE05568645829D40384 /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CrossOverlayFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.project.CrossOverlayFramework-iOS"; + PRODUCT_NAME = CrossOverlayFramework; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = "Production Release"; + }; E683F74557A3FC7BD78CAB2B /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -7965,6 +8729,19 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Production Debug"; }; + 641D1B2D88B93FAD0EA09187 /* Build configuration list for PBXNativeTarget "CrossOverlayFramework_iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9483E827FAD142F28A0E16D /* Production Debug */, + E5EB6CE05568645829D40384 /* Production Release */, + 1FB2AFB2F45076B4A047499E /* Staging Debug */, + 6E93ACBBB608F386C0EB0F40 /* Staging Release */, + E0DF26EA764106961DEC59C9 /* Test Debug */, + 1C63C4A728212D903E4F2CBB /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; 658628E35283172E17BFC6A3 /* Build configuration list for PBXNativeTarget "Framework_tvOS" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -8121,6 +8898,19 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Production Debug"; }; + 9C9913AAE0ABA99337F0C069 /* Build configuration list for PBXNativeTarget "CrossOverlayFramework_macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CF25791E297417E38800A521 /* Production Debug */, + 34ED16009A759D256D7ECB53 /* Production Release */, + 8705629C56ACC795F1DDB96D /* Staging Debug */, + 6FCE7B896519D4B364BD3A71 /* Staging Release */, + 94C7D2D3D0907DF146EFC13C /* Test Debug */, + 96130B9B35FEC2FEA00AFDB9 /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; 9F4CBE5D909D2757B3D334B3 /* Build configuration list for PBXNativeTarget "TestFramework" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -8160,6 +8950,19 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Production Debug"; }; + C483BD5456B09C276DE6EFC1 /* Build configuration list for PBXNativeTarget "CrossOverlayFramework_watchOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1C644E47F1C539F2B95160B8 /* Production Debug */, + DE81296F5A364B236643A3B9 /* Production Release */, + B8CC52B6DC03DACD9B1309E0 /* Staging Debug */, + 45FD151DC9928DE066A3B1AD /* Staging Release */, + 4D5DC2028DC046B8AF0B9B83 /* Test Debug */, + 19BF18E6EAA8B30F894EAB4E /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; C4FB84AAA6F6974CEA51D359 /* Build configuration list for PBXNativeTarget "EndpointSecuritySystemExtension" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -8238,6 +9041,19 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Production Debug"; }; + E3D23AF56C29471E48CA9A11 /* Build configuration list for PBXNativeTarget "CrossOverlayFramework_tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 02E38E444E372E89E589E022 /* Production Debug */, + B4464446E556BA3E731D3D25 /* Production Release */, + 321D6FAF1E7AA977008359C7 /* Staging Debug */, + 9E1F620F233A34DE80D84356 /* Staging Release */, + C9D8E28D29695DF97266F229 /* Test Debug */, + 8FEAEB3CB45479405F52D3AF /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; ED1A174BA92C6E5172B519B7 /* Build configuration list for PBXNativeTarget "iMessageExtension" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index fb052d3fa..f6df18a49 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -321,6 +321,14 @@ targets: - sdk: Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework root: DEVELOPER_DIR + CrossOverlayFramework: + type: framework + platform: [iOS, tvOS, watchOS, macOS] + sources: + - path: CrossOverlayFramework + excludes: + - "*.xcodeproj" + App_iOS_Tests: type: bundle.unit-test platform: iOS From 80e317206b4d7706110969e0ec2c36346315188c Mon Sep 17 00:00:00 2001 From: Marcin Chojnacki Date: Sat, 18 Feb 2023 10:32:16 +0100 Subject: [PATCH 168/284] Remove SPM configurations warning from ProjectSpec (#1329) ProjectSpec states that Swift Packages don't work in projects with configurations other than `Debug` and `Release`. It provides a link to Swift bugtracker to issue marked as duplicate. Original issue that it points to is closed and fixed since 2020 with Xcode 12. Let's remove misleading note from ProjectSpec. https://github.com/apple/swift-package-manager/issues/4674 --- Docs/ProjectSpec.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index ad64977b8..72ea7efd2 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -997,8 +997,6 @@ The result will be a scheme that builds `MyModule` when you request a build, and ## Swift Package Swift packages are defined at a project level, and then linked to individual targets via a [Dependency](#dependency). -> Note that Swift Packages don't work in projects with configurations other than `Debug` and `Release`. That limitation is tracked here bugs.swift.org/browse/SR-10927 - ### Remote Package - [x] **url**: **URL** - the url to the package From 43e40a9efc9feb1480ef548011bf6597ee7364a7 Mon Sep 17 00:00:00 2001 From: Wendy Liga Date: Fri, 24 Feb 2023 05:49:57 +0700 Subject: [PATCH 169/284] Added support for scheme management (#1142) * wip * Added scheme management metadata properties to TargetScheme * wip * Added Scheme.Management for metadata * use sharedDefault * move generateSchemeManagement to SchemeGenerator * revert * update changelog * update docs * update test case * remove * remove unused file * revert * changed on fixtures project * Updated ProjectSpec docs index * User Scheme.Management also for TargetSchemes, use XCUserData * Changelog * Switch XcodeProj back tuist/XcodeProj - 8.9.0 * Reindent TOC Docs/ProjectSpec.md * Revert swift tools version --------- Co-authored-by: Tieme van Veen --- .gitignore | 2 - CHANGELOG.md | 1 + Docs/ProjectSpec.md | 53 +++++++---- Package.resolved | 4 +- Package.swift | 3 +- Sources/ProjectSpec/Scheme.swift | 58 +++++++++++- Sources/ProjectSpec/TargetScheme.swift | 11 ++- .../Commands/GenerateCommand.swift | 9 +- Sources/XcodeGenCLI/GenerationError.swift | 3 + Sources/XcodeGenKit/ProjectGenerator.swift | 26 ++++-- Sources/XcodeGenKit/SchemeGenerator.swift | 61 +++++++++--- Tests/FixtureTests/FixtureTests.swift | 2 +- .../TestProject.xcodeproj/project.pbxproj | 50 ++++++++++ .../xcschemes/ExternalTarget.xcscheme | 93 +++++++++++++++++++ .../xcschemes/Shared_TargetScheme.xcscheme | 93 +++++++++++++++++++ .../xcschemes/User_ProjectScheme.xcscheme | 87 +++++++++++++++++ .../xcschemes/xcschememanagement.plist | 26 ++++++ Tests/Fixtures/scheme_test/test_project.yml | 19 ++++ Tests/PerformanceTests/PerformanceTests.swift | 8 +- Tests/PerformanceTests/TestProject.swift | 3 +- Tests/ProjectSpecTests/SpecLoadingTests.swift | 28 +++++- .../PBXProjGeneratorTests.swift | 2 +- .../ProjectGeneratorTests.swift | 8 +- .../SchemeGeneratorTests.swift | 21 ++++- 24 files changed, 610 insertions(+), 61 deletions(-) create mode 100644 Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcshareddata/xcschemes/ExternalTarget.xcscheme create mode 100644 Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcshareddata/xcschemes/Shared_TargetScheme.xcscheme create mode 100644 Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcuserdata/someUser.xcuserdatad/xcschemes/User_ProjectScheme.xcscheme create mode 100644 Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcuserdata/someUser.xcuserdatad/xcschemes/xcschememanagement.plist diff --git a/.gitignore b/.gitignore index 1f55464ba..2b4358fca 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,7 @@ .swiftpm /.build /Packages -xcuserdata *.xccheckout -*.xcuserstate XcodeGen.xcodeproj xcodegen.zip .vscode/launch.json diff --git a/CHANGELOG.md b/CHANGELOG.md index e79374fa7..ddcc9ca63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Renamed build phase `Embed App Extensions` to `Embed Foundation Extensions` to fix Xcode 14 warning #1310 @casperriboe - Added support for `swiftcrossimport` folders. #1317 @Iron-Ham +- Added support for [Scheme Management](Docs/ProjectSpec.md##scheme-management) #1142 @wendyliga, @teameh ### Fixed diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 72ea7efd2..577f76eba 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -4,27 +4,42 @@ - [General](#general) - [Project](#project) - - [Include](#include) - - [Options](#options) - - [Configs](#configs) - - [Setting Groups](#setting-groups) + - [Include](#include) + - [Options](#options) + - [GroupOrdering](#groupordering) + - [FileType](#filetype) + - [Configs](#configs) + - [Setting Groups](#setting-groups) - [Settings](#settings) - [Target](#target) - - [Product Type](#product-type) - - [Platform](#platform) - - [Sources](#sources) - - [Config Files](#config-files) - - [Settings](#settings) - - [Build Script](#build-script) - - [Build Rule](#build-rule) - - [Dependency](#dependency) - - [Target Scheme](#target-scheme) - - [Legacy Target](#legacy-target) + - [Product Type](#product-type) + - [Platform](#platform) + - [Sources](#sources) + - [Dependency](#dependency) + - [Config Files](#config-files) + - [Plist](#plist) + - [Build Script](#build-script) + - [Build Rule](#build-rule) + - [Target Scheme](#target-scheme) + - [Legacy Target](#legacy-target) - [Aggregate Target](#aggregate-target) - [Target Template](#target-template) - [Scheme](#scheme) + - [Build](#build) + - [Common Build Action options](#common-build-action-options) + - [Execution Action](#execution-action) + - [Run Action](#run-action) + - [Test Action](#test-action) + - [Archive Action](#archive-action) + - [Simulate Location](#simulate-location) + - [Scheme Management](#scheme-management) + - [Environment Variable](#environment-variable) + - [Test Plan](#test-plan) - [Scheme Template](#scheme-template) + - [Remote Package](#remote-package) + - [Local Package](#local-package) - [Swift Package](#swift-package) +- [Project Reference](#project-reference) ## General @@ -649,7 +664,7 @@ targets: runOncePerArchitecture: false ``` -### Target Scheme +### Target Scheme This is a convenience used to automatically generate schemes for a target based on different configs or included tests. If you want more control check out the top level [Scheme](#scheme). @@ -667,6 +682,7 @@ This is a convenience used to automatically generate schemes for a target based - [ ] **testPlans**: **[[Test Plan](#test-plan)]** - List of test plan locations that will be referenced in the scheme. - [ ] **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 +- [ ] **management**: **[Scheme Management](#scheme-management)** - Management options for the scheme - [ ] **storeKitConfiguration**: **String** - specify storekit configuration to use during run. See [Options](#options). For example, the spec below would create 3 schemes called: @@ -708,7 +724,7 @@ targets: sources: Tests ``` -### Legacy Target +### Legacy Target By providing a legacy target, you are opting in to the "Legacy Target" mode. This is the "External Build Tool" from the Xcode GUI. This is useful for scripts that you want to run as dependencies of other targets, but you want to make sure that it only runs once even if it is specified as a dependency from multiple other targets. @@ -762,6 +778,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***: management metadata ### Build @@ -896,6 +913,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 +- [ ] **shared**: **Bool** - indicates whether the scheme is shared +- [ ] **orderHint**: **Int** - used by Xcode to sort the schemes +- [ ] **isShown**: **Bool** - indicates whether the sheme is shown in the scheme list ### Environment Variable diff --git a/Package.resolved b/Package.resolved index 880cba3e4..bd391b518 100644 --- a/Package.resolved +++ b/Package.resolved @@ -78,8 +78,8 @@ "repositoryURL": "https://github.com/tuist/XcodeProj.git", "state": { "branch": null, - "revision": "b6de1bfe021b861c94e7c83821b595083f74b997", - "version": "8.8.0" + "revision": "fae27b48bc14ff3fd9b02902e48c4665ce5a0793", + "version": "8.9.0" } }, { diff --git a/Package.swift b/Package.swift index 80f07c216..089662466 100644 --- a/Package.swift +++ b/Package.swift @@ -16,11 +16,12 @@ 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.8.0"), + .package(url: "https://github.com/tuist/XcodeProj.git", from: "8.9.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")), ], + targets: [ .target(name: "XcodeGen", dependencies: [ "XcodeGenCLI", diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index 1b166871f..104fb35ff 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,29 @@ 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 = Scheme.Management.sharedDefault, + orderHint: Int? = nil, + isShown: Bool? = nil + ) { + if shared == Scheme.Management.sharedDefault, orderHint == nil, isShown == nil { + return nil + } + + self.shared = shared + self.orderHint = orderHint + self.isShown = isShown + } } public struct SimulateLocation: Equatable { @@ -403,6 +428,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"] = shared + } + + 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 { @@ -718,6 +772,7 @@ extension Scheme: NamedJSONDictionaryConvertible { analyze = jsonDictionary.json(atKeyPath: "analyze") profile = jsonDictionary.json(atKeyPath: "profile") archive = jsonDictionary.json(atKeyPath: "archive") + management = jsonDictionary.json(atKeyPath: "management") } } @@ -730,6 +785,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 59818a070..a19e214f5 100644 --- a/Sources/ProjectSpec/TargetScheme.swift +++ b/Sources/ProjectSpec/TargetScheme.swift @@ -22,6 +22,7 @@ public struct TargetScheme: Equatable { public var environmentVariables: [XCScheme.EnvironmentVariable] public var preActions: [Scheme.ExecutionAction] public var postActions: [Scheme.ExecutionAction] + public var management: Scheme.Management? public var testPlans: [TestPlan] public init( @@ -39,7 +40,8 @@ public struct TargetScheme: Equatable { commandLineArguments: [String: Bool] = [:], environmentVariables: [XCScheme.EnvironmentVariable] = [], preActions: [Scheme.ExecutionAction] = [], - postActions: [Scheme.ExecutionAction] = [] + postActions: [Scheme.ExecutionAction] = [], + management: Scheme.Management? = nil ) { self.testTargets = testTargets self.testPlans = testPlans @@ -56,6 +58,8 @@ public struct TargetScheme: Equatable { self.environmentVariables = environmentVariables self.preActions = preActions self.postActions = postActions + self.postActions = postActions + self.management = management } } @@ -105,6 +109,7 @@ extension TargetScheme: JSONObjectConvertible { environmentVariables = try XCScheme.EnvironmentVariable.parseAll(jsonDictionary: jsonDictionary) preActions = jsonDictionary.json(atKeyPath: "preActions") ?? [] postActions = jsonDictionary.json(atKeyPath: "postActions") ?? [] + management = jsonDictionary.json(atKeyPath: "management") } } @@ -149,6 +154,10 @@ extension TargetScheme: JSONEncodable { dict["region"] = region } + if let management = management { + dict["management"] = management.toJSONValue() + } + return dict } } diff --git a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift index b786e5637..b607b09b3 100644 --- a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift +++ b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift @@ -102,7 +102,13 @@ class GenerateCommand: ProjectCommand { let xcodeProject: XcodeProj do { let projectGenerator = ProjectGenerator(project: project) - xcodeProject = try projectGenerator.generateXcodeProject(in: projectDirectory) + + guard let userName = ProcessInfo.processInfo.environment["LOGNAME"] else { + throw GenerationError.missingUsername + } + + xcodeProject = try projectGenerator.generateXcodeProject(in: projectDirectory, userName: userName) + } catch { throw GenerationError.generationError(error) } @@ -111,6 +117,7 @@ class GenerateCommand: ProjectCommand { info("⚙️ Writing project...") do { try fileWriter.writeXcodeProject(xcodeProject, to: projectPath) + success("Created project at \(projectPath)") } catch { throw GenerationError.writingError(error) diff --git a/Sources/XcodeGenCLI/GenerationError.swift b/Sources/XcodeGenCLI/GenerationError.swift index 985246bdb..b9470a93c 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 798b112f1..7bb20af46 100644 --- a/Sources/XcodeGenKit/ProjectGenerator.swift +++ b/Sources/XcodeGenKit/ProjectGenerator.swift @@ -13,22 +13,34 @@ public class ProjectGenerator { self.project = project } - public func generateXcodeProject(in projectDirectory: Path? = nil) throws -> XcodeProj { + public func generateXcodeProject(in projectDirectory: Path? = nil, userName: String) throws -> XcodeProj { // generate PBXProj let pbxProjGenerator = PBXProjGenerator(project: project, projectDirectory: projectDirectory) let pbxProj = try pbxProjGenerator.generate() - // generate Schemes - let schemeGenerator = SchemeGenerator(project: project, pbxProj: pbxProj) - let schemes = try schemeGenerator.generateSchemes() - // generate Workspace let workspace = try generateWorkspace() - let sharedData = XCSharedData(schemes: schemes) - return XcodeProj(workspace: workspace, pbxproj: pbxProj, sharedData: sharedData) + // generate Schemes + let schemeGenerator = SchemeGenerator(project: project, pbxProj: pbxProj) + let (sharedSchemes, userSchemes, schemeManagement) = try schemeGenerator.generateSchemes() + + // generate shared data + let sharedData = XCSharedData(schemes: sharedSchemes) + + // generate user data + let userData = userSchemes.isEmpty && schemeManagement == nil ? [] : [ + XCUserData(userName: userName, schemes: userSchemes, schemeManagement: schemeManagement) + ] + + return XcodeProj( + workspace: workspace, + pbxproj: pbxProj, + sharedData: sharedData, + userData: userData + ) } func generateWorkspace() throws -> XCWorkspace { diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index fb069c752..583c57aa3 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -40,12 +40,15 @@ public class SchemeGenerator { return pbxproj } - public func generateSchemes() throws -> [XCScheme] { - var xcschemes: [XCScheme] = [] + public func generateSchemes() throws -> ( + shared: [XCScheme], + user: [XCScheme], + management: XCSchemeManagement? + ) { + var schemes: [(Scheme, ProjectTarget?)] = [] for scheme in project.schemes { - let xcscheme = try generateScheme(scheme) - xcschemes.append(xcscheme) + schemes.append((scheme, nil)) } for target in project.projectTargets { @@ -64,19 +67,18 @@ public class SchemeGenerator { debugConfig: debugConfig.name, releaseConfig: releaseConfig.name ) - let xcscheme = try generateScheme(scheme, for: target) - xcschemes.append(xcscheme) + schemes.append((scheme, target)) } else { for configVariant in targetScheme.configVariants { let schemeName = "\(target.name) \(configVariant)" - + let debugConfig = project.configs .first(including: configVariant, for: .debug)! - + let releaseConfig = project.configs .first(including: configVariant, for: .release)! - + let scheme = Scheme( name: schemeName, target: target, @@ -85,14 +87,44 @@ public class SchemeGenerator { debugConfig: debugConfig.name, releaseConfig: releaseConfig.name ) - let xcscheme = try generateScheme(scheme, for: target) - xcschemes.append(xcscheme) + schemes.append((scheme, target)) } } } } - return xcschemes + var sharedSchemes: [XCScheme] = [] + var userSchemes: [XCScheme] = [] + var schemeManagements: [XCSchemeManagement.UserStateScheme] = [] + + for (scheme, projectTarget) in schemes { + let xcscheme = try generateScheme(scheme, for: projectTarget) + + if scheme.management?.shared == false { + userSchemes.append(xcscheme) + } else { + sharedSchemes.append(xcscheme) + } + + if let management = scheme.management { + schemeManagements.append( + XCSchemeManagement.UserStateScheme( + name: scheme.name + ".xcscheme", + shared: management.shared, + orderHint: management.orderHint, + isShown: management.isShown + ) + ) + } + } + + return ( + shared: sharedSchemes, + user: userSchemes, + management: schemeManagements.isEmpty + ? nil + : XCSchemeManagement(schemeUserState: schemeManagements, suppressBuildableAutocreation: nil) + ) } public func generateScheme(_ scheme: Scheme, for target: ProjectTarget? = nil) throws -> XCScheme { @@ -358,7 +390,7 @@ public class SchemeGenerator { .flatMap { $0.type.isExtension ? true : nil } ) } - + private func launchAutomaticallySubstyle(for target: ProjectTarget?) -> String? { if target?.type.isExtension == true { return "2" @@ -461,7 +493,8 @@ extension Scheme { ), archive: .init( config: releaseConfig - ) + ), + management: targetScheme.management ) } diff --git a/Tests/FixtureTests/FixtureTests.swift b/Tests/FixtureTests/FixtureTests.swift index d4ebda332..19cdcdb05 100644 --- a/Tests/FixtureTests/FixtureTests.swift +++ b/Tests/FixtureTests/FixtureTests.swift @@ -28,7 +28,7 @@ private func generateXcodeProject(specPath: Path, file: String = #file, line: In let project = try Project(path: specPath) let generator = ProjectGenerator(project: project) let writer = FileWriter(project: project) - let xcodeProject = try generator.generateXcodeProject() + let xcodeProject = try generator.generateXcodeProject(userName: "someUser") try writer.writeXcodeProject(xcodeProject) try writer.writePlists() } diff --git a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj index 2b667fe4d..5d7c40ebc 100644 --- a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXFileReference section */ + 5FE827133AD803E389008F92 /* Shared_TargetScheme.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = Shared_TargetScheme.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 9194D98A5CC4C58074AED541 /* ExternalTarget.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ExternalTarget.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -22,6 +23,7 @@ isa = PBXGroup; children = ( 9194D98A5CC4C58074AED541 /* ExternalTarget.framework */, + 5FE827133AD803E389008F92 /* Shared_TargetScheme.bundle */, ); name = Products; sourceTree = ""; @@ -44,6 +46,20 @@ productReference = 9194D98A5CC4C58074AED541 /* ExternalTarget.framework */; productType = "com.apple.product-type.framework"; }; + 7D5ECBED52C0D723572BDC7A /* Shared_TargetScheme */ = { + isa = PBXNativeTarget; + buildConfigurationList = FF87BC5AF9E43A6A84F165D0 /* Build configuration list for PBXNativeTarget "Shared_TargetScheme" */; + buildPhases = ( + ); + buildRules = ( + ); + dependencies = ( + ); + name = Shared_TargetScheme; + productName = Shared_TargetScheme; + productReference = 5FE827133AD803E389008F92 /* Shared_TargetScheme.bundle */; + productType = "com.apple.product-type.bundle"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -67,6 +83,7 @@ projectRoot = ""; targets = ( 370BCE474732AA3FDEE3019C /* ExternalTarget */, + 7D5ECBED52C0D723572BDC7A /* Shared_TargetScheme */, ); }; /* End PBXProject section */ @@ -241,6 +258,30 @@ }; name = Debug; }; + EC8D269E955A03687C9CC471 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + EFFEE19ADA3596D4D0EDD264 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -262,6 +303,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; + FF87BC5AF9E43A6A84F165D0 /* Build configuration list for PBXNativeTarget "Shared_TargetScheme" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EC8D269E955A03687C9CC471 /* Debug */, + EFFEE19ADA3596D4D0EDD264 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; /* End XCConfigurationList section */ }; rootObject = 8702E0566EC7EF0ABE948569 /* Project object */; diff --git a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcshareddata/xcschemes/ExternalTarget.xcscheme b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcshareddata/xcschemes/ExternalTarget.xcscheme new file mode 100644 index 000000000..b0e979368 --- /dev/null +++ b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcshareddata/xcschemes/ExternalTarget.xcscheme @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcshareddata/xcschemes/Shared_TargetScheme.xcscheme b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcshareddata/xcschemes/Shared_TargetScheme.xcscheme new file mode 100644 index 000000000..1954e6147 --- /dev/null +++ b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcshareddata/xcschemes/Shared_TargetScheme.xcscheme @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcuserdata/someUser.xcuserdatad/xcschemes/User_ProjectScheme.xcscheme b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcuserdata/someUser.xcuserdatad/xcschemes/User_ProjectScheme.xcscheme new file mode 100644 index 000000000..d31f73694 --- /dev/null +++ b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcuserdata/someUser.xcuserdatad/xcschemes/User_ProjectScheme.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcuserdata/someUser.xcuserdatad/xcschemes/xcschememanagement.plist b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcuserdata/someUser.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 000000000..f92f56495 --- /dev/null +++ b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/xcuserdata/someUser.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,26 @@ + + + + + SchemeUserState + + ExternalTarget.xcscheme_^#shared#^_ + + isShown + + + Shared_TargetScheme.xcscheme_^#shared#^_ + + orderHint + 0 + + User_ProjectScheme.xcscheme + + isShown + + orderHint + 1 + + + + diff --git a/Tests/Fixtures/scheme_test/test_project.yml b/Tests/Fixtures/scheme_test/test_project.yml index 846fb53f2..8faedc0ee 100644 --- a/Tests/Fixtures/scheme_test/test_project.yml +++ b/Tests/Fixtures/scheme_test/test_project.yml @@ -1,5 +1,24 @@ name: TestProject +schemes: + User_ProjectScheme: + build: + targets: + ExternalTarget: all + management: + shared: false + orderHint: 1 + isShown: true targets: ExternalTarget: type: framework platform: iOS + scheme: + management: + shared: true + isShown: false + Shared_TargetScheme: + type: bundle + platform: iOS + scheme: + management: + orderHint: 0 \ No newline at end of file diff --git a/Tests/PerformanceTests/PerformanceTests.swift b/Tests/PerformanceTests/PerformanceTests.swift index bad966a8b..48f604c04 100644 --- a/Tests/PerformanceTests/PerformanceTests.swift +++ b/Tests/PerformanceTests/PerformanceTests.swift @@ -25,14 +25,14 @@ class GeneratedPerformanceTests: XCTestCase { let project = try Project.testProject(basePath: basePath) measure { let generator = ProjectGenerator(project: project) - _ = try! generator.generateXcodeProject() + _ = try! generator.generateXcodeProject(userName: "someUser") } } func testWriting() throws { let project = try Project.testProject(basePath: basePath) let generator = ProjectGenerator(project: project) - let xcodeProject = try generator.generateXcodeProject() + let xcodeProject = try generator.generateXcodeProject(userName: "someUser") measure { xcodeProject.pbxproj.invalidateUUIDs() try! xcodeProject.write(path: project.defaultProjectPath) @@ -65,14 +65,14 @@ class FixturePerformanceTests: XCTestCase { let project = try Project(path: specPath) measure { let generator = ProjectGenerator(project: project) - _ = try! generator.generateXcodeProject() + _ = try! generator.generateXcodeProject(userName: "someUser") } } func testFixtureWriting() throws { let project = try Project(path: specPath) let generator = ProjectGenerator(project: project) - let xcodeProject = try generator.generateXcodeProject() + let xcodeProject = try generator.generateXcodeProject(userName: "someUser") measure { xcodeProject.pbxproj.invalidateUUIDs() try! xcodeProject.write(path: project.defaultProjectPath) diff --git a/Tests/PerformanceTests/TestProject.swift b/Tests/PerformanceTests/TestProject.swift index e1d8edc9f..4ce17072e 100644 --- a/Tests/PerformanceTests/TestProject.swift +++ b/Tests/PerformanceTests/TestProject.swift @@ -30,7 +30,8 @@ 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")], + management: Scheme.Management(shared: false, orderHint: 1, isShown: true) ) for platform in Platform.allCases { let appTarget = Target( diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 4481d5d9d..4e854cbc1 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -796,6 +796,11 @@ class SpecLoadingTests: XCTestCase { "script": "hello", ], ], + "management": [ + "shared": false, + "isShown": true, + "orderHint": 10 + ], ] let target = try Target(name: "test", jsonDictionary: targetDictionary) @@ -813,7 +818,8 @@ class SpecLoadingTests: XCTestCase { commandLineArguments: ["ENV1": true], environmentVariables: [XCScheme.EnvironmentVariable(variable: "TEST_VAR", value: "TEST_VAL", enabled: true)], preActions: [.init(name: "Do Thing", script: "dothing", settingsTarget: "test")], - postActions: [.init(name: "Run Script", script: "hello")] + postActions: [.init(name: "Run Script", script: "hello")], + management: Scheme.Management(shared: false, orderHint: 10, isShown: true) ) try expect(target.scheme) == scheme @@ -873,6 +879,10 @@ class SpecLoadingTests: XCTestCase { ] ] ], + "management": [ + "isShown": false, + "orderHint": 4 + ], ] let scheme = try Scheme(name: "Scheme", jsonDictionary: schemeDictionary) let expectedTargets: [Scheme.BuildTarget] = [ @@ -923,6 +933,9 @@ class SpecLoadingTests: XCTestCase { ] ) try expect(scheme.test) == expectedTest + + let expectedManagement = Scheme.Management(shared: true, orderHint: 4, isShown: false) + try expect(scheme.management) == expectedManagement } $0.it("parses alternate test schemes") { @@ -946,6 +959,9 @@ class SpecLoadingTests: XCTestCase { "disableMainThreadChecker": true, "stopOnEveryMainThreadCheckerIssue": true, ], + "management": [ + "isShown": false + ], ] let scheme = try Scheme(name: "Scheme", jsonDictionary: schemeDictionary) @@ -965,6 +981,9 @@ class SpecLoadingTests: XCTestCase { ] ) try expect(scheme.test) == expectedTest + + let expectedManagement = Scheme.Management(shared: true, orderHint: nil, isShown: false) + try expect(scheme.management) == expectedManagement } $0.it("parses schemes variables") { @@ -1104,6 +1123,10 @@ class SpecLoadingTests: XCTestCase { "disableMainThreadChecker": true, "stopOnEveryMainThreadCheckerIssue": false, ], + "management": [ + "shared": false, + "orderHint": 8 + ], ], ], "schemes": [ @@ -1154,6 +1177,9 @@ class SpecLoadingTests: XCTestCase { ] ) try expect(scheme.test) == expectedTest + + let expectedManagement = Scheme.Management(shared: false, orderHint: 8, isShown: nil) + try expect(scheme.management) == expectedManagement } $0.it("parses copy files on install") { diff --git a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift index f667ceb0e..2fc9e872d 100644 --- a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift @@ -15,7 +15,7 @@ extension Project { try self.validate() } let generator = ProjectGenerator(project: self) - return try generator.generateXcodeProject() + return try generator.generateXcodeProject(userName: "someUser") } } diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 4ed5ae082..ac9e1af97 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -355,7 +355,7 @@ class ProjectGeneratorTests: XCTestCase { let project = try! Project(path: fixturePath + "TestProject/AnotherProject/project.yml") let generator = ProjectGenerator(project: project) let writer = FileWriter(project: project) - let xcodeProject = try! generator.generateXcodeProject() + let xcodeProject = try! generator.generateXcodeProject(userName: "someUser") try! writer.writeXcodeProject(xcodeProject) try! writer.writePlists() subproject = xcodeProject.pbxproj @@ -1513,7 +1513,7 @@ class ProjectGeneratorTests: XCTestCase { $0.it("generate groups") { let project = Project(name: "test", targets: [frameworkWithSources]) let generator = ProjectGenerator(project: project) - let generatedProject = try generator.generateXcodeProject() + let generatedProject = try generator.generateXcodeProject(userName: "someUser") let group = generatedProject.pbxproj.groups.first(where: { $0.nameOrPath == groupName }) try expect(group?.path) == "App_iOS" } @@ -1524,7 +1524,7 @@ class ProjectGeneratorTests: XCTestCase { let destinationPath = fixturePath let project = Project(name: "test", targets: [frameworkWithSources]) let generator = ProjectGenerator(project: project) - let generatedProject = try generator.generateXcodeProject(in: destinationPath) + let generatedProject = try generator.generateXcodeProject(in: destinationPath, userName: "someUser") let group = generatedProject.pbxproj.groups.first(where: { $0.nameOrPath == groupName }) try expect(group?.path) == "TestProject/App_iOS" } @@ -1533,7 +1533,7 @@ class ProjectGeneratorTests: XCTestCase { let destinationPath = fixturePath let project = Project(name: "test", targets: [frameworkWithSources]) let generator = ProjectGenerator(project: project) - let generatedProject = try generator.generateXcodeProject(in: destinationPath) + let generatedProject = try generator.generateXcodeProject(in: destinationPath, userName: "someUser") let plists = generatedProject.pbxproj.buildConfigurations.compactMap { $0.buildSettings["INFOPLIST_FILE"] as? String } try expect(plists.count) == 2 for plist in plists { diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index ef110faf6..8de673180 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -119,7 +119,6 @@ class SchemeGeneratorTests: XCTestCase { try expect(xcscheme.testAction?.testables[1].locationScenarioReference?.referenceType) == "1" try expect(xcscheme.testAction?.testables[1].locationScenarioReference?.identifier) == "New York, NY, USA" - } let frameworkTarget = Scheme.BuildTarget(target: .local(framework.name), buildTypes: [.archiving]) @@ -352,7 +351,7 @@ class SchemeGeneratorTests: XCTestCase { let project = try! Project(path: fixturePath + "scheme_test/test_project.yml") let generator = ProjectGenerator(project: project) let writer = FileWriter(project: project) - let xcodeProject = try! generator.generateXcodeProject() + let xcodeProject = try! generator.generateXcodeProject(userName: "someUser") try! writer.writeXcodeProject(xcodeProject) try! writer.writePlists() } @@ -383,7 +382,7 @@ class SchemeGeneratorTests: XCTestCase { let project = try! Project(path: fixturePath + "scheme_test/test_project.yml") let generator = ProjectGenerator(project: project) let writer = FileWriter(project: project) - let xcodeProject = try! generator.generateXcodeProject() + let xcodeProject = try! generator.generateXcodeProject(userName: "someUser") try! writer.writeXcodeProject(xcodeProject) try! writer.writePlists() } @@ -586,7 +585,7 @@ class SchemeGeneratorTests: XCTestCase { XCTAssertEqual(xcscheme.lastUpgradeVersion, lastUpgradeValue) } - + func testDefaultLastUpgradeVersionWhenUserDidNotSpecify() throws { var target = app target.scheme = TargetScheme() @@ -598,6 +597,20 @@ class SchemeGeneratorTests: XCTestCase { XCTAssertEqual(xcscheme.lastUpgradeVersion, project.xcodeVersion) } + func testGenerateSchemeManagementOnHiddenTargetScheme() throws { + var target = app + target.scheme = TargetScheme(management: Scheme.Management(isShown: false)) + + let project = Project(name: "test", targets: [target, framework]) + let xcodeProject = try project.generateXcodeProject() + + let xcSchemeManagement = try XCTUnwrap(xcodeProject.userData.first?.schemeManagement) + XCTAssertEqual(xcSchemeManagement.schemeUserState![0].name, "MyApp.xcscheme") + XCTAssertEqual(xcSchemeManagement.schemeUserState![0].shared, true) + XCTAssertEqual(xcSchemeManagement.schemeUserState![0].isShown, false) + XCTAssertEqual(xcSchemeManagement.schemeUserState![0].orderHint, nil) + } + // MARK: - Helpers private func makeWatchScheme(appType: PBXProductType, extensionType: PBXProductType) throws -> XCScheme { From 271ad593b801ea0293bb6f07466ba131f4dde59f Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Fri, 24 Feb 2023 09:51:20 +1100 Subject: [PATCH 170/284] Update to 2.34.0 --- CHANGELOG.md | 4 +++- Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddcc9ca63..1904a4e37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,15 +2,17 @@ ## Next Version +## 2.34.0 + ### Changed -- Renamed build phase `Embed App Extensions` to `Embed Foundation Extensions` to fix Xcode 14 warning #1310 @casperriboe - Added support for `swiftcrossimport` folders. #1317 @Iron-Ham - Added support for [Scheme Management](Docs/ProjectSpec.md##scheme-management) #1142 @wendyliga, @teameh ### Fixed - Fix includes when the projectRoot is a relative path #1262 @CraigSiemens +- Renamed build phase `Embed App Extensions` to `Embed Foundation Extensions` to fix Xcode 14 warning #1310 @casperriboe ## 2.33.0 diff --git a/Makefile b/Makefile index 254c3ffef..857bcb3c9 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.33.0 +VERSION = 2.34.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index f19d77f33..0ed61403b 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.33.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.34.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index cb3248696..e983e7953 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.33.0") +let version = Version("2.34.0") let cli = XcodeGenCLI(version: version) cli.execute() From 39739b4efd3f486bde42376e9a0c236995ddfb34 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Fri, 24 Feb 2023 09:53:06 +1100 Subject: [PATCH 171/284] ignore user data --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 2b4358fca..1f55464ba 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,9 @@ .swiftpm /.build /Packages +xcuserdata *.xccheckout +*.xcuserstate XcodeGen.xcodeproj xcodegen.zip .vscode/launch.json From aa7fed0f5b1e4d3701bfa6ff842f44e3f3089d90 Mon Sep 17 00:00:00 2001 From: tzxdtc10 Date: Fri, 24 Feb 2023 07:54:58 +0900 Subject: [PATCH 172/284] Fix typo in 'addtional' (#1328) * fix typo * rename to included_additional.yml * remove one * fix typo * Update Tests/ProjectSpecTests/SpecLoadingTests.swift --------- Co-authored-by: Yonas Kolb --- Tests/Fixtures/include_test.yml | 4 ++-- ...{included_addtional.yml => included_additional.yml} | 4 ++-- Tests/ProjectSpecTests/SpecLoadingTests.swift | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) rename Tests/Fixtures/{included_addtional.yml => included_additional.yml} (78%) diff --git a/Tests/Fixtures/include_test.yml b/Tests/Fixtures/include_test.yml index 1c24a731a..796db3226 100644 --- a/Tests/Fixtures/include_test.yml +++ b/Tests/Fixtures/include_test.yml @@ -1,7 +1,7 @@ include: - included.yml - - path: included_addtional.yml - enable: ${INCLUDE_ADDTIONAL_YAML} + - path: included_additional.yml + enable: ${INCLUDE_ADDITIONAL_YAML} packages: Yams: url: https://github.com/jpsim/Yams diff --git a/Tests/Fixtures/included_addtional.yml b/Tests/Fixtures/included_additional.yml similarity index 78% rename from Tests/Fixtures/included_addtional.yml rename to Tests/Fixtures/included_additional.yml index 3623d2bea..8fda263d6 100644 --- a/Tests/Fixtures/included_addtional.yml +++ b/Tests/Fixtures/included_additional.yml @@ -1,7 +1,7 @@ -name: Included_Addtional +name: Included_Additional settingGroups: test: - MY_SETTING5: ADDTIONAL + MY_SETTING5: ADDITIONAL packages: SwiftPM: url: https://github.com/apple/swift-package-manager diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 4e854cbc1..75c3f26b3 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -43,13 +43,13 @@ class SpecLoadingTests: XCTestCase { ] } - $0.it("merges includes with addtional one") { + $0.it("merges includes with additional") { let path = fixturePath + "include_test.yml" - let project = try loadSpec(path: path, variables: ["INCLUDE_ADDTIONAL_YAML": "YES"]) + let project = try loadSpec(path: path, variables: ["INCLUDE_ADDITIONAL_YAML": "YES"]) try expect(project.name) == "NewName" try expect(project.settingGroups) == [ - "test": Settings(dictionary: ["MY_SETTING1": "NEW VALUE", "MY_SETTING2": "VALUE2", "MY_SETTING3": "VALUE3", "MY_SETTING4": "${SETTING4}", "MY_SETTING5": "ADDTIONAL"]), + "test": Settings(dictionary: ["MY_SETTING1": "NEW VALUE", "MY_SETTING2": "VALUE2", "MY_SETTING3": "VALUE3", "MY_SETTING4": "${SETTING4}", "MY_SETTING5": "ADDITIONAL"]), "new": Settings(dictionary: ["MY_SETTING": "VALUE"]), "toReplace": Settings(dictionary: ["MY_SETTING2": "VALUE2"]), ] @@ -59,9 +59,9 @@ class SpecLoadingTests: XCTestCase { ] } - $0.it("merges includes without addtional one by environemnt variable") { + $0.it("merges includes without additional by environment variable") { let path = fixturePath + "include_test.yml" - let project = try loadSpec(path: path, variables: ["INCLUDE_ADDTIONAL_YAML": "NO"]) + let project = try loadSpec(path: path, variables: ["INCLUDE_ADDITIONAL_YAML": "NO"]) try expect(project.name) == "NewName" try expect(project.settingGroups) == [ From d1dd93aac40631645d0ad090a038570d0f3b0e9f Mon Sep 17 00:00:00 2001 From: Jierong Li Date: Tue, 28 Feb 2023 20:00:39 +0900 Subject: [PATCH 173/284] Rebase #177 - Shared breakpoints support (#693) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Resolves #173 - Shared breakpoints support * Added breakpoints full documentation * Invalid breakpoint just throw JSONUtilities decoding error. * Use enumeration types instead of String for extensionIDs * Remove a necessary line * Remove unnecessary custom Equatable implementation * Update CHANGELOG.md * Ignore empty breakpoints * Update Docs/ProjectSpec.md Fix a typo Co-Authored-By: Yonas Kolb * Change some properties that should be Int to Int * Create 2 typealiases * Use BreakpointType where it is missing * Remove unused Location * Change some names * Add Breakpoint.Scope * Add Breakpoint.StopOnStyle * Change the type of the raw value to String * Remove some properties that may cause confusing * Require filePah and line when the type is .file * Add tests about decoding breakpoints * Add Breakpoint.Action.ConveyanceType * Add default value for waitUntilDone * Add Breakpoint.Action.SoundName * Add tests about decoding breakpoint actions * Fix some issues in ProjectSpec.md * Improve ProjectSpec.md * Add missing condition * Add breakpoints to project.yml * Use unwarp * Remove the Breakpoint suffix * Refactor BreakpointType * Refactor Breakpoint.Action * Remove unnecessary properties * Adjust the line wrapping style for BreakpointGenerator * Support column breakpoints --------- Co-authored-by: Alex Rupérez Co-authored-by: Yonas Kolb --- CHANGELOG.md | 4 + Docs/ProjectSpec.md | 76 +++++ Sources/ProjectSpec/Breakpoint.swift | 261 ++++++++++++++++++ Sources/ProjectSpec/Project.swift | 9 + Sources/ProjectSpec/SpecParsingError.swift | 18 ++ Sources/ProjectSpec/XCProjExtensions.swift | 27 ++ Sources/XcodeGenKit/BreakpointGenerator.swift | 124 +++++++++ Sources/XcodeGenKit/ProjectGenerator.swift | 6 +- .../xcdebugger/Breakpoints_v2.xcbkptlist | 154 +++++++++++ Tests/Fixtures/TestProject/project.yml | 40 +++ Tests/ProjectSpecTests/SpecLoadingTests.swift | 94 +++++++ .../BreakpointGeneratorTests.swift | 20 ++ 12 files changed, 832 insertions(+), 1 deletion(-) create mode 100644 Sources/ProjectSpec/Breakpoint.swift create mode 100644 Sources/XcodeGenKit/BreakpointGenerator.swift create mode 100644 Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcdebugger/Breakpoints_v2.xcbkptlist create mode 100644 Tests/XcodeGenKitTests/BreakpointGeneratorTests.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index 1904a4e37..cef7eeb58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Added + +- Added support for shared breakpoints #177 @alexruperez @myihsan + ## 2.34.0 ### Changed diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 577f76eba..1f5a41111 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -55,6 +55,7 @@ You can also use environment variables in your configuration file, by using `${S - [ ] **include**: **[Include](#include)** - One or more paths to other specs - [ ] **options**: **[Options](#options)** - Various options to override default behaviour - [ ] **attributes**: **[String: Any]** - The PBXProject attributes. This is for advanced use. If no value is set for `LastUpgradeCheck`, it will be defaulted to ``{"LastUpgradeCheck": "XcodeVersion"}`` with `xcodeVersion` being set by [Options](#options)`.xcodeVersion` +- [ ] **breakpoints**: [Breakpoints](#breakpoints) - Add shared breakpoints to the generated project - [ ] **configs**: **[Configs](#configs)** - Project build configurations. Defaults to `Debug` and `Release` configs - [ ] **configFiles**: **[Config Files](#config-files)** - `.xcconfig` files per config - [ ] **settings**: **[Settings](#settings)** - Project specific settings. Default base and config type settings will be applied first before any settings defined here @@ -181,6 +182,81 @@ Default settings for file extensions. See [Sources](#sources) for more documenta - [ ] **resourceTags**: **[String]** - On Demand Resource Tags that will be applied to any resources. This also adds to the project attribute's knownAssetTags. - [ ] **compilerFlags**: **[String]** - A list of compiler flags to add. +### Breakpoints + +- [x] **type**: **String** - Breakpoint type + - `File`: file breakpoint + - `Exception`: exception breakpoint + - `SwiftError`: swift error breakpoint + - `OpenGLError`: OpenGL breakpoint + - `Symbolic`: symbolic breakpoint + - `IDEConstraintError`: IDE constraint breakpoint + - `IDETestFailure`: IDE test failure breakpoint +- [ ] **enabled**: **Bool** - Indicates whether it should be active. Default to `true` +- [ ] **ignoreCount**: **Int** - Indicates how many times it should be ignored before stopping, Default to `0` +- [ ] **continueAfterRunningActions**: **Bool** - Indicates if should automatically continue after evaluating actions, Default to `false` +- [ ] **path**: **String** - Breakpoint file path (only required by file breakpoints) +- [ ] **line**: **Int** - Breakpoint line (only required by file breakpoints) +- [ ] **symbol**: **String** - Breakpoint symbol (only used by symbolic breakpoints) +- [ ] **module**: **String** - Breakpoint module (only used by symbolic breakpoints) +- [ ] **scope**: **String** - Breakpoint scope (only used by exception breakpoints) + - `All` + - `Objective-C` (default) + - `C++` +- [ ] **stopOnStyle**: **String** - Indicates if should stop on style (only used by exception breakpoints) + -`throw` (default) + -`catch` +- [ ] **condition**: **String** - Breakpoint condition +- [ ] **actions**: **[[Breakpoint Action](#breakpoint-action)]** - breakpoint actions + +```yaml +breakpoints: + - type: ExceptionBreakpoint + enabled: true + ignoreCount: 0 + continueAfterRunningActions: false +``` + +#### Breakpoint Action + +- [x] **type**: **String** - Breakpoint action type + - `DebuggerCommand`: execute debugger command + - `Log`: log message + - `ShellCommand`: execute shell command + - `GraphicsTrace`: capture GPU frame + - `AppleScript`: execute AppleScript + - `Sound`: play sound +- [ ] **command**: **String** - Debugger command (only used by debugger command breakpoint action) +- [ ] **message**: **String** - Log message (only used log message breakpoint action) +- [ ] **conveyanceType**: **String** - Conveyance type (only used by log message breakpoint action) + - `console`: log message to console (default) + - `speak`: speak message +- [ ] **path**: **String** - Shell command file path (only used by shell command breakpoint action) +- [ ] **arguments**: **String** - Shell command arguments (only used by shell command breakpoint action) +- [ ] **waitUntilDone**: **Bool** - Indicates whether it should wait until done (only used by shell command breakpoint action). Default to `false` +- [ ] **script**: **String** - AppleScript (only used by AppleScript breakpoint action) +- [ ] **sound**: **String** - Sound name (only used by sound breakpoint action) + - `Basso` (default) + - `Blow` + - `Bottle` + - `Frog` + - `Funk` + - `Glass` + - `Hero` + - `Morse` + - `Ping` + - `Pop` + - `Purr` + - `Sosumi` + - `Submarine` + - `Tink` + +```yaml +actions: + - type: Sound + sound: Blow +``` + ### Configs Each config maps to a build type of either `debug` or `release` which will then apply default build settings to the project. Any value other than `debug` or `release` (for example `none`), will mean no default build settings will be applied to the project. diff --git a/Sources/ProjectSpec/Breakpoint.swift b/Sources/ProjectSpec/Breakpoint.swift new file mode 100644 index 000000000..e5dee106b --- /dev/null +++ b/Sources/ProjectSpec/Breakpoint.swift @@ -0,0 +1,261 @@ +import Foundation +import XcodeProj +import JSONUtilities + +public typealias BreakpointActionExtensionID = XCBreakpointList.BreakpointProxy.BreakpointContent.BreakpointActionProxy.ActionExtensionID +public typealias BreakpointExtensionID = XCBreakpointList.BreakpointProxy.BreakpointExtensionID + +public struct Breakpoint: Equatable { + + public enum BreakpointType: Equatable { + + public struct Exception: Equatable { + + public enum Scope: String, Equatable { + case all = "0" + case objectiveC = "1" + case cpp = "2" + } + + public enum StopOnStyle: String, Equatable { + case `throw` = "0" + case `catch` = "1" + } + + public var scope: Scope + public var stopOnStyle: StopOnStyle + + public init(scope: Breakpoint.BreakpointType.Exception.Scope = .objectiveC, + stopOnStyle: Breakpoint.BreakpointType.Exception.StopOnStyle = .throw) { + self.scope = scope + self.stopOnStyle = stopOnStyle + } + } + case file(path: String, line: Int, column: Int?) + case exception(Exception) + case swiftError + case openGLError + case symbolic(symbol: String?, module: String?) + case ideConstraintError + case ideTestFailure + } + + public enum Action: Equatable { + + public struct Log: Equatable { + + public enum ConveyanceType: String, Equatable { + case console = "0" + case speak = "1" + } + + public var message: String? + public var conveyanceType: ConveyanceType + + public init(message: String? = nil, conveyanceType: Breakpoint.Action.Log.ConveyanceType = .console) { + self.message = message + self.conveyanceType = conveyanceType + } + } + + public enum Sound: String, Equatable { + case basso = "Basso" + case blow = "Blow" + case bottle = "Bottle" + case frog = "Frog" + case funk = "Funk" + case glass = "Glass" + case hero = "Hero" + case morse = "Morse" + case ping = "Ping" + case pop = "Pop" + case purr = "Purr" + case sosumi = "Sosumi" + case submarine = "Submarine" + case tink = "Tink" + } + + case debuggerCommand(String?) + case log(Log) + case shellCommand(path: String?, arguments: String?, waitUntilDone: Bool = false) + case graphicsTrace + case appleScript(String?) + case sound(Sound) + } + + public var type: BreakpointType + public var enabled: Bool + public var ignoreCount: Int + public var continueAfterRunningActions: Bool + public var condition: String? + public var actions: [Breakpoint.Action] + + public init(type: BreakpointType, + enabled: Bool = true, + ignoreCount: Int = 0, + continueAfterRunningActions: Bool = false, + filePath: String? = nil, + line: Int? = nil, + condition: String? = nil, + actions: [Breakpoint.Action] = []) { + self.type = type + self.enabled = enabled + self.ignoreCount = ignoreCount + self.continueAfterRunningActions = continueAfterRunningActions + self.condition = condition + self.actions = actions + } +} + +extension Breakpoint.BreakpointType.Exception.Scope { + + public init(string: String) throws { + let string = string.lowercased() + switch string { + case "all": + self = .all + case "objective-c": + self = .objectiveC + case "c++": + self = .cpp + default: + throw SpecParsingError.unknownBreakpointScope(string) + } + } +} + +extension Breakpoint.BreakpointType.Exception.StopOnStyle { + + public init(string: String) throws { + let string = string.lowercased() + switch string { + case "throw": + self = .throw + case "catch": + self = .catch + default: + throw SpecParsingError.unknownBreakpointStopOnStyle(string) + } + } +} + +extension Breakpoint.Action.Log.ConveyanceType { + + init(string: String) throws { + let string = string.lowercased() + switch string { + case "console": + self = .console + case "speak": + self = .speak + default: + throw SpecParsingError.unknownBreakpointActionConveyanceType(string) + } + } +} + +extension Breakpoint.Action.Sound { + + init(name: String) throws { + guard let sound = Self.init(rawValue: name) else { + throw SpecParsingError.unknownBreakpointActionSoundName(name) + } + self = sound + } +} + +extension Breakpoint.Action: JSONObjectConvertible { + + public init(jsonDictionary: JSONDictionary) throws { + let idString: String = try jsonDictionary.json(atKeyPath: "type") + let id = try BreakpointActionExtensionID(string: idString) + switch id { + case .debuggerCommand: + let command: String? = jsonDictionary.json(atKeyPath: "command") + self = .debuggerCommand(command) + case .log: + let message: String? = jsonDictionary.json(atKeyPath: "message") + let conveyanceType: Log.ConveyanceType + if jsonDictionary["conveyanceType"] != nil { + let conveyanceTypeString: String = try jsonDictionary.json(atKeyPath: "conveyanceType") + conveyanceType = try .init(string: conveyanceTypeString) + } else { + conveyanceType = .console + } + self = .log(.init(message: message, conveyanceType: conveyanceType)) + case .shellCommand: + let path: String? = jsonDictionary.json(atKeyPath: "path") + let arguments: String? = jsonDictionary.json(atKeyPath: "arguments") + let waitUntilDone = jsonDictionary.json(atKeyPath: "waitUntilDone") ?? false + self = .shellCommand(path: path, arguments: arguments, waitUntilDone: waitUntilDone) + case .graphicsTrace: + self = .graphicsTrace + case .appleScript: + let script: String? = jsonDictionary.json(atKeyPath: "script") + self = .appleScript(script) + case .sound: + let sound: Sound + if jsonDictionary["sound"] != nil { + let name: String = try jsonDictionary.json(atKeyPath: "sound") + sound = try .init(name: name) + } else { + sound = .basso + } + self = .sound(sound) + case .openGLError: + throw SpecParsingError.unknownBreakpointActionType(idString) + } + } +} + +extension Breakpoint: JSONObjectConvertible { + + public init(jsonDictionary: JSONDictionary) throws { + let idString: String = try jsonDictionary.json(atKeyPath: "type") + let id = try BreakpointExtensionID(string: idString) + switch id { + case .file: + let path: String = try jsonDictionary.json(atKeyPath: "path") + let line: Int = try jsonDictionary.json(atKeyPath: "line") + let column: Int? = jsonDictionary.json(atKeyPath: "column") + type = .file(path: path, line: line, column: column) + case .exception: + let scope: BreakpointType.Exception.Scope + if jsonDictionary["scope"] != nil { + let scopeString: String = try jsonDictionary.json(atKeyPath: "scope") + scope = try .init(string: scopeString) + } else { + scope = .objectiveC + } + let stopOnStyle: BreakpointType.Exception.StopOnStyle + if jsonDictionary["stopOnStyle"] != nil { + let stopOnStyleString: String = try jsonDictionary.json(atKeyPath: "stopOnStyle") + stopOnStyle = try .init(string: stopOnStyleString) + } else { + stopOnStyle = .throw + } + type = .exception(.init(scope: scope, stopOnStyle: stopOnStyle)) + case .swiftError: + type = .swiftError + case .openGLError: + type = .openGLError + case .symbolic: + let symbol: String? = jsonDictionary.json(atKeyPath: "symbol") + let module: String? = jsonDictionary.json(atKeyPath: "module") + type = .symbolic(symbol: symbol, module: module) + case .ideConstraintError: + type = .ideConstraintError + case .ideTestFailure: + type = .ideTestFailure + } + enabled = jsonDictionary.json(atKeyPath: "enabled") ?? true + ignoreCount = jsonDictionary.json(atKeyPath: "ignoreCount") ?? 0 + continueAfterRunningActions = jsonDictionary.json(atKeyPath: "continueAfterRunningActions") ?? false + condition = jsonDictionary.json(atKeyPath: "condition") + if jsonDictionary["actions"] != nil { + actions = try jsonDictionary.json(atKeyPath: "actions", invalidItemBehaviour: .fail) + } else { + actions = [] + } + } +} diff --git a/Sources/ProjectSpec/Project.swift b/Sources/ProjectSpec/Project.swift index bc82e9aa5..aa873bcfe 100644 --- a/Sources/ProjectSpec/Project.swift +++ b/Sources/ProjectSpec/Project.swift @@ -25,6 +25,7 @@ public struct Project: BuildSettingsContainer { public var settingGroups: [String: Settings] public var configs: [Config] public var schemes: [Scheme] + public var breakpoints: [Breakpoint] public var options: SpecOptions public var attributes: [String: Any] public var fileGroups: [String] @@ -49,6 +50,7 @@ public struct Project: BuildSettingsContainer { settings: Settings = .empty, settingGroups: [String: Settings] = [:], schemes: [Scheme] = [], + breakpoints: [Breakpoint] = [], packages: [String: SwiftPackage] = [:], options: SpecOptions = SpecOptions(), fileGroups: [String] = [], @@ -66,6 +68,7 @@ public struct Project: BuildSettingsContainer { self.settings = settings self.settingGroups = settingGroups self.schemes = schemes + self.breakpoints = breakpoints self.packages = packages self.options = options self.fileGroups = fileGroups @@ -144,6 +147,7 @@ extension Project: Equatable { lhs.settingGroups == rhs.settingGroups && lhs.configs == rhs.configs && lhs.schemes == rhs.schemes && + lhs.breakpoints == rhs.breakpoints && lhs.fileGroups == rhs.fileGroups && lhs.configFiles == rhs.configFiles && lhs.options == rhs.options && @@ -179,6 +183,11 @@ extension Project { aggregateTargets = try jsonDictionary.json(atKeyPath: "aggregateTargets").sorted { $0.name < $1.name } projectReferences = try jsonDictionary.json(atKeyPath: "projectReferences").sorted { $0.name < $1.name } schemes = try jsonDictionary.json(atKeyPath: "schemes") + if jsonDictionary["breakpoints"] != nil { + breakpoints = try jsonDictionary.json(atKeyPath: "breakpoints", invalidItemBehaviour: .fail) + } else { + breakpoints = [] + } fileGroups = jsonDictionary.json(atKeyPath: "fileGroups") ?? [] configFiles = jsonDictionary.json(atKeyPath: "configFiles") ?? [:] attributes = jsonDictionary.json(atKeyPath: "attributes") ?? [:] diff --git a/Sources/ProjectSpec/SpecParsingError.swift b/Sources/ProjectSpec/SpecParsingError.swift index da6eadbaf..59ae2ad91 100644 --- a/Sources/ProjectSpec/SpecParsingError.swift +++ b/Sources/ProjectSpec/SpecParsingError.swift @@ -8,6 +8,12 @@ public enum SpecParsingError: Error, CustomStringConvertible { case invalidSourceBuildPhase(String) case invalidTargetReference(String) case invalidVersion(String) + case unknownBreakpointType(String) + case unknownBreakpointScope(String) + case unknownBreakpointStopOnStyle(String) + case unknownBreakpointActionType(String) + case unknownBreakpointActionConveyanceType(String) + case unknownBreakpointActionSoundName(String) public var description: String { switch self { @@ -25,6 +31,18 @@ public enum SpecParsingError: Error, CustomStringConvertible { return "Invalid version: \(version)" case let .unknownPackageRequirement(package): return "Unknown package requirement: \(package)" + case let .unknownBreakpointType(type): + return "Unknown Breakpoint type: \(type)" + case let .unknownBreakpointScope(scope): + return "Unknown Breakpoint scope: \(scope)" + case let .unknownBreakpointStopOnStyle(stopOnStyle): + return "Unknown Breakpoint stopOnStyle: \(stopOnStyle)" + case let .unknownBreakpointActionType(type): + return "Unknown Breakpoint Action type: \(type)" + case let .unknownBreakpointActionConveyanceType(type): + return "Unknown Breakpoint Action conveyance type: \(type)" + case let .unknownBreakpointActionSoundName(name): + return "Unknown Breakpoint Action sound name: \(name)" } } } diff --git a/Sources/ProjectSpec/XCProjExtensions.swift b/Sources/ProjectSpec/XCProjExtensions.swift index 91b4c91f9..2ec652a60 100644 --- a/Sources/ProjectSpec/XCProjExtensions.swift +++ b/Sources/ProjectSpec/XCProjExtensions.swift @@ -106,3 +106,30 @@ extension XCScheme.CommandLineArguments { self.init(arguments: args) } } + +extension BreakpointExtensionID { + + init(string: String) throws { + if let id = BreakpointExtensionID(rawValue: "Xcode.Breakpoint.\(string)Breakpoint") { + self = id + } else if let id = BreakpointExtensionID(rawValue: string) { + self = id + } else { + throw SpecParsingError.unknownBreakpointType(string) + } + } +} + +extension BreakpointActionExtensionID { + + init(string: String) throws { + if let type = BreakpointActionExtensionID(rawValue: "Xcode.BreakpointAction.\(string)") { + self = type + } else if let type = BreakpointActionExtensionID(rawValue: string) { + self = type + } else { + throw SpecParsingError.unknownBreakpointActionType(string) + } + } +} + diff --git a/Sources/XcodeGenKit/BreakpointGenerator.swift b/Sources/XcodeGenKit/BreakpointGenerator.swift new file mode 100644 index 000000000..4decfe904 --- /dev/null +++ b/Sources/XcodeGenKit/BreakpointGenerator.swift @@ -0,0 +1,124 @@ +import Foundation +import ProjectSpec +import XcodeProj + +public class BreakpointGenerator { + + let project: Project + + public init(project: Project) { + self.project = project + } + + func generateBreakpointList() throws -> XCBreakpointList? { + let breakpoints = project.breakpoints + guard !breakpoints.isEmpty else { + return nil + } + return XCBreakpointList(type: "4", version: "2.0", breakpoints: try breakpoints.map({ try generateBreakpointProxy($0) })) + } + + private func generateBreakpointProxy(_ breakpoint: Breakpoint) throws -> XCBreakpointList.BreakpointProxy { + let breakpointExtensionID: BreakpointExtensionID + var filePath: String? + var line: String? + var column: String? + var scope: String? + var stopOnStyle: String? + var symbol: String? + var module: String? + switch breakpoint.type { + case let .file(path, lineNumber, columnNumber): + breakpointExtensionID = .file + filePath = path + line = String(lineNumber) + column = columnNumber.map(String.init) + case let .exception(exception): + breakpointExtensionID = .exception + scope = exception.scope.rawValue + stopOnStyle = exception.stopOnStyle.rawValue + case .swiftError: + breakpointExtensionID = .swiftError + case .openGLError: + breakpointExtensionID = .openGLError + case let .symbolic(symbolName, moduleName): + breakpointExtensionID = .symbolic + symbol = symbolName + module = moduleName + case .ideConstraintError: + breakpointExtensionID = .ideConstraintError + case .ideTestFailure: + breakpointExtensionID = .ideTestFailure + } + let xcbreakpoint = XCBreakpointList.BreakpointProxy.BreakpointContent( + enabled: breakpoint.enabled, + ignoreCount: String(breakpoint.ignoreCount), + continueAfterRunningActions: breakpoint.continueAfterRunningActions, + filePath: filePath, + startingColumn: column, + endingColumn: column, + startingLine: line, + endingLine: line, + symbol: symbol, + module: module, + scope: scope, + stopOnStyle: stopOnStyle, + condition: breakpoint.condition, + actions: try breakpoint.actions.map { try generateBreakpointActionProxy($0) } + ) + + return XCBreakpointList.BreakpointProxy( + breakpointExtensionID: breakpointExtensionID, + breakpointContent: xcbreakpoint + ) + } + + private func generateBreakpointActionProxy(_ breakpointAction: Breakpoint.Action) throws -> XCBreakpointList.BreakpointProxy.BreakpointContent.BreakpointActionProxy { + let actionExtensionID: BreakpointActionExtensionID + var consoleCommand: String? + var message: String? + var conveyanceType: String? + var command: String? + var arguments: String? + var waitUntilDone: Bool? + var script: String? + var soundName: String? + switch breakpointAction { + case let .debuggerCommand(command): + actionExtensionID = .debuggerCommand + consoleCommand = command + case let .log(log): + actionExtensionID = .log + message = log.message + conveyanceType = log.conveyanceType.rawValue + case let .shellCommand(commandPath, commandArguments, waitUntilCommandDone): + actionExtensionID = .shellCommand + command = commandPath + arguments = commandArguments + waitUntilDone = waitUntilCommandDone + case .graphicsTrace: + actionExtensionID = .graphicsTrace + case let .appleScript(appleScript): + actionExtensionID = .appleScript + script = appleScript + case let .sound(sound): + actionExtensionID = .sound + soundName = sound.rawValue + } + let xcaction = XCBreakpointList.BreakpointProxy.BreakpointContent.BreakpointActionProxy.ActionContent( + consoleCommand: consoleCommand, + message: message, + conveyanceType: conveyanceType, + command: command, + arguments: arguments, + waitUntilDone: waitUntilDone, + script: script, + soundName: soundName + ) + + return XCBreakpointList.BreakpointProxy.BreakpointContent.BreakpointActionProxy( + actionExtensionID: actionExtensionID, + actionContent: xcaction + ) + } +} diff --git a/Sources/XcodeGenKit/ProjectGenerator.swift b/Sources/XcodeGenKit/ProjectGenerator.swift index 7bb20af46..35a4d1bd1 100644 --- a/Sources/XcodeGenKit/ProjectGenerator.swift +++ b/Sources/XcodeGenKit/ProjectGenerator.swift @@ -27,8 +27,12 @@ public class ProjectGenerator { let schemeGenerator = SchemeGenerator(project: project, pbxProj: pbxProj) let (sharedSchemes, userSchemes, schemeManagement) = try schemeGenerator.generateSchemes() + // generate Breakpoints + let breakpointGenerator = BreakpointGenerator(project: project) + let xcbreakpointlist = try breakpointGenerator.generateBreakpointList() + // generate shared data - let sharedData = XCSharedData(schemes: sharedSchemes) + let sharedData = XCSharedData(schemes: sharedSchemes, breakpoints: xcbreakpointlist) // generate user data let userData = userSchemes.isEmpty && schemeManagement == nil ? [] : [ diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcdebugger/Breakpoints_v2.xcbkptlist b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 000000000..f51ece771 --- /dev/null +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index f6df18a49..2dd63f1b6 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -31,6 +31,46 @@ packages: Swinject: url: https://github.com/Swinject/Swinject version: 2.8.0 +breakpoints: + - type: File + path: App_iOS/AppDelegate.swift + line: 7 + condition: launchOptions == nil + actions: + - type: Log + message: message + conveyanceType: speak + - type: File + path: App_iOS/AppDelegate.swift + line: 11 + column: 13 + - type: Exception + scope: All + stopOnStype: Catch + actions: + - type: DebuggerCommand + command: po $arg1 + - type: AppleScript + script: display alert "Exception happened!" + - type: Sound + sound: Blow + - type: SwiftError + enabled: false + - type: OpenGLError + ignoreCount: 2 + actions: + - type: ShellCommand + path: script.sh + arguments: argument1, argument2 + waitUntilDone: true + - type: Symbolic + symbol: UIViewAlertForUnsatisfiableConstraints + module: UIKitCore + actions: + - type: GraphicsTrace + - type: IDEConstraintError + continueAfterRunningActions: true + - type: IDETestFailure targets: Legacy: type: "" diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 75c3f26b3..040f0f870 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -379,6 +379,7 @@ class SpecLoadingTests: XCTestCase { func testProjectSpecParser() { let validTarget: [String: Any] = ["type": "application", "platform": "iOS"] + let validBreakpoint: [String: Any] = ["type": "Exception", "scope": "All", "stopOnStyle": "Catch"] let invalid = "invalid" describe { @@ -401,6 +402,93 @@ class SpecLoadingTests: XCTestCase { try expectTargetError(target, .invalidDependency([invalid: "name"])) } + $0.it("fails with incorrect breakpoint type") { + var breakpoint = validBreakpoint + breakpoint["type"] = invalid + try expectBreakpointError(breakpoint, .unknownBreakpointType(invalid)) + } + + $0.it("fails with incorrect breakpoint scope") { + var target = validBreakpoint + target["scope"] = invalid + try expectBreakpointError(target, .unknownBreakpointScope(invalid)) + } + + $0.it("fails with incorrect breakpoint stop on style") { + var target = validBreakpoint + target["stopOnStyle"] = invalid + try expectBreakpointError(target, .unknownBreakpointStopOnStyle(invalid)) + } + + $0.it("fails with incorrect breakpoint action type") { + var breakpoint = validBreakpoint + breakpoint["actions"] = [["type": invalid]] + try expectBreakpointError(breakpoint, .unknownBreakpointActionType(invalid)) + } + + $0.it("fails with incorrect breakpoint action conveyance type") { + var breakpoint = validBreakpoint + breakpoint["actions"] = [["type": "Log", "conveyanceType": invalid]] + try expectBreakpointError(breakpoint, .unknownBreakpointActionConveyanceType(invalid)) + } + + $0.it("fails with incorrect breakpoint action sound name") { + var breakpoint = validBreakpoint + breakpoint["actions"] = [["type": "Sound", "sound": invalid]] + try expectBreakpointError(breakpoint, .unknownBreakpointActionSoundName(invalid)) + } + + $0.it("parses breakpoints") { + let breakpointDictionaries = [ + ["type": "File", "path": "Foo.swift", "line": 7, "column": 14, "condition": "bar == nil"], + ["type": "Exception", "scope": "All", "stopOnStyle": "Catch"], + ["type": "SwiftError", "enabled": false], + ["type": "OpenGLError", "ignoreCount": 2], + ["type": "Symbolic", "symbol": "UIViewAlertForUnsatisfiableConstraints", "module": "UIKitCore"], + ["type": "IDEConstraintError", "continueAfterRunningActions": true], + ["type": "IDETestFailure"], + ] + + let project = try getProjectSpec(["breakpoints": breakpointDictionaries]) + + let expectedBreakpoints = [ + Breakpoint(type: .file(path: "Foo.swift", line: 7, column: 14), condition: "bar == nil"), + Breakpoint(type: .exception(.init(scope: .all, stopOnStyle: .catch))), + Breakpoint(type: .swiftError, enabled: false), + Breakpoint(type: .openGLError, ignoreCount: 2), + Breakpoint(type: .symbolic(symbol: "UIViewAlertForUnsatisfiableConstraints", module: "UIKitCore")), + Breakpoint(type: .ideConstraintError, continueAfterRunningActions: true), + Breakpoint(type: .ideTestFailure), + ] + + try expect(project.breakpoints) == expectedBreakpoints + } + + $0.it("parses breakpoint actions") { + var breakpointDicationary = validBreakpoint + breakpointDicationary["actions"] = [ + ["type": "DebuggerCommand", "command": "po $arg1"], + ["type": "Log", "message": "message", "conveyanceType": "speak"], + ["type": "ShellCommand", "path": "script.sh", "arguments": "argument1, argument2", "waitUntilDone": true], + ["type": "GraphicsTrace"], + ["type": "AppleScript", "script": #"display alert "Hello!""#], + ["type": "Sound", "sound": "Hero"], + ] + + let breakpoint = try Breakpoint(jsonDictionary: breakpointDicationary) + + let expectedActions: [Breakpoint.Action] = [ + .debuggerCommand("po $arg1"), + .log(.init(message: "message", conveyanceType: .speak)), + .shellCommand(path: "script.sh", arguments: "argument1, argument2", waitUntilDone: true), + .graphicsTrace, + .appleScript(#"display alert "Hello!""#), + .sound(.hero), + ] + + try expect(breakpoint.actions) == expectedActions + } + $0.it("parses sources") { var targetDictionary1 = validTarget targetDictionary1["sources"] = [ @@ -1482,3 +1570,9 @@ private func expectTargetError(_ target: [String: Any], _ expectedError: SpecPar _ = try Target(name: "test", jsonDictionary: target) } } + +private func expectBreakpointError(_ breakpoint: [String: Any], _ expectedError: SpecParsingError, file: String = #file, line: Int = #line) throws { + try expectError(expectedError, file: file, line: line) { + _ = try Breakpoint(jsonDictionary: breakpoint) + } +} diff --git a/Tests/XcodeGenKitTests/BreakpointGeneratorTests.swift b/Tests/XcodeGenKitTests/BreakpointGeneratorTests.swift new file mode 100644 index 000000000..a1d3152a3 --- /dev/null +++ b/Tests/XcodeGenKitTests/BreakpointGeneratorTests.swift @@ -0,0 +1,20 @@ +import ProjectSpec +import Spectre +import TestSupport +import XCTest + +class BreakpointGeneratorTests: XCTestCase { + + func testBreakpoints() { + describe { + + $0.it("generates breakpoint") { + let breakpoint = Breakpoint(type: .exception(.init())) + let project = Project(basePath: "", name: "test", targets: [], breakpoints: [breakpoint]) + let xcodeProject = try project.generateXcodeProject() + let xcbreakpoint = try unwrap(xcodeProject.sharedData?.breakpoints?.breakpoints.first) + try expect(xcbreakpoint.breakpointExtensionID.rawValue) == "Xcode.Breakpoint.ExceptionBreakpoint" + } + } + } +} From 5a34c489e16eed6b7d43ee0064b3525b0d11f1c0 Mon Sep 17 00:00:00 2001 From: Sara Tavares <29093946+stavares843@users.noreply.github.com> Date: Wed, 22 Mar 2023 23:29:08 +0000 Subject: [PATCH 174/284] chore(typos): fix typos (#1340) --- Docs/ProjectSpec.md | 8 ++++---- Docs/Usage.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 1f5a41111..053eaffb8 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -115,7 +115,7 @@ Note that target names can also be changed by adding a `name` property to a targ - [ ] **minimumXcodeGenVersion**: **String** - The minimum version of XcodeGen required. - [ ] **carthageBuildPath**: **String** - The path to the carthage build directory. Defaults to `Carthage/Build`. This is used when specifying target carthage dependencies - [ ] **carthageExecutablePath**: **String** - The path to the carthage executable. Defaults to `carthage`. You can specify when you use custom built or locally installed Carthage using [Mint](https://github.com/yonaskolb/Mint), for example. -- [ ] **createIntermediateGroups**: **Bool** - If this is specified and set to `true`, then intermediate groups will be created for every path component between the folder containing the source and next existing group it finds or the base path. For example, when enabled if a source path is specified as `Vendor/Foo/Hello.swift`, the group `Vendor` will created as a parent of the `Foo` group. This can be overriden in a specific [Target source](#target-source) +- [ ] **createIntermediateGroups**: **Bool** - If this is specified and set to `true`, then intermediate groups will be created for every path component between the folder containing the source and next existing group it finds or the base path. For example, when enabled if a source path is specified as `Vendor/Foo/Hello.swift`, the group `Vendor` will created as a parent of the `Foo` group. This can be overridden in a specific [Target source](#target-source) - [ ] **bundleIdPrefix**: **String** - If this is specified then any target that doesn't have an `PRODUCT_BUNDLE_IDENTIFIER` (via all levels of build settings) will get an autogenerated one by combining `bundleIdPrefix` and the target name: `bundleIdPrefix.name`. The target name will be stripped of all characters that aren't alphanumerics, hyphens, or periods. Underscores will be replaced with hyphens. - [ ] **settingPresets**: **String** - This controls the settings that are automatically applied to the project and its targets. These are the same build settings that Xcode would add when creating a new project. Project settings are applied by config type. Target settings are applied by the product type and platform. By default this is set to `all` - `all`: project and target settings @@ -140,7 +140,7 @@ Note that target names can also be changed by adding a `name` property to a targ - [ ] **groupOrdering**: **[[GroupOrdering]](#groupOrdering)** - An order of groups. - [ ] **transitivelyLinkDependencies**: **Bool** - If this is `true` then targets will link to the dependencies of their target dependencies. If a target should embed its dependencies, such as application and test bundles, it will embed these transitive dependencies as well. Some complex setups might want to set this to `false` and explicitly specify dependencies at every level. Targets can override this with [Target](#target).transitivelyLinkDependencies. Defaults to `false`. - [ ] **generateEmptyDirectories**: **Bool** - If this is `true` then empty directories will be added to project too else will be missed. Defaults to `false`. -- [ ] **findCarthageFrameworks**: **Bool** - When this is set to `true`, all the invididual frameworks for Carthage framework dependencies will automatically be found. This property can be overriden individually for each carthage dependency - for more details see See **findFrameworks** in the [Dependency](#dependency) section. Defaults to `false`. +- [ ] **findCarthageFrameworks**: **Bool** - When this is set to `true`, all the individual frameworks for Carthage framework dependencies will automatically be found. This property can be overridden individually for each carthage dependency - for more details see See **findFrameworks** in the [Dependency](#dependency) section. Defaults to `false`. - [ ] **localPackagesGroup**: **String** - The group name that local packages are put into. This defaults to `Packages` - [ ] **fileTypes**: **[String: [FileType](#filetype)]** - A list of default file options for specific file extensions across the project. Values in [Sources](#sources) will overwrite these settings. - [ ] **preGenCommand**: **String** - A bash command to run before the project has been generated. If the project isn't generated due to no changes when using the cache then this won't run. This is useful for running things like generating resources files before the project is regenerated. @@ -344,7 +344,7 @@ Settings are merged in the following order: groups, base, configs. - [ ] **templateAttributes**: **[String: String]** - A list of attributes where each instance of `${attributeName}` within the templates listed in `templates` will be replaced with the value specified. - [ ] **transitivelyLinkDependencies**: **Bool** - If this is not specified the value from the project set in [Options](#options)`.transitivelyLinkDependencies` will be used. - [ ] **directlyEmbedCarthageDependencies**: **Bool** - If this is `true` Carthage framework dependencies will be embedded using an `Embed Frameworks` build phase instead of the `copy-frameworks` script. Defaults to `true` for all targets except iOS/tvOS/watchOS Applications. -- [ ] **requiresObjCLinking**: **Bool** - If this is `true` any targets that link to this target will have `-ObjC` added to their `OTHER_LDFLAGS`. This is required if a static library has any catagories or extensions on Objective-C code. See [this guide](https://pewpewthespells.com/blog/objc_linker_flags.html#objc) for more details. Defaults to `true` if `type` is `library.static`. If you are 100% sure you don't have catagories or extensions on Objective-C code (pure Swift with no use of Foundation/UIKit) you can set this to `false`, otherwise it's best to leave it alone. +- [ ] **requiresObjCLinking**: **Bool** - If this is `true` any targets that link to this target will have `-ObjC` added to their `OTHER_LDFLAGS`. This is required if a static library has any categories or extensions on Objective-C code. See [this guide](https://pewpewthespells.com/blog/objc_linker_flags.html#objc) for more details. Defaults to `true` if `type` is `library.static`. If you are 100% sure you don't have categories or extensions on Objective-C code (pure Swift with no use of Foundation/UIKit) you can set this to `false`, otherwise it's best to leave it alone. - [ ] **onlyCopyFilesOnInstall**: **Bool** – If this is `true`, the `Embed Frameworks` and `Embed App Extensions` (if available) build phases will have the "Copy only when installing" chekbox checked. Defaults to `false`. - [ ] **preBuildScripts**: **[[Build Script](#build-script)]** - Build scripts that run *before* any other build phases - [ ] **postCompileScripts**: **[[Build Script](#build-script)]** - Build scripts that run after the Compile Sources phase @@ -441,7 +441,7 @@ A source can be provided via a string (the path) or an object of the form: - [x] **path**: **String** - The path to the source file or directory. - [ ] **name**: **String** - Can be used to override the name of the source file or directory. By default the last component of the path is used for the name - [ ] **group**: **String** - Can be used to override the parent group of the source file or directory. By default a group is created at the root with the name of this source file or directory or intermediate groups are created if `createIntermediateGroups` is set to `true`. Multiple groups can be created by separating each one using a `/`. If multiple target sources share the same `group`, they will be put together in the same parent group. -- [ ] **compilerFlags**: **[String]** or **String** - A list of compilerFlags to add to files under this specific path provided as a list or a space delimitted string. Defaults to empty. +- [ ] **compilerFlags**: **[String]** or **String** - A list of compilerFlags to add to files under this specific path provided as a list or a space delimited string. Defaults to empty. - [ ] **excludes**: **[String]** - A list of [global patterns](https://en.wikipedia.org/wiki/Glob_(programming)) representing the files to exclude. These rules are relative to `path` and _not the directory where `project.yml` resides_. XcodeGen uses Bash 4's Glob behaviors where globstar (**) is enabled. - [ ] **includes**: **[String]** - A list of global patterns in the same format as `excludes` representing the files to include. These rules are relative to `path` and _not the directory where `project.yml` resides_. If **excludes** is present and file conflicts with **includes**, **excludes** will override the **includes** behavior. - [ ] **createIntermediateGroups**: **Bool** - This overrides the value in [Options](#options) diff --git a/Docs/Usage.md b/Docs/Usage.md index c69ab3368..505cdbfc8 100644 --- a/Docs/Usage.md +++ b/Docs/Usage.md @@ -127,7 +127,7 @@ targets: - carthage: ReactiveMapKit ``` -XcodeGen can look these up for you automatically! This can be enabled with a global `options.findCarthageFrameworks` or can be overriden for each Carthage dependency. Note that if this is enabled, the Carthage dependencies need to have already been built before XcodeGen is run. This is because XcodeGen loads `.version` files that Carthage writes in the `Carthage/Build` directory which lists the all the frameworks. The name you use must also be the name of the `.version` file Carthage writes to `Carthage/Build`. Be aware that in some cases this name can differ from the name of the repo in the Cartfile and even the framework name. If the `.version` file is not found or fails parsing, XcodeGen will fallback to the regular Framework lookup in the relevant Carthage directory. +XcodeGen can look these up for you automatically! This can be enabled with a global `options.findCarthageFrameworks` or can be overridden for each Carthage dependency. Note that if this is enabled, the Carthage dependencies need to have already been built before XcodeGen is run. This is because XcodeGen loads `.version` files that Carthage writes in the `Carthage/Build` directory which lists the all the frameworks. The name you use must also be the name of the `.version` file Carthage writes to `Carthage/Build`. Be aware that in some cases this name can differ from the name of the repo in the Cartfile and even the framework name. If the `.version` file is not found or fails parsing, XcodeGen will fallback to the regular Framework lookup in the relevant Carthage directory. ```yml options: From 988afa0f5bbd66ceda4b0aa2a2a26318a50baea6 Mon Sep 17 00:00:00 2001 From: Dale Myers <112943336+dalemyers-flipdish@users.noreply.github.com> Date: Thu, 6 Apr 2023 00:17:31 +0100 Subject: [PATCH 175/284] Sanitize the ends of folder source paths (#1341) * Sanitize the ends of folder source paths Setting the source: `/foo/bar` is _sometimes_ different from `/foo/bar/` even if `bar` is a folder in both cases. The result of this is that we often run into a race condition where we have two objects with the same hash but different properties. This fixes #1339 and #1131. * Update CHANGELOG.md * Update TargetSource.swift * Update TargetSource.swift * Update TargetSource.swift --- CHANGELOG.md | 4 ++++ Sources/ProjectSpec/TargetSource.swift | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cef7eeb58..ef6b84357 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - Added support for shared breakpoints #177 @alexruperez @myihsan +### Fixed + +- Fix case where source paths may not be deduplicated correctly resulting in duplicate groups and/or a crash in running Xcodegen #1341 @dalemyers + ## 2.34.0 ### Changed diff --git a/Sources/ProjectSpec/TargetSource.swift b/Sources/ProjectSpec/TargetSource.swift index 7ad5e4aa4..6674972b2 100644 --- a/Sources/ProjectSpec/TargetSource.swift +++ b/Sources/ProjectSpec/TargetSource.swift @@ -4,8 +4,13 @@ import PathKit public struct TargetSource: Equatable { public static let optionalDefault = false - - public var path: String + + public var path: String { + didSet { + path = (path as NSString).standardizingPath + } + } + public var name: String? public var group: String? public var compilerFlags: [String] @@ -48,7 +53,7 @@ public struct TargetSource: Equatable { attributes: [String] = [], resourceTags: [String] = [] ) { - self.path = path + self.path = (path as NSString).standardizingPath self.name = name self.group = group self.compilerFlags = compilerFlags @@ -83,6 +88,7 @@ extension TargetSource: JSONObjectConvertible { public init(jsonDictionary: JSONDictionary) throws { path = try jsonDictionary.json(atKeyPath: "path") + path = (path as NSString).standardizingPath // Done in two steps as the compiler can't figure out the types otherwise name = jsonDictionary.json(atKeyPath: "name") group = jsonDictionary.json(atKeyPath: "group") From 8256008778284695e35b0bbd19a7dedde4275219 Mon Sep 17 00:00:00 2001 From: mat1th Date: Tue, 25 Apr 2023 01:57:44 +0000 Subject: [PATCH 176/284] Add possiblity to add resources before the sources build phase (#1351) * feat: Add possiblity to add resources before the sources build phase; * feat(ios): Add change to Docs + CHANGELOG; * fix: rename resourcesBeforeSourcesBuildPhase to putResourcesBeforeSourcesBuildPhase to make it more clear; * Update CHANGELOG.md --------- Co-authored-by: Yonas Kolb --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 1 + Sources/ProjectSpec/Target.swift | 10 ++++- Sources/XcodeGenKit/PBXProjGenerator.swift | 18 +++++++-- .../Project.xcodeproj/project.pbxproj | 2 +- Tests/Fixtures/TestProject/project.yml | 1 + Tests/ProjectSpecTests/ProjectSpecTests.swift | 3 +- Tests/ProjectSpecTests/SpecLoadingTests.swift | 7 ++++ .../PBXProjGeneratorTests.swift | 38 +++++++++++++++++++ 9 files changed, 74 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef6b84357..132a3de46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added - Added support for shared breakpoints #177 @alexruperez @myihsan +- Added support for `putResourcesBeforeSourcesBuildPhase` in a target #1351 @mat1th ### Fixed diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 053eaffb8..bc4c65811 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -356,6 +356,7 @@ Settings are merged in the following order: groups, base, configs. - `DevelopmentTeam`: if all configurations have the same `DEVELOPMENT_TEAM` setting - `ProvisioningStyle`: if all configurations have the same `CODE_SIGN_STYLE` setting - `TestTargetID`: if all configurations have the same `TEST_TARGET_NAME` setting +- [ ] **putResourcesBeforeSourcesBuildPhase**: **Bool** - If this is `true` the `Copy Resources` step will be placed before the `Compile Sources` build step. ### Product Type diff --git a/Sources/ProjectSpec/Target.swift b/Sources/ProjectSpec/Target.swift index 9736694ce..9bac89bdf 100644 --- a/Sources/ProjectSpec/Target.swift +++ b/Sources/ProjectSpec/Target.swift @@ -56,6 +56,7 @@ public struct Target: ProjectTarget { public var attributes: [String: Any] public var productName: String public var onlyCopyFilesOnInstall: Bool + public var putResourcesBeforeSourcesBuildPhase: Bool public var isLegacy: Bool { legacy != nil @@ -94,7 +95,8 @@ public struct Target: ProjectTarget { scheme: TargetScheme? = nil, legacy: LegacyTarget? = nil, attributes: [String: Any] = [:], - onlyCopyFilesOnInstall: Bool = false + onlyCopyFilesOnInstall: Bool = false, + putResourcesBeforeSourcesBuildPhase: Bool = false ) { self.name = name self.type = type @@ -118,6 +120,7 @@ public struct Target: ProjectTarget { self.legacy = legacy self.attributes = attributes self.onlyCopyFilesOnInstall = onlyCopyFilesOnInstall + self.putResourcesBeforeSourcesBuildPhase = putResourcesBeforeSourcesBuildPhase } } @@ -329,6 +332,7 @@ extension Target: NamedJSONDictionaryConvertible { legacy = jsonDictionary.json(atKeyPath: "legacy") attributes = jsonDictionary.json(atKeyPath: "attributes") ?? [:] onlyCopyFilesOnInstall = jsonDictionary.json(atKeyPath: "onlyCopyFilesOnInstall") ?? false + putResourcesBeforeSourcesBuildPhase = jsonDictionary.json(atKeyPath: "putResourcesBeforeSourcesBuildPhase") ?? false } } @@ -364,6 +368,10 @@ extension Target: JSONEncodable { dict["onlyCopyFilesOnInstall"] = true } + if putResourcesBeforeSourcesBuildPhase { + dict["putResourcesBeforeSourcesBuildPhase"] = true + } + return dict } } diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 88d786f99..8a3509c5e 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -1083,6 +1083,18 @@ public class PBXProjGenerator { } } + func addResourcesBuildPhase() { + let resourcesBuildPhaseFiles = getBuildFilesForPhase(.resources) + copyResourcesReferences + if !resourcesBuildPhaseFiles.isEmpty { + let resourcesBuildPhase = addObject(PBXResourcesBuildPhase(files: resourcesBuildPhaseFiles)) + buildPhases.append(resourcesBuildPhase) + } + } + + if target.putResourcesBeforeSourcesBuildPhase { + addResourcesBuildPhase() + } + let sourcesBuildPhaseFiles = getBuildFilesForPhase(.sources) let shouldSkipSourcesBuildPhase = sourcesBuildPhaseFiles.isEmpty && target.type.canSkipCompileSourcesBuildPhase if !shouldSkipSourcesBuildPhase { @@ -1092,10 +1104,8 @@ public class PBXProjGenerator { buildPhases += try target.postCompileScripts.map { try generateBuildScript(targetName: target.name, buildScript: $0) } - let resourcesBuildPhaseFiles = getBuildFilesForPhase(.resources) + copyResourcesReferences - if !resourcesBuildPhaseFiles.isEmpty { - let resourcesBuildPhase = addObject(PBXResourcesBuildPhase(files: resourcesBuildPhaseFiles)) - buildPhases.append(resourcesBuildPhase) + if !target.putResourcesBeforeSourcesBuildPhase { + addResourcesBuildPhase() } let swiftObjCInterfaceHeader = project.getCombinedBuildSetting("SWIFT_OBJC_INTERFACE_HEADER_NAME", target: target, config: project.configs[0]) as? String diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 590824f66..8d52e4a3d 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -1652,8 +1652,8 @@ isa = PBXNativeTarget; buildConfigurationList = 77CE5B5E5DEAC820254D484C /* Build configuration list for PBXNativeTarget "App_macOS" */; buildPhases = ( - 96BB43F4706B031DA45166E8 /* Sources */, 77D35586228BF8AB74152BB5 /* Resources */, + 96BB43F4706B031DA45166E8 /* Sources */, FB79B30FEA6073A29B4D9FCC /* CopyFiles */, A6E1C88C073F8CC6B5B072B6 /* Frameworks */, DE875E9A37F7CB9C347AEFA0 /* Embed System Extensions */, diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 2dd63f1b6..5cb716952 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -111,6 +111,7 @@ targets: - sdk: Contacts.framework - sdk: libc++.tbd - sdk: libz.dylib + putResourcesBeforeSourcesBuildPhase: true App_iOS: type: application diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 50e27c1f3..0422290b3 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -575,7 +575,8 @@ class ProjectSpecTests: XCTestCase { passSettings: true, arguments: "bar", workingDirectory: "foo"), - attributes: ["foo": "bar"])], + attributes: ["foo": "bar"], + putResourcesBeforeSourcesBuildPhase: true)], aggregateTargets: [AggregateTarget(name: "aggregate target", targets: ["App"], settings: Settings(buildSettings: ["buildSettings": "bar"], diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 040f0f870..37eda5f9f 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -1277,6 +1277,13 @@ class SpecLoadingTests: XCTestCase { try expect(target.onlyCopyFilesOnInstall) == true } + $0.it("parses put resources before Sources Build Phase") { + var targetSource = validTarget + targetSource["putResourcesBeforeSourcesBuildPhase"] = true + let target = try Target(name: "Embed Frameworks", jsonDictionary: targetSource) + try expect(target.putResourcesBeforeSourcesBuildPhase) == true + } + $0.it("parses settings") { let project = try Project(path: fixturePath + "settings_test.yml") let buildSettings: BuildSettings = ["SETTING": "value"] diff --git a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift index 2fc9e872d..8a864a3e7 100644 --- a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift @@ -375,6 +375,44 @@ class PBXProjGeneratorTests: XCTestCase { try expect(testTarget?.frameworksBuildPhase()?.files?.count) == 1 try expect(testTarget?.frameworksBuildPhase()?.files?[0].platformFilter) == "ios" } + + $0.it("places resources before sources buildPhase") { + let directories = """ + Sources: + - MainScreen: + - Entities: + - file.swift + - image.jpg + """ + try createDirectories(directories) + let target1 = Target( + name: "TestAll", + type: .application, + platform: .iOS, + sources: ["Sources"], + putResourcesBeforeSourcesBuildPhase: true + ) + let target2 = Target( + name: "TestiOS", + type: .application, + platform: .iOS, + sources: ["Sources"], + putResourcesBeforeSourcesBuildPhase: false + ) + + let project = Project(basePath: directoryPath, name: "Test", targets: [target1, target2]) + + let pbxProj = try project.generatePbxProj() + + let targets = pbxProj.projects.first?.targets + try expect(targets?.count) == 2 + try expect(targets?.first?.buildPhases.first).to.beOfType(PBXResourcesBuildPhase.self) + try expect(targets?.first?.buildPhases.last).to.beOfType(PBXSourcesBuildPhase.self) + + try expect(targets?.last?.buildPhases.first).to.beOfType(PBXSourcesBuildPhase.self) + try expect(targets?.last?.buildPhases.last).to.beOfType(PBXResourcesBuildPhase.self) + } } } + } From 10b99f1be02cbe3c5807ebe3b599e5d7318d62f2 Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Thu, 27 Apr 2023 08:54:58 +0200 Subject: [PATCH 177/284] Update documentation of Settings and Setting Groups (#1352) What was changed: - updated index, - improve examples, - improve formatting, - add reference to Settings Group - add information that Simple Map will be skipped if used with base, groups or configs --- Docs/ProjectSpec.md | 154 +++++++++++++++++++++++++++----------------- 1 file changed, 96 insertions(+), 58 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index bc4c65811..887f7755c 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -2,44 +2,52 @@ ### Index -- [General](#general) -- [Project](#project) - - [Include](#include) - - [Options](#options) - - [GroupOrdering](#groupordering) - - [FileType](#filetype) - - [Configs](#configs) - - [Setting Groups](#setting-groups) -- [Settings](#settings) -- [Target](#target) - - [Product Type](#product-type) - - [Platform](#platform) - - [Sources](#sources) - - [Dependency](#dependency) - - [Config Files](#config-files) - - [Plist](#plist) - - [Build Script](#build-script) - - [Build Rule](#build-rule) - - [Target Scheme](#target-scheme) - - [Legacy Target](#legacy-target) -- [Aggregate Target](#aggregate-target) -- [Target Template](#target-template) -- [Scheme](#scheme) - - [Build](#build) - - [Common Build Action options](#common-build-action-options) - - [Execution Action](#execution-action) - - [Run Action](#run-action) - - [Test Action](#test-action) - - [Archive Action](#archive-action) - - [Simulate Location](#simulate-location) - - [Scheme Management](#scheme-management) - - [Environment Variable](#environment-variable) - - [Test Plan](#test-plan) -- [Scheme Template](#scheme-template) - - [Remote Package](#remote-package) - - [Local Package](#local-package) -- [Swift Package](#swift-package) -- [Project Reference](#project-reference) +- [Project Spec](#project-spec) + - [Index](#index) + - [General](#general) + - [Project](#project) + - [Include](#include) + - [Options](#options) + - [GroupOrdering](#groupordering) + - [FileType](#filetype) + - [Breakpoints](#breakpoints) + - [Breakpoint Action](#breakpoint-action) + - [Configs](#configs) + - [Setting Groups](#setting-groups) + - [Settings](#settings) + - [Target](#target) + - [Product Type](#product-type) + - [Platform](#platform) + - [Sources](#sources) + - [Target Source](#target-source) + - [Dependency](#dependency) + - [Config Files](#config-files) + - [Plist](#plist) + - [Build Script](#build-script) + - [Build Rule](#build-rule) + - [Target Scheme](#target-scheme) + - [Legacy Target](#legacy-target) + - [Aggregate Target](#aggregate-target) + - [Target Template](#target-template) + - [Scheme](#scheme) + - [Build](#build) + - [Common Build Action options](#common-build-action-options) + - [Execution Action](#execution-action) + - [Run Action](#run-action) + - [Test Action](#test-action) + - [Test Target](#test-target) + - [Other Parameters](#other-parameters) + - [Testable Target Reference](#testable-target-reference) + - [Archive Action](#archive-action) + - [Simulate Location](#simulate-location) + - [Scheme Management](#scheme-management) + - [Environment Variable](#environment-variable) + - [Test Plan](#test-plan) + - [Scheme Template](#scheme-template) + - [Swift Package](#swift-package) + - [Remote Package](#remote-package) + - [Local Package](#local-package) + - [Project Reference](#project-reference) ## General @@ -259,7 +267,7 @@ actions: ### Configs -Each config maps to a build type of either `debug` or `release` which will then apply default build settings to the project. Any value other than `debug` or `release` (for example `none`), will mean no default build settings will be applied to the project. +Each config maps to a build type of either `debug` or `release` which will then apply default `Build Settings` to the project. Any value other than `debug` or `release` (for example `none`), will mean no default `Build Settings` will be applied to the project. ```yaml configs: @@ -271,50 +279,80 @@ If no configs are specified, default `Debug` and `Release` configs will be creat ### Setting Groups -Setting groups are named groups of build settings that can be reused elsewhere. Each preset is a [Settings](#settings) schema, so can include other groups +Setting groups are named groups of `Build Settings` that can be reused elsewhere. Each preset is a [Settings](#settings) schema, so can include other `groups` or define settings by `configs`. ```yaml settingGroups: - preset1: - BUILD_SETTING: value - preset2: + preset_generic: + CUSTOM_SETTING: value_custom + preset_debug: + BUILD_SETTING: value_debug + preset_release: base: - BUILD_SETTING: value + BUILD_SETTING: value_release + preset_all: groups: - - preset - preset3: - configs: - debug: - groups: - - preset + - preset_generic + configs: + debug: + groups: + - preset_debug + release: + groups: + - preset_release + +targets: + Application: + settings: + groups: + - preset_all ``` ## Settings -Settings can either be a simple map of build settings `[String:String]`, or can be more advanced with the following properties: +Settings correspond to `Build Settings` tab in Xcode. To display Setting Names instead of Setting Titles, select `Editor -> Show Setting Names` in Xcode. -- [ ] **groups**: **[String]** - List of setting groups to include and merge +Settings can either be a simple map of `Build Settings` `[String:String]`, or can be more advanced with the following properties: + +- [ ] **groups**: **[String]** - List of [Setting Groups](#setting-groups) to include and merge - [ ] **configs**: **[String:[Settings](#settings)]** - Mapping of config name to a settings spec. These settings will only be applied for that config. Each key will be matched to any configs that contain the key and is case insensitive. So if you had `Staging Debug` and `Staging Release`, you could apply settings to both of them using `staging`. However if a config name is an exact match to a config it won't be applied to any others. eg `Release` will be applied to config `Release` but not `Staging Release` - [ ] **base**: **[String:String]** - Used to specify default settings that apply to any config ```yaml settings: - BUILD_SETTING_1: value 1 - BUILD_SETTING_2: value 2 + GENERATE_INFOPLIST_FILE: NO + CODE_SIGNING_ALLOWED: NO + WRAPPER_EXTENSION: bundle +``` + +Don't mix simple maps with `groups`, `base` and `configs`. +If `groups`, `base`, `configs` are used then simple maps is silently ignored. + +In this example, `CURRENT_PROJECT_VERSION` will be set, but `MARKETING_VERSION` will be ignored: +```yaml +settings: + MARKETING_VERSION: 100.0.0 + base: + CURRENT_PROJECT_VERSION: 100.0 ``` ```yaml settings: base: - BUILD_SETTING_1: value 1 + PRODUCT_NAME: XcodeGenProduct configs: - my_config: - BUILD_SETTING_2: value 2 + debug: + CODE_SIGN_IDENTITY: iPhone Developer + PRODUCT_BUNDLE_IDENTIFIER: com.tomtom.debug_app + release: + CODE_SIGN_IDENTITY: iPhone Distribution + PRODUCT_BUNDLE_IDENTIFIER: com.tomtom.app + PROVISIONING_PROFILE_SPECIFIER: "Xcodegen Release" groups: - my_settings ``` -Settings are merged in the following order: groups, base, configs. +Settings are merged in the following order: `groups`, `base`, `configs` (simple maps are ignored). ## Target From 5cad63987e07817afc49a99779ac2c5c15add831 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 27 Apr 2023 16:59:48 +1000 Subject: [PATCH 178/284] Update ProjectSpec.md --- Docs/ProjectSpec.md | 100 +++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 52 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 887f7755c..631a3d7ef 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -1,62 +1,58 @@ # Project Spec -### Index - -- [Project Spec](#project-spec) - - [Index](#index) - - [General](#general) - - [Project](#project) - - [Include](#include) - - [Options](#options) - - [GroupOrdering](#groupordering) - - [FileType](#filetype) - - [Breakpoints](#breakpoints) - - [Breakpoint Action](#breakpoint-action) - - [Configs](#configs) - - [Setting Groups](#setting-groups) - - [Settings](#settings) - - [Target](#target) - - [Product Type](#product-type) - - [Platform](#platform) - - [Sources](#sources) - - [Target Source](#target-source) - - [Dependency](#dependency) - - [Config Files](#config-files) - - [Plist](#plist) - - [Build Script](#build-script) - - [Build Rule](#build-rule) - - [Target Scheme](#target-scheme) - - [Legacy Target](#legacy-target) - - [Aggregate Target](#aggregate-target) - - [Target Template](#target-template) - - [Scheme](#scheme) - - [Build](#build) - - [Common Build Action options](#common-build-action-options) - - [Execution Action](#execution-action) - - [Run Action](#run-action) - - [Test Action](#test-action) - - [Test Target](#test-target) - - [Other Parameters](#other-parameters) - - [Testable Target Reference](#testable-target-reference) - - [Archive Action](#archive-action) - - [Simulate Location](#simulate-location) - - [Scheme Management](#scheme-management) - - [Environment Variable](#environment-variable) - - [Test Plan](#test-plan) - - [Scheme Template](#scheme-template) - - [Swift Package](#swift-package) - - [Remote Package](#remote-package) - - [Local Package](#local-package) - - [Project Reference](#project-reference) - -## General - The project spec can be written in either YAML or JSON. All the examples below use YAML. -Required properties are marked with checkbox. Some of the YAML examples don't show all the required properties. For example not all target examples will have a platform or type, even though they are required. +- [x] required property +- [ ] optional property + +Some of the YAML examples below don't show all the required properties. For example not all target examples will have a platform or type, even though they are required. You can also use environment variables in your configuration file, by using `${SOME_VARIABLE}` in a string. +- [Project](#project) + - [Include](#include) + - [Options](#options) + - [GroupOrdering](#groupordering) + - [FileType](#filetype) + - [Breakpoints](#breakpoints) + - [Breakpoint Action](#breakpoint-action) + - [Configs](#configs) + - [Setting Groups](#setting-groups) +- [Settings](#settings) +- [Target](#target) + - [Product Type](#product-type) + - [Platform](#platform) + - [Sources](#sources) + - [Target Source](#target-source) + - [Dependency](#dependency) + - [Config Files](#config-files) + - [Plist](#plist) + - [Build Script](#build-script) + - [Build Rule](#build-rule) + - [Target Scheme](#target-scheme) + - [Legacy Target](#legacy-target) +- [Aggregate Target](#aggregate-target) +- [Target Template](#target-template) +- [Scheme](#scheme) + - [Build](#build) + - [Common Build Action options](#common-build-action-options) + - [Execution Action](#execution-action) + - [Run Action](#run-action) + - [Test Action](#test-action) + - [Test Target](#test-target) + - [Other Parameters](#other-parameters) + - [Testable Target Reference](#testable-target-reference) + - [Archive Action](#archive-action) + - [Simulate Location](#simulate-location) + - [Scheme Management](#scheme-management) + - [Environment Variable](#environment-variable) + - [Test Plan](#test-plan) +- [Scheme Template](#scheme-template) +- [Swift Package](#swift-package) + - [Remote Package](#remote-package) + - [Local Package](#local-package) +- [Project Reference](#project-reference) + ## Project - [x] **name**: **String** - Name of the generated project From ee60884b132078035d30f9892eb8e3e91ba2382c Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 27 Apr 2023 17:04:40 +1000 Subject: [PATCH 179/284] Update to 2.35.0 --- CHANGELOG.md | 2 ++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 132a3de46..b27bf7226 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.35.0 + ### Added - Added support for shared breakpoints #177 @alexruperez @myihsan diff --git a/Makefile b/Makefile index 857bcb3c9..d6823bc8b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.34.0 +VERSION = 2.35.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 0ed61403b..aad40ba3e 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.34.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.35.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index e983e7953..d4ffcaa83 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.34.0") +let version = Version("2.35.0") let cli = XcodeGenCLI(version: version) cli.execute() From 9766326dcd946012c7c61bf775c5f558b9d9f31e Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Thu, 27 Apr 2023 23:52:06 +0200 Subject: [PATCH 180/284] Display absolute path for invalidBuildScriptPath and invalidTargetConfigFile error print. (#1353) * Display absolute path in invalidBuildScriptPath error print. With previous implementation, the error message was not clear for end user: Spec validation error: Target "Project" has a script "SwiftLint" which has a path that doesn't exist "../../wrong-dir/scripts/run_swiftlint_in_xcode_wrapper.sh" With new implementation with absolute path, it is easier to validate what is wrong with path: Spec validation error: Target "Project" has a script "SwiftLint" which has a path that doesn't exist "/Users/SomeUser/dev/fancy-project/wrong-dir/scripts/run_swiftlint_in_xcode_wrapper.sh" * Display absolute path for invalidTargetConfigFile error print. Without patch: 2 Spec validations errors: - Target "MM" has invalid config file "../../xcodegen/MM/Build/xcconfig/conan_config.xcconfig" for config "Debug" - Target "MM" has invalid config file "../../xcodegen/MM/Build/xcconfig/conan_config.xcconfig" for config "Release" After fix: 2 Spec validations errors: - Target "MM" has invalid config file path "/Users/MyUser/dev/myproject/xcodegen/MM/Build/xcconfig/conan_config.xcconfig" for config "Release" - Target "MM" has invalid config file path "/Users/MyUser/dev/myproject/xcodegen/MM/Build/xcconfig/conan_config.xcconfig" for config "Debug" --- Sources/ProjectSpec/SpecValidation.swift | 7 ++++--- Sources/ProjectSpec/SpecValidationError.swift | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Sources/ProjectSpec/SpecValidation.swift b/Sources/ProjectSpec/SpecValidation.swift index 376c0153f..b449f6c6c 100644 --- a/Sources/ProjectSpec/SpecValidation.swift +++ b/Sources/ProjectSpec/SpecValidation.swift @@ -81,8 +81,9 @@ extension Project { for target in projectTargets { for (config, configFile) in target.configFiles { - if !options.disabledValidations.contains(.missingConfigFiles) && !(basePath + configFile).exists { - errors.append(.invalidTargetConfigFile(target: target.name, configFile: configFile, config: config)) + let configPath = basePath + configFile + if !options.disabledValidations.contains(.missingConfigFiles) && !configPath.exists { + errors.append(.invalidTargetConfigFile(target: target.name, configFile: configPath.string, config: config)) } if !options.disabledValidations.contains(.missingConfigs) && getConfig(config) == nil { errors.append(.invalidConfigFileConfig(config)) @@ -137,7 +138,7 @@ extension Project { if case let .path(pathString) = script.script { let scriptPath = basePath + pathString if !scriptPath.exists { - errors.append(.invalidBuildScriptPath(target: target.name, name: script.name, path: pathString)) + errors.append(.invalidBuildScriptPath(target: target.name, name: script.name, path: scriptPath.string)) } } } diff --git a/Sources/ProjectSpec/SpecValidationError.swift b/Sources/ProjectSpec/SpecValidationError.swift index 8a9832ac0..f0c957ed1 100644 --- a/Sources/ProjectSpec/SpecValidationError.swift +++ b/Sources/ProjectSpec/SpecValidationError.swift @@ -46,7 +46,7 @@ public struct SpecValidationError: Error, CustomStringConvertible { case let .invalidTargetDependency(target, dependency): return "Target \(target.quoted) has invalid dependency: \(dependency.quoted)" case let .invalidTargetConfigFile(target, configFile, config): - return "Target \(target.quoted) has invalid config file \(configFile.quoted) for config \(config.quoted)" + return "Target \(target.quoted) has invalid config file path \(configFile.quoted) for config \(config.quoted)" case let .invalidTargetSource(target, source): return "Target \(target.quoted) has a missing source directory \(source.quoted)" case let .invalidTargetSchemeConfigVariant(target, configVariant, configType): From 372f20fe5a3823dc398f52cb6cc1af5003d452f7 Mon Sep 17 00:00:00 2001 From: Roman Gardukevich Date: Wed, 17 May 2023 04:58:32 +0300 Subject: [PATCH 181/284] Reuse ReferenceProxy references when possible (#1354) * Reuse ReferenceProxy references when possible * Add changelog * Update CHANGELOG.md --------- Co-authored-by: Yonas Kolb --- CHANGELOG.md | 8 +++++- Sources/XcodeGenKit/PBXProjGenerator.swift | 32 ++++++++++++++++------ 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b27bf7226..b4d63b6ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,18 @@ ## Next Version +### Added + +### Fixed + +- Fix external dependencies from being removed by Xcode #1354 @OdNairy + ## 2.35.0 ### Added - Added support for shared breakpoints #177 @alexruperez @myihsan -- Added support for `putResourcesBeforeSourcesBuildPhase` in a target #1351 @mat1th +- Added support for `putResourcesBeforeSourcesBuildPhase` in a target #1351 @mat1th ### Fixed diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 8a3509c5e..6e77c3f8e 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -423,16 +423,32 @@ public class PBXProjGenerator { path = "lib\(tmpPath)" } - let productReferenceProxy = addObject( - PBXReferenceProxy( - fileType: targetObject.productNameWithExtension().flatMap { Xcode.fileType(path: Path($0)) }, - path: path, - remote: productProxy, - sourceTree: .buildProductsDir + let productReferenceProxyFileType = targetObject.productNameWithExtension() + .flatMap { Xcode.fileType(path: Path($0)) } + + let existingValue = self.pbxProj.referenceProxies.first { referenceProxy in + referenceProxy.path == path && + referenceProxy.remote == productProxy && + referenceProxy.sourceTree == .buildProductsDir && + referenceProxy.fileType == productReferenceProxyFileType + } + + let productReferenceProxy: PBXReferenceProxy + if let existingValue = existingValue { + productReferenceProxy = existingValue + } else { + productReferenceProxy = addObject( + PBXReferenceProxy( + fileType: productReferenceProxyFileType, + path: path, + remote: productProxy, + sourceTree: .buildProductsDir + ) ) - ) - productsGroup.children.append(productReferenceProxy) + productsGroup.children.append(productReferenceProxy) + } + let targetDependency = addObject( PBXTargetDependency( From f33d600d50690eb3fc251410edf9abc92632d4f4 Mon Sep 17 00:00:00 2001 From: LouisLWang <243847996@qq.com> Date: Thu, 13 Jul 2023 18:58:32 +0800 Subject: [PATCH 182/284] adding support for enableGPUValidationMode (#1294) * adding support for enableGPUValidationMode * encode enableGPUValidationMode in Scheme.Run.toJSONValue() * ci: commit fixtures changes * docs: Add changelog for enableGPUValidationMode update Doc ProjectSpec.md * docs: update ProjectSpec.md for enableGPUValidationMode default value --------- Co-authored-by: wanglulu --- Docs/ProjectSpec.md | 1 + Sources/ProjectSpec/Scheme.swift | 38 +++++++++++++++++++ Sources/XcodeGenKit/SchemeGenerator.swift | 1 + .../xcschemes/App_Scheme.xcscheme | 1 + Tests/Fixtures/TestProject/project.yml | 1 + 5 files changed, 42 insertions(+) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 631a3d7ef..4247a9f86 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -933,6 +933,7 @@ The different actions share some properties: - [ ] **postActions**: **[[Execution Action](#execution-action)]** - Scripts that are run *after* the action - [ ] **environmentVariables**: **[[Environment Variable](#environment-variable)]** or **[String:String]** - `run`, `test` and `profile` actions can define the environment variables. When passing a dictionary, every key-value entry maps to a corresponding variable that is enabled. - [ ] **enableGPUFrameCaptureMode**: **GPUFrameCaptureMode** - Property value set for `GPU Frame Capture`. Possible values are `autoEnabled`, `metal`, `openGL`, `disabled`. Default is `autoEnabled`. +- [ ] **enableGPUValidationMode**: **GPUValidationMode** - Property value set for `Metal API Validation`. Possible values are `enabled`, `disabled`, `extended`. Default is `enabled`. - [ ] **disableMainThreadChecker**: **Bool** - `run` and `test` actions can define a boolean that indicates that 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 - [ ] **language**: **String** - `run` and `test` actions can define a language that is used for Application Language diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index 104fb35ff..0a2aa6473 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -135,6 +135,7 @@ public struct Scheme: Equatable { public var postActions: [ExecutionAction] public var environmentVariables: [XCScheme.EnvironmentVariable] public var enableGPUFrameCaptureMode: XCScheme.LaunchAction.GPUFrameCaptureMode + public var enableGPUValidationMode: XCScheme.LaunchAction.GPUValidationMode public var disableMainThreadChecker: Bool public var stopOnEveryMainThreadCheckerIssue: Bool public var language: String? @@ -156,6 +157,7 @@ public struct Scheme: Equatable { postActions: [ExecutionAction] = [], environmentVariables: [XCScheme.EnvironmentVariable] = [], enableGPUFrameCaptureMode: XCScheme.LaunchAction.GPUFrameCaptureMode = XCScheme.LaunchAction.defaultGPUFrameCaptureMode, + enableGPUValidationMode: XCScheme.LaunchAction.GPUValidationMode = XCScheme.LaunchAction.GPUValidationMode.enabled, disableMainThreadChecker: Bool = disableMainThreadCheckerDefault, stopOnEveryMainThreadCheckerIssue: Bool = stopOnEveryMainThreadCheckerIssueDefault, language: String? = nil, @@ -175,6 +177,7 @@ public struct Scheme: Equatable { self.environmentVariables = environmentVariables self.disableMainThreadChecker = disableMainThreadChecker self.enableGPUFrameCaptureMode = enableGPUFrameCaptureMode + self.enableGPUValidationMode = enableGPUValidationMode self.stopOnEveryMainThreadCheckerIssue = stopOnEveryMainThreadCheckerIssue self.language = language self.region = region @@ -470,6 +473,11 @@ extension Scheme.Run: JSONObjectConvertible { } else { enableGPUFrameCaptureMode = XCScheme.LaunchAction.defaultGPUFrameCaptureMode } + if let gpuValidationMode: String = jsonDictionary.json(atKeyPath: "enableGPUValidationMode") { + enableGPUValidationMode = XCScheme.LaunchAction.GPUValidationMode.fromJSONValue(gpuValidationMode) + } else { + enableGPUValidationMode = XCScheme.LaunchAction.defaultGPUValidationMode + } disableMainThreadChecker = jsonDictionary.json(atKeyPath: "disableMainThreadChecker") ?? Scheme.Run.disableMainThreadCheckerDefault stopOnEveryMainThreadCheckerIssue = jsonDictionary.json(atKeyPath: "stopOnEveryMainThreadCheckerIssue") ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault language = jsonDictionary.json(atKeyPath: "language") @@ -514,6 +522,10 @@ extension Scheme.Run: JSONEncodable { if enableGPUFrameCaptureMode != XCScheme.LaunchAction.defaultGPUFrameCaptureMode { dict["enableGPUFrameCaptureMode"] = enableGPUFrameCaptureMode.toJSONValue() } + + if enableGPUValidationMode != XCScheme.LaunchAction.defaultGPUValidationMode { + dict["enableGPUValidationMode"] = enableGPUValidationMode.toJSONValue() + } if disableMainThreadChecker != Scheme.Run.disableMainThreadCheckerDefault { dict["disableMainThreadChecker"] = disableMainThreadChecker @@ -962,3 +974,29 @@ extension XCScheme.LaunchAction.GPUFrameCaptureMode: JSONEncodable { } } } + +extension XCScheme.LaunchAction.GPUValidationMode: JSONEncodable { + public func toJSONValue() -> Any { + switch self { + case .enabled: + return "enabled" + case .disabled: + return "disabled" + case .extended: + return "extended" + } + } + + static func fromJSONValue(_ string: String) -> XCScheme.LaunchAction.GPUValidationMode { + switch string { + case "enabled": + return .enabled + case "disabled": + return .disabled + case "extended": + return .extended + default: + fatalError("Invalid enableGPUValidationMode value. Valid values are: enable, disable, extended") + } + } +} diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 583c57aa3..acfd5d375 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -341,6 +341,7 @@ public class SchemeGenerator { allowLocationSimulation: allowLocationSimulation, locationScenarioReference: locationScenarioReference, enableGPUFrameCaptureMode: scheme.run?.enableGPUFrameCaptureMode ?? XCScheme.LaunchAction.defaultGPUFrameCaptureMode, + enableGPUValidationMode: scheme.run?.enableGPUValidationMode ?? XCScheme.LaunchAction.defaultGPUValidationMode, disableMainThreadChecker: scheme.run?.disableMainThreadChecker ?? Scheme.Run.disableMainThreadCheckerDefault, stopOnEveryMainThreadCheckerIssue: scheme.run?.stopOnEveryMainThreadCheckerIssue ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault, commandlineArguments: launchCommandLineArgs, diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme index 529d76e38..2fe45e211 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme @@ -88,6 +88,7 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" enableGPUFrameCaptureMode = "3" + enableGPUValidationMode = "1" allowLocationSimulation = "YES"> diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 5cb716952..8e3ee2351 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -478,6 +478,7 @@ schemes: defaultLocation: Honolulu, HI, USA customLLDBInit: ${SRCROOT}/.lldbinit enableGPUFrameCaptureMode: "disabled" + enableGPUValidationMode: "disabled" storeKitConfiguration: "App_iOS/Configuration.storekit" macroExpansion: App_iOS test: From a9ed3cec0800ac9a8b4cd5cfb0bb3ee76429a22c Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 13 Jul 2023 21:00:16 +1000 Subject: [PATCH 183/284] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4d63b6ff..da7c32415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Added +- Added `scheme.enableGPUValidationMode` #1294 @LouisLWang + ### Fixed - Fix external dependencies from being removed by Xcode #1354 @OdNairy From af1adfe1cddaac0fc6be0ad50b79f6227900fa18 Mon Sep 17 00:00:00 2001 From: Oleg Barenboim Date: Mon, 24 Jul 2023 21:25:04 -0400 Subject: [PATCH 184/284] Update README for Xcode version (#1376) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aad40ba3e..115c0bf38 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ A project would be created with 2 connected targets, with all the required confi ## Installing -Make sure Xcode 11 is installed first. +Make sure the latest stable (non-beta) version of Xcode is installed first. ### [Mint](https://github.com/yonaskolb/mint) ```sh From 98ce05105bf40f85bf6e15fe9f8fabce3de6d76d Mon Sep 17 00:00:00 2001 From: Liam Nichols Date: Wed, 26 Jul 2023 14:52:43 +0200 Subject: [PATCH 185/284] Don't add `PBXContainerItemProxy` when reusing `PBXReferenceProxy` (#1377) * Reproduce issue in FixtureTests * Don't add PBXContainerItemProxy if existing PBXReferenceProxy was reused * Move extenral target fixture to an iOS target so that it actually compiles * Update CHANGELOG.md --- CHANGELOG.md | 3 ++- Sources/XcodeGenKit/PBXProjGenerator.swift | 13 ++++++------- .../Project.xcodeproj/project.pbxproj | 17 +++++++++++++++++ Tests/Fixtures/TestProject/project.yml | 1 + 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da7c32415..ab03984e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,11 @@ ### Added - Added `scheme.enableGPUValidationMode` #1294 @LouisLWang - + ### Fixed - Fix external dependencies from being removed by Xcode #1354 @OdNairy +- Stop creating orphaned object references when reusing references to external dependencies #1377 @liamnichols ## 2.35.0 diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 6e77c3f8e..9ad0c918d 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -407,13 +407,11 @@ public class PBXProjGenerator { ) ) - let productProxy = addObject( - PBXContainerItemProxy( - containerPortal: .fileReference(projectFileReference), - remoteGlobalID: targetObject.product.flatMap(PBXContainerItemProxy.RemoteGlobalID.object), - proxyType: .reference, - remoteInfo: target - ) + let productProxy = PBXContainerItemProxy( + containerPortal: .fileReference(projectFileReference), + remoteGlobalID: targetObject.product.flatMap(PBXContainerItemProxy.RemoteGlobalID.object), + proxyType: .reference, + remoteInfo: target ) var path = targetObject.productNameWithExtension() @@ -437,6 +435,7 @@ public class PBXProjGenerator { if let existingValue = existingValue { productReferenceProxy = existingValue } else { + addObject(productProxy) productReferenceProxy = addObject( PBXReferenceProxy( fileType: productReferenceProxyFileType, diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 8d52e4a3d..b8637f822 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -72,6 +72,7 @@ 3788E1382B38DF4ACE3D2BB1 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3BBCA6F76E5F212E9C55FB78 /* BundleX.bundle in Copy Bundle Resources */ = {isa = PBXBuildFile; fileRef = 45C12576F5AA694DD0CE2132 /* BundleX.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 3C5134EE524310ACF7B7CD6E /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CAF6C55B555E3E1352645B6 /* ExtensionDelegate.swift */; }; + 3DF22C477446669094AC7C8C /* ExternalTarget.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F6ADE654A3459AFDA2CC0CD3 /* ExternalTarget.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 447D59BE2E0993D7245EA247 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3797E591F302ECC0AA2FC607 /* Assets.xcassets */; }; 45E6702CD9C088FF1FC25F34 /* App_watchOS.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = A680BE9F68A255B0FB291AE6 /* App_watchOS.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 470D3493CDBFE56E2083A5FD /* BundleY.bundle in Copy Bundle Resources */ = {isa = PBXBuildFile; fileRef = E3958AB20082EA12D4D5E60C /* BundleY.bundle */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; @@ -165,6 +166,7 @@ CCA17097382757012B58C17C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1BC32A813B80A53962A1F365 /* Assets.xcassets */; }; D058D241BDF5FB0C919BBECA /* CrossOverlayFramework.swiftcrossimport in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8DD7A61B07AD2F91BDECC255 /* CrossOverlayFramework.swiftcrossimport */; }; D5458D67C3596943114C3205 /* Standalone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F5BD97AF0F94A15A5B7DDB7 /* Standalone.swift */; }; + D5D493E4A7AD63860E1399DD /* ExternalTarget.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6ADE654A3459AFDA2CC0CD3 /* ExternalTarget.framework */; }; D61BEABD5B26B2DE67D0C2EC /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; D62AB3A85B32F353ABBD57BC /* iMessageExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = D629E142AB87C681D4EC90F7 /* iMessageExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; D8ED40ED61AD912385CFF5F0 /* StaticLibrary_ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D0C79A8C750EC0DE748C463 /* StaticLibrary_ObjC.m */; }; @@ -366,6 +368,13 @@ remoteGlobalIDString = 0867B0DACEF28C11442DE8F7; remoteInfo = App_iOS; }; + CA16090DFCA7842CB4E20265 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F192E783CCA898FBAA5C34EA /* AnotherProject */; + proxyType = 1; + remoteGlobalIDString = E76A5F5E363E470416D3B487; + remoteInfo = ExternalTarget; + }; CB8F4B3FDD84A2A6F3CA7F4C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0FBAE303E3CFC2ABAC876A77 /* Project object */; @@ -552,6 +561,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + 3DF22C477446669094AC7C8C /* ExternalTarget.framework in Embed Frameworks */, 9C92B7C89E5F0A10A34F5AA4 /* Framework.framework in Embed Frameworks */, ); name = "Embed Frameworks"; @@ -970,6 +980,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D5D493E4A7AD63860E1399DD /* ExternalTarget.framework in Frameworks */, A1588BF3BFFE1DF7409CBA10 /* Framework.framework in Frameworks */, 65EBD2D87F1F5FDA63F8C027 /* Result.framework in Frameworks */, 71A2AAC5934BDC9EDB6F0D9E /* libStaticLibrary_ObjC.a in Frameworks */, @@ -2240,6 +2251,7 @@ buildRules = ( ); dependencies = ( + FD2D68EC95DC231C4007FB08 /* PBXTargetDependency */, BE9300E427142E634A8A91B8 /* PBXTargetDependency */, CFEACC1CED73B52EA1CCD054 /* PBXTargetDependency */, ); @@ -3207,6 +3219,11 @@ target = AD28397BCC984F769EE8A937 /* NetworkSystemExtension */; targetProxy = D4A7C57F6272F44F2E69A5DB /* PBXContainerItemProxy */; }; + FD2D68EC95DC231C4007FB08 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = ExternalTarget; + targetProxy = CA16090DFCA7842CB4E20265 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 8e3ee2351..67138ddbb 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -421,6 +421,7 @@ targets: dependencies: - target: Framework_iOS - target: StaticLibrary_ObjC_iOS + - target: AnotherProject/ExternalTarget scheme: testTargets: - App_Clip_Tests From 49a9bda9925b4df5b87db912d84c10c418912bb8 Mon Sep 17 00:00:00 2001 From: Liam Nichols Date: Thu, 27 Jul 2023 03:03:31 +0200 Subject: [PATCH 186/284] Update CI Workflows to also test Xcode 14.3.1 (#1378) * Update Xcode 13.0 to 13.4.1, add job for Xcode 14.3.1 * Set DEVELOPER_DIR env to simplify changing Xcode version * Update Carthage workarounds for Xcode 14 --- .github/workflows/ci.yml | 22 +++++++++---------- .../TestProject/carthage_dynamic.xcconfig | 7 +++++- .../TestProject/carthage_static.xcconfig | 8 ++++++- Tests/Fixtures/TestProject/fixtures.xcconfig | 2 +- ... => xcode12_13_and_14_workaround.xcconfig} | 1 + 5 files changed, 26 insertions(+), 14 deletions(-) rename Tests/Fixtures/TestProject/{xcode12_and_13_workaround.xcconfig => xcode12_13_and_14_workaround.xcconfig} (80%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39508bc5b..9894a16b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,22 +4,22 @@ on: pull_request: {} jobs: run: - runs-on: macos-11 + runs-on: ${{ matrix.macos }} name: Xcode ${{ matrix.xcode }} strategy: matrix: - xcode: ["12.5.1", "13.0"] + xcode: ["12.5.1", "13.4.1", "14.3.1"] + include: + - xcode: "12.5.1" + macos: macos-11 + - xcode: "13.4.1" + macos: macos-12 + - xcode: "14.3.1" + macos: macos-13 + env: + DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer steps: - uses: actions/checkout@master - - name: Set Xcode - run: | - echo "Available Xcode versions:" - ls /Applications | grep Xcode - echo "Choosing Xcode_${{ matrix.xcode }}.app" - sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app - xcodebuild -version - swift --version - swift package --version - name: Resolve run: swift package resolve - name: Build diff --git a/Tests/Fixtures/TestProject/carthage_dynamic.xcconfig b/Tests/Fixtures/TestProject/carthage_dynamic.xcconfig index fc72c48c0..c21ace608 100644 --- a/Tests/Fixtures/TestProject/carthage_dynamic.xcconfig +++ b/Tests/Fixtures/TestProject/carthage_dynamic.xcconfig @@ -1 +1,6 @@ -#include "xcode12_and_13_workaround.xcconfig" +#include "xcode12_13_and_14_workaround.xcconfig" + +IPHONEOS_DEPLOYMENT_TARGET=14.0 +MACOSX_DEPLOYMENT_TARGET=10.15 +TVOS_DEPLOYMENT_TARGET=14.0 +WATCHOS_DEPLOYMENT_TARGET=7.0 diff --git a/Tests/Fixtures/TestProject/carthage_static.xcconfig b/Tests/Fixtures/TestProject/carthage_static.xcconfig index f1b875b96..86bcfeba6 100644 --- a/Tests/Fixtures/TestProject/carthage_static.xcconfig +++ b/Tests/Fixtures/TestProject/carthage_static.xcconfig @@ -1,2 +1,8 @@ -#include "xcode12_and_13_workaround.xcconfig" +#include "xcode12_13_and_14_workaround.xcconfig" + MACH_O_TYPE = staticlib + +IPHONEOS_DEPLOYMENT_TARGET=14.0 +MACOSX_DEPLOYMENT_TARGET=10.15 +TVOS_DEPLOYMENT_TARGET=14.0 +WATCHOS_DEPLOYMENT_TARGET=7.0 diff --git a/Tests/Fixtures/TestProject/fixtures.xcconfig b/Tests/Fixtures/TestProject/fixtures.xcconfig index 8f9d84d4c..c272c840f 100644 --- a/Tests/Fixtures/TestProject/fixtures.xcconfig +++ b/Tests/Fixtures/TestProject/fixtures.xcconfig @@ -1,4 +1,4 @@ -#include "xcode12_and_13_workaround.xcconfig" +#include "xcode12_13_and_14_workaround.xcconfig" // Common settings for fixtures CODE_SIGN_IDENTITY = diff --git a/Tests/Fixtures/TestProject/xcode12_and_13_workaround.xcconfig b/Tests/Fixtures/TestProject/xcode12_13_and_14_workaround.xcconfig similarity index 80% rename from Tests/Fixtures/TestProject/xcode12_and_13_workaround.xcconfig rename to Tests/Fixtures/TestProject/xcode12_13_and_14_workaround.xcconfig index d89990040..1622037ab 100644 --- a/Tests/Fixtures/TestProject/xcode12_and_13_workaround.xcconfig +++ b/Tests/Fixtures/TestProject/xcode12_13_and_14_workaround.xcconfig @@ -7,4 +7,5 @@ EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8 EXCLUDED_ARCHS_1200=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)) EXCLUDED_ARCHS_1300=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)) +EXCLUDED_ARCHS_1400=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)) EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS_$(XCODE_VERSION_MAJOR)) From 3a215ce9996abf113d63f7d63249632c49de2c5c Mon Sep 17 00:00:00 2001 From: Satsuki Hashiba Date: Mon, 7 Aug 2023 21:12:34 +0900 Subject: [PATCH 187/284] Add support for visionOS (#1379) * Add support for visionOS * Update ProjectSpec * Add carthageName property for .visionOS * Update CHANGELOG.md and ProjectSpec.md * Add visionOS yml to SettingPresets/Platforms and SettingPresets/Product_Platform --------- Co-authored-by: Satsuki Hashiba --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 1 + SettingPresets/Platforms/visionOS.yml | 2 ++ .../Product_Platform/application_visionOS.yml | 1 + Sources/ProjectSpec/DeploymentTarget.swift | 10 +++++++++- Sources/ProjectSpec/Platform.swift | 1 + Sources/ProjectSpec/XCProjExtensions.swift | 1 + Sources/XcodeGenKit/CarthageDependencyResolver.swift | 3 +++ Sources/XcodeGenKit/PBXProjGenerator.swift | 2 +- 9 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 SettingPresets/Platforms/visionOS.yml create mode 100644 SettingPresets/Product_Platform/application_visionOS.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index ab03984e2..e4760ef99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added - Added `scheme.enableGPUValidationMode` #1294 @LouisLWang +- Added visionOS support #1379 @shiba1014 ### Fixed diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 4247a9f86..e2fd07318 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -434,6 +434,7 @@ This will provide default build settings for a certain platform. It can be any o - `macOS` - `tvOS` - `watchOS` +- `visionOS` (`visionOS` doesn't support Carthage usage) **Multi Platform targets** diff --git a/SettingPresets/Platforms/visionOS.yml b/SettingPresets/Platforms/visionOS.yml new file mode 100644 index 000000000..5f2e52201 --- /dev/null +++ b/SettingPresets/Platforms/visionOS.yml @@ -0,0 +1,2 @@ +SDKROOT: xros +TARGETED_DEVICE_FAMILY: 7 diff --git a/SettingPresets/Product_Platform/application_visionOS.yml b/SettingPresets/Product_Platform/application_visionOS.yml new file mode 100644 index 000000000..e538b2380 --- /dev/null +++ b/SettingPresets/Product_Platform/application_visionOS.yml @@ -0,0 +1 @@ +ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon diff --git a/Sources/ProjectSpec/DeploymentTarget.swift b/Sources/ProjectSpec/DeploymentTarget.swift index 958380313..d3c9e3f79 100644 --- a/Sources/ProjectSpec/DeploymentTarget.swift +++ b/Sources/ProjectSpec/DeploymentTarget.swift @@ -8,17 +8,20 @@ public struct DeploymentTarget: Equatable { public var tvOS: Version? public var watchOS: Version? public var macOS: Version? + public var visionOS: Version? public init( iOS: Version? = nil, tvOS: Version? = nil, watchOS: Version? = nil, - macOS: Version? = nil + macOS: Version? = nil, + visionOS: Version? = nil ) { self.iOS = iOS self.tvOS = tvOS self.watchOS = watchOS self.macOS = macOS + self.visionOS = visionOS } public func version(for platform: Platform) -> Version? { @@ -27,6 +30,7 @@ public struct DeploymentTarget: Equatable { case .tvOS: return tvOS case .watchOS: return watchOS case .macOS: return macOS + case .visionOS: return visionOS } } } @@ -39,6 +43,7 @@ extension Platform { case .tvOS: return "TVOS_DEPLOYMENT_TARGET" case .watchOS: return "WATCHOS_DEPLOYMENT_TARGET" case .macOS: return "MACOSX_DEPLOYMENT_TARGET" + case .visionOS: return "XROS_DEPLOYMENT_TARGET" } } @@ -48,6 +53,7 @@ extension Platform { case .tvOS: return "appletvos" case .watchOS: return "watchos" case .macOS: return "macosx" + case .visionOS: return "xros" } } } @@ -77,6 +83,7 @@ extension DeploymentTarget: JSONObjectConvertible { tvOS = try parseVersion("tvOS") watchOS = try parseVersion("watchOS") macOS = try parseVersion("macOS") + visionOS = try parseVersion("visionOS") } } @@ -87,6 +94,7 @@ extension DeploymentTarget: JSONEncodable { "tvOS": tvOS?.description, "watchOS": watchOS?.description, "macOS": macOS?.description, + "visionOS": visionOS?.description, ] } } diff --git a/Sources/ProjectSpec/Platform.swift b/Sources/ProjectSpec/Platform.swift index f3652de8b..69a976f17 100644 --- a/Sources/ProjectSpec/Platform.swift +++ b/Sources/ProjectSpec/Platform.swift @@ -5,4 +5,5 @@ public enum Platform: String, Hashable, CaseIterable { case watchOS case tvOS case macOS + case visionOS } diff --git a/Sources/ProjectSpec/XCProjExtensions.swift b/Sources/ProjectSpec/XCProjExtensions.swift index 2ec652a60..bbb3247ea 100644 --- a/Sources/ProjectSpec/XCProjExtensions.swift +++ b/Sources/ProjectSpec/XCProjExtensions.swift @@ -86,6 +86,7 @@ extension Platform { case .watchOS: return "⌚️" case .tvOS: return "📺" case .macOS: return "🖥" + case .visionOS: return "🕶️" } } } diff --git a/Sources/XcodeGenKit/CarthageDependencyResolver.swift b/Sources/XcodeGenKit/CarthageDependencyResolver.swift index ac4588fb7..8fcb6e462 100644 --- a/Sources/XcodeGenKit/CarthageDependencyResolver.swift +++ b/Sources/XcodeGenKit/CarthageDependencyResolver.swift @@ -159,6 +159,9 @@ extension Platform { return "watchOS" case .macOS: return "Mac" + case .visionOS: + // This is a dummy value because Carthage doesn't support visionOS. + return "visionOS" } } } diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 9ad0c918d..686bc99c5 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -1561,7 +1561,7 @@ extension Platform { /// - returns: `true` for platforms that the app store requires simulator slices to be stripped. public var requiresSimulatorStripping: Bool { switch self { - case .iOS, .tvOS, .watchOS: + case .iOS, .tvOS, .watchOS, .visionOS: return true case .macOS: return false From c7ae369c141d046220554c0b0c8b473b11cb6a2c Mon Sep 17 00:00:00 2001 From: Leonardo Oliveira Date: Mon, 7 Aug 2023 19:49:33 -0300 Subject: [PATCH 188/284] Updates project object version to support `BuildIndependentTargetsInParallel` setting (#1368) * feat: updates project object version * updates CHANGELOG.md with PR changes --- CHANGELOG.md | 4 ++++ Sources/XcodeGenKit/Version.swift | 2 +- .../CarthageProject/Project.xcodeproj/project.pbxproj | 2 +- Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj | 2 +- .../AnotherProject/AnotherProject.xcodeproj/project.pbxproj | 2 +- Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj | 2 +- .../scheme_test/TestProject.xcodeproj/project.pbxproj | 2 +- 7 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4760ef99..c428ad6ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ - Added `scheme.enableGPUValidationMode` #1294 @LouisLWang - Added visionOS support #1379 @shiba1014 +### Changed + +- The project object version has been updated for Xcode 14.3 #1368 @leonardorock + ### Fixed - Fix external dependencies from being removed by Xcode #1354 @OdNairy diff --git a/Sources/XcodeGenKit/Version.swift b/Sources/XcodeGenKit/Version.swift index fe1b24af8..c36a39925 100644 --- a/Sources/XcodeGenKit/Version.swift +++ b/Sources/XcodeGenKit/Version.swift @@ -16,7 +16,7 @@ extension Project { } var objectVersion: UInt { - 51 + 54 } } diff --git a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj index b99951bd2..375205ca0 100644 --- a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index 9efdbfe4f..9e09f0f16 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ diff --git a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj index 6813fe75d..28b0f31b4 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXFileReference section */ diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index b8637f822..66a3271ea 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXAggregateTarget section */ diff --git a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj index 5d7c40ebc..936eca4dd 100644 --- a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXFileReference section */ From a10bd4baa0ef8d7ab40cc7fe3d3e60c544e0033e Mon Sep 17 00:00:00 2001 From: Antoine Piellard Date: Tue, 8 Aug 2023 00:50:13 +0200 Subject: [PATCH 189/284] Add support to disable "Thread Performance Checker" (#1380) * Add disableThreadPerformanceChecker scheme option * Update changelog --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 2 ++ Sources/ProjectSpec/Scheme.swift | 9 +++++++++ Sources/ProjectSpec/TargetScheme.swift | 9 +++++++++ Sources/XcodeGenKit/SchemeGenerator.swift | 2 ++ Tests/ProjectSpecTests/ProjectSpecTests.swift | 2 ++ Tests/ProjectSpecTests/SpecLoadingTests.swift | 4 ++++ 7 files changed, 29 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c428ad6ed..0eb06b568 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Added `scheme.enableGPUValidationMode` #1294 @LouisLWang - Added visionOS support #1379 @shiba1014 +- Added ability to disable Thread performance checker in Schemes #1380 @piellarda ### Changed diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index e2fd07318..16263d822 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -786,6 +786,7 @@ This is a convenience used to automatically generate schemes for a target based - [ ] **coverageTargets**: **[[Testable Target Reference](#testable-target-reference) - a list of targets to gather code coverage. Each entry can either be a simple string, a string using [Project Reference](#project-reference) or [Testable Target Reference](#testable-target-reference) - [ ] **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 +- [ ] **disableThreadPerformanceChecker**: **Bool** - a boolean that indicates if this scheme should disable the Thread Performance Checker. 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. - [ ] **language**: **String** - a String that indicates the language used for running and testing. This defaults to nil - [ ] **region**: **String** - a String that indicates the region used for running and testing. This defaults to nil @@ -937,6 +938,7 @@ The different actions share some properties: - [ ] **enableGPUValidationMode**: **GPUValidationMode** - Property value set for `Metal API Validation`. Possible values are `enabled`, `disabled`, `extended`. Default is `enabled`. - [ ] **disableMainThreadChecker**: **Bool** - `run` and `test` actions can define a boolean that indicates that 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 +- [ ] **disableThreadPerformanceChecker**: **Bool** - `run` action can define a boolean that indicates that this scheme should disable the Thread Performance Checker. This defaults to false - [ ] **language**: **String** - `run` and `test` actions can define a language that is used for Application Language - [ ] **region**: **String** - `run` and `test` actions can define a language that is used for Application Region - [ ] **debugEnabled**: **Bool** - `run` and `test` actions can define a whether debugger should be used. This defaults to true. diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index 0a2aa6473..db6aca739 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -127,6 +127,7 @@ public struct Scheme: Equatable { public struct Run: BuildAction { public static let disableMainThreadCheckerDefault = false public static let stopOnEveryMainThreadCheckerIssueDefault = false + public static let disableThreadPerformanceCheckerDefault = false public static let debugEnabledDefault = true public var config: String? @@ -138,6 +139,7 @@ public struct Scheme: Equatable { public var enableGPUValidationMode: XCScheme.LaunchAction.GPUValidationMode public var disableMainThreadChecker: Bool public var stopOnEveryMainThreadCheckerIssue: Bool + public var disableThreadPerformanceChecker: Bool public var language: String? public var region: String? public var askForAppToLaunch: Bool? @@ -160,6 +162,7 @@ public struct Scheme: Equatable { enableGPUValidationMode: XCScheme.LaunchAction.GPUValidationMode = XCScheme.LaunchAction.GPUValidationMode.enabled, disableMainThreadChecker: Bool = disableMainThreadCheckerDefault, stopOnEveryMainThreadCheckerIssue: Bool = stopOnEveryMainThreadCheckerIssueDefault, + disableThreadPerformanceChecker: Bool = disableThreadPerformanceCheckerDefault, language: String? = nil, region: String? = nil, askForAppToLaunch: Bool? = nil, @@ -179,6 +182,7 @@ public struct Scheme: Equatable { self.enableGPUFrameCaptureMode = enableGPUFrameCaptureMode self.enableGPUValidationMode = enableGPUValidationMode self.stopOnEveryMainThreadCheckerIssue = stopOnEveryMainThreadCheckerIssue + self.disableThreadPerformanceChecker = disableThreadPerformanceChecker self.language = language self.region = region self.askForAppToLaunch = askForAppToLaunch @@ -480,6 +484,7 @@ extension Scheme.Run: JSONObjectConvertible { } disableMainThreadChecker = jsonDictionary.json(atKeyPath: "disableMainThreadChecker") ?? Scheme.Run.disableMainThreadCheckerDefault stopOnEveryMainThreadCheckerIssue = jsonDictionary.json(atKeyPath: "stopOnEveryMainThreadCheckerIssue") ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault + disableThreadPerformanceChecker = jsonDictionary.json(atKeyPath: "disableThreadPerformanceChecker") ?? Scheme.Run.disableThreadPerformanceCheckerDefault language = jsonDictionary.json(atKeyPath: "language") region = jsonDictionary.json(atKeyPath: "region") debugEnabled = jsonDictionary.json(atKeyPath: "debugEnabled") ?? Scheme.Run.debugEnabledDefault @@ -535,6 +540,10 @@ extension Scheme.Run: JSONEncodable { dict["stopOnEveryMainThreadCheckerIssue"] = stopOnEveryMainThreadCheckerIssue } + if disableThreadPerformanceChecker != Scheme.Run.disableThreadPerformanceCheckerDefault { + dict["disableThreadPerformanceChecker"] = disableThreadPerformanceChecker + } + if debugEnabled != Scheme.Run.debugEnabledDefault { dict["debugEnabled"] = debugEnabled } diff --git a/Sources/ProjectSpec/TargetScheme.swift b/Sources/ProjectSpec/TargetScheme.swift index a19e214f5..967417b55 100644 --- a/Sources/ProjectSpec/TargetScheme.swift +++ b/Sources/ProjectSpec/TargetScheme.swift @@ -6,6 +6,7 @@ public struct TargetScheme: Equatable { public static let gatherCoverageDataDefault = false public static let disableMainThreadCheckerDefault = false public static let stopOnEveryMainThreadCheckerIssueDefault = false + public static let disableThreadPerformanceCheckerDefault = false public static let buildImplicitDependenciesDefault = true public var testTargets: [Scheme.Test.TestTarget] @@ -17,6 +18,7 @@ public struct TargetScheme: Equatable { public var region: String? public var disableMainThreadChecker: Bool public var stopOnEveryMainThreadCheckerIssue: Bool + public var disableThreadPerformanceChecker: Bool public var buildImplicitDependencies: Bool public var commandLineArguments: [String: Bool] public var environmentVariables: [XCScheme.EnvironmentVariable] @@ -36,6 +38,7 @@ public struct TargetScheme: Equatable { region: String? = nil, disableMainThreadChecker: Bool = disableMainThreadCheckerDefault, stopOnEveryMainThreadCheckerIssue: Bool = stopOnEveryMainThreadCheckerIssueDefault, + disableThreadPerformanceChecker: Bool = disableThreadPerformanceCheckerDefault, buildImplicitDependencies: Bool = buildImplicitDependenciesDefault, commandLineArguments: [String: Bool] = [:], environmentVariables: [XCScheme.EnvironmentVariable] = [], @@ -53,6 +56,7 @@ public struct TargetScheme: Equatable { self.region = region self.disableMainThreadChecker = disableMainThreadChecker self.stopOnEveryMainThreadCheckerIssue = stopOnEveryMainThreadCheckerIssue + self.disableThreadPerformanceChecker = disableThreadPerformanceChecker self.buildImplicitDependencies = buildImplicitDependencies self.commandLineArguments = commandLineArguments self.environmentVariables = environmentVariables @@ -104,6 +108,7 @@ extension TargetScheme: JSONObjectConvertible { region = jsonDictionary.json(atKeyPath: "region") disableMainThreadChecker = jsonDictionary.json(atKeyPath: "disableMainThreadChecker") ?? TargetScheme.disableMainThreadCheckerDefault stopOnEveryMainThreadCheckerIssue = jsonDictionary.json(atKeyPath: "stopOnEveryMainThreadCheckerIssue") ?? TargetScheme.stopOnEveryMainThreadCheckerIssueDefault + disableThreadPerformanceChecker = jsonDictionary.json(atKeyPath: "disableThreadPerformanceChecker") ?? TargetScheme.disableThreadPerformanceCheckerDefault buildImplicitDependencies = jsonDictionary.json(atKeyPath: "buildImplicitDependencies") ?? TargetScheme.buildImplicitDependenciesDefault commandLineArguments = jsonDictionary.json(atKeyPath: "commandLineArguments") ?? [:] environmentVariables = try XCScheme.EnvironmentVariable.parseAll(jsonDictionary: jsonDictionary) @@ -142,6 +147,10 @@ extension TargetScheme: JSONEncodable { dict["stopOnEveryMainThreadCheckerIssue"] = stopOnEveryMainThreadCheckerIssue } + if disableThreadPerformanceChecker != TargetScheme.disableThreadPerformanceCheckerDefault { + dict["disableThreadPerformanceChecker"] = disableThreadPerformanceChecker + } + if buildImplicitDependencies != TargetScheme.buildImplicitDependenciesDefault { dict["buildImplicitDependencies"] = buildImplicitDependencies } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index acfd5d375..1f2a08105 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -343,6 +343,7 @@ public class SchemeGenerator { enableGPUFrameCaptureMode: scheme.run?.enableGPUFrameCaptureMode ?? XCScheme.LaunchAction.defaultGPUFrameCaptureMode, enableGPUValidationMode: scheme.run?.enableGPUValidationMode ?? XCScheme.LaunchAction.defaultGPUValidationMode, disableMainThreadChecker: scheme.run?.disableMainThreadChecker ?? Scheme.Run.disableMainThreadCheckerDefault, + disablePerformanceAntipatternChecker: scheme.run?.disableThreadPerformanceChecker ?? Scheme.Run.disableThreadPerformanceCheckerDefault, stopOnEveryMainThreadCheckerIssue: scheme.run?.stopOnEveryMainThreadCheckerIssue ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault, commandlineArguments: launchCommandLineArgs, environmentVariables: launchVariables, @@ -468,6 +469,7 @@ extension Scheme { environmentVariables: targetScheme.environmentVariables, disableMainThreadChecker: targetScheme.disableMainThreadChecker, stopOnEveryMainThreadCheckerIssue: targetScheme.stopOnEveryMainThreadCheckerIssue, + disableThreadPerformanceChecker: targetScheme.disableThreadPerformanceChecker, language: targetScheme.language, region: targetScheme.region, storeKitConfiguration: targetScheme.storeKitConfiguration diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 0422290b3..5b25a67b9 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -561,6 +561,7 @@ class ProjectSpecTests: XCTestCase { storeKitConfiguration: "Configuration.storekit", disableMainThreadChecker: true, stopOnEveryMainThreadCheckerIssue: false, + disableThreadPerformanceChecker: true, commandLineArguments: ["foo": true], environmentVariables: [XCScheme.EnvironmentVariable(variable: "environmentVariable", value: "bar", @@ -601,6 +602,7 @@ class ProjectSpecTests: XCTestCase { configVariants: ["foo"], gatherCoverageData: true, disableMainThreadChecker: true, + disableThreadPerformanceChecker: true, commandLineArguments: ["foo": true], environmentVariables: [XCScheme.EnvironmentVariable(variable: "environmentVariable", value: "bar", diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 37eda5f9f..c405f3cca 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -869,6 +869,7 @@ class SpecLoadingTests: XCTestCase { "region": "US", "disableMainThreadChecker": true, "stopOnEveryMainThreadCheckerIssue": true, + "disableThreadPerformanceChecker": true, "environmentVariables": [ "TEST_VAR": "TEST_VAL", ], @@ -903,6 +904,7 @@ class SpecLoadingTests: XCTestCase { region: "US", disableMainThreadChecker: true, stopOnEveryMainThreadCheckerIssue: true, + disableThreadPerformanceChecker: true, commandLineArguments: ["ENV1": true], environmentVariables: [XCScheme.EnvironmentVariable(variable: "TEST_VAR", value: "TEST_VAL", enabled: true)], preActions: [.init(name: "Do Thing", script: "dothing", settingsTarget: "test")], @@ -941,6 +943,7 @@ class SpecLoadingTests: XCTestCase { "launchAutomaticallySubstyle": 2, "enableGPUFrameCaptureMode": "disabled", "storeKitConfiguration": "Configuration.storekit", + "disableThreadPerformanceChecker": true, ], "test": [ "config": "debug", @@ -995,6 +998,7 @@ class SpecLoadingTests: XCTestCase { let expectedRun = Scheme.Run( config: "debug", enableGPUFrameCaptureMode: .disabled, + disableThreadPerformanceChecker: true, launchAutomaticallySubstyle: "2", storeKitConfiguration: "Configuration.storekit" ) From c701d3ddf76fca4d11f45de7dd48da2cf91304d7 Mon Sep 17 00:00:00 2001 From: kaseken Date: Fri, 11 Aug 2023 14:35:19 +0900 Subject: [PATCH 190/284] Update Project.md (#1382) Use true or false instead of yes or no, for boolean default values in Build Script options. --- Docs/ProjectSpec.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 16263d822..16c612b3c 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -712,9 +712,9 @@ Each script can contain: - [ ] **inputFileLists**: **[String]** - list of input .xcfilelist - [ ] **outputFileLists**: **[String]** - list of output .xcfilelist - [ ] **shell**: **String** - shell used for the script. Defaults to `/bin/sh` -- [ ] **showEnvVars**: **Bool** - whether the environment variables accessible to the script show be printed to the build log. Defaults to yes -- [ ] **runOnlyWhenInstalling**: **Bool** - whether the script is only run when installing (`runOnlyForDeploymentPostprocessing`). Defaults to no -- [ ] **basedOnDependencyAnalysis**: **Bool** - whether to skip the script if inputs, context, or outputs haven't changed. Defaults to yes +- [ ] **showEnvVars**: **Bool** - whether the environment variables accessible to the script show be printed to the build log. Defaults to `true` +- [ ] **runOnlyWhenInstalling**: **Bool** - whether the script is only run when installing (`runOnlyForDeploymentPostprocessing`). Defaults to `false` +- [ ] **basedOnDependencyAnalysis**: **Bool** - whether to skip the script if inputs, context, or outputs haven't changed. Defaults to `true` - [ ] **discoveredDependencyFile**: **String** - discovered dependency .d file. Defaults to none Either a **path** or **script** must be defined, the rest are optional. From 5f1efd90efbb554058d624bc40db391edb5c1517 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Sat, 12 Aug 2023 23:23:12 +1000 Subject: [PATCH 191/284] Update XcodeProj and add RuntimeIssue breakpoint (#1384) * support RuntimeIssue breakpoint * drop xcode 12 and 13 support * changelog --- .github/workflows/ci.yml | 6 +----- CHANGELOG.md | 2 ++ Docs/ProjectSpec.md | 1 + Package.resolved | 4 ++-- Package.swift | 4 ++-- Sources/ProjectSpec/Breakpoint.swift | 3 +++ Sources/XcodeGenKit/BreakpointGenerator.swift | 2 ++ .../xcdebugger/Breakpoints_v2.xcbkptlist | 12 ++++++++++++ Tests/Fixtures/TestProject/project.yml | 1 + 9 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9894a16b3..3c41ae63e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,12 +8,8 @@ jobs: name: Xcode ${{ matrix.xcode }} strategy: matrix: - xcode: ["12.5.1", "13.4.1", "14.3.1"] + xcode: ["14.3.1"] include: - - xcode: "12.5.1" - macos: macos-11 - - xcode: "13.4.1" - macos: macos-12 - xcode: "14.3.1" macos: macos-13 env: diff --git a/CHANGELOG.md b/CHANGELOG.md index 0eb06b568..e43cada2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,12 @@ - Added `scheme.enableGPUValidationMode` #1294 @LouisLWang - Added visionOS support #1379 @shiba1014 - Added ability to disable Thread performance checker in Schemes #1380 @piellarda +- Added support for `RuntimeIssue` breakpoints #1384 @yonaskolb ### Changed - The project object version has been updated for Xcode 14.3 #1368 @leonardorock +- Dropped support for Xcode 12 and 13, due to XcodeProj update #1384 @yonaskolb ### Fixed diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 16c612b3c..e9777fa52 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -196,6 +196,7 @@ Default settings for file extensions. See [Sources](#sources) for more documenta - `Symbolic`: symbolic breakpoint - `IDEConstraintError`: IDE constraint breakpoint - `IDETestFailure`: IDE test failure breakpoint + - `RuntimeIssue`: Runtime issue breakpoint - [ ] **enabled**: **Bool** - Indicates whether it should be active. Default to `true` - [ ] **ignoreCount**: **Int** - Indicates how many times it should be ignored before stopping, Default to `0` - [ ] **continueAfterRunningActions**: **Bool** - Indicates if should automatically continue after evaluating actions, Default to `false` diff --git a/Package.resolved b/Package.resolved index bd391b518..eaab8f054 100644 --- a/Package.resolved +++ b/Package.resolved @@ -78,8 +78,8 @@ "repositoryURL": "https://github.com/tuist/XcodeProj.git", "state": { "branch": null, - "revision": "fae27b48bc14ff3fd9b02902e48c4665ce5a0793", - "version": "8.9.0" + "revision": "c4d5f9d7f789dd944222be95938810947561e559", + "version": "8.12.0" } }, { diff --git a/Package.swift b/Package.swift index 089662466..54df1575c 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.0 +// swift-tools-version:5.7 import PackageDescription @@ -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.9.0"), + .package(url: "https://github.com/tuist/XcodeProj.git", from: "8.12.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/Breakpoint.swift b/Sources/ProjectSpec/Breakpoint.swift index e5dee106b..7877a6956 100644 --- a/Sources/ProjectSpec/Breakpoint.swift +++ b/Sources/ProjectSpec/Breakpoint.swift @@ -38,6 +38,7 @@ public struct Breakpoint: Equatable { case symbolic(symbol: String?, module: String?) case ideConstraintError case ideTestFailure + case runtimeIssue } public enum Action: Equatable { @@ -247,6 +248,8 @@ extension Breakpoint: JSONObjectConvertible { type = .ideConstraintError case .ideTestFailure: type = .ideTestFailure + case .runtimeIssue: + type = .runtimeIssue } enabled = jsonDictionary.json(atKeyPath: "enabled") ?? true ignoreCount = jsonDictionary.json(atKeyPath: "ignoreCount") ?? 0 diff --git a/Sources/XcodeGenKit/BreakpointGenerator.swift b/Sources/XcodeGenKit/BreakpointGenerator.swift index 4decfe904..bf6b793c9 100644 --- a/Sources/XcodeGenKit/BreakpointGenerator.swift +++ b/Sources/XcodeGenKit/BreakpointGenerator.swift @@ -49,6 +49,8 @@ public class BreakpointGenerator { breakpointExtensionID = .ideConstraintError case .ideTestFailure: breakpointExtensionID = .ideTestFailure + case .runtimeIssue: + breakpointExtensionID = .runtimeIssue } let xcbreakpoint = XCBreakpointList.BreakpointProxy.BreakpointContent( enabled: breakpoint.enabled, diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcdebugger/Breakpoints_v2.xcbkptlist b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcdebugger/Breakpoints_v2.xcbkptlist index f51ece771..4b3e82723 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcdebugger/Breakpoints_v2.xcbkptlist @@ -150,5 +150,17 @@ + + + + + + + + diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 67138ddbb..f6666784e 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -71,6 +71,7 @@ breakpoints: - type: IDEConstraintError continueAfterRunningActions: true - type: IDETestFailure + - type: RuntimeIssue targets: Legacy: type: "" From 3a25334c7457af78f0392bf5c3ed6381571010cc Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Sun, 13 Aug 2023 00:10:05 +1000 Subject: [PATCH 192/284] fix package warnings --- Package.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 54df1575c..b3ddb239b 100644 --- a/Package.swift +++ b/Package.swift @@ -19,11 +19,11 @@ let package = Package( .package(url: "https://github.com/tuist/XcodeProj.git", from: "8.12.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")), + .package(url: "https://github.com/SwiftDocOrg/GraphViz.git", exact: "0.2.0"), ], targets: [ - .target(name: "XcodeGen", dependencies: [ + .executableTarget(name: "XcodeGen", dependencies: [ "XcodeGenCLI", "Version", ]), From 7ea32005e246d06ff501cb57b98b352cfb73cb7d Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Sun, 13 Aug 2023 00:15:50 +1000 Subject: [PATCH 193/284] add recommended settings for xcode 14 (#1385) * add recommended settings for xcode 14 * changelog --- CHANGELOG.md | 1 + SettingPresets/base.yml | 3 +++ Sources/XcodeGenKit/PBXProjGenerator.swift | 5 +++- Sources/XcodeGenKit/Version.swift | 4 ++-- .../Project.xcodeproj/project.pbxproj | 11 +++++++-- .../SPM/SPM.xcodeproj/project.pbxproj | 11 +++++++-- .../xcshareddata/xcschemes/App.xcscheme | 2 +- .../AnotherProject.xcodeproj/project.pbxproj | 23 +++++++++++++++++-- .../Project.xcodeproj/project.pbxproj | 23 +++++++++++++++++-- .../xcshareddata/xcschemes/App_Clip.xcscheme | 2 +- .../xcschemes/App_Scheme.xcscheme | 2 +- .../xcschemes/App_iOS Production.xcscheme | 2 +- .../xcschemes/App_iOS Staging.xcscheme | 2 +- .../xcschemes/App_iOS Test.xcscheme | 2 +- .../xcshareddata/xcschemes/App_macOS.xcscheme | 2 +- .../xcschemes/App_watchOS.xcscheme | 2 +- .../xcschemes/DriverKitDriver.xcscheme | 2 +- .../EndpointSecuritySystemExtension.xcscheme | 2 +- .../xcshareddata/xcschemes/Framework.xcscheme | 2 +- .../xcschemes/NetworkSystemExtension.xcscheme | 2 +- .../xcshareddata/xcschemes/Tool.xcscheme | 2 +- .../xcschemes/iMessageApp.xcscheme | 2 +- .../xcschemes/iMessageExtension.xcscheme | 2 +- .../TestProject.xcodeproj/project.pbxproj | 11 +++++++-- .../xcschemes/ExternalTarget.xcscheme | 2 +- .../xcschemes/Shared_TargetScheme.xcscheme | 2 +- .../xcschemes/User_ProjectScheme.xcscheme | 2 +- 27 files changed, 97 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e43cada2f..827d9b29c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - The project object version has been updated for Xcode 14.3 #1368 @leonardorock - Dropped support for Xcode 12 and 13, due to XcodeProj update #1384 @yonaskolb +- Updated recommended settings for Xcode 14 #1385 @yonaskolb ### Fixed diff --git a/SettingPresets/base.yml b/SettingPresets/base.yml index d7533a841..47ce5aa5a 100644 --- a/SettingPresets/base.yml +++ b/SettingPresets/base.yml @@ -41,6 +41,9 @@ GCC_WARN_UNDECLARED_SELECTOR: YES GCC_WARN_UNINITIALIZED_AUTOS: YES_AGGRESSIVE GCC_WARN_UNUSED_FUNCTION: YES GCC_WARN_UNUSED_VARIABLE: YES +ENABLE_MODULE_VERIFIER: YES +MODULE_VERIFIER_SUPPORTED_LANGUAGES: "objective-c objective-c++" +MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS: "gnu11 gnu++14" MTL_FAST_MATH: YES # Target Settings diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 686bc99c5..02acb3488 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -285,7 +285,10 @@ public class PBXProjGenerator { }.flatMap { $0 } ).sorted() - var projectAttributes: [String: Any] = project.attributes + let defaultAttributes: [String: Any] = [ + "BuildIndependentTargetsInParallel": "YES" + ] + var projectAttributes: [String: Any] = defaultAttributes.merged(project.attributes) // Set default LastUpgradeCheck if user did not specify let lastUpgradeKey = "LastUpgradeCheck" diff --git a/Sources/XcodeGenKit/Version.swift b/Sources/XcodeGenKit/Version.swift index c36a39925..0f4fed636 100644 --- a/Sources/XcodeGenKit/Version.swift +++ b/Sources/XcodeGenKit/Version.swift @@ -4,7 +4,7 @@ import ProjectSpec extension Project { public var xcodeVersion: String { - XCodeVersion.parse(options.xcodeVersion ?? "12.0") + XCodeVersion.parse(options.xcodeVersion ?? "14.3") } var schemeVersion: String { @@ -12,7 +12,7 @@ extension Project { } var compatibilityVersion: String { - "Xcode 11.0" + "Xcode 14.0" } var objectVersion: UInt { diff --git a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj index 375205ca0..87cac5452 100644 --- a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj @@ -312,12 +312,13 @@ 0FBAE303E3CFC2ABAC876A77 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1200; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1430; TargetAttributes = { }; }; buildConfigurationList = D91E14E36EC0B415578456F2 /* Build configuration list for PBXProject "Project" */; - compatibilityVersion = "Xcode 11.0"; + compatibilityVersion = "Xcode 14.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -403,6 +404,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_MODULE_VERIFIER = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -413,6 +415,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -579,6 +583,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_MODULE_VERIFIER = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -595,6 +600,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index 9e09f0f16..50079a9ea 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -198,12 +198,13 @@ F7B09D77DB7447B17DCDA3C4 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1200; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1430; TargetAttributes = { }; }; buildConfigurationList = 425866ADA259DB93FC4AF1E3 /* Build configuration list for PBXProject "SPM" */; - compatibilityVersion = "Xcode 11.0"; + compatibilityVersion = "Xcode 14.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -422,6 +423,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_MODULE_VERIFIER = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -438,6 +440,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -499,6 +503,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_MODULE_VERIFIER = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -509,6 +514,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme b/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme index 8e271576f..353d320e0 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme @@ -1,6 +1,6 @@ Date: Sun, 13 Aug 2023 00:20:49 +1000 Subject: [PATCH 194/284] Update to 2.36.0 --- CHANGELOG.md | 4 +++- Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 827d9b29c..74b2171cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.36.0 + ### Added - Added `scheme.enableGPUValidationMode` #1294 @LouisLWang @@ -12,8 +14,8 @@ ### Changed - The project object version has been updated for Xcode 14.3 #1368 @leonardorock +- Updated recommended settings for Xcode 14.3 #1385 @yonaskolb - Dropped support for Xcode 12 and 13, due to XcodeProj update #1384 @yonaskolb -- Updated recommended settings for Xcode 14 #1385 @yonaskolb ### Fixed diff --git a/Makefile b/Makefile index d6823bc8b..7e767084c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.35.0 +VERSION = 2.36.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 115c0bf38..cf5f305e4 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.35.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.36.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index d4ffcaa83..69644ebf2 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.35.0") +let version = Version("2.36.0") let cli = XcodeGenCLI(version: version) cli.execute() From 2b032561ed88d2eba13f88d630c5257bf87e1a24 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Mon, 14 Aug 2023 10:54:37 +1000 Subject: [PATCH 195/284] remove ENABLE_MODULE_VERIFIER (#1387) --- SettingPresets/base.yml | 3 --- .../Project.xcodeproj/project.pbxproj | 6 ------ .../Fixtures/SPM/SPM.xcodeproj/project.pbxproj | 6 ------ .../AnotherProject.xcodeproj/project.pbxproj | 18 ------------------ .../Project.xcodeproj/project.pbxproj | 18 ------------------ .../TestProject.xcodeproj/project.pbxproj | 6 ------ 6 files changed, 57 deletions(-) diff --git a/SettingPresets/base.yml b/SettingPresets/base.yml index 47ce5aa5a..d7533a841 100644 --- a/SettingPresets/base.yml +++ b/SettingPresets/base.yml @@ -41,9 +41,6 @@ GCC_WARN_UNDECLARED_SELECTOR: YES GCC_WARN_UNINITIALIZED_AUTOS: YES_AGGRESSIVE GCC_WARN_UNUSED_FUNCTION: YES GCC_WARN_UNUSED_VARIABLE: YES -ENABLE_MODULE_VERIFIER: YES -MODULE_VERIFIER_SUPPORTED_LANGUAGES: "objective-c objective-c++" -MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS: "gnu11 gnu++14" MTL_FAST_MATH: YES # Target Settings diff --git a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj index 87cac5452..a9c8a23cb 100644 --- a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj @@ -404,7 +404,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_MODULE_VERIFIER = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -415,8 +414,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -583,7 +580,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_MODULE_VERIFIER = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -600,8 +596,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index 50079a9ea..b35a74f10 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -423,7 +423,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_MODULE_VERIFIER = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -440,8 +439,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -503,7 +500,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_MODULE_VERIFIER = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -514,8 +510,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj index fd5ce2721..67468978a 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj @@ -188,7 +188,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_MODULE_VERIFIER = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -199,8 +198,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -246,7 +243,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_MODULE_VERIFIER = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -257,8 +253,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -305,7 +299,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_MODULE_VERIFIER = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -316,8 +309,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -397,7 +388,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_MODULE_VERIFIER = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -414,8 +404,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -585,7 +573,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_MODULE_VERIFIER = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -602,8 +589,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -766,7 +751,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_MODULE_VERIFIER = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -783,8 +767,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 728739f4e..0fbe3f3a4 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -6848,7 +6848,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_MODULE_VERIFIER = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -6865,8 +6864,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -7190,7 +7187,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_MODULE_VERIFIER = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7201,8 +7197,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -7276,7 +7270,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_MODULE_VERIFIER = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7287,8 +7280,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -7840,7 +7831,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_MODULE_VERIFIER = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7857,8 +7847,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -8139,7 +8127,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_MODULE_VERIFIER = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8156,8 +8143,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -8479,7 +8464,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_MODULE_VERIFIER = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8490,8 +8474,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj index 2ba99b5ea..3318273cf 100644 --- a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj @@ -135,7 +135,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_MODULE_VERIFIER = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -146,8 +145,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -235,7 +232,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_MODULE_VERIFIER = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -252,8 +248,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; - MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; From 26e817b2deca1ceb9fdebfa963b86311fef3d05c Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Mon, 14 Aug 2023 10:56:24 +1000 Subject: [PATCH 196/284] Update to 2.36.1 --- CHANGELOG.md | 6 ++++++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74b2171cf..5e4e7b6de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Next Version +## 2.36.1 + +### Fixed + +- Revert addition of `ENABLE_MODULE_VERIFIER` build setting for causing issues in tests and some setups #1387 @yonaskolb + ## 2.36.0 ### Added diff --git a/Makefile b/Makefile index 7e767084c..ad4bac456 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.36.0 +VERSION = 2.36.1 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index cf5f305e4..5f13984b3 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.36.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.36.1"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 69644ebf2..0a2cfeebb 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.36.0") +let version = Version("2.36.1") let cli = XcodeGenCLI(version: version) cli.execute() From 2ef94c9910443abeb462ae7e1a270531f7fba406 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Wed, 16 Aug 2023 17:43:03 +1000 Subject: [PATCH 197/284] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e4e7b6de..59fafaa5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Fixed + +- Fixed source file `includes` not working when no paths were found #1337 @shnhrrsn + ## 2.36.1 ### Fixed From d8d5457f48f20085074815b600e04d48b4b88124 Mon Sep 17 00:00:00 2001 From: BarredEwe Date: Wed, 16 Aug 2023 15:22:16 +0300 Subject: [PATCH 198/284] Add support for adding build tool plugins to targets (#1374) * Add support for adding build tool plugins to targets * Added Plugin validation * Added some tests * Limited the minimum version to 5.7 Swift * Update .gitignore Co-authored-by: freddi(Yuki Aki) * Update CHANGELOG.md Co-authored-by: freddi(Yuki Aki) * Update CHANGELOG.md Co-authored-by: freddi(Yuki Aki) * Update Docs/ProjectSpec.md Co-authored-by: freddi(Yuki Aki) * Added a fixture for testing plugins * Update CHANGELOG.md * Installed the release version of XcodeProj --------- Co-authored-by: freddi(Yuki Aki) --- CHANGELOG.md | 4 + Docs/ProjectSpec.md | 33 ++++ Docs/Usage.md | 17 ++ Package.resolved | 186 +++++++++--------- Package.swift | 2 +- Sources/ProjectSpec/BuildToolPlugin.swift | 58 ++++++ Sources/ProjectSpec/SpecValidation.swift | 6 + Sources/ProjectSpec/SpecValidationError.swift | 3 + Sources/ProjectSpec/Target.swift | 13 +- Sources/XcodeGenKit/PBXProjGenerator.swift | 17 ++ .../SPM/SPM.xcodeproj/project.pbxproj | 19 ++ Tests/Fixtures/SPM/project.yml | 6 + Tests/ProjectSpecTests/ProjectSpecTests.swift | 32 +++ Tests/ProjectSpecTests/SpecLoadingTests.swift | 23 +++ 14 files changed, 323 insertions(+), 96 deletions(-) create mode 100644 Sources/ProjectSpec/BuildToolPlugin.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index 59fafaa5f..57f61d9bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - Fixed source file `includes` not working when no paths were found #1337 @shnhrrsn +### Added + +- Added support for adding `Build Tool Plug-ins` to targets #1374 @BarredEwe + ## 2.36.1 ### Fixed diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index e9777fa52..2cd3c461c 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -27,6 +27,7 @@ You can also use environment variables in your configuration file, by using `${S - [Dependency](#dependency) - [Config Files](#config-files) - [Plist](#plist) + - [Build Tool Plug-ins](#build-tool-plug-ins) - [Build Script](#build-script) - [Build Rule](#build-rule) - [Target Scheme](#target-scheme) @@ -381,6 +382,7 @@ Settings are merged in the following order: `groups`, `base`, `configs` (simple - [ ] **directlyEmbedCarthageDependencies**: **Bool** - If this is `true` Carthage framework dependencies will be embedded using an `Embed Frameworks` build phase instead of the `copy-frameworks` script. Defaults to `true` for all targets except iOS/tvOS/watchOS Applications. - [ ] **requiresObjCLinking**: **Bool** - If this is `true` any targets that link to this target will have `-ObjC` added to their `OTHER_LDFLAGS`. This is required if a static library has any categories or extensions on Objective-C code. See [this guide](https://pewpewthespells.com/blog/objc_linker_flags.html#objc) for more details. Defaults to `true` if `type` is `library.static`. If you are 100% sure you don't have categories or extensions on Objective-C code (pure Swift with no use of Foundation/UIKit) you can set this to `false`, otherwise it's best to leave it alone. - [ ] **onlyCopyFilesOnInstall**: **Bool** – If this is `true`, the `Embed Frameworks` and `Embed App Extensions` (if available) build phases will have the "Copy only when installing" chekbox checked. Defaults to `false`. +- [ ] **buildToolPlugins**: **[[Build Tool Plug-ins](#build-tool-plug-ins)]** - Commands for the build system that run automatically *during* the build. - [ ] **preBuildScripts**: **[[Build Script](#build-script)]** - Build scripts that run *before* any other build phases - [ ] **postCompileScripts**: **[[Build Script](#build-script)]** - Build scripts that run after the Compile Sources phase - [ ] **postBuildScripts**: **[[Build Script](#build-script)]** - Build scripts that run *after* any other build phases @@ -695,6 +697,36 @@ targets: com.apple.security.application-groups: group.com.app ``` +### Build Tool Plug-ins + +To add `Build Tool Plug-ins`, you need to add information about plugins to [Target](#target): + +- **buildToolPlugins**: List of plugins to connect to the target + +Each plugin includes information: + +- [x] **plugin**: **String** - plugin name +- [x] **package**: **String** - the name of the package that contains the plugin + +Сonnect the plugin to the desired target: + +```yaml +targets: + App: + buildToolPlugins: + - plugin: MyPlugin + package: MyPackage +``` + +Don't forget to add a package containing the plugin we need: + +```yaml +packages: + MyPackage: + url: https://github.com/MyPackage + from: 1.3.0 +``` + ### Build Script Run script build phases can be added at 3 different points in the build: @@ -854,6 +886,7 @@ This is used to override settings or run build scripts in specific targets - [x] **targets**: **[String]** - The list of target names to include as target dependencies - [ ] **configFiles**: **[Config Files](#config-files)** - `.xcconfig` files per config - [ ] **settings**: **[Settings](#settings)** - Target specific build settings. +- [ ] **buildToolPlugins**: **[[Build Tool Plug-ins](#build-tool-plug-ins)]** - Commands for the build system that run automatically *during* the build - [ ] **buildScripts**: **[[Build Script](#build-script)]** - Build scripts to run - [ ] **scheme**: **[Target Scheme](#target-scheme)** - Generated scheme - [ ] **attributes**: **[String: Any]** - This sets values in the project `TargetAttributes`. It is merged with `attributes` from the project and anything automatically added by XcodeGen, with any duplicate values being override by values specified here diff --git a/Docs/Usage.md b/Docs/Usage.md index 505cdbfc8..390cf5875 100644 --- a/Docs/Usage.md +++ b/Docs/Usage.md @@ -204,3 +204,20 @@ targets: dependencies: - framework: Vendor/MyFramework.framework ``` + +# Build Tool Plug-ins +XCodeGen supports working with [Swift Package Plug-ins](https://github.com/apple/swift-package-manager/blob/main/Documentation/Plugins.md#using-a-package-plugin). + +To use plugins, you need to specify in your target which plugin you want to connect, and don't forget to connect the package to target. + +```yaml +packages: + Prefire: + url: https://github.com/BarredEwe/Prefire + from: 1.3.0 +targets: + App: + buildToolPlugins: + - plugin: PrefirePlaybookPlugin + package: Prefire +``` diff --git a/Package.resolved b/Package.resolved index eaab8f054..b3231bf75 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,97 +1,95 @@ { - "object": { - "pins": [ - { - "package": "AEXML", - "repositoryURL": "https://github.com/tadija/AEXML.git", - "state": { - "branch": null, - "revision": "38f7d00b23ecd891e1ee656fa6aeebd6ba04ecc3", - "version": "4.6.1" - } - }, - { - "package": "GraphViz", - "repositoryURL": "https://github.com/SwiftDocOrg/GraphViz.git", - "state": { - "branch": null, - "revision": "70bebcf4597b9ce33e19816d6bbd4ba9b7bdf038", - "version": "0.2.0" - } - }, - { - "package": "JSONUtilities", - "repositoryURL": "https://github.com/yonaskolb/JSONUtilities.git", - "state": { - "branch": null, - "revision": "128d2ffc22467f69569ef8ff971683e2393191a0", - "version": "4.2.0" - } - }, - { - "package": "PathKit", - "repositoryURL": "https://github.com/kylef/PathKit.git", - "state": { - "branch": null, - "revision": "3bfd2737b700b9a36565a8c94f4ad2b050a5e574", - "version": "1.0.1" - } - }, - { - "package": "Rainbow", - "repositoryURL": "https://github.com/onevcat/Rainbow.git", - "state": { - "branch": null, - "revision": "626c3d4b6b55354b4af3aa309f998fae9b31a3d9", - "version": "3.2.0" - } - }, - { - "package": "Spectre", - "repositoryURL": "https://github.com/kylef/Spectre.git", - "state": { - "branch": null, - "revision": "26cc5e9ae0947092c7139ef7ba612e34646086c7", - "version": "0.10.1" - } - }, - { - "package": "SwiftCLI", - "repositoryURL": "https://github.com/jakeheis/SwiftCLI.git", - "state": { - "branch": null, - "revision": "2e949055d9797c1a6bddcda0e58dada16cc8e970", - "version": "6.0.3" - } - }, - { - "package": "Version", - "repositoryURL": "https://github.com/mxcl/Version", - "state": { - "branch": null, - "revision": "a94b48f36763c05629fc102837398505032dead9", - "version": "2.0.0" - } - }, - { - "package": "XcodeProj", - "repositoryURL": "https://github.com/tuist/XcodeProj.git", - "state": { - "branch": null, - "revision": "c4d5f9d7f789dd944222be95938810947561e559", - "version": "8.12.0" - } - }, - { - "package": "Yams", - "repositoryURL": "https://github.com/jpsim/Yams.git", - "state": { - "branch": null, - "revision": "01835dc202670b5bb90d07f3eae41867e9ed29f6", - "version": "5.0.1" - } + "pins" : [ + { + "identity" : "aexml", + "kind" : "remoteSourceControl", + "location" : "https://github.com/tadija/AEXML.git", + "state" : { + "revision" : "38f7d00b23ecd891e1ee656fa6aeebd6ba04ecc3", + "version" : "4.6.1" } - ] - }, - "version": 1 + }, + { + "identity" : "graphviz", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SwiftDocOrg/GraphViz.git", + "state" : { + "revision" : "70bebcf4597b9ce33e19816d6bbd4ba9b7bdf038", + "version" : "0.2.0" + } + }, + { + "identity" : "jsonutilities", + "kind" : "remoteSourceControl", + "location" : "https://github.com/yonaskolb/JSONUtilities.git", + "state" : { + "revision" : "128d2ffc22467f69569ef8ff971683e2393191a0", + "version" : "4.2.0" + } + }, + { + "identity" : "pathkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/kylef/PathKit.git", + "state" : { + "revision" : "3bfd2737b700b9a36565a8c94f4ad2b050a5e574", + "version" : "1.0.1" + } + }, + { + "identity" : "rainbow", + "kind" : "remoteSourceControl", + "location" : "https://github.com/onevcat/Rainbow.git", + "state" : { + "revision" : "626c3d4b6b55354b4af3aa309f998fae9b31a3d9", + "version" : "3.2.0" + } + }, + { + "identity" : "spectre", + "kind" : "remoteSourceControl", + "location" : "https://github.com/kylef/Spectre.git", + "state" : { + "revision" : "26cc5e9ae0947092c7139ef7ba612e34646086c7", + "version" : "0.10.1" + } + }, + { + "identity" : "swiftcli", + "kind" : "remoteSourceControl", + "location" : "https://github.com/jakeheis/SwiftCLI.git", + "state" : { + "revision" : "2e949055d9797c1a6bddcda0e58dada16cc8e970", + "version" : "6.0.3" + } + }, + { + "identity" : "version", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mxcl/Version", + "state" : { + "revision" : "a94b48f36763c05629fc102837398505032dead9", + "version" : "2.0.0" + } + }, + { + "identity" : "xcodeproj", + "kind" : "remoteSourceControl", + "location" : "https://github.com/tuist/XcodeProj.git", + "state" : { + "revision" : "6e60fb55271c80f83a186c9b1b4982fd991cfc0a", + "version" : "8.13.0" + } + }, + { + "identity" : "yams", + "kind" : "remoteSourceControl", + "location" : "https://github.com/jpsim/Yams.git", + "state" : { + "revision" : "01835dc202670b5bb90d07f3eae41867e9ed29f6", + "version" : "5.0.1" + } + } + ], + "version" : 2 } diff --git a/Package.swift b/Package.swift index b3ddb239b..00423603f 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.12.0"), + .package(url: "https://github.com/tuist/XcodeProj.git", from: "8.13.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/BuildToolPlugin.swift b/Sources/ProjectSpec/BuildToolPlugin.swift new file mode 100644 index 000000000..76de6f0d8 --- /dev/null +++ b/Sources/ProjectSpec/BuildToolPlugin.swift @@ -0,0 +1,58 @@ +import Foundation +import JSONUtilities + +/// Specifies the use of a plug-in product in a target. +public struct BuildToolPlugin: Equatable { + + /// The name of the plug-in target. + public var plugin: String + /// The name of the package that defines the plug-in target. + public var package: String + + public init( + plugin: String, + package: String + ) { + self.plugin = plugin + self.package = package + } +} + +extension BuildToolPlugin: JSONObjectConvertible { + + public init(jsonDictionary: JSONDictionary) throws { + if let plugin: String = jsonDictionary.json(atKeyPath: "plugin") { + self.plugin = plugin + } else { + throw SpecParsingError.invalidDependency(jsonDictionary) + } + + if let package: String = jsonDictionary.json(atKeyPath: "package") { + self.package = package + } else { + throw SpecParsingError.invalidDependency(jsonDictionary) + } + } +} + +extension BuildToolPlugin { + public var uniqueID: String { + return "\(plugin)/\(package)" + } +} + +extension BuildToolPlugin: Hashable { + public func hash(into hasher: inout Hasher) { + hasher.combine(plugin) + hasher.combine(package) + } +} + +extension BuildToolPlugin: JSONEncodable { + public func toJSONValue() -> Any { + [ + "plugin": plugin, + "package": package + ] + } +} diff --git a/Sources/ProjectSpec/SpecValidation.swift b/Sources/ProjectSpec/SpecValidation.swift index b449f6c6c..f387911a8 100644 --- a/Sources/ProjectSpec/SpecValidation.swift +++ b/Sources/ProjectSpec/SpecValidation.swift @@ -174,6 +174,12 @@ extension Project { errors.append(.invalidTargetSource(target: target.name, source: sourcePath.string)) } } + + for buildToolPlugin in target.buildToolPlugins { + if packages[buildToolPlugin.package] == nil { + errors.append(.invalidPluginPackageReference(plugin: buildToolPlugin.plugin, package: buildToolPlugin.package)) + } + } } for projectReference in projectReferences { diff --git a/Sources/ProjectSpec/SpecValidationError.swift b/Sources/ProjectSpec/SpecValidationError.swift index f0c957ed1..639ccb28a 100644 --- a/Sources/ProjectSpec/SpecValidationError.swift +++ b/Sources/ProjectSpec/SpecValidationError.swift @@ -36,6 +36,7 @@ public struct SpecValidationError: Error, CustomStringConvertible { case invalidTestPlan(TestPlan) case multipleDefaultTestPlans case duplicateDependencies(target: String, dependencyReference: String) + case invalidPluginPackageReference(plugin: String, package: String) public var description: String { switch self { @@ -91,6 +92,8 @@ public struct SpecValidationError: Error, CustomStringConvertible { return "Your test plans contain more than one default test plan" case let .duplicateDependencies(target, dependencyReference): return "Target \(target.quoted) has the dependency \(dependencyReference.quoted) multiple times" + case let .invalidPluginPackageReference(plugin, package): + return "Plugin \(plugin) has invalide package reference \(package)" } } } diff --git a/Sources/ProjectSpec/Target.swift b/Sources/ProjectSpec/Target.swift index 9bac89bdf..e7856ab78 100644 --- a/Sources/ProjectSpec/Target.swift +++ b/Sources/ProjectSpec/Target.swift @@ -46,6 +46,7 @@ public struct Target: ProjectTarget { public var directlyEmbedCarthageDependencies: Bool? public var requiresObjCLinking: Bool? public var preBuildScripts: [BuildScript] + public var buildToolPlugins: [BuildToolPlugin] public var postCompileScripts: [BuildScript] public var postBuildScripts: [BuildScript] public var buildRules: [BuildRule] @@ -89,6 +90,7 @@ public struct Target: ProjectTarget { directlyEmbedCarthageDependencies: Bool? = nil, requiresObjCLinking: Bool? = nil, preBuildScripts: [BuildScript] = [], + buildToolPlugins: [BuildToolPlugin] = [], postCompileScripts: [BuildScript] = [], postBuildScripts: [BuildScript] = [], buildRules: [BuildRule] = [], @@ -113,6 +115,7 @@ public struct Target: ProjectTarget { self.directlyEmbedCarthageDependencies = directlyEmbedCarthageDependencies self.requiresObjCLinking = requiresObjCLinking self.preBuildScripts = preBuildScripts + self.buildToolPlugins = buildToolPlugins self.postCompileScripts = postCompileScripts self.postBuildScripts = postBuildScripts self.buildRules = buildRules @@ -223,6 +226,7 @@ extension Target: Equatable { lhs.entitlements == rhs.entitlements && lhs.dependencies == rhs.dependencies && lhs.preBuildScripts == rhs.preBuildScripts && + lhs.buildToolPlugins == rhs.buildToolPlugins && lhs.postCompileScripts == rhs.postCompileScripts && lhs.postBuildScripts == rhs.postBuildScripts && lhs.buildRules == rhs.buildRules && @@ -312,7 +316,13 @@ extension Target: NamedJSONDictionaryConvertible { return platforms.contains(platform) } } - + + if jsonDictionary["buildToolPlugins"] == nil { + buildToolPlugins = [] + } else { + self.buildToolPlugins = try jsonDictionary.json(atKeyPath: "buildToolPlugins", invalidItemBehaviour: .fail) + } + if jsonDictionary["info"] != nil { info = try jsonDictionary.json(atKeyPath: "info") as Plist } @@ -348,6 +358,7 @@ extension Target: JSONEncodable { "dependencies": dependencies.map { $0.toJSONValue() }, "postCompileScripts": postCompileScripts.map { $0.toJSONValue() }, "prebuildScripts": preBuildScripts.map { $0.toJSONValue() }, + "buildToolPlugins": buildToolPlugins.map { $0.toJSONValue() }, "postbuildScripts": postBuildScripts.map { $0.toJSONValue() }, "buildRules": buildRules.map { $0.toJSONValue() }, "deploymentTarget": deploymentTarget?.deploymentTarget, diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 02acb3488..df38cff91 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -1032,6 +1032,23 @@ public class PBXProjGenerator { carthageFrameworksToEmbed = carthageFrameworksToEmbed.uniqued() + // Adding `Build Tools Plug-ins` as a dependency to the target + for buildToolPlugin in target.buildToolPlugins { + let packageReference = packageReferences[buildToolPlugin.package] + if packageReference == nil, !localPackageReferences.contains(buildToolPlugin.package) { + continue + } + + let packageDependency = addObject( + XCSwiftPackageProductDependency(productName: buildToolPlugin.plugin, package: packageReference, isPlugin: true) + ) + let targetDependency = addObject( + PBXTargetDependency(product: packageDependency) + ) + + dependencies.append(targetDependency) + } + var buildPhases: [PBXBuildPhase] = [] func getBuildFilesForSourceFiles(_ sourceFiles: [SourceFile]) -> [PBXBuildFile] { diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index b35a74f10..d93b15a78 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -181,6 +181,7 @@ ); dependencies = ( 078202CF7B08B66ACF7FEC23 /* PBXTargetDependency */, + E157C6348B8AD6A28C706801 /* PBXTargetDependency */, ); name = App; packageProductDependencies = ( @@ -214,6 +215,7 @@ mainGroup = 218F6C96DF9E182F526258CF; packageReferences = ( 5BA91390AE78D2EE15C60091 /* XCRemoteSwiftPackageReference "Codability" */, + 348C81C327DB1710B742C370 /* XCRemoteSwiftPackageReference "Prefire" */, E3887F3CB2C069E70D98092F /* XCRemoteSwiftPackageReference "SwiftRoaring" */, ); projectDirPath = ""; @@ -306,6 +308,10 @@ isa = PBXTargetDependency; productRef = C816AEB28ED71C3C47F31B98 /* SwiftRoaringDynamic */; }; + E157C6348B8AD6A28C706801 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = DC47EF1BFBBD751E3C1C95E3 /* PrefirePlaybookPlugin */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -562,6 +568,14 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ + 348C81C327DB1710B742C370 /* XCRemoteSwiftPackageReference "Prefire" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/BarredEwe/Prefire"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.4.1; + }; + }; 5BA91390AE78D2EE15C60091 /* XCRemoteSwiftPackageReference "Codability" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/yonaskolb/Codability"; @@ -604,6 +618,11 @@ package = E3887F3CB2C069E70D98092F /* XCRemoteSwiftPackageReference "SwiftRoaring" */; productName = SwiftRoaringDynamic; }; + DC47EF1BFBBD751E3C1C95E3 /* PrefirePlaybookPlugin */ = { + isa = XCSwiftPackageProductDependency; + package = 348C81C327DB1710B742C370 /* XCRemoteSwiftPackageReference "Prefire" */; + productName = "plugin:PrefirePlaybookPlugin"; + }; DC73B269C8B0C0BF6912842C /* SwiftRoaringDynamic */ = { isa = XCSwiftPackageProductDependency; package = E3887F3CB2C069E70D98092F /* XCRemoteSwiftPackageReference "SwiftRoaring" */; diff --git a/Tests/Fixtures/SPM/project.yml b/Tests/Fixtures/SPM/project.yml index 818f66ff9..b6b4f8e31 100644 --- a/Tests/Fixtures/SPM/project.yml +++ b/Tests/Fixtures/SPM/project.yml @@ -6,6 +6,9 @@ packages: SwiftRoaring: url: https://github.com/piotte13/SwiftRoaring majorVersion: 1.0.4 + Prefire: + url: https://github.com/BarredEwe/Prefire + majorVersion: 1.4.1 XcodeGen: path: ../../.. #XcodeGen itself group: SPM @@ -18,6 +21,9 @@ targets: testTargets: - package: XcodeGen/XcodeGenKitTests - Tests + buildToolPlugins: + - plugin: PrefirePlaybookPlugin + package: Prefire dependencies: - package: Codability weak: true diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 5b25a67b9..cb41b989f 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -457,6 +457,37 @@ class ProjectSpecTests: XCTestCase { try expectValidationError(project, .multipleDefaultTestPlans) } + + $0.it("fails on packages has not plugin packge reference") { + var project = baseProject + project.targets = [ + Target( + name: "target", + type: .application, + platform: .iOS, + buildToolPlugins: [ + BuildToolPlugin(plugin: "plugin", package: "package") + ] + ) + ] + try expectValidationError(project, .invalidPluginPackageReference(plugin: "plugin", package: "package")) + } + + $0.it("allow on packages has plugin packge reference") { + var project = baseProject + project.packages["package"] = .remote(url: "url", versionRequirement: .branch("branch")) + project.targets = [ + Target( + name: "target", + type: .application, + platform: .iOS, + buildToolPlugins: [ + BuildToolPlugin(plugin: "plugin", package: "package") + ] + ) + ] + try expectNoValidationError(project, .invalidPluginPackageReference(plugin: "plugin", package: "package")) + } } } @@ -509,6 +540,7 @@ class ProjectSpecTests: XCTestCase { runOnlyWhenInstalling: true, showEnvVars: true, basedOnDependencyAnalysis: false)], + buildToolPlugins: [BuildToolPlugin(plugin: "plugin", package: "Yams")], postCompileScripts: [BuildScript(script: .path("cmd.sh"), name: "Bar script", inputFiles: ["foo"], diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index c405f3cca..bb8a4b183 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -1510,6 +1510,29 @@ class SpecLoadingTests: XCTestCase { try expect(scheme.run) == runAction } + + $0.it("parses buildToolPlugins") { + var target = validTarget + let buildToolPlugins: [[String: Any]] = [ + [ + "plugin": "FirstPlugin", + "package": "FirstPackage" + ], + [ + "plugin": "SecondPlugin", + "package": "SecondPackage" + ] + ] + target["buildToolPlugins"] = buildToolPlugins + + let expectedBuildToolPlugins = [ + BuildToolPlugin(plugin: "FirstPlugin", package: "FirstPackage"), + BuildToolPlugin(plugin: "SecondPlugin", package: "SecondPackage") + ] + + let parsedTarget = try Target(name: "test", jsonDictionary: target) + try expect(parsedTarget.buildToolPlugins) == expectedBuildToolPlugins + } } } From b448a6718f1042ccd9f8a783686826d869c44605 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Wed, 16 Aug 2023 23:48:44 +1000 Subject: [PATCH 199/284] Update to 2.37.0 --- CHANGELOG.md | 2 ++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57f61d9bf..39d7f04c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.37.0 + ### Fixed - Fixed source file `includes` not working when no paths were found #1337 @shnhrrsn diff --git a/Makefile b/Makefile index ad4bac456..5b741e40c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.36.1 +VERSION = 2.37.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 5f13984b3..0ece74791 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.36.1"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.37.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 0a2cfeebb..d52668c05 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.36.1") +let version = Version("2.37.0") let cli = XcodeGenCLI(version: version) cli.execute() From 3a7e75f1fb4ffd6e5226b46a468dcba5eb6263e2 Mon Sep 17 00:00:00 2001 From: Shaun Harrison Date: Wed, 16 Aug 2023 23:58:50 -0400 Subject: [PATCH 200/284] Fix issue with includes not working when no matches are found (#1337) * Fix issue where an includes pattern without matches prevented includes from working * Add new test to handle includes with no matches --- Sources/XcodeGenKit/SourceGenerator.swift | 12 +++---- .../SourceGeneratorTests.swift | 33 +++++++++++++++++++ 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index c540e9718..3ffcbb3ab 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -384,12 +384,12 @@ class SourceGenerator { } /// Checks whether the path is not in any default or TargetSource excludes - func isIncludedPath(_ path: Path, excludePaths: Set, includePaths: SortedArray) -> Bool { + func isIncludedPath(_ path: Path, excludePaths: Set, includePaths: SortedArray?) -> Bool { return !defaultExcludedFiles.contains(where: { path.lastComponent == $0 }) && !(path.extension.map(defaultExcludedExtensions.contains) ?? false) && !excludePaths.contains(path) // If includes is empty, it's included. If it's not empty, the path either needs to match exactly, or it needs to be a direct parent of an included path. - && (includePaths.value.isEmpty || _isIncludedPathSorted(path, sortedPaths: includePaths)) + && (includePaths.flatMap { _isIncludedPathSorted(path, sortedPaths: $0) } ?? true) } private func _isIncludedPathSorted(_ path: Path, sortedPaths: SortedArray) -> Bool { @@ -400,7 +400,7 @@ class SourceGenerator { /// Gets all the children paths that aren't excluded - private func getSourceChildren(targetSource: TargetSource, dirPath: Path, excludePaths: Set, includePaths: SortedArray) throws -> [Path] { + private func getSourceChildren(targetSource: TargetSource, dirPath: Path, excludePaths: Set, includePaths: SortedArray?) throws -> [Path] { try dirPath.children() .filter { if $0.isDirectory { @@ -429,7 +429,7 @@ class SourceGenerator { isBaseGroup: Bool, hasCustomParent: Bool, excludePaths: Set, - includePaths: SortedArray, + includePaths: SortedArray?, buildPhases: [Path: BuildPhaseSpec] ) throws -> (sourceFiles: [SourceFile], groups: [PBXGroup]) { @@ -586,7 +586,7 @@ class SourceGenerator { let path = project.basePath + targetSource.path let excludePaths = getSourceMatches(targetSource: targetSource, patterns: targetSource.excludes) // generate included paths. Excluded paths will override this. - let includePaths = getSourceMatches(targetSource: targetSource, patterns: targetSource.includes) + let includePaths = targetSource.includes.isEmpty ? nil : getSourceMatches(targetSource: targetSource, patterns: targetSource.includes) let type = resolvedTargetSourceType(for: targetSource, at: path) @@ -655,7 +655,7 @@ class SourceGenerator { isBaseGroup: true, hasCustomParent: hasCustomParent, excludePaths: excludePaths, - includePaths: SortedArray(includePaths), + includePaths: includePaths.flatMap(SortedArray.init(_:)), buildPhases: buildPhases ) diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index de033f509..c48f6e050 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -1042,6 +1042,39 @@ class SourceGeneratorTests: XCTestCase { try pbxProj.expectFileMissing(paths: ["Sources", "group", "file.swift"]) } + $0.it("handles includes with no matches correctly") { + let directories = """ + Sources: + - file3.swift + - file3Tests.swift + - file2.swift + - file2Tests.swift + - group2: + - file.swift + - fileTests.swift + - group: + - file.swift + """ + try createDirectories(directories) + + let includes = [ + "**/*NonExistent.*", + ] + + let target = Target(name: "Test", type: .application, platform: .iOS, sources: [TargetSource(path: "Sources", includes: includes)]) + + let project = Project(basePath: directoryPath, name: "Test", targets: [target]) + let pbxProj = try project.generatePbxProj() + + try pbxProj.expectFileMissing(paths: ["Sources", "file2.swift"]) + try pbxProj.expectFileMissing(paths: ["Sources", "file3.swift"]) + try pbxProj.expectFileMissing(paths: ["Sources", "file2Tests.swift"]) + try pbxProj.expectFileMissing(paths: ["Sources", "file3Tests.swift"]) + try pbxProj.expectFileMissing(paths: ["Sources", "group2", "file.swift"]) + try pbxProj.expectFileMissing(paths: ["Sources", "group2", "fileTests.swift"]) + try pbxProj.expectFileMissing(paths: ["Sources", "group", "file.swift"]) + } + $0.it("prioritizes excludes over includes when both are present") { let directories = """ Sources: From a0e71fe3dff95f964e1508748027fb93a693cc2d Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 17 Aug 2023 14:00:00 +1000 Subject: [PATCH 201/284] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39d7f04c7..3bd948789 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,12 @@ ## Next Version -## 2.37.0 - ### Fixed - Fixed source file `includes` not working when no paths were found #1337 @shnhrrsn +## 2.37.0 + ### Added - Added support for adding `Build Tool Plug-ins` to targets #1374 @BarredEwe From 808aa25f5139b2613bb90f933c50510db7dc7fa5 Mon Sep 17 00:00:00 2001 From: Aaron Farnham <74742335+aaron-foreflight@users.noreply.github.com> Date: Sat, 2 Sep 2023 09:00:56 -0500 Subject: [PATCH 202/284] Add support for .mlpackage bundles (#1398) --- Sources/ProjectSpec/FileType.swift | 1 + Tests/XcodeGenKitTests/SourceGeneratorTests.swift | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Sources/ProjectSpec/FileType.swift b/Sources/ProjectSpec/FileType.swift index c794b64e2..b6af3a9fa 100644 --- a/Sources/ProjectSpec/FileType.swift +++ b/Sources/ProjectSpec/FileType.swift @@ -87,6 +87,7 @@ extension FileType { "intentdefinition": FileType(buildPhase: .sources), "metal": FileType(buildPhase: .sources), "mlmodel": FileType(buildPhase: .sources), + "mlpackage" : FileType(buildPhase: .sources), "mlmodelc": FileType(buildPhase: .resources), "rcproject": FileType(buildPhase: .sources), "iig": FileType(buildPhase: .sources), diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index c48f6e050..2075abf3b 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -589,6 +589,7 @@ class SourceGeneratorTests: XCTestCase { - file.xcassets - file.metal - file.mlmodel + - file.mlpackage - file.mlmodelc - Info.plist - Intent.intentdefinition @@ -648,6 +649,7 @@ class SourceGeneratorTests: XCTestCase { try pbxProj.expectFile(paths: ["C", "Info.plist"], buildPhase: BuildPhaseSpec.none) try pbxProj.expectFile(paths: ["C", "file.metal"], buildPhase: .sources) try pbxProj.expectFile(paths: ["C", "file.mlmodel"], buildPhase: .sources) + try pbxProj.expectFile(paths: ["C", "file.mlpackage"], buildPhase: .sources) try pbxProj.expectFile(paths: ["C", "file.mlmodelc"], buildPhase: .resources) try pbxProj.expectFile(paths: ["C", "Intent.intentdefinition"], buildPhase: .sources) try pbxProj.expectFile(paths: ["C", "Configuration.storekit"], buildPhase: .resources) From 213f47d7d555dbd66245951490fbbd7a543422a7 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Sun, 3 Sep 2023 00:02:42 +1000 Subject: [PATCH 203/284] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bd948789..289faca74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Added + +- `.mlpackage` files now default to being a source type #1398 @aaron-foreflight + ### Fixed - Fixed source file `includes` not working when no paths were found #1337 @shnhrrsn From 73e25e494352f74981a10cb5b54c4ab47d223cb1 Mon Sep 17 00:00:00 2001 From: BarredEwe Date: Sun, 10 Sep 2023 14:42:47 +0300 Subject: [PATCH 204/284] Added support for `Build Tool Plug-ins` in AggregateTarget (#1390) * Added support for `BuildTool Plug-ins` in AggregateTarget * Update CHANGELOG.md --- CHANGELOG.md | 3 +- Sources/ProjectSpec/AggregateTarget.swift | 6 + Sources/ProjectSpec/ProjectTarget.swift | 1 + Sources/ProjectSpec/SpecValidation.swift | 12 +- Sources/XcodeGenKit/PBXProjGenerator.swift | 46 ++-- .../SPM/SPM.xcodeproj/project.pbxproj | 45 ++++ .../xcshareddata/swiftpm/Package.resolved | 222 ++++++++++-------- Tests/Fixtures/SPM/project.yml | 5 + 8 files changed, 212 insertions(+), 128 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 289faca74..37f81baf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ ### Added - `.mlpackage` files now default to being a source type #1398 @aaron-foreflight - +- Added support for `Build Tool Plug-ins` in `AggregateTarget` #1390 @BarredEwe + ### Fixed - Fixed source file `includes` not working when no paths were found #1337 @shnhrrsn diff --git a/Sources/ProjectSpec/AggregateTarget.swift b/Sources/ProjectSpec/AggregateTarget.swift index 3769e64ce..1a3225c40 100644 --- a/Sources/ProjectSpec/AggregateTarget.swift +++ b/Sources/ProjectSpec/AggregateTarget.swift @@ -8,6 +8,7 @@ public struct AggregateTarget: ProjectTarget { public var targets: [String] public var settings: Settings public var buildScripts: [BuildScript] + public var buildToolPlugins: [BuildToolPlugin] public var configFiles: [String: String] public var scheme: TargetScheme? public var attributes: [String: Any] @@ -18,6 +19,7 @@ public struct AggregateTarget: ProjectTarget { settings: Settings = .empty, configFiles: [String: String] = [:], buildScripts: [BuildScript] = [], + buildToolPlugins: [BuildToolPlugin] = [], scheme: TargetScheme? = nil, attributes: [String: Any] = [:] ) { @@ -26,6 +28,7 @@ public struct AggregateTarget: ProjectTarget { self.settings = settings self.configFiles = configFiles self.buildScripts = buildScripts + self.buildToolPlugins = buildToolPlugins self.scheme = scheme self.attributes = attributes } @@ -46,6 +49,7 @@ extension AggregateTarget: Equatable { lhs.settings == rhs.settings && lhs.configFiles == rhs.configFiles && lhs.buildScripts == rhs.buildScripts && + lhs.buildToolPlugins == rhs.buildToolPlugins && lhs.scheme == rhs.scheme && NSDictionary(dictionary: lhs.attributes).isEqual(to: rhs.attributes) } @@ -59,6 +63,7 @@ extension AggregateTarget: NamedJSONDictionaryConvertible { settings = jsonDictionary.json(atKeyPath: "settings") ?? .empty configFiles = jsonDictionary.json(atKeyPath: "configFiles") ?? [:] buildScripts = jsonDictionary.json(atKeyPath: "buildScripts") ?? [] + buildToolPlugins = jsonDictionary.json(atKeyPath: "buildToolPlugins") ?? [] scheme = jsonDictionary.json(atKeyPath: "scheme") attributes = jsonDictionary.json(atKeyPath: "attributes") ?? [:] } @@ -72,6 +77,7 @@ extension AggregateTarget: JSONEncodable { "configFiles": configFiles, "attributes": attributes, "buildScripts": buildScripts.map { $0.toJSONValue() }, + "buildToolPlugins": buildToolPlugins.map { $0.toJSONValue() }, "scheme": scheme?.toJSONValue(), ] as [String: Any?] } diff --git a/Sources/ProjectSpec/ProjectTarget.swift b/Sources/ProjectSpec/ProjectTarget.swift index 99fd1d77d..6539f3e84 100644 --- a/Sources/ProjectSpec/ProjectTarget.swift +++ b/Sources/ProjectSpec/ProjectTarget.swift @@ -6,6 +6,7 @@ public protocol ProjectTarget: BuildSettingsContainer { var name: String { get } var type: PBXProductType { get } var buildScripts: [BuildScript] { get } + var buildToolPlugins: [BuildToolPlugin] { get } var scheme: TargetScheme? { get } var attributes: [String: Any] { get } } diff --git a/Sources/ProjectSpec/SpecValidation.swift b/Sources/ProjectSpec/SpecValidation.swift index f387911a8..018a5243d 100644 --- a/Sources/ProjectSpec/SpecValidation.swift +++ b/Sources/ProjectSpec/SpecValidation.swift @@ -144,6 +144,12 @@ extension Project { } errors += validateSettings(target.settings) + + for buildToolPlugin in target.buildToolPlugins { + if packages[buildToolPlugin.package] == nil { + errors.append(.invalidPluginPackageReference(plugin: buildToolPlugin.plugin, package: buildToolPlugin.package)) + } + } } for target in aggregateTargets { @@ -174,12 +180,6 @@ extension Project { errors.append(.invalidTargetSource(target: target.name, source: sourcePath.string)) } } - - for buildToolPlugin in target.buildToolPlugins { - if packages[buildToolPlugin.package] == nil { - errors.append(.invalidPluginPackageReference(plugin: buildToolPlugin.plugin, package: buildToolPlugin.package)) - } - } } for projectReference in projectReferences { diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index df38cff91..7f3b67073 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -30,6 +30,7 @@ public class PBXProjGenerator { var generated = false private var projects: [ProjectReference: PBXProj] = [:] + lazy private var localPackageReferences: [String] = project.packages.compactMap { $0.value.isLocal ? $0.key : nil } public init(project: Project, projectDirectory: Path? = nil) { self.project = project @@ -339,7 +340,7 @@ public class PBXProjGenerator { return addObject(buildConfig) } - let dependencies = target.targets.map { generateTargetDependency(from: target.name, to: $0, platform: nil) } + var dependencies = target.targets.map { generateTargetDependency(from: target.name, to: $0, platform: nil) } let defaultConfigurationName = project.options.defaultConfig ?? project.configs.first?.name ?? "" let buildConfigList = addObject(XCConfigurationList( @@ -350,6 +351,9 @@ public class PBXProjGenerator { var buildPhases: [PBXBuildPhase] = [] buildPhases += try target.buildScripts.map { try generateBuildScript(targetName: target.name, buildScript: $0) } + let packagePluginDependencies = makePackagePluginDependency(for: target) + dependencies.append(contentsOf: packagePluginDependencies) + aggregateTarget.buildPhases = buildPhases aggregateTarget.buildConfigurationList = buildConfigList aggregateTarget.dependencies = dependencies @@ -692,7 +696,6 @@ public class PBXProjGenerator { var systemExtensions: [PBXBuildFile] = [] var appClips: [PBXBuildFile] = [] var carthageFrameworksToEmbed: [String] = [] - let localPackageReferences: [String] = project.packages.compactMap { $0.value.isLocal ? $0.key : nil } let targetDependencies = (target.transitivelyLinkDependencies ?? project.options.transitivelyLinkDependencies) ? getAllDependenciesPlusTransitiveNeedingEmbedding(target: target) : target.dependencies @@ -1032,22 +1035,8 @@ public class PBXProjGenerator { carthageFrameworksToEmbed = carthageFrameworksToEmbed.uniqued() - // Adding `Build Tools Plug-ins` as a dependency to the target - for buildToolPlugin in target.buildToolPlugins { - let packageReference = packageReferences[buildToolPlugin.package] - if packageReference == nil, !localPackageReferences.contains(buildToolPlugin.package) { - continue - } - - let packageDependency = addObject( - XCSwiftPackageProductDependency(productName: buildToolPlugin.plugin, package: packageReference, isPlugin: true) - ) - let targetDependency = addObject( - PBXTargetDependency(product: packageDependency) - ) - - dependencies.append(targetDependency) - } + let packagePluginDependencies = makePackagePluginDependency(for: target) + dependencies.append(contentsOf: packagePluginDependencies) var buildPhases: [PBXBuildPhase] = [] @@ -1448,6 +1437,27 @@ public class PBXProjGenerator { } } + /// Make `Build Tools Plug-ins` as a dependency to the target + /// - Parameter target: ProjectTarget + /// - Returns: Elements for referencing other targets through content proxies. + func makePackagePluginDependency(for target: ProjectTarget) -> [PBXTargetDependency] { + target.buildToolPlugins.compactMap { buildToolPlugin in + let packageReference = packageReferences[buildToolPlugin.package] + if packageReference == nil, !localPackageReferences.contains(buildToolPlugin.package) { + return nil + } + + let packageDependency = addObject( + XCSwiftPackageProductDependency(productName: buildToolPlugin.plugin, package: packageReference, isPlugin: true) + ) + let targetDependency = addObject( + PBXTargetDependency(product: packageDependency) + ) + + return targetDependency + } + } + func getInfoPlists(for target: Target) -> [Config: String] { var searchForDefaultInfoPlist: Bool = true var defaultInfoPlist: String? diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index d93b15a78..94022862a 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -6,6 +6,20 @@ objectVersion = 54; objects = { +/* Begin PBXAggregateTarget section */ + ADD3CE771A0D5E996031A193 /* AggTarget */ = { + isa = PBXAggregateTarget; + buildConfigurationList = A7ABF1B35D9170092F822790 /* Build configuration list for PBXAggregateTarget "AggTarget" */; + buildPhases = ( + ); + dependencies = ( + D287BAAB664D1A024D9DD57E /* PBXTargetDependency */, + ); + name = AggTarget; + productName = AggTarget; + }; +/* End PBXAggregateTarget section */ + /* Begin PBXBuildFile section */ 23C6626698DE560017A89F2F /* XcodeGen in Frameworks */ = {isa = PBXBuildFile; productRef = 6F7DEA2D82649EDF903FBDBD /* XcodeGen */; }; 2DA7998902987953B119E4CE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26F7EFEE613987D1E1258A60 /* AppDelegate.swift */; }; @@ -221,6 +235,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( + ADD3CE771A0D5E996031A193 /* AggTarget */, C99E3C420D63D5219CE57E33 /* App */, 3F8D94C4EFC431F646AAFB28 /* StaticLibrary */, 339863E54E2D955C00B56802 /* Tests */, @@ -300,6 +315,10 @@ isa = PBXTargetDependency; productRef = 5A36E2FE69703FCAC0BE8064 /* XcodeGen */; }; + D287BAAB664D1A024D9DD57E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = 896D1E2063A93D40F04D7864 /* PrefirePlaybookPlugin */; + }; D85FFB99444DD260A72DDDA7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; productRef = AF233B61592982A7F6431FC6 /* Codability */; @@ -315,6 +334,12 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ + 0C023F1AE037C42683029CE9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Debug; + }; 0CCC06807E5CD8361D899B7F /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -360,6 +385,12 @@ }; name = Debug; }; + 5E087A904FBC0E623E672507 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Release; + }; 7A384B9B9CF42FCF9EF02057 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -565,6 +596,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; + A7ABF1B35D9170092F822790 /* Build configuration list for PBXAggregateTarget "AggTarget" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0C023F1AE037C42683029CE9 /* Debug */, + 5E087A904FBC0E623E672507 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ @@ -608,6 +648,11 @@ isa = XCSwiftPackageProductDependency; productName = XcodeGen; }; + 896D1E2063A93D40F04D7864 /* PrefirePlaybookPlugin */ = { + isa = XCSwiftPackageProductDependency; + package = 348C81C327DB1710B742C370 /* XCRemoteSwiftPackageReference "Prefire" */; + productName = "plugin:PrefirePlaybookPlugin"; + }; AF233B61592982A7F6431FC6 /* Codability */ = { isa = XCSwiftPackageProductDependency; package = 5BA91390AE78D2EE15C60091 /* XCRemoteSwiftPackageReference "Codability" */; diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Tests/Fixtures/SPM/SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index a14eedb25..8d8accfc1 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,106 +1,122 @@ { - "object": { - "pins": [ - { - "package": "AEXML", - "repositoryURL": "https://github.com/tadija/AEXML", - "state": { - "branch": null, - "revision": "e4d517844dd03dac557e35d77a8e9ab438de91a6", - "version": "4.4.0" - } - }, - { - "package": "Codability", - "repositoryURL": "https://github.com/yonaskolb/Codability", - "state": { - "branch": null, - "revision": "eb5bac78e0679f521c3f058c1eb9be0dd657dadd", - "version": "0.2.1" - } - }, - { - "package": "JSONUtilities", - "repositoryURL": "https://github.com/yonaskolb/JSONUtilities.git", - "state": { - "branch": null, - "revision": "128d2ffc22467f69569ef8ff971683e2393191a0", - "version": "4.2.0" - } - }, - { - "package": "PathKit", - "repositoryURL": "https://github.com/kylef/PathKit.git", - "state": { - "branch": null, - "revision": "73f8e9dca9b7a3078cb79128217dc8f2e585a511", - "version": "1.0.0" - } - }, - { - "package": "Rainbow", - "repositoryURL": "https://github.com/onevcat/Rainbow.git", - "state": { - "branch": null, - "revision": "9c52c1952e9b2305d4507cf473392ac2d7c9b155", - "version": "3.1.5" - } - }, - { - "package": "Spectre", - "repositoryURL": "https://github.com/kylef/Spectre.git", - "state": { - "branch": null, - "revision": "f14ff47f45642aa5703900980b014c2e9394b6e5", - "version": "0.9.0" - } - }, - { - "package": "SwiftCLI", - "repositoryURL": "https://github.com/jakeheis/SwiftCLI.git", - "state": { - "branch": null, - "revision": "c72c4564f8c0a24700a59824880536aca45a4cae", - "version": "6.0.1" - } - }, - { - "package": "SwiftRoaring", - "repositoryURL": "https://github.com/piotte13/SwiftRoaring", - "state": { - "branch": null, - "revision": "9104cf3f35e7a38c9fb633084c7adb63a9f27f8b", - "version": "1.0.4" - } - }, - { - "package": "Version", - "repositoryURL": "https://github.com/mxcl/Version", - "state": { - "branch": null, - "revision": "a94b48f36763c05629fc102837398505032dead9", - "version": "2.0.0" - } - }, - { - "package": "XcodeProj", - "repositoryURL": "https://github.com/tuist/XcodeProj.git", - "state": { - "branch": null, - "revision": "f32704e01d2752bdc17cde3963bee4256c1f4df4", - "version": "7.8.0" - } - }, - { - "package": "Yams", - "repositoryURL": "https://github.com/jpsim/Yams.git", - "state": { - "branch": null, - "revision": "c947a306d2e80ecb2c0859047b35c73b8e1ca27f", - "version": "2.0.0" - } + "pins" : [ + { + "identity" : "aexml", + "kind" : "remoteSourceControl", + "location" : "https://github.com/tadija/AEXML.git", + "state" : { + "revision" : "38f7d00b23ecd891e1ee656fa6aeebd6ba04ecc3", + "version" : "4.6.1" } - ] - }, - "version": 1 + }, + { + "identity" : "codability", + "kind" : "remoteSourceControl", + "location" : "https://github.com/yonaskolb/Codability", + "state" : { + "revision" : "eb5bac78e0679f521c3f058c1eb9be0dd657dadd", + "version" : "0.2.1" + } + }, + { + "identity" : "graphviz", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SwiftDocOrg/GraphViz.git", + "state" : { + "revision" : "70bebcf4597b9ce33e19816d6bbd4ba9b7bdf038", + "version" : "0.2.0" + } + }, + { + "identity" : "jsonutilities", + "kind" : "remoteSourceControl", + "location" : "https://github.com/yonaskolb/JSONUtilities.git", + "state" : { + "revision" : "128d2ffc22467f69569ef8ff971683e2393191a0", + "version" : "4.2.0" + } + }, + { + "identity" : "pathkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/kylef/PathKit.git", + "state" : { + "revision" : "3bfd2737b700b9a36565a8c94f4ad2b050a5e574", + "version" : "1.0.1" + } + }, + { + "identity" : "prefire", + "kind" : "remoteSourceControl", + "location" : "https://github.com/BarredEwe/Prefire", + "state" : { + "revision" : "abb8dfa44391b4f47edb4937a4ba124e76270a87", + "version" : "1.4.1" + } + }, + { + "identity" : "rainbow", + "kind" : "remoteSourceControl", + "location" : "https://github.com/onevcat/Rainbow.git", + "state" : { + "revision" : "626c3d4b6b55354b4af3aa309f998fae9b31a3d9", + "version" : "3.2.0" + } + }, + { + "identity" : "spectre", + "kind" : "remoteSourceControl", + "location" : "https://github.com/kylef/Spectre.git", + "state" : { + "revision" : "26cc5e9ae0947092c7139ef7ba612e34646086c7", + "version" : "0.10.1" + } + }, + { + "identity" : "swiftcli", + "kind" : "remoteSourceControl", + "location" : "https://github.com/jakeheis/SwiftCLI.git", + "state" : { + "revision" : "2e949055d9797c1a6bddcda0e58dada16cc8e970", + "version" : "6.0.3" + } + }, + { + "identity" : "swiftroaring", + "kind" : "remoteSourceControl", + "location" : "https://github.com/piotte13/SwiftRoaring", + "state" : { + "revision" : "9104cf3f35e7a38c9fb633084c7adb63a9f27f8b", + "version" : "1.0.4" + } + }, + { + "identity" : "version", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mxcl/Version", + "state" : { + "revision" : "1fe824b80d89201652e7eca7c9252269a1d85e25", + "version" : "2.0.1" + } + }, + { + "identity" : "xcodeproj", + "kind" : "remoteSourceControl", + "location" : "https://github.com/tuist/XcodeProj.git", + "state" : { + "revision" : "6e60fb55271c80f83a186c9b1b4982fd991cfc0a", + "version" : "8.13.0" + } + }, + { + "identity" : "yams", + "kind" : "remoteSourceControl", + "location" : "https://github.com/jpsim/Yams.git", + "state" : { + "revision" : "0d9ee7ea8c4ebd4a489ad7a73d5c6cad55d6fed3", + "version" : "5.0.6" + } + } + ], + "version" : 2 } diff --git a/Tests/Fixtures/SPM/project.yml b/Tests/Fixtures/SPM/project.yml index b6b4f8e31..c1c360308 100644 --- a/Tests/Fixtures/SPM/project.yml +++ b/Tests/Fixtures/SPM/project.yml @@ -12,6 +12,11 @@ packages: XcodeGen: path: ../../.. #XcodeGen itself group: SPM +aggregateTargets: + AggTarget: + buildToolPlugins: + - plugin: PrefirePlaybookPlugin + package: Prefire targets: App: type: application From 486df5da4da9c0fd479cb7f55b9d0dc3b5531c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Mon, 11 Sep 2023 03:49:38 +0200 Subject: [PATCH 205/284] Supports specifying multiple package products (#1395) * Supports specifying multiple package products * Adds #1395 to CHANGELOG.md * Updates documentation * Adds fixture * Adds changes to pbxproj after changing fixture * Elaborates on linking options in "Package dependency" section --- CHANGELOG.md | 1 + Docs/ProjectSpec.md | 18 ++++- Sources/ProjectSpec/Dependency.swift | 21 ++++-- Sources/XcodeGenKit/PBXProjGenerator.swift | 69 +++++++++++-------- Tests/Fixtures/SPM/FooFeature/Package.swift | 20 ++++++ .../Sources/FooDomain/FooDomain.swift | 1 + .../SPM/FooFeature/Sources/FooUI/FooUI.swift | 1 + .../SPM/SPM.xcodeproj/project.pbxproj | 44 ++++++++++++ Tests/Fixtures/SPM/project.yml | 10 +++ Tests/ProjectSpecTests/ProjectSpecTests.swift | 6 +- Tests/ProjectSpecTests/SpecLoadingTests.swift | 6 +- .../GraphVizGeneratorTests.swift | 2 +- .../PBXProjGeneratorTests.swift | 2 +- .../ProjectGeneratorTests.swift | 59 ++++++++++++---- .../SchemeGeneratorTests.swift | 2 +- 15 files changed, 202 insertions(+), 60 deletions(-) create mode 100644 Tests/Fixtures/SPM/FooFeature/Package.swift create mode 100644 Tests/Fixtures/SPM/FooFeature/Sources/FooDomain/FooDomain.swift create mode 100644 Tests/Fixtures/SPM/FooFeature/Sources/FooUI/FooUI.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index 37f81baf0..6947ac20d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Fixed - Fixed source file `includes` not working when no paths were found #1337 @shnhrrsn +- Supports specifying multiple package products #1395 @simonbs ## 2.37.0 diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 2cd3c461c..a1fb0ad37 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -645,7 +645,8 @@ targets: ``` **Package dependency** -- [ ] **product**: **String** - The product to use from the package. This defaults to the package name, so is only required if a Package has multiple libraries or a library with a differing name +- [ ] **product**: **String** - The product to use from the package. This defaults to the package name, so is only required if a Package has multiple libraries or a library with a differing name. Use this over `products` when you want to define different linking options per product. +- [ ] **products**: **String** - A list of products to use from the package. This can be used when depending on multiple products from a package. ```yaml packages: @@ -663,6 +664,21 @@ targets: product: SPMUtility ``` +Depending on multiple products from a package: + +```yaml +packages: + FooFeature: + path: Packages/FooFeature +targets: + App: + dependencies: + - package: FooFeature + products: + - FooDomain + - FooUI +``` + ### Config Files Specifies `.xcconfig` files for each configuration. diff --git a/Sources/ProjectSpec/Dependency.swift b/Sources/ProjectSpec/Dependency.swift index ba4068cb0..b102b1276 100644 --- a/Sources/ProjectSpec/Dependency.swift +++ b/Sources/ProjectSpec/Dependency.swift @@ -61,7 +61,7 @@ public struct Dependency: Equatable { case framework case carthage(findFrameworks: Bool?, linkType: CarthageLinkType) case sdk(root: String?) - case package(product: String?) + case package(products: [String]) case bundle } } @@ -69,9 +69,9 @@ public struct Dependency: Equatable { extension Dependency { public var uniqueID: String { switch type { - case .package(let product): - if let product = product { - return "\(reference)/\(product)" + case .package(let products): + if !products.isEmpty { + return "\(reference)/\(products.joined(separator: ","))" } else { return reference } @@ -106,9 +106,16 @@ extension Dependency: JSONObjectConvertible { type = .sdk(root: sdkRoot) reference = sdk } else if let package: String = jsonDictionary.json(atKeyPath: "package") { - let product: String? = jsonDictionary.json(atKeyPath: "product") - type = .package(product: product) - reference = package + if let products: [String] = jsonDictionary.json(atKeyPath: "products") { + type = .package(products: products) + reference = package + } else if let product: String = jsonDictionary.json(atKeyPath: "product") { + type = .package(products: [product]) + reference = package + } else { + type = .package(products: []) + reference = package + } } else if let bundle: String = jsonDictionary.json(atKeyPath: "bundle") { type = .bundle reference = bundle diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 7f3b67073..0ac632a86 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -931,7 +931,7 @@ public class PBXProjGenerator { } } // Embedding handled by iterating over `carthageDependencies` below - case .package(let product): + case .package(let products): let packageReference = packageReferences[dependency.reference] // If package's reference is none and there is no specified package in localPackages, @@ -940,40 +940,49 @@ public class PBXProjGenerator { continue } - let productName = product ?? dependency.reference - let packageDependency = addObject( - XCSwiftPackageProductDependency(productName: productName, package: packageReference) - ) + func addPackageProductDependency(named productName: String) { + let packageDependency = addObject( + XCSwiftPackageProductDependency(productName: productName, package: packageReference) + ) - // Add package dependency if linking is true. - if dependency.link ?? true { - packageDependencies.append(packageDependency) - } + // Add package dependency if linking is true. + if dependency.link ?? true { + packageDependencies.append(packageDependency) + } - let link = dependency.link ?? (target.type != .staticLibrary) - if link { - let file = PBXBuildFile(product: packageDependency, settings: getDependencyFrameworkSettings(dependency: dependency)) - file.platformFilter = platform - let buildFile = addObject(file) - targetFrameworkBuildFiles.append(buildFile) - } else { - let targetDependency = addObject( - PBXTargetDependency(platformFilter: platform, product: packageDependency) - ) - dependencies.append(targetDependency) + let link = dependency.link ?? (target.type != .staticLibrary) + if link { + let file = PBXBuildFile(product: packageDependency, settings: getDependencyFrameworkSettings(dependency: dependency)) + file.platformFilter = platform + let buildFile = addObject(file) + targetFrameworkBuildFiles.append(buildFile) + } else { + let targetDependency = addObject( + PBXTargetDependency(platformFilter: platform, product: packageDependency) + ) + dependencies.append(targetDependency) + } + + if dependency.embed == true { + let pbxBuildFile = PBXBuildFile(product: packageDependency, + settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) + pbxBuildFile.platformFilter = platform + let embedFile = addObject(pbxBuildFile) + + if dependency.copyPhase != nil { + customCopyDependenciesReferences.append(embedFile) + } else { + copyFrameworksReferences.append(embedFile) + } + } } - if dependency.embed == true { - let pbxBuildFile = PBXBuildFile(product: packageDependency, - settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) - pbxBuildFile.platformFilter = platform - let embedFile = addObject(pbxBuildFile) - - if dependency.copyPhase != nil { - customCopyDependenciesReferences.append(embedFile) - } else { - copyFrameworksReferences.append(embedFile) + if !products.isEmpty { + for product in products { + addPackageProductDependency(named: product) } + } else { + addPackageProductDependency(named: dependency.reference) } case .bundle: // Static and dynamic libraries can't copy resources diff --git a/Tests/Fixtures/SPM/FooFeature/Package.swift b/Tests/Fixtures/SPM/FooFeature/Package.swift new file mode 100644 index 000000000..2540293c8 --- /dev/null +++ b/Tests/Fixtures/SPM/FooFeature/Package.swift @@ -0,0 +1,20 @@ +// swift-tools-version: 5.8 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "FooFeature", + products: [ + .library(name: "FooDomain", targets: [ + "FooDomain" + ]), + .library(name: "FooUI", targets: [ + "FooUI" + ]) + ], + targets: [ + .target(name: "FooDomain"), + .target(name: "FooUI") + ] +) diff --git a/Tests/Fixtures/SPM/FooFeature/Sources/FooDomain/FooDomain.swift b/Tests/Fixtures/SPM/FooFeature/Sources/FooDomain/FooDomain.swift new file mode 100644 index 000000000..580e98166 --- /dev/null +++ b/Tests/Fixtures/SPM/FooFeature/Sources/FooDomain/FooDomain.swift @@ -0,0 +1 @@ +public struct FooDomain {} diff --git a/Tests/Fixtures/SPM/FooFeature/Sources/FooUI/FooUI.swift b/Tests/Fixtures/SPM/FooFeature/Sources/FooUI/FooUI.swift new file mode 100644 index 000000000..1951b94c7 --- /dev/null +++ b/Tests/Fixtures/SPM/FooFeature/Sources/FooUI/FooUI.swift @@ -0,0 +1 @@ +public struct FooUI {} diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index 94022862a..5c21547ed 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -23,10 +23,12 @@ /* Begin PBXBuildFile section */ 23C6626698DE560017A89F2F /* XcodeGen in Frameworks */ = {isa = PBXBuildFile; productRef = 6F7DEA2D82649EDF903FBDBD /* XcodeGen */; }; 2DA7998902987953B119E4CE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26F7EFEE613987D1E1258A60 /* AppDelegate.swift */; }; + 36CE2E6187D9709BAD9EF807 /* FooUI in Frameworks */ = {isa = PBXBuildFile; productRef = 927CB19D94339CC9960E930C /* FooUI */; }; 3986ED6965842721C46C0452 /* SwiftRoaringDynamic in Frameworks */ = {isa = PBXBuildFile; productRef = DC73B269C8B0C0BF6912842C /* SwiftRoaringDynamic */; }; 4CC663B42B270404EF5FD037 /* libStaticLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CAB5625F6FEA668410ED5482 /* libStaticLibrary.a */; }; 9AD886A88D3E4A1B5E900687 /* SPMTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7970A2253B14A9B27C307FAC /* SPMTests.swift */; }; 9C4AD0711D706FD3ED0E436D /* StaticLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61C17B77601A9D1B7895AB42 /* StaticLibrary.swift */; }; + AF8E362713B9D28EA9A5C9FC /* FooDomain in Frameworks */ = {isa = PBXBuildFile; productRef = 8D2DC638BEF7FDF23907E134 /* FooDomain */; }; B89EA0F3859878A1DCF7BAFD /* SwiftRoaringDynamic in Embed Frameworks */ = {isa = PBXBuildFile; productRef = DC73B269C8B0C0BF6912842C /* SwiftRoaringDynamic */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; CE46CBA5671B951B546C8673 /* Codability in Frameworks */ = {isa = PBXBuildFile; productRef = 16E6FE01D5BD99F78D4A17E2 /* Codability */; settings = {ATTRIBUTES = (Weak, ); }; }; E368431019ABC696E4FFC0CF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4E22B8BCC18A29EFE1DE3BE4 /* Assets.xcassets */; }; @@ -71,6 +73,7 @@ 4E22B8BCC18A29EFE1DE3BE4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 61C17B77601A9D1B7895AB42 /* StaticLibrary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StaticLibrary.swift; sourceTree = ""; }; 7970A2253B14A9B27C307FAC /* SPMTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPMTests.swift; sourceTree = ""; }; + 979AE1767E2AF6B3B9D7F13D /* FooFeature */ = {isa = PBXFileReference; lastKnownFileType = folder; name = FooFeature; path = FooFeature; sourceTree = SOURCE_ROOT; }; A9601593D0AD02931266A4E5 /* App.xctestplan */ = {isa = PBXFileReference; path = App.xctestplan; sourceTree = ""; }; CAB5625F6FEA668410ED5482 /* libStaticLibrary.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary.a; sourceTree = BUILT_PRODUCTS_DIR; }; ED284AB7C13DCC0A95DAA680 /* XcodeGen */ = {isa = PBXFileReference; lastKnownFileType = folder; name = XcodeGen; path = ../../..; sourceTree = SOURCE_ROOT; }; @@ -85,6 +88,8 @@ 3986ED6965842721C46C0452 /* SwiftRoaringDynamic in Frameworks */, 4CC663B42B270404EF5FD037 /* libStaticLibrary.a in Frameworks */, 23C6626698DE560017A89F2F /* XcodeGen in Frameworks */, + AF8E362713B9D28EA9A5C9FC /* FooDomain in Frameworks */, + 36CE2E6187D9709BAD9EF807 /* FooUI in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -114,6 +119,7 @@ 218F6C96DF9E182F526258CF = { isa = PBXGroup; children = ( + AD0F3623091EEA8D1EA3DFF8 /* Packages */, 17DD374CC81D710476AFF41C /* SPM */, CF3BD77AEAA56553289456BA /* SPMTests */, 1FA59BFD192FB5A68D5F587C /* StaticLibrary */, @@ -131,6 +137,14 @@ name = Products; sourceTree = ""; }; + AD0F3623091EEA8D1EA3DFF8 /* Packages */ = { + isa = PBXGroup; + children = ( + 979AE1767E2AF6B3B9D7F13D /* FooFeature */, + ); + name = Packages; + sourceTree = SOURCE_ROOT; + }; CF3BD77AEAA56553289456BA /* SPMTests */ = { isa = PBXGroup; children = ( @@ -171,12 +185,16 @@ D85FFB99444DD260A72DDDA7 /* PBXTargetDependency */, DDD17C561AD5065DF4FA4072 /* PBXTargetDependency */, C6360997FFC102F6725099D4 /* PBXTargetDependency */, + 00B467060F3DEC027711F9C2 /* PBXTargetDependency */, + 7EB17E90A4D8F26FEABEEDF6 /* PBXTargetDependency */, ); name = StaticLibrary; packageProductDependencies = ( AF233B61592982A7F6431FC6 /* Codability */, C816AEB28ED71C3C47F31B98 /* SwiftRoaringDynamic */, 5A36E2FE69703FCAC0BE8064 /* XcodeGen */, + 6B8A6E1EA485E607A1D1DCD1 /* FooDomain */, + 15DB49096E2978F6BCA8D604 /* FooUI */, ); productName = StaticLibrary; productReference = CAB5625F6FEA668410ED5482 /* libStaticLibrary.a */; @@ -202,6 +220,8 @@ 16E6FE01D5BD99F78D4A17E2 /* Codability */, DC73B269C8B0C0BF6912842C /* SwiftRoaringDynamic */, 6F7DEA2D82649EDF903FBDBD /* XcodeGen */, + 8D2DC638BEF7FDF23907E134 /* FooDomain */, + 927CB19D94339CC9960E930C /* FooUI */, ); productName = App; productReference = 097F2DB5622B591E21BC3C73 /* App.app */; @@ -301,11 +321,19 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 00B467060F3DEC027711F9C2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = 6B8A6E1EA485E607A1D1DCD1 /* FooDomain */; + }; 078202CF7B08B66ACF7FEC23 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 3F8D94C4EFC431F646AAFB28 /* StaticLibrary */; targetProxy = 29147E1DDAEB1AAC20CB0CF9 /* PBXContainerItemProxy */; }; + 7EB17E90A4D8F26FEABEEDF6 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = 15DB49096E2978F6BCA8D604 /* FooUI */; + }; 8693351DA9DBE579AC9DD513 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = C99E3C420D63D5219CE57E33 /* App */; @@ -635,6 +663,10 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 15DB49096E2978F6BCA8D604 /* FooUI */ = { + isa = XCSwiftPackageProductDependency; + productName = FooUI; + }; 16E6FE01D5BD99F78D4A17E2 /* Codability */ = { isa = XCSwiftPackageProductDependency; package = 5BA91390AE78D2EE15C60091 /* XCRemoteSwiftPackageReference "Codability" */; @@ -644,6 +676,10 @@ isa = XCSwiftPackageProductDependency; productName = XcodeGen; }; + 6B8A6E1EA485E607A1D1DCD1 /* FooDomain */ = { + isa = XCSwiftPackageProductDependency; + productName = FooDomain; + }; 6F7DEA2D82649EDF903FBDBD /* XcodeGen */ = { isa = XCSwiftPackageProductDependency; productName = XcodeGen; @@ -653,6 +689,14 @@ package = 348C81C327DB1710B742C370 /* XCRemoteSwiftPackageReference "Prefire" */; productName = "plugin:PrefirePlaybookPlugin"; }; + 8D2DC638BEF7FDF23907E134 /* FooDomain */ = { + isa = XCSwiftPackageProductDependency; + productName = FooDomain; + }; + 927CB19D94339CC9960E930C /* FooUI */ = { + isa = XCSwiftPackageProductDependency; + productName = FooUI; + }; AF233B61592982A7F6431FC6 /* Codability */ = { isa = XCSwiftPackageProductDependency; package = 5BA91390AE78D2EE15C60091 /* XCRemoteSwiftPackageReference "Codability" */; diff --git a/Tests/Fixtures/SPM/project.yml b/Tests/Fixtures/SPM/project.yml index c1c360308..266f102e7 100644 --- a/Tests/Fixtures/SPM/project.yml +++ b/Tests/Fixtures/SPM/project.yml @@ -12,6 +12,8 @@ packages: XcodeGen: path: ../../.. #XcodeGen itself group: SPM + FooFeature: + path: FooFeature aggregateTargets: AggTarget: buildToolPlugins: @@ -37,6 +39,10 @@ targets: embed: true - target: StaticLibrary - package: XcodeGen + - package: FooFeature + products: + - FooDomain + - FooUI Tests: type: bundle.unit-test platform: iOS @@ -52,3 +58,7 @@ targets: - package: SwiftRoaring product: SwiftRoaringDynamic - package: XcodeGen + - package: FooFeature + products: + - FooDomain + - FooUI diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index cb41b989f..644e9fbc4 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -156,8 +156,8 @@ class ProjectSpecTests: XCTestCase { Dependency(type: .framework, reference: "dependency2"), // multiple package dependencies with different products should be allowed - Dependency(type: .package(product: "one"), reference: "package1"), - Dependency(type: .package(product: "two"), reference: "package1"), + Dependency(type: .package(products: ["one"]), reference: "package1"), + Dependency(type: .package(products: ["two"]), reference: "package1"), ] ), Target( @@ -205,7 +205,7 @@ class ProjectSpecTests: XCTestCase { sources: ["invalidSource"], dependencies: [ Dependency(type: .target, reference: "invalidDependency"), - Dependency(type: .package(product: nil), reference: "invalidPackage"), + Dependency(type: .package(products: []), reference: "invalidPackage"), ], preBuildScripts: [BuildScript(script: .path("invalidPreBuildScript"), name: "preBuildScript1")], postCompileScripts: [BuildScript(script: .path("invalidPostCompileScript"))], diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index bb8a4b183..2fe221841 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -38,7 +38,7 @@ class SpecLoadingTests: XCTestCase { "toReplace": Settings(dictionary: ["MY_SETTING2": "VALUE2"]), ] try expect(project.targets) == [ - Target(name: "IncludedTargetNew", type: .application, platform: .tvOS, sources: ["NewSource"], dependencies: [Dependency(type: .package(product: nil), reference: "Yams")]), + Target(name: "IncludedTargetNew", type: .application, platform: .tvOS, sources: ["NewSource"], dependencies: [Dependency(type: .package(products: []), reference: "Yams")]), Target(name: "NewTarget", type: .application, platform: .iOS, sources: ["template", "target"]), ] } @@ -54,7 +54,7 @@ class SpecLoadingTests: XCTestCase { "toReplace": Settings(dictionary: ["MY_SETTING2": "VALUE2"]), ] try expect(project.targets) == [ - Target(name: "IncludedTargetNew", type: .application, platform: .tvOS, sources: ["NewSource"], dependencies: [Dependency(type: .package(product: nil), reference: "SwiftPM"), Dependency(type: .package(product: nil), reference: "Yams")]), + Target(name: "IncludedTargetNew", type: .application, platform: .tvOS, sources: ["NewSource"], dependencies: [Dependency(type: .package(products: []), reference: "SwiftPM"), Dependency(type: .package(products: []), reference: "Yams")]), Target(name: "NewTarget", type: .application, platform: .iOS, sources: ["template", "target"]), ] } @@ -70,7 +70,7 @@ class SpecLoadingTests: XCTestCase { "toReplace": Settings(dictionary: ["MY_SETTING2": "VALUE2"]), ] try expect(project.targets) == [ - Target(name: "IncludedTargetNew", type: .application, platform: .tvOS, sources: ["NewSource"], dependencies: [Dependency(type: .package(product: nil), reference: "Yams")]), + Target(name: "IncludedTargetNew", type: .application, platform: .tvOS, sources: ["NewSource"], dependencies: [Dependency(type: .package(products: []), reference: "Yams")]), Target(name: "NewTarget", type: .application, platform: .iOS, sources: ["template", "target"]), ] } diff --git a/Tests/XcodeGenKitTests/GraphVizGeneratorTests.swift b/Tests/XcodeGenKitTests/GraphVizGeneratorTests.swift index 7bf3597a1..69af964c6 100644 --- a/Tests/XcodeGenKitTests/GraphVizGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/GraphVizGeneratorTests.swift @@ -14,7 +14,7 @@ private let app = Target( Dependency(type: .carthage(findFrameworks: true, linkType: .static), reference: "MyStaticFramework"), Dependency(type: .carthage(findFrameworks: true, linkType: .dynamic), reference: "MyDynamicFramework"), Dependency(type: .framework, reference: "MyExternalFramework"), - Dependency(type: .package(product: "MyPackage"), reference: "MyPackage"), + Dependency(type: .package(products: ["MyPackage"]), reference: "MyPackage"), Dependency(type: .sdk(root: "MySDK"), reference: "MySDK"), ] ) diff --git a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift index 8a864a3e7..7ffa5242a 100644 --- a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift @@ -357,7 +357,7 @@ class PBXProjGeneratorTests: XCTestCase { let dependency1 = Dependency(type: .target, reference: "TestAll", platformFilter: .all) let dependency2 = Dependency(type: .target, reference: "TestiOS", platformFilter: .iOS) let dependency3 = Dependency(type: .target, reference: "TestmacOS", platformFilter: .macOS) - let dependency4 = Dependency(type: .package(product: "Swinject"), reference: "Swinject", platformFilter: .iOS) + let dependency4 = Dependency(type: .package(products: ["Swinject"]), reference: "Swinject", platformFilter: .iOS) let target = Target(name: "Test", type: .application, platform: .iOS, sources: ["Sources"], dependencies: [dependency1, dependency2, dependency3, dependency4]) let swinjectPackage = SwiftPackage.remote(url: "https://github.com/Swinject/Swinject", versionRequirement: .exact("2.8.0")) let project = Project(basePath: directoryPath, name: "Test", targets: [target, target1, target2, target3], packages: ["Swinject": swinjectPackage]) diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index ac9e1af97..703126c76 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -555,12 +555,12 @@ class ProjectGeneratorTests: XCTestCase { Dependency(type: .target, reference: resourceBundle.name), Dependency(type: .framework, reference: "FrameworkC.framework"), Dependency(type: .carthage(findFrameworks: false, linkType: .dynamic), reference: "CarthageA"), - Dependency(type: .package(product: "RxSwift"), reference: "RxSwift"), - Dependency(type: .package(product: "RxCocoa"), reference: "RxSwift"), - Dependency(type: .package(product: "RxRelay"), reference: "RxSwift"), + Dependency(type: .package(products: ["RxSwift"]), reference: "RxSwift"), + Dependency(type: .package(products: ["RxCocoa"]), reference: "RxSwift"), + Dependency(type: .package(products: ["RxRelay"]), reference: "RxSwift"), // Validate - Do not link package - Dependency(type: .package(product: "KeychainAccess"), reference: "KeychainAccess", link: false), + Dependency(type: .package(products: ["KeychainAccess"]), reference: "KeychainAccess", link: false), // Statically linked, so don't embed into test Dependency(type: .target, reference: staticLibrary.name), @@ -1263,8 +1263,8 @@ class ProjectGeneratorTests: XCTestCase { type: .application, platform: .iOS, dependencies: [ - Dependency(type: .package(product: "ProjectSpec"), reference: "XcodeGen"), - Dependency(type: .package(product: nil), reference: "Codability"), + Dependency(type: .package(products: ["ProjectSpec"]), reference: "XcodeGen"), + Dependency(type: .package(products: []), reference: "Codability"), ] ) @@ -1300,7 +1300,7 @@ class ProjectGeneratorTests: XCTestCase { type: .application, platform: .iOS, dependencies: [ - Dependency(type: .package(product: nil), reference: "XcodeGen"), + Dependency(type: .package(products: []), reference: "XcodeGen"), ] ) @@ -1324,14 +1324,13 @@ class ProjectGeneratorTests: XCTestCase { try expect(file.product?.productName) == "XcodeGen" } - $0.it("generates local swift packages with custom xcode path") { let app = Target( name: "MyApp", type: .application, platform: .iOS, dependencies: [ - Dependency(type: .package(product: nil), reference: "XcodeGen"), + Dependency(type: .package(products: []), reference: "XcodeGen"), ] ) @@ -1495,6 +1494,40 @@ class ProjectGeneratorTests: XCTestCase { try expect(NSDictionary(dictionary: expectedInfoPlist).isEqual(to: infoPlist)).beTrue() } + + $0.it("generates local swift packages with multiple products") { + let app = Target( + name: "MyApp", + type: .application, + platform: .iOS, + dependencies: [ + Dependency(type: .package(products: ["FooDomain", "FooUI"]), reference: "FooFeature") + ] + ) + + let project = Project(name: "test", targets: [app], packages: [ + "FooFeature": .local(path: "../FooFeature", group: nil) + ], options: .init(localPackagesGroup: "MyPackages")) + + let pbxProject = try project.generatePbxProj(specValidate: false) + let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) + let localPackageFile = try unwrap(pbxProject.fileReferences.first(where: { $0.path == "../FooFeature" })) + try expect(localPackageFile.lastKnownFileType) == "folder" + + let frameworkPhases = nativeTarget.buildPhases.compactMap { $0 as? PBXFrameworksBuildPhase } + + guard let frameworkPhase = frameworkPhases.first else { + return XCTFail("frameworkPhases should have more than one") + } + + guard let files = frameworkPhase.files, files.count == 2 else { + return XCTFail("frameworkPhase should have exactly two files") + } + + let productNames = files.compactMap(\.product?.productName) + try expect(productNames).contains { $0 == "FooDomain" } + try expect(productNames).contains { $0 == "FooUI" } + } } } @@ -2978,8 +3011,8 @@ class ProjectGeneratorTests: XCTestCase { // given let dependencies = [ - Dependency(type: .package(product: "RxSwift"), reference: "RxSwift", embed: true), - Dependency(type: .package(product: "RxCocoa"), reference: "RxSwift", embed: false), + Dependency(type: .package(products: ["RxSwift"]), reference: "RxSwift", embed: true), + Dependency(type: .package(products: ["RxCocoa"]), reference: "RxSwift", embed: false), ] // when @@ -2993,8 +3026,8 @@ class ProjectGeneratorTests: XCTestCase { // given let dependencies = [ - Dependency(type: .package(product: "RxSwift"), reference: "RxSwift", embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), - Dependency(type: .package(product: "RxCocoa"), reference: "RxSwift", embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .package(products: ["RxSwift"]), reference: "RxSwift", embed: true, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), + Dependency(type: .package(products: ["RxCocoa"]), reference: "RxSwift", embed: false, copyPhase: BuildPhaseSpec.CopyFilesSettings(destination: .plugins, subpath: "test", phaseOrder: .postCompile)), ] // when diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index 8de673180..b5f392d38 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -487,7 +487,7 @@ class SchemeGeneratorTests: XCTestCase { type: .application, platform: .iOS, dependencies: [ - Dependency(type: .package(product: nil), reference: "XcodeGen") + Dependency(type: .package(products: []), reference: "XcodeGen") ], scheme: targetScheme ) From 26fc38a664cae9e2a76ec23566820a1dcfe4099c Mon Sep 17 00:00:00 2001 From: Ahmed Khalaf Date: Mon, 2 Oct 2023 07:49:46 +0200 Subject: [PATCH 206/284] Typo in ProjectSpec.md (#1405) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit schems -> schemes It ain't much, but it's honest work 😄 --- Docs/ProjectSpec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index a1fb0ad37..c9d400f42 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -68,7 +68,7 @@ You can also use environment variables in your configuration file, by using `${S - [ ] **targets**: **[String: [Target](#target)]** - The list of targets in the project mapped by name - [ ] **fileGroups**: **[String]** - A list of paths to add to the root of the project. These aren't files that will be included in your targets, but that you'd like to include in the project hierarchy anyway. For example a folder of xcconfig files that aren't already added by any target sources, or a Readme file. - [ ] **schemes**: **[Scheme](#scheme)** - A list of schemes by name. This allows more control over what is found in [Target Scheme](#target-scheme) -- [ ] **schemeTemplates**: **[String: [Scheme Template](#scheme-template)]** - a list of schemes that can be used as templates for actual schems which reference them via a `template` property. They can be used to extract common scheme settings. Works great in combination with `include`. +- [ ] **schemeTemplates**: **[String: [Scheme Template](#scheme-template)]** - a list of schemes that can be used as templates for actual schemes which reference them via a `template` property. They can be used to extract common scheme settings. Works great in combination with `include`. - [ ] **targetTemplates**: **[String: [Target Template](#target-template)]** - a list of targets that can be used as templates for actual targets which reference them via a `template` property. They can be used to extract common target settings. Works great in combination with `include`. - [ ] **packages**: **[String: [Swift Package](#swift-package)]** - a map of Swift packages by name. - [ ] **projectReferences**: **[String: [Project Reference](#project-reference)]** - a map of project references by name From ec050cd5cbd3af9cf51a3311d8c0540b2b017996 Mon Sep 17 00:00:00 2001 From: Soham Tembhurne <82658685+sohamtembhurne@users.noreply.github.com> Date: Tue, 17 Oct 2023 05:45:35 +0530 Subject: [PATCH 207/284] Update CHANGELOG.md (#1407) embeding -> embedding --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6947ac20d..2ae404e24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -361,7 +361,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen #### Fixed -- Fixed issue when linking and embeding static frameworks: they should be linked and NOT embed. #820 @acecilia +- Fixed issue when linking and embedding static frameworks: they should be linked and NOT embed. #820 @acecilia - Fixed issue when generating projects for paths with a dot in the folder for swift sources. #826 @asifmohd - Prefix static library target filenames with 'lib' to match Xcode. #831 @ileitch - Fixed duplicate addition of carthage static frameworks. #829 @funzin From 97d36fd1d29b69f0786c5d38acf1535b8776d233 Mon Sep 17 00:00:00 2001 From: Giovanni Amati Date: Tue, 31 Oct 2023 09:55:38 +0000 Subject: [PATCH 208/284] Support for multiple deployment targets with xcode 14 (#1336) * platformFilters on Dependecies * platformFilters on sources * fixed current unit tests * renamed enum to SupportedPlatforms * supportedPlatforms field for target * errors * renamed errors * inferPlatformFiltersByPath flag * changed priority to generate filter * fixed parsing * fixed init * unit test supportedPlatforms * unit tests for errors * fixing build settings and unit tests * added new settingsPresets * new check errors and unit tests * case insensitive match * fixed skipping cross platform target * json decode * unit tests inferPlatformFiltersByPath and platformFilters for sources * mocked files * fixing unit tests * first test on dependecies * unit tests completed * fixed unit tests * changelog * doc changes * doc changes * doc changes * doc changes * doc changes * doc changes * doc changes * doc changes * fixed doc * fixed unti tests style * fixed regex * fixed doc * addressing comments * Added TestProject, moved unit tests resources in another folder * Raising error if platform is an array * unit test on new error * fixed error enum * Integrated in TestProject * committed TestProject * unit test error * fixing spm deps in test project * pushed testProject * pushed testProject * pushed testProject fix * comment on isResolved property * renameing supportedPlatforms to supportedDestinations * renameing supportedPlatforms to supportedDestinations * renameing test app * checked out old file * fixing test app * working on auto baseSDK * fixed deploymentTarget * renamed errors * fixed presets * remamed index to priority * small comments * removed isResolved in target and fixed error check * added unit tests * fixed doc * fixed doc * fixed doc * fixed doc * fixed test app * add visionOS and more error check and testing * fixed supported destinations priority and tests * fixed doc * solved conflicts * fixed conflicts * renamed everything --------- Co-authored-by: Giovanni Amati --- CHANGELOG.md | 9 + Docs/ProjectSpec.md | 54 ++- SettingPresets/Platforms/tvOS.yml | 2 +- SettingPresets/SupportedDestinations/iOS.yml | 5 + .../SupportedDestinations/macCatalyst.yml | 2 + .../SupportedDestinations/macOS.yml | 3 + SettingPresets/SupportedDestinations/tvOS.yml | 2 + .../SupportedDestinations/visionOS.yml | 3 + Sources/ProjectSpec/Dependency.swift | 12 +- Sources/ProjectSpec/DeploymentTarget.swift | 3 + Sources/ProjectSpec/Platform.swift | 3 +- Sources/ProjectSpec/Plist.swift | 2 +- Sources/ProjectSpec/Settings.swift | 2 +- Sources/ProjectSpec/SpecParsingError.swift | 3 + Sources/ProjectSpec/SpecValidation.swift | 23 + Sources/ProjectSpec/SpecValidationError.swift | 12 + .../ProjectSpec/SupportedDestination.swift | 45 ++ Sources/ProjectSpec/Target.swift | 44 +- Sources/ProjectSpec/TargetSource.swift | 16 +- Sources/ProjectSpec/TestPlan.swift | 2 +- Sources/ProjectSpec/XCProjExtensions.swift | 1 + .../CarthageDependencyResolver.swift | 3 + Sources/XcodeGenKit/PBXProjGenerator.swift | 37 +- Sources/XcodeGenKit/SettingsBuilder.swift | 59 ++- Sources/XcodeGenKit/SettingsPresetFile.swift | 3 + Sources/XcodeGenKit/SourceGenerator.swift | 24 +- .../Info.generated.plist | 24 + .../Sources/MyAppApp.swift | 10 + .../Sources/iOS/ContentView.swift | 13 + .../Sources/tvOS/ContentView.swift | 13 + .../Storyboards/LaunchScreen.storyboard | 25 + .../TestResources/File_MACCATALYST.swift | 1 + .../TestResources/File_ios.swift | 1 + .../TestResources/File_macOS.swift | 1 + .../TestResources/File_tvOs.swift | 1 + .../TestResources/TVOS/File_B.swift | 1 + .../TestResources/iOs/File_A.swift | 1 + .../TestResources/macCatalyst/File_D.swift | 1 + .../TestResources/macos/File_C.swift | 1 + .../Project.xcodeproj/project.pbxproj | 242 ++++++++++ Tests/Fixtures/TestProject/project.yml | 25 +- Tests/ProjectSpecTests/ProjectSpecTests.swift | 65 ++- Tests/ProjectSpecTests/SpecLoadingTests.swift | 58 ++- .../ProjectGeneratorTests.swift | 444 +++++++++++++++++- 44 files changed, 1255 insertions(+), 46 deletions(-) create mode 100644 SettingPresets/SupportedDestinations/iOS.yml create mode 100644 SettingPresets/SupportedDestinations/macCatalyst.yml create mode 100644 SettingPresets/SupportedDestinations/macOS.yml create mode 100644 SettingPresets/SupportedDestinations/tvOS.yml create mode 100644 SettingPresets/SupportedDestinations/visionOS.yml create mode 100644 Sources/ProjectSpec/SupportedDestination.swift create mode 100644 Tests/Fixtures/TestProject/App_supportedDestinations/Info.generated.plist create mode 100644 Tests/Fixtures/TestProject/App_supportedDestinations/Sources/MyAppApp.swift create mode 100644 Tests/Fixtures/TestProject/App_supportedDestinations/Sources/iOS/ContentView.swift create mode 100644 Tests/Fixtures/TestProject/App_supportedDestinations/Sources/tvOS/ContentView.swift create mode 100644 Tests/Fixtures/TestProject/App_supportedDestinations/Storyboards/LaunchScreen.storyboard create mode 100644 Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_MACCATALYST.swift create mode 100644 Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_ios.swift create mode 100644 Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_macOS.swift create mode 100644 Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_tvOs.swift create mode 100644 Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/TVOS/File_B.swift create mode 100644 Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/iOs/File_A.swift create mode 100644 Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/macCatalyst/File_D.swift create mode 100644 Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/macos/File_C.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ae404e24..28e51b164 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ ## Next Version +### Feature support for multiple deployment targets with xcode 14 + +- Added `supportedDestinations` for target +- Added a new platform value `auto` that we can use only with `supportedDestinations` +- Added the possiblity to avoid the definition of plaform, only when we use `supportedDestinations`, that fallbacks to 'auto' +- Added `destinationFilters` for sources and dependecies +- Added `inferDestinationFiltersByPath`, a convenience filter for sources +- Added visionOS support + ### Added - `.mlpackage` files now default to being a source type #1398 @aaron-foreflight diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index c9d400f42..326e17f3c 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -22,6 +22,7 @@ You can also use environment variables in your configuration file, by using `${S - [Target](#target) - [Product Type](#product-type) - [Platform](#platform) + - [Supported Destinations](#supported-destinations) - [Sources](#sources) - [Target Source](#target-source) - [Dependency](#dependency) @@ -356,6 +357,7 @@ Settings are merged in the following order: `groups`, `base`, `configs` (simple - [x] **type**: **[Product Type](#product-type)** - Product type of the target - [x] **platform**: **[Platform](#platform)** - Platform of the target +- [ ] **supportedDestinations**: **[[Supported Destinations](#supported-destinations)]** - List of supported platform destinations for the target. - [ ] **deploymentTarget**: **String** - The deployment target (eg `9.2`). If this is not specified the value from the project set in [Options](#options)`.deploymentTarget.PLATFORM` will be used. - [ ] **sources**: **[Sources](#sources)** - Source directories of the target - [ ] **configFiles**: **[Config Files](#config-files)** - `.xcconfig` files per config @@ -433,12 +435,15 @@ This will provide default build settings for a certain product type. It can be a This will provide default build settings for a certain platform. It can be any of the following: +- `auto` (available only when we use `supportedDestinations`) - `iOS` -- `macOS` - `tvOS` +- `macOS` - `watchOS` - `visionOS` (`visionOS` doesn't support Carthage usage) +Note that when we use supported destinations with Xcode 14+ we can avoid the definition of platform that fallbacks to the `auto` value. + **Multi Platform targets** You can also specify an array of platforms. This will generate a target for each platform. @@ -469,6 +474,33 @@ targets: The above will generate 2 targets named `MyFramework_iOS` and `MyFramework_tvOS`, with all the relevant platform build settings. They will both have a `PRODUCT_NAME` of `MyFramework` +### Supported Destinations + +This will provide a mix of default build settings for the chosen platform destinations. It can be any of the following: + +- `iOS` +- `tvOS` +- `macOS` +- `macCatalyst` +- `visionOS` + +```yaml +targets: + MyFramework: + type: framework + supportedDestinations: [iOS, tvOS] + deploymentTarget: + iOS: 9.0 + tvOS: 10.0 + sources: + - path: MySources + inferDestinationFiltersByPath: true + - path: OtherSources + destinationFilters: [iOS] +``` + +Note that the definition of supported destinations can be applied to every type of bundle making everything more easy to manage (app targets, unit tests, UI tests etc). + ### Sources Specifies the source directories for a target. This can either be a single source or a list of sources. Applicable source files, resources, headers, and `.lproj` files will be parsed appropriately. @@ -483,7 +515,9 @@ A source can be provided via a string (the path) or an object of the form: - [ ] **compilerFlags**: **[String]** or **String** - A list of compilerFlags to add to files under this specific path provided as a list or a space delimited string. Defaults to empty. - [ ] **excludes**: **[String]** - A list of [global patterns](https://en.wikipedia.org/wiki/Glob_(programming)) representing the files to exclude. These rules are relative to `path` and _not the directory where `project.yml` resides_. XcodeGen uses Bash 4's Glob behaviors where globstar (**) is enabled. - [ ] **includes**: **[String]** - A list of global patterns in the same format as `excludes` representing the files to include. These rules are relative to `path` and _not the directory where `project.yml` resides_. If **excludes** is present and file conflicts with **includes**, **excludes** will override the **includes** behavior. -- [ ] **createIntermediateGroups**: **Bool** - This overrides the value in [Options](#options) +- [ ] **destinationFilters**: **[[Supported Destinations](#supported-destinations)]** - List of supported platform destinations the files should filter to. Defaults to all supported destinations. +- [ ] **inferDestinationFiltersByPath**: **Bool** - This is a convenience filter that helps you to filter the files if their paths match these patterns `**//*` or `*_.swift`. Note, if you use `destinationFilters` this flag will be ignored. +- [ ] **createIntermediateGroups**: **Bool** - This overrides the value in [Options](#options). - [ ] **optional**: **Bool** - Disable missing path check. Defaults to false. - [ ] **buildPhase**: **String** - This manually sets the build phase this file or files in this directory will be added to, otherwise XcodeGen will guess based on the file extension. Note that `Info.plist` files will never be added to any build phases, no matter what this setting is. Possible values are: - `sources` - Compile Sources phase @@ -519,9 +553,11 @@ targets: MyTarget: sources: MyTargetSource MyOtherTarget: + supportedDestinations: [iOS, tvOS] sources: - MyOtherTargetSource1 - path: MyOtherTargetSource2 + inferDestinationFiltersByPath: true name: MyNewName excludes: - "ios/*.[mh]" @@ -533,6 +569,7 @@ targets: - "-Werror" - "-Wextra" - path: MyOtherTargetSource3 + destinationFilters: [iOS] compilerFlags: "-Werror -Wextra" - path: ModuleMaps buildPhase: @@ -560,10 +597,11 @@ A dependency can be one of a 6 types: - [ ] **embed**: **Bool** - Whether to embed the dependency. Defaults to true for application target and false for non application targets. - [ ] **link**: **Bool** - Whether to link the dependency. Defaults to `true` depending on the type of the dependency and the type of the target (e.g. static libraries will only link to executables by default). -- [ ] **codeSign**: **Bool** - Whether the `codeSignOnCopy` setting is applied when embedding framework. Defaults to true -- [ ] **removeHeaders**: **Bool** - Whether the `removeHeadersOnCopy` setting is applied when embedding the framework. Defaults to true -- [ ] **weak**: **Bool** - Whether the `Weak` setting is applied when linking the framework. Defaults to false -- [ ] **platformFilter**: **String** - This field is specific to Mac Catalyst. It corresponds to the "Platforms" dropdown in the Frameworks & Libraries section of Target settings in Xcode. Available options are: **iOS**, **macOS** and **all**. Defaults is **all** +- [ ] **codeSign**: **Bool** - Whether the `codeSignOnCopy` setting is applied when embedding framework. Defaults to true. +- [ ] **removeHeaders**: **Bool** - Whether the `removeHeadersOnCopy` setting is applied when embedding the framework. Defaults to true. +- [ ] **weak**: **Bool** - Whether the `Weak` setting is applied when linking the framework. Defaults to false. +- [ ] **platformFilter**: **String** - This field is specific to Mac Catalyst. It corresponds to the "Platforms" dropdown in the Frameworks & Libraries section of Target settings in Xcode. Available options are: **iOS**, **macOS** and **all**. Defaults is **all**. +- [ ] **destinationFilters**: **[[Supported Destinations](#supported-destinations)]** - List of supported platform destinations this dependency should filter to. Defaults to all supported destinations. - [ ] **platforms**: **[[Platform](#platform)]** - List of platforms this dependency should apply to. Defaults to all applicable platforms. - **copy** - Copy Files Phase for this dependency. This only applies when `embed` is true. Must be specified as an object with the following fields: - [x] **destination**: **String** - Destination of the Copy Files phase. This can be one of the following values: @@ -613,13 +651,17 @@ projectReferences: path: path/to/FooLib.xcodeproj targets: MyTarget: + supportedDestinations: [iOS, tvOS] dependencies: - target: MyFramework + destinationFilters: [iOS] - target: FooLib/FooTarget - framework: path/to/framework.framework + destinationFilters: [tvOS] - carthage: Result findFrameworks: false linkType: static + destinationFilters: [iOS] - sdk: Contacts.framework - sdk: libc++.tbd - sdk: libz.dylib diff --git a/SettingPresets/Platforms/tvOS.yml b/SettingPresets/Platforms/tvOS.yml index 26c99a9dc..40491c07f 100644 --- a/SettingPresets/Platforms/tvOS.yml +++ b/SettingPresets/Platforms/tvOS.yml @@ -1,3 +1,3 @@ -TARGETED_DEVICE_FAMILY: 3 LD_RUNPATH_SEARCH_PATHS: ["$(inherited)", "@executable_path/Frameworks"] SDKROOT: appletvos +TARGETED_DEVICE_FAMILY: 3 diff --git a/SettingPresets/SupportedDestinations/iOS.yml b/SettingPresets/SupportedDestinations/iOS.yml new file mode 100644 index 000000000..91bfa0b47 --- /dev/null +++ b/SettingPresets/SupportedDestinations/iOS.yml @@ -0,0 +1,5 @@ +SUPPORTED_PLATFORMS: iphoneos iphonesimulator +TARGETED_DEVICE_FAMILY: '1,2' +SUPPORTS_MACCATALYST: NO +SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD: YES +SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD: YES diff --git a/SettingPresets/SupportedDestinations/macCatalyst.yml b/SettingPresets/SupportedDestinations/macCatalyst.yml new file mode 100644 index 000000000..953af2680 --- /dev/null +++ b/SettingPresets/SupportedDestinations/macCatalyst.yml @@ -0,0 +1,2 @@ +SUPPORTS_MACCATALYST: YES +SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD: NO diff --git a/SettingPresets/SupportedDestinations/macOS.yml b/SettingPresets/SupportedDestinations/macOS.yml new file mode 100644 index 000000000..e59a8f69d --- /dev/null +++ b/SettingPresets/SupportedDestinations/macOS.yml @@ -0,0 +1,3 @@ +SUPPORTED_PLATFORMS: macosx +SUPPORTS_MACCATALYST: NO +SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD: NO diff --git a/SettingPresets/SupportedDestinations/tvOS.yml b/SettingPresets/SupportedDestinations/tvOS.yml new file mode 100644 index 000000000..a40ce2666 --- /dev/null +++ b/SettingPresets/SupportedDestinations/tvOS.yml @@ -0,0 +1,2 @@ +SUPPORTED_PLATFORMS: appletvos appletvsimulator +TARGETED_DEVICE_FAMILY: '3' diff --git a/SettingPresets/SupportedDestinations/visionOS.yml b/SettingPresets/SupportedDestinations/visionOS.yml new file mode 100644 index 000000000..1353d7191 --- /dev/null +++ b/SettingPresets/SupportedDestinations/visionOS.yml @@ -0,0 +1,3 @@ +SUPPORTED_PLATFORMS: xros xrsimulator +TARGETED_DEVICE_FAMILY: '7' +SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD: NO diff --git a/Sources/ProjectSpec/Dependency.swift b/Sources/ProjectSpec/Dependency.swift index b102b1276..f7a72c0a9 100644 --- a/Sources/ProjectSpec/Dependency.swift +++ b/Sources/ProjectSpec/Dependency.swift @@ -16,6 +16,7 @@ public struct Dependency: Equatable { public var implicit: Bool = implicitDefault public var weakLink: Bool = weakLinkDefault public var platformFilter: PlatformFilter = platformFilterDefault + public var destinationFilters: [SupportedDestination]? public var platforms: Set? public var copyPhase: BuildPhaseSpec.CopyFilesSettings? @@ -28,6 +29,7 @@ public struct Dependency: Equatable { implicit: Bool = implicitDefault, weakLink: Bool = weakLinkDefault, platformFilter: PlatformFilter = platformFilterDefault, + destinationFilters: [SupportedDestination]? = nil, platforms: Set? = nil, copyPhase: BuildPhaseSpec.CopyFilesSettings? = nil ) { @@ -39,6 +41,7 @@ public struct Dependency: Equatable { self.implicit = implicit self.weakLink = weakLink self.platformFilter = platformFilter + self.destinationFilters = destinationFilters self.platforms = platforms self.copyPhase = copyPhase } @@ -48,7 +51,7 @@ public struct Dependency: Equatable { case iOS case macOS } - + public enum CarthageLinkType: String { case dynamic case `static` @@ -142,7 +145,11 @@ extension Dependency: JSONObjectConvertible { } else { self.platformFilter = .all } - + + if let destinationFilters: [SupportedDestination] = jsonDictionary.json(atKeyPath: "destinationFilters") { + self.destinationFilters = destinationFilters + } + if let platforms: [ProjectSpec.Platform] = jsonDictionary.json(atKeyPath: "platforms") { self.platforms = Set(platforms) } @@ -161,6 +168,7 @@ extension Dependency: JSONEncodable { "link": link, "platforms": platforms?.map(\.rawValue).sorted(), "copy": copyPhase?.toJSONValue(), + "destinationFilters": destinationFilters?.map { $0.rawValue }, ] if removeHeaders != Dependency.removeHeadersDefault { diff --git a/Sources/ProjectSpec/DeploymentTarget.swift b/Sources/ProjectSpec/DeploymentTarget.swift index d3c9e3f79..a22f25ce0 100644 --- a/Sources/ProjectSpec/DeploymentTarget.swift +++ b/Sources/ProjectSpec/DeploymentTarget.swift @@ -26,6 +26,7 @@ public struct DeploymentTarget: Equatable { public func version(for platform: Platform) -> Version? { switch platform { + case .auto: return nil case .iOS: return iOS case .tvOS: return tvOS case .watchOS: return watchOS @@ -39,6 +40,7 @@ extension Platform { public var deploymentTargetSetting: String { switch self { + case .auto: return "" case .iOS: return "IPHONEOS_DEPLOYMENT_TARGET" case .tvOS: return "TVOS_DEPLOYMENT_TARGET" case .watchOS: return "WATCHOS_DEPLOYMENT_TARGET" @@ -49,6 +51,7 @@ extension Platform { public var sdkRoot: String { switch self { + case .auto: return "auto" case .iOS: return "iphoneos" case .tvOS: return "appletvos" case .watchOS: return "watchos" diff --git a/Sources/ProjectSpec/Platform.swift b/Sources/ProjectSpec/Platform.swift index 69a976f17..5f7613b41 100644 --- a/Sources/ProjectSpec/Platform.swift +++ b/Sources/ProjectSpec/Platform.swift @@ -1,9 +1,10 @@ import Foundation public enum Platform: String, Hashable, CaseIterable { + case auto case iOS - case watchOS case tvOS case macOS + case watchOS case visionOS } diff --git a/Sources/ProjectSpec/Plist.swift b/Sources/ProjectSpec/Plist.swift index d478fd019..124b4bfbf 100644 --- a/Sources/ProjectSpec/Plist.swift +++ b/Sources/ProjectSpec/Plist.swift @@ -30,7 +30,7 @@ extension Plist: JSONEncodable { [ "path": path, "properties": properties, - ] + ] as [String : Any] } } diff --git a/Sources/ProjectSpec/Settings.swift b/Sources/ProjectSpec/Settings.swift index 6ac0328c7..f59006a72 100644 --- a/Sources/ProjectSpec/Settings.swift +++ b/Sources/ProjectSpec/Settings.swift @@ -113,7 +113,7 @@ extension Settings: JSONEncodable { "base": buildSettings, "groups": groups, "configs": configSettings.mapValues { $0.toJSONValue() }, - ] + ] as [String : Any] } return buildSettings } diff --git a/Sources/ProjectSpec/SpecParsingError.swift b/Sources/ProjectSpec/SpecParsingError.swift index 59ae2ad91..b875eadce 100644 --- a/Sources/ProjectSpec/SpecParsingError.swift +++ b/Sources/ProjectSpec/SpecParsingError.swift @@ -7,6 +7,7 @@ public enum SpecParsingError: Error, CustomStringConvertible { case unknownPackageRequirement([String: Any]) case invalidSourceBuildPhase(String) case invalidTargetReference(String) + case invalidTargetPlatformAsArray case invalidVersion(String) case unknownBreakpointType(String) case unknownBreakpointScope(String) @@ -27,6 +28,8 @@ public enum SpecParsingError: Error, CustomStringConvertible { return "Invalid Source Build Phase: \(error)" case let .invalidTargetReference(targetReference): return "Invalid Target Reference Syntax: \(targetReference)" + case .invalidTargetPlatformAsArray: + return "Invalid Target platform: Array not allowed with supported destinations" case let .invalidVersion(version): return "Invalid version: \(version)" case let .unknownPackageRequirement(package): diff --git a/Sources/ProjectSpec/SpecValidation.swift b/Sources/ProjectSpec/SpecValidation.swift index 018a5243d..9bf43e1a5 100644 --- a/Sources/ProjectSpec/SpecValidation.swift +++ b/Sources/ProjectSpec/SpecValidation.swift @@ -180,6 +180,29 @@ extension Project { errors.append(.invalidTargetSource(target: target.name, source: sourcePath.string)) } } + + if target.supportedDestinations != nil, target.platform == .watchOS { + errors.append(.unexpectedTargetPlatformForSupportedDestinations(target: target.name, platform: target.platform)) + } + + if target.supportedDestinations?.contains(.macOS) == true, + target.supportedDestinations?.contains(.macCatalyst) == true { + + errors.append(.multipleMacPlatformsInSupportedDestinations(target: target.name)) + } + + if target.supportedDestinations?.contains(.macCatalyst) == true, + target.platform != .iOS, target.platform != .auto { + + errors.append(.invalidTargetPlatformForSupportedDestinations(target: target.name)) + } + + if target.platform != .auto, target.platform != .watchOS, + let supportedDestination = SupportedDestination(rawValue: target.platform.rawValue), + target.supportedDestinations?.contains(supportedDestination) == false { + + errors.append(.missingTargetPlatformInSupportedDestinations(target: target.name, platform: target.platform)) + } } for projectReference in projectReferences { diff --git a/Sources/ProjectSpec/SpecValidationError.swift b/Sources/ProjectSpec/SpecValidationError.swift index 639ccb28a..6564067a6 100644 --- a/Sources/ProjectSpec/SpecValidationError.swift +++ b/Sources/ProjectSpec/SpecValidationError.swift @@ -17,6 +17,10 @@ public struct SpecValidationError: Error, CustomStringConvertible { case invalidTargetConfigFile(target: String, configFile: String, config: String) case invalidTargetSchemeConfigVariant(target: String, configVariant: String, configType: ConfigType) case invalidTargetSchemeTest(target: String, testTarget: String) + case invalidTargetPlatformForSupportedDestinations(target: String) + case unexpectedTargetPlatformForSupportedDestinations(target: String, platform: Platform) + case multipleMacPlatformsInSupportedDestinations(target: String) + case missingTargetPlatformInSupportedDestinations(target: String, platform: Platform) case invalidSchemeTarget(scheme: String, target: String, action: String) case invalidSchemeConfig(scheme: String, config: String) case invalidSwiftPackage(name: String, target: String) @@ -54,6 +58,14 @@ public struct SpecValidationError: Error, CustomStringConvertible { return "Target \(target.quoted) has an invalid scheme config variant which requires a config that has a \(configType.rawValue.quoted) type and contains the name \(configVariant.quoted)" case let .invalidTargetSchemeTest(target, test): return "Target \(target.quoted) scheme has invalid test \(test.quoted)" + case let .invalidTargetPlatformForSupportedDestinations(target): + return "Target \(target.quoted) has supported destinations that require a target platform iOS or auto" + case let .unexpectedTargetPlatformForSupportedDestinations(target, platform): + return "Target \(target.quoted) has platform \(platform.rawValue.quoted) that does not expect supported destinations" + case let .multipleMacPlatformsInSupportedDestinations(target): + return "Target \(target.quoted) has multiple definitions of mac platforms in supported destinations" + case let .missingTargetPlatformInSupportedDestinations(target, platform): + return "Target \(target.quoted) has platform \(platform.rawValue.quoted) that is missing in supported destinations" case let .invalidConfigFile(configFile, config): return "Invalid config file \(configFile.quoted) for config \(config.quoted)" case let .invalidSchemeTarget(scheme, target, action): diff --git a/Sources/ProjectSpec/SupportedDestination.swift b/Sources/ProjectSpec/SupportedDestination.swift new file mode 100644 index 000000000..15a776a4c --- /dev/null +++ b/Sources/ProjectSpec/SupportedDestination.swift @@ -0,0 +1,45 @@ +import Foundation + +public enum SupportedDestination: String, CaseIterable { + case iOS + case tvOS + case macOS + case macCatalyst + case visionOS +} + +extension SupportedDestination { + + public var string: String { + switch self { + case .iOS: + return "ios" + case .tvOS: + return "tvos" + case .macOS: + return "macos" + case .macCatalyst: + return "maccatalyst" + case .visionOS: + return "xros" + } + } + + // This is used to: + // 1. Get the first one and apply SettingPresets 'Platforms' and 'Product_Platform' if the platform is 'auto' + // 2. Sort, loop and merge together SettingPresets 'SupportedDestinations' + public var priority: Int { + switch self { + case .iOS: + return 0 + case .tvOS: + return 1 + case .visionOS: + return 2 + case .macOS: + return 3 + case .macCatalyst: + return 4 + } + } +} diff --git a/Sources/ProjectSpec/Target.swift b/Sources/ProjectSpec/Target.swift index e7856ab78..3b9f2c535 100644 --- a/Sources/ProjectSpec/Target.swift +++ b/Sources/ProjectSpec/Target.swift @@ -37,6 +37,7 @@ public struct Target: ProjectTarget { public var name: String public var type: PBXProductType public var platform: Platform + public var supportedDestinations: [SupportedDestination]? public var settings: Settings public var sources: [TargetSource] public var dependencies: [Dependency] @@ -58,7 +59,7 @@ public struct Target: ProjectTarget { public var productName: String public var onlyCopyFilesOnInstall: Bool public var putResourcesBeforeSourcesBuildPhase: Bool - + public var isLegacy: Bool { legacy != nil } @@ -78,6 +79,7 @@ public struct Target: ProjectTarget { name: String, type: PBXProductType, platform: Platform, + supportedDestinations: [SupportedDestination]? = nil, productName: String? = nil, deploymentTarget: Version? = nil, settings: Settings = .empty, @@ -103,6 +105,7 @@ public struct Target: ProjectTarget { self.name = name self.type = type self.platform = platform + self.supportedDestinations = supportedDestinations self.deploymentTarget = deploymentTarget self.productName = productName ?? name self.settings = settings @@ -162,15 +165,17 @@ extension Target { guard let targetsDictionary: [String: JSONDictionary] = jsonDictionary["targets"] as? [String: JSONDictionary] else { return jsonDictionary } - + var crossPlatformTargets: [String: JSONDictionary] = [:] for (targetName, target) in targetsDictionary { - if let platforms = target["platform"] as? [String] { - for platform in platforms { var platformTarget = target + + /// This value is set to help us to check, in Target init, that there are no conflicts in the definition of the platforms. We want to ensure that the user didn't define, at the same time, + /// the new Xcode 14 supported destinations and the XcodeGen generation of Multiple Platform Targets (when you define the platform field as an array). + platformTarget["isMultiPlatformTarget"] = true platformTarget = platformTarget.expand(variables: ["platform": platform]) @@ -202,8 +207,8 @@ extension Target { crossPlatformTargets[targetName] = target } } + var merged = jsonDictionary - merged["targets"] = crossPlatformTargets return merged } @@ -268,19 +273,41 @@ extension Target: NamedJSONDictionaryConvertible { let resolvedName: String = jsonDictionary.json(atKeyPath: "name") ?? name self.name = resolvedName productName = jsonDictionary.json(atKeyPath: "productName") ?? resolvedName - let typeString: String = try jsonDictionary.json(atKeyPath: "type") + + let typeString: String = jsonDictionary.json(atKeyPath: "type") ?? "" if let type = PBXProductType(string: typeString) { self.type = type } else { throw SpecParsingError.unknownTargetType(typeString) } - let platformString: String = try jsonDictionary.json(atKeyPath: "platform") + + if let supportedDestinations: [SupportedDestination] = jsonDictionary.json(atKeyPath: "supportedDestinations") { + self.supportedDestinations = supportedDestinations + } + + let isResolved = jsonDictionary.json(atKeyPath: "isMultiPlatformTarget") ?? false + if isResolved, supportedDestinations != nil { + throw SpecParsingError.invalidTargetPlatformAsArray + } + + var platformString: String = jsonDictionary.json(atKeyPath: "platform") ?? "" + // platform defaults to 'auto' if it is empty and we are using supported destinations + if supportedDestinations != nil, platformString.isEmpty { + platformString = Platform.auto.rawValue + } + // we add 'iOS' in supported destinations if it contains only 'macCatalyst' + if supportedDestinations?.contains(.macCatalyst) == true, + supportedDestinations?.contains(.iOS) == false { + + supportedDestinations?.append(.iOS) + } + if let platform = Platform(rawValue: platformString) { self.platform = platform } else { throw SpecParsingError.unknownTargetPlatform(platformString) } - + if let string: String = jsonDictionary.json(atKeyPath: "deploymentTarget") { deploymentTarget = try Version.parse(string) } else if let double: Double = jsonDictionary.json(atKeyPath: "deploymentTarget") { @@ -351,6 +378,7 @@ extension Target: JSONEncodable { var dict: [String: Any?] = [ "type": type.name, "platform": platform.rawValue, + "supportedDestinations": supportedDestinations?.map { $0.rawValue }, "settings": settings.toJSONValue(), "configFiles": configFiles, "attributes": attributes, diff --git a/Sources/ProjectSpec/TargetSource.swift b/Sources/ProjectSpec/TargetSource.swift index 6674972b2..f5932c837 100644 --- a/Sources/ProjectSpec/TargetSource.swift +++ b/Sources/ProjectSpec/TargetSource.swift @@ -23,6 +23,8 @@ public struct TargetSource: Equatable { public var createIntermediateGroups: Bool? public var attributes: [String] public var resourceTags: [String] + public var inferDestinationFiltersByPath: Bool? + public var destinationFilters: [SupportedDestination]? public enum HeaderVisibility: String { case `public` @@ -51,7 +53,9 @@ public struct TargetSource: Equatable { headerVisibility: HeaderVisibility? = nil, createIntermediateGroups: Bool? = nil, attributes: [String] = [], - resourceTags: [String] = [] + resourceTags: [String] = [], + inferDestinationFiltersByPath: Bool? = nil, + destinationFilters: [SupportedDestination]? = nil ) { self.path = (path as NSString).standardizingPath self.name = name @@ -66,6 +70,8 @@ public struct TargetSource: Equatable { self.createIntermediateGroups = createIntermediateGroups self.attributes = attributes self.resourceTags = resourceTags + self.inferDestinationFiltersByPath = inferDestinationFiltersByPath + self.destinationFilters = destinationFilters } } @@ -112,6 +118,12 @@ extension TargetSource: JSONObjectConvertible { createIntermediateGroups = jsonDictionary.json(atKeyPath: "createIntermediateGroups") attributes = jsonDictionary.json(atKeyPath: "attributes") ?? [] resourceTags = jsonDictionary.json(atKeyPath: "resourceTags") ?? [] + + inferDestinationFiltersByPath = jsonDictionary.json(atKeyPath: "inferDestinationFiltersByPath") + + if let destinationFilters: [SupportedDestination] = jsonDictionary.json(atKeyPath: "destinationFilters") { + self.destinationFilters = destinationFilters + } } } @@ -129,6 +141,8 @@ extension TargetSource: JSONEncodable { "createIntermediateGroups": createIntermediateGroups, "resourceTags": resourceTags, "path": path, + "inferDestinationFiltersByPath": inferDestinationFiltersByPath, + "destinationFilters": destinationFilters?.map { $0.rawValue }, ] if optional != TargetSource.optionalDefault { diff --git a/Sources/ProjectSpec/TestPlan.swift b/Sources/ProjectSpec/TestPlan.swift index 541b4e639..c47b17cab 100644 --- a/Sources/ProjectSpec/TestPlan.swift +++ b/Sources/ProjectSpec/TestPlan.swift @@ -25,7 +25,7 @@ extension TestPlan: JSONEncodable { [ "path": path, "defaultPlan": defaultPlan, - ] + ] as [String : Any] } } diff --git a/Sources/ProjectSpec/XCProjExtensions.swift b/Sources/ProjectSpec/XCProjExtensions.swift index bbb3247ea..e1da8a3b0 100644 --- a/Sources/ProjectSpec/XCProjExtensions.swift +++ b/Sources/ProjectSpec/XCProjExtensions.swift @@ -82,6 +82,7 @@ extension Platform { public var emoji: String { switch self { + case .auto: return "🤖" case .iOS: return "📱" case .watchOS: return "⌚️" case .tvOS: return "📺" diff --git a/Sources/XcodeGenKit/CarthageDependencyResolver.swift b/Sources/XcodeGenKit/CarthageDependencyResolver.swift index 8fcb6e462..46b83ac90 100644 --- a/Sources/XcodeGenKit/CarthageDependencyResolver.swift +++ b/Sources/XcodeGenKit/CarthageDependencyResolver.swift @@ -151,6 +151,9 @@ extension Platform { public var carthageName: String { switch self { + case .auto: + // This is a dummy value + return "auto" case .iOS: return "iOS" case .tvOS: diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 0ac632a86..82e87f2c7 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -340,7 +340,7 @@ public class PBXProjGenerator { return addObject(buildConfig) } - var dependencies = target.targets.map { generateTargetDependency(from: target.name, to: $0, platform: nil) } + var dependencies = target.targets.map { generateTargetDependency(from: target.name, to: $0, platform: nil, platforms: nil) } let defaultConfigurationName = project.options.defaultConfig ?? project.configs.first?.name ?? "" let buildConfigList = addObject(XCConfigurationList( @@ -359,7 +359,7 @@ public class PBXProjGenerator { aggregateTarget.dependencies = dependencies } - func generateTargetDependency(from: String, to target: String, platform: String?) -> PBXTargetDependency { + func generateTargetDependency(from: String, to target: String, platform: String?, platforms: [String]?) -> PBXTargetDependency { guard let targetObject = targetObjects[target] ?? targetAggregateObjects[target] else { fatalError("Target dependency not found: from ( \(from) ) to ( \(target) )") } @@ -376,6 +376,7 @@ public class PBXProjGenerator { let targetDependency = addObject( PBXTargetDependency( platformFilter: platform, + platformFilters: platforms, target: targetObject, targetProxy: targetProxy ) @@ -727,7 +728,7 @@ public class PBXProjGenerator { return !linkingAttributes.isEmpty ? ["ATTRIBUTES": linkingAttributes] : nil } - func processTargetDependency(_ dependency: Dependency, dependencyTarget: Target, embedFileReference: PBXFileElement?, platform: String?) { + func processTargetDependency(_ dependency: Dependency, dependencyTarget: Target, embedFileReference: PBXFileElement?, platform: String?, platforms: [String]?) { let dependencyLinkage = dependencyTarget.defaultLinkage let link = dependency.link ?? ((dependencyLinkage == .dynamic && target.type != .staticLibrary) || @@ -736,6 +737,7 @@ public class PBXProjGenerator { if link, let dependencyFile = embedFileReference { let pbxBuildFile = PBXBuildFile(file: dependencyFile, settings: getDependencyFrameworkSettings(dependency: dependency)) pbxBuildFile.platformFilter = platform + pbxBuildFile.platformFilters = platforms let buildFile = addObject(pbxBuildFile) targetFrameworkBuildFiles.append(buildFile) @@ -752,6 +754,7 @@ public class PBXProjGenerator { settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? !dependencyTarget.type.isExecutable) ) pbxBuildFile.platformFilter = platform + pbxBuildFile.platformFilters = platforms let embedFile = addObject(pbxBuildFile) if dependency.copyPhase != nil { @@ -787,6 +790,7 @@ public class PBXProjGenerator { let embed = dependency.embed ?? target.shouldEmbedDependencies let platform = makePlatformFilter(for: dependency.platformFilter) + let platforms = makeDestinationFilters(for: dependency.destinationFilters) switch dependency.type { case .target: @@ -795,15 +799,15 @@ public class PBXProjGenerator { switch dependencyTargetReference.location { case .local: let dependencyTargetName = dependency.reference - let targetDependency = generateTargetDependency(from: target.name, to: dependencyTargetName, platform: platform) + let targetDependency = generateTargetDependency(from: target.name, to: dependencyTargetName, platform: platform, platforms: platforms) dependencies.append(targetDependency) guard let dependencyTarget = project.getTarget(dependencyTargetName) else { continue } - processTargetDependency(dependency, dependencyTarget: dependencyTarget, embedFileReference: targetFileReferences[dependencyTarget.name], platform: platform) + processTargetDependency(dependency, dependencyTarget: dependencyTarget, embedFileReference: targetFileReferences[dependencyTarget.name], platform: platform, platforms: platforms) case .project(let dependencyProjectName): let dependencyTargetName = dependencyTargetReference.name let (targetDependency, dependencyTarget, dependencyProductProxy) = try generateExternalTargetDependency(from: target.name, to: dependencyTargetName, in: dependencyProjectName, platform: target.platform) dependencies.append(targetDependency) - processTargetDependency(dependency, dependencyTarget: dependencyTarget, embedFileReference: dependencyProductProxy, platform: platform) + processTargetDependency(dependency, dependencyTarget: dependencyTarget, embedFileReference: dependencyProductProxy, platform: platform, platforms: platforms) } case .framework: @@ -829,6 +833,7 @@ public class PBXProjGenerator { if dependency.link ?? (target.type != .staticLibrary) { let pbxBuildFile = PBXBuildFile(file: fileReference, settings: getDependencyFrameworkSettings(dependency: dependency)) pbxBuildFile.platformFilter = platform + pbxBuildFile.platformFilters = platforms let buildFile = addObject(pbxBuildFile) targetFrameworkBuildFiles.append(buildFile) @@ -841,6 +846,7 @@ public class PBXProjGenerator { if embed { let pbxBuildFile = PBXBuildFile(file: fileReference, settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) pbxBuildFile.platformFilter = platform + pbxBuildFile.platformFilters = platforms let embedFile = addObject(pbxBuildFile) if dependency.copyPhase != nil { @@ -891,12 +897,14 @@ public class PBXProjGenerator { settings: getDependencyFrameworkSettings(dependency: dependency) ) pbxBuildFile.platformFilter = platform + pbxBuildFile.platformFilters = platforms let buildFile = addObject(pbxBuildFile) targetFrameworkBuildFiles.append(buildFile) if dependency.embed == true { let pbxBuildFile = PBXBuildFile(file: fileReference, settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) pbxBuildFile.platformFilter = platform + pbxBuildFile.platformFilters = platforms let embedFile = addObject(pbxBuildFile) if dependency.copyPhase != nil { @@ -926,6 +934,7 @@ public class PBXProjGenerator { if dependency.link ?? (!isStaticLibrary && !isCarthageStaticLink) { let pbxBuildFile = PBXBuildFile(file: fileReference, settings: getDependencyFrameworkSettings(dependency: dependency)) pbxBuildFile.platformFilter = platform + pbxBuildFile.platformFilters = platforms let buildFile = addObject(pbxBuildFile) targetFrameworkBuildFiles.append(buildFile) } @@ -954,11 +963,12 @@ public class PBXProjGenerator { if link { let file = PBXBuildFile(product: packageDependency, settings: getDependencyFrameworkSettings(dependency: dependency)) file.platformFilter = platform + file.platformFilters = platforms let buildFile = addObject(file) targetFrameworkBuildFiles.append(buildFile) } else { let targetDependency = addObject( - PBXTargetDependency(platformFilter: platform, product: packageDependency) + PBXTargetDependency(platformFilter: platform, platformFilters: platforms, product: packageDependency) ) dependencies.append(targetDependency) } @@ -967,6 +977,7 @@ public class PBXProjGenerator { let pbxBuildFile = PBXBuildFile(product: packageDependency, settings: getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true)) pbxBuildFile.platformFilter = platform + pbxBuildFile.platformFilters = platforms let embedFile = addObject(pbxBuildFile) if dependency.copyPhase != nil { @@ -999,6 +1010,7 @@ public class PBXProjGenerator { settings: embed ? getEmbedSettings(dependency: dependency, codeSign: dependency.codeSign ?? true) : nil ) pbxBuildFile.platformFilter = platform + pbxBuildFile.platformFilters = platforms let buildFile = addObject(pbxBuildFile) copyBundlesReferences.append(buildFile) @@ -1445,7 +1457,12 @@ public class PBXProjGenerator { return "ios" } } - + + private func makeDestinationFilters(for filters: [SupportedDestination]?) -> [String]? { + guard let filters = filters, !filters.isEmpty else { return nil } + return filters.map { $0.string } + } + /// Make `Build Tools Plug-ins` as a dependency to the target /// - Parameter target: ProjectTarget /// - Returns: Elements for referencing other targets through content proxies. @@ -1466,7 +1483,7 @@ public class PBXProjGenerator { return targetDependency } } - + func getInfoPlists(for target: Target) -> [Config: String] { var searchForDefaultInfoPlist: Bool = true var defaultInfoPlist: String? @@ -1600,7 +1617,7 @@ extension Platform { /// - returns: `true` for platforms that the app store requires simulator slices to be stripped. public var requiresSimulatorStripping: Bool { switch self { - case .iOS, .tvOS, .watchOS, .visionOS: + case .auto, .iOS, .tvOS, .watchOS, .visionOS: return true case .macOS: return false diff --git a/Sources/XcodeGenKit/SettingsBuilder.swift b/Sources/XcodeGenKit/SettingsBuilder.swift index e4ae29f44..69aadf6f4 100644 --- a/Sources/XcodeGenKit/SettingsBuilder.swift +++ b/Sources/XcodeGenKit/SettingsBuilder.swift @@ -41,16 +41,63 @@ extension Project { public func getTargetBuildSettings(target: Target, config: Config) -> BuildSettings { var buildSettings = BuildSettings() - + + // list of supported destination sorted by priority + let specSupportedDestinations = target.supportedDestinations?.sorted(by: { $0.priority < $1.priority }) ?? [] + if options.settingPresets.applyTarget { - buildSettings += SettingsPresetFile.platform(target.platform).getBuildSettings() + let platform: Platform + + if target.platform == .auto, + let firstDestination = specSupportedDestinations.first, + let firstDestinationPlatform = Platform(rawValue: firstDestination.rawValue) { + + platform = firstDestinationPlatform + } else { + platform = target.platform + } + + buildSettings += SettingsPresetFile.platform(platform).getBuildSettings() buildSettings += SettingsPresetFile.product(target.type).getBuildSettings() - buildSettings += SettingsPresetFile.productPlatform(target.type, target.platform).getBuildSettings() + buildSettings += SettingsPresetFile.productPlatform(target.type, platform).getBuildSettings() + + if target.platform == .auto { + // this fix is necessary because the platform preset overrides the original value + buildSettings["SDKROOT"] = Platform.auto.rawValue + } } - + + if !specSupportedDestinations.isEmpty { + var supportedPlatforms: [String] = [] + var targetedDeviceFamily: [String] = [] + + for supportedDestination in specSupportedDestinations { + let supportedPlatformBuildSettings = SettingsPresetFile.supportedDestination(supportedDestination).getBuildSettings() + buildSettings += supportedPlatformBuildSettings + + if let value = supportedPlatformBuildSettings?["SUPPORTED_PLATFORMS"] as? String { + supportedPlatforms += value.components(separatedBy: " ") + } + if let value = supportedPlatformBuildSettings?["TARGETED_DEVICE_FAMILY"] as? String { + targetedDeviceFamily += value.components(separatedBy: ",") + } + } + + buildSettings["SUPPORTED_PLATFORMS"] = supportedPlatforms.joined(separator: " ") + buildSettings["TARGETED_DEVICE_FAMILY"] = targetedDeviceFamily.joined(separator: ",") + } + // apply custom platform version if let version = target.deploymentTarget { - buildSettings[target.platform.deploymentTargetSetting] = version.deploymentTarget + if !specSupportedDestinations.isEmpty { + for supportedDestination in specSupportedDestinations { + if let platform = Platform(rawValue: supportedDestination.rawValue) { + buildSettings[platform.deploymentTargetSetting] = version.deploymentTarget + } + } + } else { + buildSettings[target.platform.deploymentTargetSetting] = version.deploymentTarget + } } // Prevent setting presets from overrwriting settings in target xcconfig files @@ -205,7 +252,7 @@ extension SettingsPresetFile { guard let settingsPath = possibleSettingsPaths.first(where: { $0.exists }) else { switch self { - case .base, .config, .platform: + case .base, .config, .platform, .supportedDestination: print("No \"\(name)\" settings found") case .product, .productPlatform: break diff --git a/Sources/XcodeGenKit/SettingsPresetFile.swift b/Sources/XcodeGenKit/SettingsPresetFile.swift index 8cbffad11..30a1f4103 100644 --- a/Sources/XcodeGenKit/SettingsPresetFile.swift +++ b/Sources/XcodeGenKit/SettingsPresetFile.swift @@ -5,6 +5,7 @@ import XcodeProj public enum SettingsPresetFile { case config(ConfigType) case platform(Platform) + case supportedDestination(SupportedDestination) case product(PBXProductType) case productPlatform(PBXProductType, Platform) case base @@ -13,6 +14,7 @@ public enum SettingsPresetFile { switch self { case let .config(config): return "Configs/\(config.rawValue)" case let .platform(platform): return "Platforms/\(platform.rawValue)" + case let .supportedDestination(supportedDestination): return "SupportedDestinations/\(supportedDestination.rawValue)" case let .product(product): return "Products/\(product.name)" case let .productPlatform(product, platform): return "Product_Platform/\(product.name)_\(platform.rawValue)" case .base: return "base" @@ -23,6 +25,7 @@ public enum SettingsPresetFile { switch self { case let .config(config): return "\(config.rawValue) config" case let .platform(platform): return platform.rawValue + case let .supportedDestination(supportedDestination): return supportedDestination.rawValue case let .product(product): return product.name case let .productPlatform(product, platform): return "\(platform) \(product)" case .base: return "base" diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index 3ffcbb3ab..21155156f 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -109,7 +109,23 @@ class SourceGenerator { return nil } } - + + private func makeDestinationFilters(for path: Path, with filters: [SupportedDestination]?, or inferDestinationFiltersByPath: Bool?) -> [String]? { + if let filters = filters, !filters.isEmpty { + return filters.map { $0.string } + } else if inferDestinationFiltersByPath == true { + for supportedDestination in SupportedDestination.allCases { + let regex1 = try? NSRegularExpression(pattern: "\\/\(supportedDestination)\\/", options: .caseInsensitive) + let regex2 = try? NSRegularExpression(pattern: "\\_\(supportedDestination)\\.swift$", options: .caseInsensitive) + + if regex1?.isMatch(to: path.string) == true || regex2?.isMatch(to: path.string) == true { + return [supportedDestination.string] + } + } + } + return nil + } + func generateSourceFile(targetType: PBXProductType, targetSource: TargetSource, path: Path, fileReference: PBXFileElement? = nil, buildPhases: [Path: BuildPhaseSpec]) -> SourceFile { let fileReference = fileReference ?? fileReferencesByPath[path.string.lowercased()]! var settings: [String: Any] = [:] @@ -174,8 +190,10 @@ class SourceGenerator { if chosenBuildPhase == .resources && !assetTags.isEmpty { settings["ASSET_TAGS"] = assetTags } - - let buildFile = PBXBuildFile(file: fileReference, settings: settings.isEmpty ? nil : settings) + + let platforms = makeDestinationFilters(for: path, with: targetSource.destinationFilters, or: targetSource.inferDestinationFiltersByPath) + + let buildFile = PBXBuildFile(file: fileReference, settings: settings.isEmpty ? nil : settings, platformFilters: platforms) return SourceFile( path: path, fileReference: fileReference, diff --git a/Tests/Fixtures/TestProject/App_supportedDestinations/Info.generated.plist b/Tests/Fixtures/TestProject/App_supportedDestinations/Info.generated.plist new file mode 100644 index 000000000..8bed04c06 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_supportedDestinations/Info.generated.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + TestApp + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0.0 + + diff --git a/Tests/Fixtures/TestProject/App_supportedDestinations/Sources/MyAppApp.swift b/Tests/Fixtures/TestProject/App_supportedDestinations/Sources/MyAppApp.swift new file mode 100644 index 000000000..2db0d8841 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_supportedDestinations/Sources/MyAppApp.swift @@ -0,0 +1,10 @@ +import SwiftUI + +@main +struct MyAppApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/Tests/Fixtures/TestProject/App_supportedDestinations/Sources/iOS/ContentView.swift b/Tests/Fixtures/TestProject/App_supportedDestinations/Sources/iOS/ContentView.swift new file mode 100644 index 000000000..1e32a55a0 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_supportedDestinations/Sources/iOS/ContentView.swift @@ -0,0 +1,13 @@ +import SwiftUI + +struct ContentView: View { + var body: some View { + VStack { + Image(systemName: "globe") + .imageScale(.large) + .foregroundColor(.accentColor) + Text("Hello, world! on iOS") + } + .padding() + } +} diff --git a/Tests/Fixtures/TestProject/App_supportedDestinations/Sources/tvOS/ContentView.swift b/Tests/Fixtures/TestProject/App_supportedDestinations/Sources/tvOS/ContentView.swift new file mode 100644 index 000000000..f0512afc0 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_supportedDestinations/Sources/tvOS/ContentView.swift @@ -0,0 +1,13 @@ +import SwiftUI + +struct ContentView: View { + var body: some View { + VStack { + Image(systemName: "house") + .imageScale(.large) + .foregroundColor(.accentColor) + Text("Hello, world! tvOS") + } + .padding() + } +} diff --git a/Tests/Fixtures/TestProject/App_supportedDestinations/Storyboards/LaunchScreen.storyboard b/Tests/Fixtures/TestProject/App_supportedDestinations/Storyboards/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/Tests/Fixtures/TestProject/App_supportedDestinations/Storyboards/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_MACCATALYST.swift b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_MACCATALYST.swift new file mode 100644 index 000000000..fecc4ab44 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_MACCATALYST.swift @@ -0,0 +1 @@ +import Foundation diff --git a/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_ios.swift b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_ios.swift new file mode 100644 index 000000000..fecc4ab44 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_ios.swift @@ -0,0 +1 @@ +import Foundation diff --git a/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_macOS.swift b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_macOS.swift new file mode 100644 index 000000000..fecc4ab44 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_macOS.swift @@ -0,0 +1 @@ +import Foundation diff --git a/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_tvOs.swift b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_tvOs.swift new file mode 100644 index 000000000..fecc4ab44 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/File_tvOs.swift @@ -0,0 +1 @@ +import Foundation diff --git a/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/TVOS/File_B.swift b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/TVOS/File_B.swift new file mode 100644 index 000000000..fecc4ab44 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/TVOS/File_B.swift @@ -0,0 +1 @@ +import Foundation diff --git a/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/iOs/File_A.swift b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/iOs/File_A.swift new file mode 100644 index 000000000..fecc4ab44 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/iOs/File_A.swift @@ -0,0 +1 @@ +import Foundation diff --git a/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/macCatalyst/File_D.swift b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/macCatalyst/File_D.swift new file mode 100644 index 000000000..fecc4ab44 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/macCatalyst/File_D.swift @@ -0,0 +1 @@ +import Foundation diff --git a/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/macos/File_C.swift b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/macos/File_C.swift new file mode 100644 index 000000000..fecc4ab44 --- /dev/null +++ b/Tests/Fixtures/TestProject/App_supportedDestinations/TestResources/macos/File_C.swift @@ -0,0 +1 @@ +import Foundation diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 0fbe3f3a4..5cdebf96f 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -41,6 +41,7 @@ 0F99AECCB4691803C791CDCE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2FC2A8A829CE71B1CF415FF7 /* Main.storyboard */; }; 15129B8D9ED000BDA1FEEC27 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23A2F16890ECF2EE3FED72AE /* AppDelegate.swift */; }; 1551370B0ACAC632E15C853B /* SwiftyJSON.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF47010E7368583405AA50CB /* SwiftyJSON.framework */; }; + 1B485D6584C3B47AC58831C6 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18722C61B05FFF4CC63D5755 /* ContentView.swift */; platformFilters = (tvos, ); }; 1BC891D89980D82738D963F3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 74FBDFA5CB063F6001AD8ACD /* Main.storyboard */; }; 1E03FC7312293997599C6435 /* Empty.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 068EDF47F0B087F6A4052AC0 /* Empty.h */; }; 1E2A4D61E96521FF7123D7B0 /* XPC Service.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 22237B8EBD9E6BE8EBC8735F /* XPC Service.xpc */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -56,6 +57,7 @@ 21CA04F29CD0DEB0DD27B808 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; }; 262891CCD5F74316610437FA /* Framework2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EF21DF245F66BEF5446AAEF /* Framework2.framework */; platformFilter = ios; settings = {ATTRIBUTES = (Weak, ); }; }; 265B6A05C0198FD2EB485173 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93C033648A37D95027845BD3 /* main.swift */; }; + 2698ED273D0A5820B28CAD20 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D52EC9AA9FFD3B690C355068 /* LaunchScreen.storyboard */; platformFilters = (ios, ); }; 2730C6D0A35AED4ADD6EDF17 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0704B6CAFBB53E0EBB08F6B3 /* ViewController.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; 28A96EBC76D53817AABDA91C /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 8AF20308873AEEEC4D8C45D1 /* Settings.bundle */; }; 2A5356FCC03EE312F1738C61 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09B82F603D981398F38D762E /* AppDelegate.swift */; }; @@ -70,6 +72,7 @@ 339578307B9266AB3D7722D9 /* File2.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC56891DA7446EAC8C2F27EB /* File2.swift */; }; 3535891EC86283BB5064E7E1 /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 2E1E747C7BC434ADB80CC269 /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; 3788E1382B38DF4ACE3D2BB1 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3A3BA9F91994D8B472C71F04 /* Swinject in Frameworks */ = {isa = PBXBuildFile; platformFilters = (tvos, ); productRef = C7F9B7EDE85527EFEA85D46D /* Swinject */; }; 3BBCA6F76E5F212E9C55FB78 /* BundleX.bundle in Copy Bundle Resources */ = {isa = PBXBuildFile; fileRef = 45C12576F5AA694DD0CE2132 /* BundleX.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 3C5134EE524310ACF7B7CD6E /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CAF6C55B555E3E1352645B6 /* ExtensionDelegate.swift */; }; 3DF22C477446669094AC7C8C /* ExternalTarget.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F6ADE654A3459AFDA2CC0CD3 /* ExternalTarget.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -148,6 +151,7 @@ B18C121B0A4D43ED8149D8E2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 79325B44B19B83EC6CEDBCC5 /* LaunchScreen.storyboard */; }; B20617116B230DED1F7AF5E5 /* libStaticLibrary_ObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B221F5A689AD7D3AD52F56B8 /* libStaticLibrary_ObjC.a */; }; B2D43A31C184E34EF9CB743C /* Framework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + B358AB913543E62237FCC4E3 /* MyAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15A4363D659A58DA835DE8BA /* MyAppApp.swift */; }; B47F2629BFE5853767C8BB5E /* Contacts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB2B6A77D39CD5602F2125F /* Contacts.framework */; }; B49D3A51787E362DE4D0E78A /* SomeXPCService.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70A8E15C81E454DC950C59F0 /* SomeXPCService.xpc */; }; B502EF8F7605CBD038298F23 /* CrossOverlayFramework.swiftcrossimport in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8DD7A61B07AD2F91BDECC255 /* CrossOverlayFramework.swiftcrossimport */; }; @@ -163,6 +167,7 @@ C836F09B677937EFF69B1FCE /* NotificationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C934C1F7A68CCD0AB6B38478 /* NotificationController.swift */; }; C88598A49087A212990F4E8B /* ResourceFolder in Resources */ = {isa = PBXBuildFile; fileRef = 6B1603BA83AA0C7B94E45168 /* ResourceFolder */; }; CAE18A2194B57C830A297F83 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6680EFE4E908CDBDCE405C8 /* main.swift */; }; + CAF8470C7F1BF207DBE6AEE3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEEFDE76B5FEC833403C0869 /* ContentView.swift */; platformFilters = (ios, ); }; CCA17097382757012B58C17C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1BC32A813B80A53962A1F365 /* Assets.xcassets */; }; D058D241BDF5FB0C919BBECA /* CrossOverlayFramework.swiftcrossimport in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8DD7A61B07AD2F91BDECC255 /* CrossOverlayFramework.swiftcrossimport */; }; D5458D67C3596943114C3205 /* Standalone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F5BD97AF0F94A15A5B7DDB7 /* Standalone.swift */; }; @@ -738,8 +743,10 @@ 108BB29172D27BE3BD1E7F35 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 13EEAB58665D79C15184D9D0 /* App_iOS_UITests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = App_iOS_UITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 148B7C933698BCC4F1DBA979 /* XPC_Service.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPC_Service.m; sourceTree = ""; }; + 15A4363D659A58DA835DE8BA /* MyAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyAppApp.swift; sourceTree = ""; }; 16AA52945B70B1BF9E246350 /* FilterDataProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilterDataProvider.swift; sourceTree = ""; }; 16D662EE577E4CD6AFF39D66 /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = config.xcconfig; sourceTree = ""; }; + 18722C61B05FFF4CC63D5755 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 187E665975BB5611AF0F27E1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 1BC32A813B80A53962A1F365 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 1D0C79A8C750EC0DE748C463 /* StaticLibrary_ObjC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StaticLibrary_ObjC.m; sourceTree = ""; }; @@ -766,6 +773,7 @@ 3ED831531AA349CCC19B258B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 3EF21DF245F66BEF5446AAEF /* Framework2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3FC04772130400920D68A167 /* App_Clip_Tests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = App_Clip_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 407C3F0009FDCE5B1B7DC2A8 /* App_supportedDestinations.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = App_supportedDestinations.app; sourceTree = BUILT_PRODUCTS_DIR; }; 40863AE6202CFCD0529D8438 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 432E2C071A4B6B3757BEA13E /* Driver.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Driver.cpp; sourceTree = ""; }; @@ -830,6 +838,7 @@ AAA49985DFFE797EE8416887 /* inputList.xcfilelist */ = {isa = PBXFileReference; lastKnownFileType = text.xcfilelist; path = inputList.xcfilelist; sourceTree = ""; }; AB055761199DF36DB0C629A6 /* Framework2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; AEBCA8CFF769189C0D52031E /* App_iOS.xctestplan */ = {isa = PBXFileReference; path = App_iOS.xctestplan; sourceTree = ""; }; + AEEFDE76B5FEC833403C0869 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; B17B8D9C9B391332CD176A35 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LocalizedStoryboard.storyboard; sourceTree = ""; }; B198242976C3395E31FE000A /* MessagesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagesViewController.swift; sourceTree = ""; }; B1C33BB070583BE3B0EC0E68 /* App_iOS.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = App_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -855,6 +864,7 @@ D21BB1B6FA5A025305B223BA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; D296BB7355994040E197A1EE /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; D51CC8BCCBD68A90E90A3207 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + D52EC9AA9FFD3B690C355068 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; D629E142AB87C681D4EC90F7 /* iMessageExtension.appex */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "wrapper.app-extension"; path = iMessageExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; D6C89D80B5458D8929F5C127 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; D70BE0C05E5779A077793BE6 /* Model 2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Model 2.xcdatamodel"; sourceTree = ""; }; @@ -909,6 +919,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 36418B6CABA06BA9B206556E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3A3BA9F91994D8B472C71F04 /* Swinject in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 5EFF61D0A49AA8EABD72DF44 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -1102,6 +1120,7 @@ 0D039F2E62354C7C8E283BE6 /* App_iOS_UITests */, EE78B4FBD0137D1975C47D76 /* App_macOS */, 6DE1C805DC13547F27FD86C6 /* App_macOS_Tests */, + D27117FBA2920408002F0B4C /* App_supportedDestinations */, BAE6C12745737019DC9E98BF /* App_watchOS */, 795B8D70B674C850B57DD39D /* App_watchOS Extension */, 6DBE0EE90642BB3F6E58AD43 /* Configs */, @@ -1194,6 +1213,23 @@ path = UnderFileGroup; sourceTree = ""; }; + 69C61547C081D04364A5DE42 /* Storyboards */ = { + isa = PBXGroup; + children = ( + D52EC9AA9FFD3B690C355068 /* LaunchScreen.storyboard */, + ); + name = Storyboards; + path = Storyboards; + sourceTree = ""; + }; + 6A90AFD865B13D26DA108CAB /* tvOS */ = { + isa = PBXGroup; + children = ( + 18722C61B05FFF4CC63D5755 /* ContentView.swift */, + ); + path = tvOS; + sourceTree = ""; + }; 6BD8F0932CCAD4BBE752866B /* App_Clip_UITests */ = { isa = PBXGroup; children = ( @@ -1266,6 +1302,17 @@ path = "XPC Service"; sourceTree = ""; }; + 85FEBB7D2103B020423407A2 /* Sources */ = { + isa = PBXGroup; + children = ( + 9E5249A284275B0CDF4E5DDA /* iOS */, + 6A90AFD865B13D26DA108CAB /* tvOS */, + 15A4363D659A58DA835DE8BA /* MyAppApp.swift */, + ); + name = Sources; + path = Sources; + sourceTree = ""; + }; 8CFD8AD4820FAB9265663F92 /* Tool */ = { isa = PBXGroup; children = ( @@ -1301,6 +1348,14 @@ path = StandaloneFiles; sourceTree = ""; }; + 9E5249A284275B0CDF4E5DDA /* iOS */ = { + isa = PBXGroup; + children = ( + AEEFDE76B5FEC833403C0869 /* ContentView.swift */, + ); + path = iOS; + sourceTree = ""; + }; 9EDF27BB8A57733E6639D36D /* Resources */ = { isa = PBXGroup; children = ( @@ -1343,6 +1398,7 @@ B1C33BB070583BE3B0EC0E68 /* App_iOS.app */, 0B9D98D935F2C69A1F5BA539 /* App_macOS_Tests.xctest */, 33F6DCDC37D2E66543D4965D /* App_macOS.app */, + 407C3F0009FDCE5B1B7DC2A8 /* App_supportedDestinations.app */, 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */, A680BE9F68A255B0FB291AE6 /* App_watchOS.app */, 84317819C92F78425870E483 /* BundleX.bundle */, @@ -1432,6 +1488,15 @@ path = StaticLibrary_Swift; sourceTree = ""; }; + D27117FBA2920408002F0B4C /* App_supportedDestinations */ = { + isa = PBXGroup; + children = ( + 85FEBB7D2103B020423407A2 /* Sources */, + 69C61547C081D04364A5DE42 /* Storyboards */, + ); + path = App_supportedDestinations; + sourceTree = ""; + }; D557819B1EE5B42A0A3DD4D1 /* tvOS */ = { isa = PBXGroup; children = ( @@ -2205,6 +2270,26 @@ productReference = 7D700FA699849D2F95216883 /* EntitledApp.app */; productType = "com.apple.product-type.application"; }; + C0570E2FB50D830D8D423396 /* App_supportedDestinations */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5EC789CCE1928A4CDA00DD1E /* Build configuration list for PBXNativeTarget "App_supportedDestinations" */; + buildPhases = ( + CF8BAE171BAAFB2E5DDB9C19 /* Sources */, + 97119CD9F01D9A9522EF3526 /* Resources */, + 36418B6CABA06BA9B206556E /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = App_supportedDestinations; + packageProductDependencies = ( + C7F9B7EDE85527EFEA85D46D /* Swinject */, + ); + productName = App_supportedDestinations; + productReference = 407C3F0009FDCE5B1B7DC2A8 /* App_supportedDestinations.app */; + productType = "com.apple.product-type.application"; + }; C7F90FD0FAAF232B3E015D38 /* CrossOverlayFramework_watchOS */ = { isa = PBXNativeTarget; buildConfigurationList = C483BD5456B09C276DE6EFC1 /* Build configuration list for PBXNativeTarget "CrossOverlayFramework_watchOS" */; @@ -2415,6 +2500,7 @@ F674B2CFC4738EEC49BAD0DA /* App_iOS_UITests */, 020A320BB3736FCDE6CC4E70 /* App_macOS */, 71E2BDAC4B8E8FC2BBF75C55 /* App_macOS_Tests */, + C0570E2FB50D830D8D423396 /* App_supportedDestinations */, 208179651927D1138D19B5AD /* App_watchOS */, 307AE3FA155FFD09B74AE351 /* App_watchOS Extension */, DA40AB367B606CCE2FDD398D /* BundleX */, @@ -2520,6 +2606,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 97119CD9F01D9A9522EF3526 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2698ED273D0A5820B28CAD20 /* LaunchScreen.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; AA12B5909FEE45016F469C78 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -3000,6 +3094,16 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + CF8BAE171BAAFB2E5DDB9C19 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CAF8470C7F1BF207DBE6AEE3 /* ContentView.swift in Sources */, + 1B485D6584C3B47AC58831C6 /* ContentView.swift in Sources */, + B358AB913543E62237FCC4E3 /* MyAppApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; D1F422E9C4DD531AA88418C9 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -4108,6 +4212,26 @@ }; name = "Staging Debug"; }; + 24CFBB3ABB9E14E85035B892 /* Production Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + INFOPLIST_FILE = App_supportedDestinations/Info.generated.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.test.TestApp; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = YES; + TARGETED_DEVICE_FAMILY = "1,2,3"; + }; + name = "Production Debug"; + }; 2569D399CA3C4828EF87AD78 /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -4815,6 +4939,26 @@ }; name = "Production Release"; }; + 4C11A3E7EA48B5FB556D4614 /* Staging Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + INFOPLIST_FILE = App_supportedDestinations/Info.generated.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.test.TestApp; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = YES; + TARGETED_DEVICE_FAMILY = "1,2,3"; + }; + name = "Staging Debug"; + }; 4D5DC2028DC046B8AF0B9B83 /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5558,6 +5702,26 @@ }; name = "Staging Debug"; }; + 75B3C83C754AA9C12ABF5E54 /* Staging Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + INFOPLIST_FILE = App_supportedDestinations/Info.generated.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.test.TestApp; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = YES; + TARGETED_DEVICE_FAMILY = "1,2,3"; + }; + name = "Staging Release"; + }; 77B8B41EBA5D778EB3AF89DC /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5757,6 +5921,26 @@ }; name = "Production Release"; }; + 7F3F6A813F8B126258780E8D /* Production Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + INFOPLIST_FILE = App_supportedDestinations/Info.generated.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.test.TestApp; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = YES; + TARGETED_DEVICE_FAMILY = "1,2,3"; + }; + name = "Production Release"; + }; 7F86E00770E76CA3412A03BD /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6288,6 +6472,26 @@ }; name = "Staging Debug"; }; + 98EE00BF46FAE62F16C25E9C /* Test Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + INFOPLIST_FILE = App_supportedDestinations/Info.generated.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.test.TestApp; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = YES; + TARGETED_DEVICE_FAMILY = "1,2,3"; + }; + name = "Test Release"; + }; 9A891313A139893990989BDD /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6469,6 +6673,26 @@ }; name = "Production Debug"; }; + A4015127D0A01FE60CF5621B /* Test Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + INFOPLIST_FILE = App_supportedDestinations/Info.generated.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.test.TestApp; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator appletvos appletvsimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = YES; + TARGETED_DEVICE_FAMILY = "1,2,3"; + }; + name = "Test Debug"; + }; A59DDFBFCF18C44A993CFB00 /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -8721,6 +8945,19 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Production Debug"; }; + 5EC789CCE1928A4CDA00DD1E /* Build configuration list for PBXNativeTarget "App_supportedDestinations" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 24CFBB3ABB9E14E85035B892 /* Production Debug */, + 7F3F6A813F8B126258780E8D /* Production Release */, + 4C11A3E7EA48B5FB556D4614 /* Staging Debug */, + 75B3C83C754AA9C12ABF5E54 /* Staging Release */, + A4015127D0A01FE60CF5621B /* Test Debug */, + 98EE00BF46FAE62F16C25E9C /* Test Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Production Debug"; + }; 62C52A55CB8D3BD9A055FD14 /* Build configuration list for PBXNativeTarget "App_macOS_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -9125,6 +9362,11 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + C7F9B7EDE85527EFEA85D46D /* Swinject */ = { + isa = XCSwiftPackageProductDependency; + package = 4EDA79334592CBBA0E507AD2 /* XCRemoteSwiftPackageReference "Swinject" */; + productName = Swinject; + }; D7917D10F77DA9D69937D493 /* Swinject */ = { isa = XCSwiftPackageProductDependency; package = 4EDA79334592CBBA0E507AD2 /* XCRemoteSwiftPackageReference "Swinject" */; diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index f6666784e..dcef8e1e0 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -232,6 +232,29 @@ targets: properties: com.apple.security.application-groups: group.com.app + App_supportedDestinations: + type: application + supportedDestinations: [iOS, tvOS] + info: + path: App_supportedDestinations/Info.generated.plist + properties: + CFBundleDisplayName: "TestApp" + CFBundleVersion: "1.0.0" + settings: + base: + PRODUCT_BUNDLE_IDENTIFIER: com.test.TestApp + sources: + - path: App_supportedDestinations/Sources + group: App_supportedDestinations + inferDestinationFiltersByPath: true + - path: App_supportedDestinations/Storyboards + group: App_supportedDestinations + destinationFilters: [iOS] + dependencies: + - package: Swinject + product: Swinject + destinationFilters: [tvOS] + App_watchOS: type: application.watchapp2 platform: watchOS @@ -482,7 +505,7 @@ schemes: enableGPUFrameCaptureMode: "disabled" enableGPUValidationMode: "disabled" storeKitConfiguration: "App_iOS/Configuration.storekit" - macroExpansion: App_iOS + macroExpansion: App_iOS test: gatherCoverageData: true targets: diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 644e9fbc4..5f1f48546 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -73,12 +73,23 @@ class ProjectSpecTests: XCTestCase { describe { $0.it("has correct build setting") { + try expect(Platform.auto.deploymentTargetSetting) == "" try expect(Platform.iOS.deploymentTargetSetting) == "IPHONEOS_DEPLOYMENT_TARGET" try expect(Platform.tvOS.deploymentTargetSetting) == "TVOS_DEPLOYMENT_TARGET" try expect(Platform.watchOS.deploymentTargetSetting) == "WATCHOS_DEPLOYMENT_TARGET" try expect(Platform.macOS.deploymentTargetSetting) == "MACOSX_DEPLOYMENT_TARGET" + try expect(Platform.visionOS.deploymentTargetSetting) == "XROS_DEPLOYMENT_TARGET" } + $0.it("has correct sdk root") { + try expect(Platform.auto.sdkRoot) == "auto" + try expect(Platform.iOS.sdkRoot) == "iphoneos" + try expect(Platform.tvOS.sdkRoot) == "appletvos" + try expect(Platform.watchOS.sdkRoot) == "watchos" + try expect(Platform.macOS.sdkRoot) == "macosx" + try expect(Platform.visionOS.sdkRoot) == "xros" + } + $0.it("parses version correctly") { try expect(Version.parse("2").deploymentTarget) == "2.0" try expect(Version.parse("2.0").deploymentTarget) == "2.0" @@ -178,7 +189,59 @@ class ProjectSpecTests: XCTestCase { try expectNoValidationError(project, .duplicateDependencies(target: "target1", dependencyReference: "package1")) } - + + $0.it("unexpected supported destinations for watch app") { + var project = baseProject + project.targets = [ + Target( + name: "target1", + type: .application, + platform: .watchOS, + supportedDestinations: [.macOS] + ) + ] + try expectValidationError(project, .unexpectedTargetPlatformForSupportedDestinations(target: "target1", platform: .watchOS)) + } + + $0.it("multiple definitions of mac platform in supported destinations") { + var project = baseProject + project.targets = [ + Target( + name: "target1", + type: .application, + platform: .iOS, + supportedDestinations: [.macOS, .macCatalyst] + ) + ] + try expectValidationError(project, .multipleMacPlatformsInSupportedDestinations(target: "target1")) + } + + $0.it("invalid target platform for macCatalyst supported destinations") { + var project = baseProject + project.targets = [ + Target( + name: "target1", + type: .application, + platform: .tvOS, + supportedDestinations: [.tvOS, .macCatalyst] + ) + ] + try expectValidationError(project, .invalidTargetPlatformForSupportedDestinations(target: "target1")) + } + + $0.it("missing target platform in supported destinations") { + var project = baseProject + project.targets = [ + Target( + name: "target1", + type: .application, + platform: .iOS, + supportedDestinations: [.tvOS] + ) + ] + try expectValidationError(project, .missingTargetPlatformInSupportedDestinations(target: "target1", platform: .iOS)) + } + $0.it("allows non-existent configurations") { var project = baseProject project.options = SpecOptions(disabledValidations: [.missingConfigs]) diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 2fe221841..6a81c0907 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -604,10 +604,66 @@ class SpecLoadingTests: XCTestCase { target_iOS.deploymentTarget = Version(major: 9, minor: 0, patch: 0) target_tvOS.deploymentTarget = Version(major: 10, minor: 0, patch: 0) - try expect(project.targets.count) == 2 try expect(project.targets) == [target_iOS, target_tvOS] } + + $0.it("parses no platform fallbacks to auto if we are using supported destinations") { + let targetDictionary: [String: Any] = [ + "type": "framework", + "supportedDestinations": ["iOS", "tvOS"] + ] + let project = try getProjectSpec(["targets": ["Framework": targetDictionary]]) + let target = Target(name: "Framework", type: .framework, platform: .auto) + + try expect(project.targets) == [target] + } + + $0.it("parses no platform fails if we are not using supported destinations") { + let expectedError = SpecParsingError.unknownTargetPlatform("") + + let projectDictionary: [String: Any] = [ + "name": "test", + "targets": ["target1": [ + "type": "application" + ] as [String : Any]] + ] + + try expectError(expectedError) { + _ = try Project(jsonDictionary: projectDictionary) + } + } + + $0.it("parses supported destinations with macCatalyst but not iOS, we add iOS") { + let targetDictionary: [String: Any] = [ + "type": "framework", + "supportedDestinations": ["macCatalyst"] + ] + + let project = try getProjectSpec(["targets": ["Framework": targetDictionary]]) + let target = Target(name: "Framework", type: .framework, platform: .auto) + + try expect(project.targets) == [target] + try expect(project.targets.first?.supportedDestinations) == [.macCatalyst, .iOS] + } + + $0.it("invalid target platform because platform is an array and supported destinations is in use") { + let expectedError = SpecParsingError.invalidTargetPlatformAsArray + + let projectDictionary: [String: Any] = [ + "name": "test", + "targets": ["target1": [ + "type": "application", + "platform": ["iOS", "tvOS"], + "supportedDestinations": ["iOS", "tvOS"] + ] as [String : Any]] + ] + + try expectError(expectedError) { + _ = try Project(jsonDictionary: projectDictionary) + } + } + $0.it("parses target templates") { let targetDictionary: [String: Any] = [ diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 703126c76..28dbd21a1 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -335,7 +335,156 @@ class ProjectGeneratorTests: XCTestCase { try expect(targetConfig.buildSettings["WATCHOS_DEPLOYMENT_TARGET"] as? String) == "2.0" try expect(targetConfig.buildSettings["TVOS_DEPLOYMENT_TARGET"]).beNil() } - + + $0.it("supportedPlaforms merges settings - iOS, tvOS") { + let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.tvOS, .iOS]) + let project = Project(name: "", targets: [target]) + + let pbxProject = try project.generatePbxProj() + let targetConfig1 = try unwrap(pbxProject.nativeTargets.first?.buildConfigurationList?.buildConfigurations.first) + + try expect(targetConfig1.buildSettings["SUPPORTED_PLATFORMS"] as? String) == "iphoneos iphonesimulator appletvos appletvsimulator" + try expect(targetConfig1.buildSettings["TARGETED_DEVICE_FAMILY"] as? String) == "1,2,3" + try expect(targetConfig1.buildSettings["SUPPORTS_MACCATALYST"] as? Bool) == false + try expect(targetConfig1.buildSettings["SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == true + try expect(targetConfig1.buildSettings["SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == true + + try expect(targetConfig1.buildSettings["LD_RUNPATH_SEARCH_PATHS"] as? [String]) == ["$(inherited)", "@executable_path/Frameworks"] + try expect(targetConfig1.buildSettings["SDKROOT"] as? String) == "auto" + try expect(targetConfig1.buildSettings["ASSETCATALOG_COMPILER_APPICON_NAME"] as? String) == "AppIcon" + try expect(targetConfig1.buildSettings["CODE_SIGN_IDENTITY"] as? String) == "iPhone Developer" + } + + $0.it("supportedPlaforms merges settings - iOS, visionOS") { + let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.visionOS, .iOS]) + let project = Project(name: "", targets: [target]) + + let pbxProject = try project.generatePbxProj() + let targetConfig1 = try unwrap(pbxProject.nativeTargets.first?.buildConfigurationList?.buildConfigurations.first) + + try expect(targetConfig1.buildSettings["SUPPORTED_PLATFORMS"] as? String) == "iphoneos iphonesimulator xros xrsimulator" + try expect(targetConfig1.buildSettings["TARGETED_DEVICE_FAMILY"] as? String) == "1,2,7" + try expect(targetConfig1.buildSettings["SUPPORTS_MACCATALYST"] as? Bool) == false + try expect(targetConfig1.buildSettings["SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == true + try expect(targetConfig1.buildSettings["SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == false + + try expect(targetConfig1.buildSettings["LD_RUNPATH_SEARCH_PATHS"] as? [String]) == ["$(inherited)", "@executable_path/Frameworks"] + try expect(targetConfig1.buildSettings["SDKROOT"] as? String) == "auto" + try expect(targetConfig1.buildSettings["ASSETCATALOG_COMPILER_APPICON_NAME"] as? String) == "AppIcon" + try expect(targetConfig1.buildSettings["CODE_SIGN_IDENTITY"] as? String) == "iPhone Developer" + } + + $0.it("supportedPlaforms merges settings - iOS, tvOS, macOS") { + let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.iOS, .tvOS, .macOS]) + let project = Project(name: "", targets: [target]) + + let pbxProject = try project.generatePbxProj() + let targetConfig1 = try unwrap(pbxProject.nativeTargets.first?.buildConfigurationList?.buildConfigurations.first) + + try expect(targetConfig1.buildSettings["SUPPORTED_PLATFORMS"] as? String) == "iphoneos iphonesimulator appletvos appletvsimulator macosx" + try expect(targetConfig1.buildSettings["TARGETED_DEVICE_FAMILY"] as? String) == "1,2,3" + try expect(targetConfig1.buildSettings["SUPPORTS_MACCATALYST"] as? Bool) == false + try expect(targetConfig1.buildSettings["SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == false + try expect(targetConfig1.buildSettings["SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == true + + try expect(targetConfig1.buildSettings["LD_RUNPATH_SEARCH_PATHS"] as? [String]) == ["$(inherited)", "@executable_path/Frameworks"] + try expect(targetConfig1.buildSettings["SDKROOT"] as? String) == "auto" + try expect(targetConfig1.buildSettings["ASSETCATALOG_COMPILER_APPICON_NAME"] as? String) == "AppIcon" + try expect(targetConfig1.buildSettings["CODE_SIGN_IDENTITY"] as? String) == "iPhone Developer" + } + + $0.it("supportedPlaforms merges settings - iOS, tvOS, macCatalyst") { + let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.iOS, .tvOS, .macCatalyst]) + let project = Project(name: "", targets: [target]) + + let pbxProject = try project.generatePbxProj() + let targetConfig1 = try unwrap(pbxProject.nativeTargets.first?.buildConfigurationList?.buildConfigurations.first) + + try expect(targetConfig1.buildSettings["SUPPORTED_PLATFORMS"] as? String) == "iphoneos iphonesimulator appletvos appletvsimulator" + try expect(targetConfig1.buildSettings["TARGETED_DEVICE_FAMILY"] as? String) == "1,2,3" + try expect(targetConfig1.buildSettings["SUPPORTS_MACCATALYST"] as? Bool) == true + try expect(targetConfig1.buildSettings["SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == false + try expect(targetConfig1.buildSettings["SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == true + + try expect(targetConfig1.buildSettings["LD_RUNPATH_SEARCH_PATHS"] as? [String]) == ["$(inherited)", "@executable_path/Frameworks"] + try expect(targetConfig1.buildSettings["SDKROOT"] as? String) == "auto" + try expect(targetConfig1.buildSettings["ASSETCATALOG_COMPILER_APPICON_NAME"] as? String) == "AppIcon" + try expect(targetConfig1.buildSettings["CODE_SIGN_IDENTITY"] as? String) == "iPhone Developer" + } + + $0.it("supportedPlaforms merges settings - iOS, macOS") { + let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.iOS, .macOS]) + let project = Project(name: "", targets: [target]) + + let pbxProject = try project.generatePbxProj() + let targetConfig1 = try unwrap(pbxProject.nativeTargets.first?.buildConfigurationList?.buildConfigurations.first) + + try expect(targetConfig1.buildSettings["SUPPORTED_PLATFORMS"] as? String) == "iphoneos iphonesimulator macosx" + try expect(targetConfig1.buildSettings["TARGETED_DEVICE_FAMILY"] as? String) == "1,2" + try expect(targetConfig1.buildSettings["SUPPORTS_MACCATALYST"] as? Bool) == false + try expect(targetConfig1.buildSettings["SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == false + try expect(targetConfig1.buildSettings["SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == true + + try expect(targetConfig1.buildSettings["LD_RUNPATH_SEARCH_PATHS"] as? [String]) == ["$(inherited)", "@executable_path/Frameworks"] + try expect(targetConfig1.buildSettings["SDKROOT"] as? String) == "auto" + try expect(targetConfig1.buildSettings["ASSETCATALOG_COMPILER_APPICON_NAME"] as? String) == "AppIcon" + try expect(targetConfig1.buildSettings["CODE_SIGN_IDENTITY"] as? String) == "iPhone Developer" + } + + $0.it("supportedPlaforms merges settings - tvOS, macOS") { + let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.tvOS, .macOS]) + let project = Project(name: "", targets: [target]) + + let pbxProject = try project.generatePbxProj() + let targetConfig1 = try unwrap(pbxProject.nativeTargets.first?.buildConfigurationList?.buildConfigurations.first) + + try expect(targetConfig1.buildSettings["SUPPORTED_PLATFORMS"] as? String) == "appletvos appletvsimulator macosx" + try expect(targetConfig1.buildSettings["TARGETED_DEVICE_FAMILY"] as? String) == "3" + try expect(targetConfig1.buildSettings["SUPPORTS_MACCATALYST"] as? Bool) == false + try expect(targetConfig1.buildSettings["SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == false + + try expect(targetConfig1.buildSettings["LD_RUNPATH_SEARCH_PATHS"] as? [String]) == ["$(inherited)", "@executable_path/Frameworks"] + try expect(targetConfig1.buildSettings["SDKROOT"] as? String) == "auto" + try expect(targetConfig1.buildSettings["ASSETCATALOG_COMPILER_APPICON_NAME"] as? String) == "App Icon & Top Shelf Image" + try expect(targetConfig1.buildSettings["ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME"] as? String) == "LaunchImage" + } + + $0.it("supportedPlaforms merges settings - visionOS, macOS") { + let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.visionOS, .macOS]) + let project = Project(name: "", targets: [target]) + + let pbxProject = try project.generatePbxProj() + let targetConfig1 = try unwrap(pbxProject.nativeTargets.first?.buildConfigurationList?.buildConfigurations.first) + + try expect(targetConfig1.buildSettings["SUPPORTED_PLATFORMS"] as? String) == "xros xrsimulator macosx" + try expect(targetConfig1.buildSettings["TARGETED_DEVICE_FAMILY"] as? String) == "7" + try expect(targetConfig1.buildSettings["SUPPORTS_MACCATALYST"] as? Bool) == false + try expect(targetConfig1.buildSettings["SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == false + try expect(targetConfig1.buildSettings["SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == false + + try expect(targetConfig1.buildSettings["SDKROOT"] as? String) == "auto" + try expect(targetConfig1.buildSettings["ASSETCATALOG_COMPILER_APPICON_NAME"] as? String) == "AppIcon" + } + + $0.it("supportedPlaforms merges settings - iOS, macCatalyst") { + let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.iOS, .macCatalyst]) + let project = Project(name: "", targets: [target]) + + let pbxProject = try project.generatePbxProj() + let targetConfig1 = try unwrap(pbxProject.nativeTargets.first?.buildConfigurationList?.buildConfigurations.first) + + try expect(targetConfig1.buildSettings["SUPPORTED_PLATFORMS"] as? String) == "iphoneos iphonesimulator" + try expect(targetConfig1.buildSettings["TARGETED_DEVICE_FAMILY"] as? String) == "1,2" + try expect(targetConfig1.buildSettings["SUPPORTS_MACCATALYST"] as? Bool) == true + try expect(targetConfig1.buildSettings["SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == false + try expect(targetConfig1.buildSettings["SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == true + + try expect(targetConfig1.buildSettings["LD_RUNPATH_SEARCH_PATHS"] as? [String]) == ["$(inherited)", "@executable_path/Frameworks"] + try expect(targetConfig1.buildSettings["SDKROOT"] as? String) == "auto" + try expect(targetConfig1.buildSettings["ASSETCATALOG_COMPILER_APPICON_NAME"] as? String) == "AppIcon" + try expect(targetConfig1.buildSettings["CODE_SIGN_IDENTITY"] as? String) == "iPhone Developer" + } + $0.it("generates dependencies") { let pbxProject = try project.generatePbxProj() @@ -1066,7 +1215,108 @@ class ProjectGeneratorTests: XCTestCase { try expect(app2OtherLinkerSettings.contains("-ObjC")) == false try expect(app3OtherLinkerSettings.contains("-ObjC")) == true } - + + $0.it("filter sources with inferDestinationFiltersByPath") { + let sourceFiles = TargetSource(path: "App_supportedDestinations/TestResources", inferDestinationFiltersByPath: true) + + let target = Target( + name: "test", + type: .application, + platform: .auto, + sources: [sourceFiles], + dependencies: [] + ) + + let project = Project( + basePath: fixturePath + "TestProject", + name: "test", + targets: [target] + ) + + let pbxProject = try project.generatePbxProj() + let buildFiles = pbxProject.buildFiles + + try expect(buildFiles.count) == 8 + + for buildFile in buildFiles { + let name = buildFile.file?.nameOrPath + + if buildFile.platformFilters == [SupportedDestination.iOS.string] && + (name == "File_ios.swift" || name == "File_A.swift") { + continue + } else if buildFile.platformFilters == [SupportedDestination.tvOS.string] && + (name == "File_tvOs.swift" || name == "File_B.swift") { + continue + } else if buildFile.platformFilters == [SupportedDestination.macOS.string] && + (name == "File_macOS.swift" || name == "File_C.swift") { + continue + } else if buildFile.platformFilters == [SupportedDestination.macCatalyst.string] && + (name == "File_MACCATALYST.swift" || name == "File_D.swift") { + continue + } + + throw failure("Unexpected source file / destinationFilters") + } + } + + $0.it("filter sources with destinationFilters") { + let sourceFile1 = TargetSource(path: "App_supportedDestinations/TestResources/iOs", + destinationFilters: [.iOS]) + let sourceFile2 = TargetSource(path: "App_supportedDestinations/TestResources/TVOS", + destinationFilters: [.tvOS]) + let sourceFile3 = TargetSource(path: "App_supportedDestinations/TestResources/macos", + destinationFilters: [.macOS, .macCatalyst]) + let sourceFile4 = TargetSource(path: "App_supportedDestinations/TestResources/macCatalyst", + destinationFilters: [.macOS, .macCatalyst]) + let sourceFile5 = TargetSource(path: "App_supportedDestinations/TestResources/File_ios.swift", + destinationFilters: [.iOS]) + let sourceFile6 = TargetSource(path: "App_supportedDestinations/TestResources/File_tvOs.swift", + destinationFilters: [.tvOS]) + let sourceFile7 = TargetSource(path: "App_supportedDestinations/TestResources/File_macOS.swift", + destinationFilters: [.macOS, .macCatalyst]) + let sourceFile8 = TargetSource(path: "App_supportedDestinations/TestResources/File_MACCATALYST.swift", + destinationFilters: [.macOS, .macCatalyst]) + + let target = Target( + name: "test", + type: .application, + platform: .auto, + sources: [sourceFile1, sourceFile2, sourceFile3, sourceFile4, sourceFile5, sourceFile6, sourceFile7, sourceFile8], + dependencies: [] + ) + + let project = Project( + basePath: fixturePath + "TestProject", + name: "test", + targets: [target] + ) + + let pbxProject = try project.generatePbxProj() + let buildFiles = pbxProject.buildFiles + + try expect(buildFiles.count) == 8 + + for buildFile in buildFiles { + let name = buildFile.file?.nameOrPath + + if buildFile.platformFilters == [SupportedDestination.iOS.string] && + (name == "File_ios.swift" || name == "File_A.swift") { + continue + } else if buildFile.platformFilters == [SupportedDestination.tvOS.string] && + (name == "File_tvOs.swift" || name == "File_B.swift") { + continue + } else if buildFile.platformFilters == [SupportedDestination.macOS.string, SupportedDestination.macCatalyst.string] && + (name == "File_C.swift" || name == "File_D.swift") { + continue + } else if buildFile.platformFilters == [SupportedDestination.macOS.string, SupportedDestination.macCatalyst.string] && + (name == "File_macOS.swift" || name == "File_MACCATALYST.swift") { + continue + } + + throw failure("Unexpected source file / destinationFilters") + } + } + $0.it("copies Swift Objective-C Interface Header") { let swiftStaticLibraryWithHeader = Target( name: "swiftStaticLibraryWithHeader", @@ -1645,7 +1895,197 @@ class ProjectGeneratorTests: XCTestCase { } } } + + func testGenerateXcodeProjectWithPlatformFilteredDependencies() throws { + describe("generateXcodeProject with destinationFilters") { + + func generateProjectForApp(withDependencies: [Dependency], targets: [Target], packages: [String: SwiftPackage] = [:]) throws -> PBXProj { + + let app = Target( + name: "App", + type: .application, + platform: .iOS, + dependencies: withDependencies + ) + + let project = Project( + name: "test", + targets: targets + [app], + packages: packages + ) + + return try project.generatePbxProj() + } + + func expectLinkedDependecies(_ expectedLinkedFiles: [String: [String]], in project: PBXProj) throws { + let buildPhases = project.buildPhases + let frameworkPhases = project.frameworksBuildPhases.filter { buildPhases.contains($0) } + + var linkedFiles: [String: [String]] = [:] + + for link in frameworkPhases[0].files ?? [] { + if let name = link.file?.nameOrPath ?? link.product?.productName { + linkedFiles[name] = link.platformFilters + } + } + + try expect(linkedFiles) == expectedLinkedFiles + } + + func expectCopiedBundles(_ expectedCopiedBundleFiles: [String: [String]], in project: PBXProj) throws { + let buildPhases = project.buildPhases + let copyBundlesPhase = project.copyFilesBuildPhases.filter { buildPhases.contains($0) } + + var copiedFiles: [String: [String]] = [:] + + for copy in copyBundlesPhase[0].files ?? [] { + if let name = copy.file?.nameOrPath { + copiedFiles[name] = copy.platformFilters + } + } + + try expect(copiedFiles) == expectedCopiedBundleFiles + } + + $0.it("target dependencies") { + + let frameworkA = Target( + name: "frameworkA", + type: .framework, + platform: .iOS + ) + + let frameworkB = Target( + name: "frameworkB", + type: .framework, + platform: .iOS + ) + + let expectedLinkedFiles = [ + "frameworkA.framework": [SupportedDestination.iOS.string], + "frameworkB.framework": [SupportedDestination.iOS.string, SupportedDestination.tvOS.string] + ] + + // given + let dependencies = [ + Dependency(type: .target, reference: frameworkA.name, destinationFilters: [.iOS]), + Dependency(type: .target, reference: frameworkB.name, destinationFilters: [.iOS, .tvOS]), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [frameworkA, frameworkB]) + + // then ensure that everything is linked + try expectLinkedDependecies(expectedLinkedFiles, in: pbxProject) + } + + $0.it("framework dependencies") { + + let expectedLinkedFiles = [ + "frameworkA.framework": [SupportedDestination.iOS.string], + "frameworkB.framework": [SupportedDestination.iOS.string, SupportedDestination.tvOS.string] + ] + + // given + let dependencies = [ + Dependency(type: .framework, reference: "frameworkA.framework", destinationFilters: [.iOS]), + Dependency(type: .framework, reference: "frameworkB.framework", destinationFilters: [.iOS, .tvOS]), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: []) + + // then ensure that everything is linked + try expectLinkedDependecies(expectedLinkedFiles, in: pbxProject) + } + + $0.it("carthage dependencies") { + + let expectedLinkedFiles = [ + "frameworkA.framework": [SupportedDestination.iOS.string], + "frameworkB.framework": [SupportedDestination.iOS.string, SupportedDestination.tvOS.string] + ] + + // given + let dependencies = [ + Dependency(type: .carthage(findFrameworks: false, linkType: .dynamic), reference: "frameworkA.framework", destinationFilters: [.iOS]), + Dependency(type: .carthage(findFrameworks: false, linkType: .dynamic), reference: "frameworkB.framework", destinationFilters: [.iOS, .tvOS]), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: []) + + // then ensure that everything is linked + try expectLinkedDependecies(expectedLinkedFiles, in: pbxProject) + } + + $0.it("sdk dependencies") { + + let expectedLinkedFiles = [ + "sdkA.framework": [SupportedDestination.iOS.string], + "sdkB.framework": [SupportedDestination.iOS.string, SupportedDestination.tvOS.string] + ] + + // given + let dependencies = [ + Dependency(type: .sdk(root: nil), reference: "sdkA.framework", destinationFilters: [.iOS]), + Dependency(type: .sdk(root: nil), reference: "sdkB.framework", destinationFilters: [.iOS, .tvOS]), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: []) + + // then ensure that everything is linked + try expectLinkedDependecies(expectedLinkedFiles, in: pbxProject) + } + + $0.it("package dependencies") { + + let packages: [String: SwiftPackage] = [ + "RxSwift": .remote(url: "https://github.com/ReactiveX/RxSwift", versionRequirement: .upToNextMajorVersion("5.1.1")), + ] + + let expectedLinkedFiles = [ + "RxSwift": [SupportedDestination.iOS.string], + "RxCocoa": [SupportedDestination.iOS.string, SupportedDestination.tvOS.string] + ] + + // given + let dependencies = [ + Dependency(type: .package(products: ["RxSwift"]), reference: "RxSwift", destinationFilters: [.iOS]), + Dependency(type: .package(products: ["RxCocoa"]), reference: "RxSwift", destinationFilters: [.iOS, .tvOS]), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: [], packages: packages) + + // then ensure that everything is linked + try expectLinkedDependecies(expectedLinkedFiles, in: pbxProject) + } + + $0.it("bundle dependencies") { + + let expectedCopiedBundleFiles = [ + "bundleA.bundle": [SupportedDestination.iOS.string], + "bundleB.bundle": [SupportedDestination.iOS.string, SupportedDestination.tvOS.string] + ] + + // given + let dependencies = [ + Dependency(type: .bundle, reference: "bundleA.bundle", destinationFilters: [.iOS]), + Dependency(type: .bundle, reference: "bundleB.bundle", destinationFilters: [.iOS, .tvOS]), + ] + + // when + let pbxProject = try generateProjectForApp(withDependencies: dependencies, targets: []) + + // then ensure that everything is linked + try expectCopiedBundles(expectedCopiedBundleFiles, in: pbxProject) + } + } + } + func testGenerateXcodeProjectWithCustomDependencyDestinations() throws { describe("generateXcodeProject") { From 4c0b4aed2263a703f0ac420d6c6e890ae82ac72b Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 31 Oct 2023 21:04:19 +1100 Subject: [PATCH 209/284] Update CHANGELOG.md --- CHANGELOG.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28e51b164..366f180c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,17 +2,12 @@ ## Next Version -### Feature support for multiple deployment targets with xcode 14 - -- Added `supportedDestinations` for target -- Added a new platform value `auto` that we can use only with `supportedDestinations` -- Added the possiblity to avoid the definition of plaform, only when we use `supportedDestinations`, that fallbacks to 'auto' -- Added `destinationFilters` for sources and dependecies -- Added `inferDestinationFiltersByPath`, a convenience filter for sources -- Added visionOS support - ### Added - +- [Multi-destination targets](https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#supported-destinations) #1336 @amatig + - Added `supportedDestinations` to target + - Added optional new `platform` value of `auto` when using `supportedDestinations` + - Added `destinationFilters` for sources and dependecies + - Added `inferDestinationFiltersByPath`, a convenience filter for sources - `.mlpackage` files now default to being a source type #1398 @aaron-foreflight - Added support for `Build Tool Plug-ins` in `AggregateTarget` #1390 @BarredEwe From cf8ac6b61c1fd6bb2dd20cf397df514e667b6ece Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 31 Oct 2023 22:01:04 +1100 Subject: [PATCH 210/284] Update to 2.38.0 --- CHANGELOG.md | 2 ++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 366f180c9..4e863cb60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.38.0 + ### Added - [Multi-destination targets](https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#supported-destinations) #1336 @amatig - Added `supportedDestinations` to target diff --git a/Makefile b/Makefile index 5b741e40c..0e475b33a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.37.0 +VERSION = 2.38.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 0ece74791..76a3b2af9 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.37.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.38.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index d52668c05..d52d89ccc 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.37.0") +let version = Version("2.38.0") let cli = XcodeGenCLI(version: version) cli.execute() From 1b4e6971972755dd977767fb7dbdfc45f02df6f3 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 31 Oct 2023 22:01:40 +1100 Subject: [PATCH 211/284] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e863cb60..f7a983c97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ## 2.38.0 ### Added + - [Multi-destination targets](https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#supported-destinations) #1336 @amatig - Added `supportedDestinations` to target - Added optional new `platform` value of `auto` when using `supportedDestinations` From 87a275fb0852bb231550e66473804de57063c957 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 31 Oct 2023 22:03:00 +1100 Subject: [PATCH 212/284] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7a983c97..6ab8fdd63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - [Multi-destination targets](https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#supported-destinations) #1336 @amatig - Added `supportedDestinations` to target - Added optional new `platform` value of `auto` when using `supportedDestinations` - - Added `destinationFilters` for sources and dependecies + - Added `destinationFilters` for sources and dependencies - Added `inferDestinationFiltersByPath`, a convenience filter for sources - `.mlpackage` files now default to being a source type #1398 @aaron-foreflight - Added support for `Build Tool Plug-ins` in `AggregateTarget` #1390 @BarredEwe From d935e4184697052ed57f51ba740d7ed8a254bda1 Mon Sep 17 00:00:00 2001 From: Wolfgang Lutz Date: Tue, 13 Feb 2024 09:08:01 +0100 Subject: [PATCH 213/284] Update SpecValidationError.swift (#1439) fix a typo --- Sources/ProjectSpec/SpecValidationError.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ProjectSpec/SpecValidationError.swift b/Sources/ProjectSpec/SpecValidationError.swift index 6564067a6..1840a9bd1 100644 --- a/Sources/ProjectSpec/SpecValidationError.swift +++ b/Sources/ProjectSpec/SpecValidationError.swift @@ -105,7 +105,7 @@ public struct SpecValidationError: Error, CustomStringConvertible { case let .duplicateDependencies(target, dependencyReference): return "Target \(target.quoted) has the dependency \(dependencyReference.quoted) multiple times" case let .invalidPluginPackageReference(plugin, package): - return "Plugin \(plugin) has invalide package reference \(package)" + return "Plugin \(plugin) has invalid package reference \(package)" } } } From 28383d1d364363eba1fd163e93bd81a67a01e7a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Dahlgren?= Date: Tue, 13 Feb 2024 09:08:44 +0100 Subject: [PATCH 214/284] Fix missing LD_RUNPATH_SEARCH_PATHS setting for visionOS platform (#1444) --- SettingPresets/Platforms/visionOS.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/SettingPresets/Platforms/visionOS.yml b/SettingPresets/Platforms/visionOS.yml index 5f2e52201..d969bf799 100644 --- a/SettingPresets/Platforms/visionOS.yml +++ b/SettingPresets/Platforms/visionOS.yml @@ -1,2 +1,3 @@ +LD_RUNPATH_SEARCH_PATHS: ["$(inherited)", "@executable_path/Frameworks"] SDKROOT: xros TARGETED_DEVICE_FAMILY: 7 From 6bbf2c6543593a0bafa240abdcb045cd04736661 Mon Sep 17 00:00:00 2001 From: Tatsuki Otsuka Date: Tue, 13 Feb 2024 17:12:50 +0900 Subject: [PATCH 215/284] Add watchOS as a supported destination (#1438) * Add a supported destination: watchOS * Change priority * Add test cases * Refactor: reword test case descriptions --- .../SupportedDestinations/watchOS.yml | 2 + .../ProjectSpec/SupportedDestination.swift | 11 +++-- .../ProjectGeneratorTests.swift | 44 +++++++++++++++---- 3 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 SettingPresets/SupportedDestinations/watchOS.yml diff --git a/SettingPresets/SupportedDestinations/watchOS.yml b/SettingPresets/SupportedDestinations/watchOS.yml new file mode 100644 index 000000000..95ba0836d --- /dev/null +++ b/SettingPresets/SupportedDestinations/watchOS.yml @@ -0,0 +1,2 @@ +SUPPORTED_PLATFORMS: watchos watchsimulator +TARGETED_DEVICE_FAMILY: '4' diff --git a/Sources/ProjectSpec/SupportedDestination.swift b/Sources/ProjectSpec/SupportedDestination.swift index 15a776a4c..6c7ed11a0 100644 --- a/Sources/ProjectSpec/SupportedDestination.swift +++ b/Sources/ProjectSpec/SupportedDestination.swift @@ -5,6 +5,7 @@ public enum SupportedDestination: String, CaseIterable { case tvOS case macOS case macCatalyst + case watchOS case visionOS } @@ -20,6 +21,8 @@ extension SupportedDestination { return "macos" case .macCatalyst: return "maccatalyst" + case .watchOS: + return "watchos" case .visionOS: return "xros" } @@ -34,12 +37,14 @@ extension SupportedDestination { return 0 case .tvOS: return 1 - case .visionOS: + case .watchOS: return 2 - case .macOS: + case .visionOS: return 3 - case .macCatalyst: + case .macOS: return 4 + case .macCatalyst: + return 5 } } } diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 28dbd21a1..e145ceb5c 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -336,7 +336,7 @@ class ProjectGeneratorTests: XCTestCase { try expect(targetConfig.buildSettings["TVOS_DEPLOYMENT_TARGET"]).beNil() } - $0.it("supportedPlaforms merges settings - iOS, tvOS") { + $0.it("supportedDestinations merges settings - iOS, tvOS") { let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.tvOS, .iOS]) let project = Project(name: "", targets: [target]) @@ -355,7 +355,7 @@ class ProjectGeneratorTests: XCTestCase { try expect(targetConfig1.buildSettings["CODE_SIGN_IDENTITY"] as? String) == "iPhone Developer" } - $0.it("supportedPlaforms merges settings - iOS, visionOS") { + $0.it("supportedDestinations merges settings - iOS, visionOS") { let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.visionOS, .iOS]) let project = Project(name: "", targets: [target]) @@ -374,7 +374,7 @@ class ProjectGeneratorTests: XCTestCase { try expect(targetConfig1.buildSettings["CODE_SIGN_IDENTITY"] as? String) == "iPhone Developer" } - $0.it("supportedPlaforms merges settings - iOS, tvOS, macOS") { + $0.it("supportedDestinations merges settings - iOS, tvOS, macOS") { let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.iOS, .tvOS, .macOS]) let project = Project(name: "", targets: [target]) @@ -393,7 +393,7 @@ class ProjectGeneratorTests: XCTestCase { try expect(targetConfig1.buildSettings["CODE_SIGN_IDENTITY"] as? String) == "iPhone Developer" } - $0.it("supportedPlaforms merges settings - iOS, tvOS, macCatalyst") { + $0.it("supportedDestinations merges settings - iOS, tvOS, macCatalyst") { let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.iOS, .tvOS, .macCatalyst]) let project = Project(name: "", targets: [target]) @@ -412,7 +412,7 @@ class ProjectGeneratorTests: XCTestCase { try expect(targetConfig1.buildSettings["CODE_SIGN_IDENTITY"] as? String) == "iPhone Developer" } - $0.it("supportedPlaforms merges settings - iOS, macOS") { + $0.it("supportedDestinations merges settings - iOS, macOS") { let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.iOS, .macOS]) let project = Project(name: "", targets: [target]) @@ -431,7 +431,7 @@ class ProjectGeneratorTests: XCTestCase { try expect(targetConfig1.buildSettings["CODE_SIGN_IDENTITY"] as? String) == "iPhone Developer" } - $0.it("supportedPlaforms merges settings - tvOS, macOS") { + $0.it("supportedDestinations merges settings - tvOS, macOS") { let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.tvOS, .macOS]) let project = Project(name: "", targets: [target]) @@ -449,7 +449,7 @@ class ProjectGeneratorTests: XCTestCase { try expect(targetConfig1.buildSettings["ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME"] as? String) == "LaunchImage" } - $0.it("supportedPlaforms merges settings - visionOS, macOS") { + $0.it("supportedDestinations merges settings - visionOS, macOS") { let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.visionOS, .macOS]) let project = Project(name: "", targets: [target]) @@ -466,7 +466,7 @@ class ProjectGeneratorTests: XCTestCase { try expect(targetConfig1.buildSettings["ASSETCATALOG_COMPILER_APPICON_NAME"] as? String) == "AppIcon" } - $0.it("supportedPlaforms merges settings - iOS, macCatalyst") { + $0.it("supportedDestinations merges settings - iOS, macCatalyst") { let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.iOS, .macCatalyst]) let project = Project(name: "", targets: [target]) @@ -484,7 +484,33 @@ class ProjectGeneratorTests: XCTestCase { try expect(targetConfig1.buildSettings["ASSETCATALOG_COMPILER_APPICON_NAME"] as? String) == "AppIcon" try expect(targetConfig1.buildSettings["CODE_SIGN_IDENTITY"] as? String) == "iPhone Developer" } - + + $0.it("supportedDestinations merges settings - iOS, watchOS") { + let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.iOS, .watchOS]) + let project = Project(name: "", targets: [target]) + + let pbxProject = try project.generatePbxProj() + let targetConfig1 = try unwrap(pbxProject.nativeTargets.first?.buildConfigurationList?.buildConfigurations.first) + + try expect(targetConfig1.buildSettings["SUPPORTED_PLATFORMS"] as? String) == "iphoneos iphonesimulator watchos watchsimulator" + try expect(targetConfig1.buildSettings["TARGETED_DEVICE_FAMILY"] as? String) == "1,2,4" + try expect(targetConfig1.buildSettings["SUPPORTS_MACCATALYST"] as? Bool) == false + try expect(targetConfig1.buildSettings["SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == true + try expect(targetConfig1.buildSettings["SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == true + } + + $0.it("supportedDestinations merges settings - visionOS, watchOS") { + let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.visionOS, .watchOS]) + let project = Project(name: "", targets: [target]) + + let pbxProject = try project.generatePbxProj() + let targetConfig1 = try unwrap(pbxProject.nativeTargets.first?.buildConfigurationList?.buildConfigurations.first) + + try expect(targetConfig1.buildSettings["SUPPORTED_PLATFORMS"] as? String) == "watchos watchsimulator xros xrsimulator" + try expect(targetConfig1.buildSettings["TARGETED_DEVICE_FAMILY"] as? String) == "4,7" + try expect(targetConfig1.buildSettings["SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == false + } + $0.it("generates dependencies") { let pbxProject = try project.generatePbxProj() From 2c1500761dc91ca742ce73602615299e499d23ce Mon Sep 17 00:00:00 2001 From: "freddi(Yuki Aki)" Date: Tue, 13 Feb 2024 18:48:23 +0900 Subject: [PATCH 216/284] Support Artifact Bundle (#1388) * support artifact bundle * update CHANGELOG to exact PR * build ArtifactBundle only on macOS * update to copy SettingPresets into bundle * fix CHANGELOG.md * load Bundle.module * update ArtifactBundleGen * update ArtifactBundleGen to linux issue * fix unnecessary code * add lisence to bundle --- .gitignore | 1 + CHANGELOG.md | 3 +++ Makefile | 5 +++++ Package.resolved | 9 +++++++++ Package.swift | 4 +++- RELEASE.md | 4 ++-- Sources/XcodeGenKit/SettingPresets | 1 + Sources/XcodeGenKit/SettingsBuilder.swift | 3 +++ 8 files changed, 27 insertions(+), 3 deletions(-) create mode 120000 Sources/XcodeGenKit/SettingPresets diff --git a/.gitignore b/.gitignore index 1f55464ba..cf9a40a53 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ xcuserdata *.xcuserstate XcodeGen.xcodeproj xcodegen.zip +xcodegen.artifactbundle.zip .vscode/launch.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ab8fdd63..141a48c6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Change Log ## Next Version +### Added + +- Support Artifact Bundle #1388 @freddi-kit ## 2.38.0 diff --git a/Makefile b/Makefile index 0e475b33a..959be62a6 100644 --- a/Makefile +++ b/Makefile @@ -48,3 +48,8 @@ brew: archive: build ./scripts/archive.sh "$(EXECUTABLE_PATH)" + swift package plugin --allow-writing-to-package-directory generate-artifact-bundle \ + --package-version $(VERSION) \ + --executable-name $(EXECUTABLE_NAME) \ + --build-config release \ + --include-resource-path LICENSE diff --git a/Package.resolved b/Package.resolved index b3231bf75..7c9e9d087 100644 --- a/Package.resolved +++ b/Package.resolved @@ -9,6 +9,15 @@ "version" : "4.6.1" } }, + { + "identity" : "artifactbundlegen", + "kind" : "remoteSourceControl", + "location" : "https://github.com/freddi-kit/ArtifactBundleGen", + "state" : { + "revision" : "707e4ccc4b1c7e48e881cd5ea91e493a95df24bf", + "version" : "0.0.6" + } + }, { "identity" : "graphviz", "kind" : "remoteSourceControl", diff --git a/Package.swift b/Package.swift index 00423603f..bc66a795e 100644 --- a/Package.swift +++ b/Package.swift @@ -20,8 +20,8 @@ let package = Package( .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"), + .package(url: "https://github.com/freddi-kit/ArtifactBundleGen", exact: "0.0.6") ], - targets: [ .executableTarget(name: "XcodeGen", dependencies: [ "XcodeGenCLI", @@ -42,6 +42,8 @@ let package = Package( "PathKit", "XcodeGenCore", "GraphViz", + ], resources: [ + .copy("SettingPresets") ]), .target(name: "ProjectSpec", dependencies: [ "JSONUtilities", diff --git a/RELEASE.md b/RELEASE.md index 60e27d38d..ebd890a8f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -7,5 +7,5 @@ 1. Run `make release` 1. Push commit and tag to github 1. Create release from tag on GitHub using the version number and relevant changelog contents -1. Run `make archive` and upload `xcodegen.zip` to the github release -1. Run `make brew` which will open a PR on homebrew core +1. Run `make archive` and upload `xcodegen.zip` and `xcodegen.artifactbundle.zip` to the github release +1. Run `make brew` which will open a PR on homebrew core \ No newline at end of file diff --git a/Sources/XcodeGenKit/SettingPresets b/Sources/XcodeGenKit/SettingPresets new file mode 120000 index 000000000..1137a5ea8 --- /dev/null +++ b/Sources/XcodeGenKit/SettingPresets @@ -0,0 +1 @@ +../../SettingPresets/ \ No newline at end of file diff --git a/Sources/XcodeGenKit/SettingsBuilder.swift b/Sources/XcodeGenKit/SettingsBuilder.swift index 69aadf6f4..81047de7a 100644 --- a/Sources/XcodeGenKit/SettingsBuilder.swift +++ b/Sources/XcodeGenKit/SettingsBuilder.swift @@ -249,6 +249,9 @@ extension SettingsPresetFile { symlink.parent() + relativePath, ] + possibleSettingsPaths } + if let moduleResourcePath = Bundle.module.path(forResource: "SettingPresets", ofType: nil) { + possibleSettingsPaths.append(Path(moduleResourcePath) + "\(path).yml") + } guard let settingsPath = possibleSettingsPaths.first(where: { $0.exists }) else { switch self { From 2881fcc8fb9f0c34e49d9af87ceeec3dc6fe9de5 Mon Sep 17 00:00:00 2001 From: nicolasbosi95 <30941691+nicolasbosi95@users.noreply.github.com> Date: Wed, 14 Feb 2024 06:07:04 -0300 Subject: [PATCH 217/284] Support for Strings Catalogs (Xcode 15) (#1421) * Support for xcode 15 string catalogs * Add sample string catalog to Test Fixture and basic test to check that asset catalogs are added in the resources build phase * Restore unintended changes * Update Pull Request number for 'Support for Strings Catalogs' in changelog * Update fixture yml generator * Detect knownRegions based on locales in string catalogs --- CHANGELOG.md | 4 + Sources/ProjectSpec/FileType.swift | 1 + Sources/XcodeGenKit/SourceGenerator.swift | 10 +++ .../XcodeGenKit/StringCatalogDecoding.swift | 82 +++++++++++++++++++ Sources/XcodeGenKit/XCProjExtensions.swift | 2 + .../Project.xcodeproj/project.pbxproj | 12 +++ .../String Catalogs/Localizable.xcstrings | 24 ++++++ Tests/Fixtures/TestProject/project.yml | 1 + .../SourceGeneratorTests.swift | 74 ++++++++++++++++- 9 files changed, 209 insertions(+), 1 deletion(-) create mode 100644 Sources/XcodeGenKit/StringCatalogDecoding.swift create mode 100644 Tests/Fixtures/TestProject/String Catalogs/Localizable.xcstrings diff --git a/CHANGELOG.md b/CHANGELOG.md index 141a48c6a..44dfe38a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ - Support Artifact Bundle #1388 @freddi-kit +### Added + +- Added support for String Catalogs (`.xcstrings`) #1421 @nicolasbosi95 + ## 2.38.0 ### Added diff --git a/Sources/ProjectSpec/FileType.swift b/Sources/ProjectSpec/FileType.swift index b6af3a9fa..1629bca59 100644 --- a/Sources/ProjectSpec/FileType.swift +++ b/Sources/ProjectSpec/FileType.swift @@ -72,6 +72,7 @@ extension FileType { "bundle": FileType(buildPhase: .resources), "xcassets": FileType(buildPhase: .resources), "storekit": FileType(buildPhase: .resources), + "xcstrings": FileType(buildPhase: .resources), // sources "swift": FileType(buildPhase: .sources), diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index 21155156f..ba5cbd0cb 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -455,6 +455,7 @@ class SourceGenerator { let createIntermediateGroups = targetSource.createIntermediateGroups ?? project.options.createIntermediateGroups let nonLocalizedChildren = children.filter { $0.extension != "lproj" } + let stringCatalogChildren = children.filter { $0.extension == "xcstrings" } let directories = nonLocalizedChildren .filter { @@ -520,6 +521,15 @@ class SourceGenerator { }() knownRegions.formUnion(localisedDirectories.map { $0.lastComponentWithoutExtension }) + + // XCode 15 - Detect known regions from locales present in string catalogs + + let stringCatalogsLocales = stringCatalogChildren + .compactMap { StringCatalog(from: $0) } + .reduce(Set(), { partialResult, stringCatalog in + partialResult.union(stringCatalog.includedLocales) + }) + knownRegions.formUnion(stringCatalogsLocales) // create variant groups of the base localisation first var baseLocalisationVariantGroups: [PBXVariantGroup] = [] diff --git a/Sources/XcodeGenKit/StringCatalogDecoding.swift b/Sources/XcodeGenKit/StringCatalogDecoding.swift new file mode 100644 index 000000000..da66c2596 --- /dev/null +++ b/Sources/XcodeGenKit/StringCatalogDecoding.swift @@ -0,0 +1,82 @@ +import Foundation +import JSONUtilities +import PathKit + +struct StringCatalog { + +/** +* Sample string catalog: + +* { +* "sourceLanguage" : "en", +* "strings" : { +* "foo" : { +* "localizations" : { +* "en" : { +* ... +* }, +* "es" : { +* ... +* }, +* "it" : { +* ... +* } +* } +* } +* } +* } +*/ + + private struct CatalogItem { + private enum JSONKeys: String { + case localizations + } + + private let key: String + let locales: Set + + init?(key: String, from jsonDictionary: JSONDictionary) { + guard let localizations = jsonDictionary[JSONKeys.localizations.rawValue] as? JSONDictionary else { + return nil + } + + self.key = key + self.locales = Set(localizations.keys) + } + } + + private enum JSONKeys: String { + case strings + } + + private let strings: [CatalogItem] + + init?(from path: Path) { + guard let catalogDictionary = try? JSONDictionary.from(url: path.url), + let catalog = StringCatalog(from: catalogDictionary) else { + return nil + } + + self = catalog + } + + private init?(from jsonDictionary: JSONDictionary) { + guard let stringsDictionary = jsonDictionary[JSONKeys.strings.rawValue] as? JSONDictionary else { + return nil + } + + self.strings = stringsDictionary.compactMap { key, value -> CatalogItem? in + guard let stringDictionary = value as? JSONDictionary else { + return nil + } + + return CatalogItem(key: key, from: stringDictionary) + } + } + + var includedLocales: Set { + strings.reduce(Set(), { partialResult, catalogItem in + partialResult.union(catalogItem.locales) + }) + } +} diff --git a/Sources/XcodeGenKit/XCProjExtensions.swift b/Sources/XcodeGenKit/XCProjExtensions.swift index d6021668d..ec3f2763b 100644 --- a/Sources/XcodeGenKit/XCProjExtensions.swift +++ b/Sources/XcodeGenKit/XCProjExtensions.swift @@ -61,6 +61,8 @@ extension Xcode { return "wrapper.extensionkit-extension" case ("swiftcrossimport", _): return "wrapper.swiftcrossimport" + case ("xcstrings", _): + return "text.json.xcstrings" default: // fallback to XcodeProj defaults return Xcode.filetype(extension: fileExtension) diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 5cdebf96f..7328f510f 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -85,6 +85,7 @@ 4B862F11762F6BB54E97E401 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 576675973B56A96047CB4944 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4C1504A05321046B3ED7A839 /* Framework2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB055761199DF36DB0C629A6 /* Framework2.framework */; }; 4CB673A7C0C11E04F8544BDB /* Contacts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB2B6A77D39CD5602F2125F /* Contacts.framework */; }; + 4CCBDB0492AB3542B2AB6D94 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = AEDB7833B8AE2126630D6FCB /* Localizable.xcstrings */; }; 4DA7140FF84DBF39961F3409 /* NetworkSystemExtension.systemextension in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = 2049B6DD2AFE85F9DC9F3EB3 /* NetworkSystemExtension.systemextension */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 4F6481557E2BEF8D749C37E3 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 187E665975BB5611AF0F27E1 /* main.m */; }; 5126CD91C2CB41C9B14B6232 /* DriverKitDriver.dext in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = 83B5EC7EF81F7E4B6F426D4E /* DriverKitDriver.dext */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; @@ -838,6 +839,7 @@ AAA49985DFFE797EE8416887 /* inputList.xcfilelist */ = {isa = PBXFileReference; lastKnownFileType = text.xcfilelist; path = inputList.xcfilelist; sourceTree = ""; }; AB055761199DF36DB0C629A6 /* Framework2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; AEBCA8CFF769189C0D52031E /* App_iOS.xctestplan */ = {isa = PBXFileReference; path = App_iOS.xctestplan; sourceTree = ""; }; + AEDB7833B8AE2126630D6FCB /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = ""; }; AEEFDE76B5FEC833403C0869 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; B17B8D9C9B391332CD176A35 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LocalizedStoryboard.storyboard; sourceTree = ""; }; B198242976C3395E31FE000A /* MessagesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagesViewController.swift; sourceTree = ""; }; @@ -1139,6 +1141,7 @@ 9DB22CB08CFAA455518700DB /* StandaloneFiles */, BDA839814AF73F01F7710518 /* StaticLibrary_ObjC */, CBDAC144248EE9D3838C6AAA /* StaticLibrary_Swift */, + 6E0D17C5B4E6F01B89254309 /* String Catalogs */, 8CFD8AD4820FAB9265663F92 /* Tool */, 4C7F5EB7D6F3E0E9B426AB4A /* Utilities */, 3FEA12CF227D41EF50E5C2DB /* Vendor */, @@ -1257,6 +1260,14 @@ path = App_macOS_Tests; sourceTree = ""; }; + 6E0D17C5B4E6F01B89254309 /* String Catalogs */ = { + isa = PBXGroup; + children = ( + AEDB7833B8AE2126630D6FCB /* Localizable.xcstrings */, + ); + path = "String Catalogs"; + sourceTree = ""; + }; 795B8D70B674C850B57DD39D /* App_watchOS Extension */ = { isa = PBXGroup; children = ( @@ -2594,6 +2605,7 @@ A9548E5DCFE92236494164DF /* LaunchScreen.storyboard in Resources */, 6E8F8303759824631C8D9DA3 /* Localizable.strings in Resources */, E5DD0AD6F7AE1DD4AF98B83E /* Localizable.stringsdict in Resources */, + 4CCBDB0492AB3542B2AB6D94 /* Localizable.xcstrings in Resources */, 2A7EB1A9A365A7EC5D49AFCF /* LocalizedStoryboard.storyboard in Resources */, 49A4B8937BB5520B36EA33F0 /* Main.storyboard in Resources */, 900CFAD929CAEE3861127627 /* MyBundle.bundle in Resources */, diff --git a/Tests/Fixtures/TestProject/String Catalogs/Localizable.xcstrings b/Tests/Fixtures/TestProject/String Catalogs/Localizable.xcstrings new file mode 100644 index 000000000..14c34efb9 --- /dev/null +++ b/Tests/Fixtures/TestProject/String Catalogs/Localizable.xcstrings @@ -0,0 +1,24 @@ +{ + "sourceLanguage" : "en", + "strings" : { + "sampleText" : { + "comment" : "Sample string in an asset catalog", + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "This is a localized string" + } + }, + "es" : { + "stringUnit" : { + "state" : "translated", + "value" : "Esta es una cadena de texto localizable." + } + } + } + } + }, + "version" : "1.0" +} \ No newline at end of file diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index dcef8e1e0..54b33454f 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -163,6 +163,7 @@ targets: resourceTags: - tag1 - tag2 + - String Catalogs/Localizable.xcstrings settings: INFOPLIST_FILE: App_iOS/Info.plist PRODUCT_BUNDLE_IDENTIFIER: com.project.app diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index 2075abf3b..89405629c 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -1,7 +1,7 @@ import PathKit import ProjectSpec import Spectre -import XcodeGenKit +@testable import XcodeGenKit import XcodeProj import XCTest import Yams @@ -41,6 +41,13 @@ class SourceGeneratorTests: XCTestCase { try file.write("") } } + + func createFile(at relativePath: Path, content: String) throws -> Path { + let filePath = directoryPath + relativePath + try filePath.parent().mkpath() + try filePath.write(content) + return filePath + } func removeDirectories() { try? directoryPath.delete() @@ -561,6 +568,7 @@ class SourceGeneratorTests: XCTestCase { - file.h - GoogleService-Info.plist - file.xcconfig + - Localizable.xcstrings B: - file.swift - file.xcassets @@ -617,6 +625,7 @@ class SourceGeneratorTests: XCTestCase { try pbxProj.expectFile(paths: ["A", "file.h"], buildPhase: .resources) try pbxProj.expectFile(paths: ["A", "GoogleService-Info.plist"], buildPhase: .resources) try pbxProj.expectFile(paths: ["A", "file.xcconfig"], buildPhase: .resources) + try pbxProj.expectFile(paths: ["A", "Localizable.xcstrings"], buildPhase: .resources) try pbxProj.expectFile(paths: ["B", "file.swift"], buildPhase: BuildPhaseSpec.none) try pbxProj.expectFile(paths: ["B", "file.xcassets"], buildPhase: BuildPhaseSpec.none) @@ -1238,6 +1247,69 @@ class SourceGeneratorTests: XCTestCase { try expect(pbxProj.rootObject!.attributes["knownAssetTags"] as? [String]) == ["tag1", "tag2", "tag3"] } + + $0.it("Detects all locales present in a String Catalog") { + /// This is a catalog with gaps: + /// - String "foo" is translated into English (en) and Spanish (es) + /// - String "bar" is translated into English (en) and Italian (it) + /// + /// It is aimed at representing real world scenarios where translators have not finished translating all strings into their respective languages. + /// The expectation in this kind of cases is that `includedLocales` returns all locales found at least once in the catalog. + /// In this example, `includedLocales` is expected to be a set only containing "en", "es" and "it". + let stringCatalogContent = """ + { + "sourceLanguage" : "en", + "strings" : { + "foo" : { + "comment" : "Sample string in an asset catalog", + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Foo English" + } + }, + "es" : { + "stringUnit" : { + "state" : "translated", + "value" : "Foo Spanish" + } + } + } + }, + "bar" : { + "comment" : "Another sample string in an asset catalog", + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Bar English" + } + }, + "it" : { + "stringUnit" : { + "state" : "translated", + "value" : "Bar Italian" + } + } + } + } + }, + "version" : "1.0" + } + """ + + let testStringCatalogRelativePath = Path("Localizable.xcstrings") + let testStringCatalogPath = try createFile(at: testStringCatalogRelativePath, content: stringCatalogContent) + + guard let stringCatalog = StringCatalog(from: testStringCatalogPath) else { + throw failure("Failed decoding string catalog from \(testStringCatalogPath)") + } + + try expect(stringCatalog.includedLocales.sorted(by: { $0 < $1 })) == ["en", "es", "it"] + } } } } From 19109ac8c1365474b4dd668e98998dd1de4ef78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Madej?= Date: Wed, 14 Feb 2024 10:12:12 +0100 Subject: [PATCH 218/284] Update Rainbow version (#1424) --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index bc66a795e..c8940fe45 100644 --- a/Package.swift +++ b/Package.swift @@ -15,7 +15,7 @@ let package = Package( .package(url: "https://github.com/jpsim/Yams.git", from: "5.0.0"), .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/onevcat/Rainbow.git", from: "4.0.0"), .package(url: "https://github.com/tuist/XcodeProj.git", from: "8.13.0"), .package(url: "https://github.com/jakeheis/SwiftCLI.git", from: "6.0.3"), .package(url: "https://github.com/mxcl/Version", from: "2.0.0"), From 54139090a3326e9dfcd3f485d654e2adcb9d43c2 Mon Sep 17 00:00:00 2001 From: Jaap Manenschijn Date: Wed, 14 Feb 2024 10:18:16 +0100 Subject: [PATCH 219/284] Make sure to create parent group structure for local packages (#1417) * Make sure to create parent group structure for local packages * Remove redundant localPackageGroup variable --------- Co-authored-by: Jaap Manenschijn --- CHANGELOG.md | 2 ++ Sources/XcodeGenKit/SourceGenerator.swift | 25 ++++++------------- .../SPM/SPM.xcodeproj/project.pbxproj | 2 +- .../ProjectGeneratorTests.swift | 14 ++++++++++- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44dfe38a8..9950ae39e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ - Added support for String Catalogs (`.xcstrings`) #1421 @nicolasbosi95 +- Fixed custom local package groups not being created #1416 @JaapManenschijn + ## 2.38.0 ### Added diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index ba5cbd0cb..3abc303e2 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -18,7 +18,6 @@ class SourceGenerator { private var fileReferencesByPath: [String: PBXFileElement] = [:] private var groupsByPath: [Path: PBXGroup] = [:] private var variantGroupsByPath: [Path: PBXVariantGroup] = [:] - private var localPackageGroup: PBXGroup? private let project: Project let pbxProj: PBXProj @@ -54,19 +53,11 @@ class SourceGenerator { } func createLocalPackage(path: Path, group: Path?) throws { - var pbxGroup: PBXGroup? - - if let location = group { - let fullLocationPath = project.basePath + location - pbxGroup = getGroup(path: fullLocationPath, mergingChildren: [], createIntermediateGroups: true, hasCustomParent: false, isBaseGroup: true) - } - - if localPackageGroup == nil && group == nil { - let groupName = project.options.localPackagesGroup ?? "Packages" - localPackageGroup = addObject(PBXGroup(sourceTree: .sourceRoot, name: groupName)) - rootGroups.insert(localPackageGroup!) + var parentGroup: String = project.options.localPackagesGroup ?? "Packages" + if let group { + parentGroup = group.string } - + let absolutePath = project.basePath + path.normalize() // Get the local package's relative path from the project root @@ -80,11 +71,9 @@ class SourceGenerator { path: fileReferencePath ) ) - if let pbxGroup = pbxGroup { - pbxGroup.children.append(fileReference) - } else { - localPackageGroup!.children.append(fileReference) - } + + let parentGroups = parentGroup.components(separatedBy: "/") + createParentGroups(parentGroups, for: fileReference) } /// Collects an array complete of all `SourceFile` objects that make up the target based on the provided `TargetSource` definitions. diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index 5c21547ed..1d15e475f 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -143,7 +143,7 @@ 979AE1767E2AF6B3B9D7F13D /* FooFeature */, ); name = Packages; - sourceTree = SOURCE_ROOT; + sourceTree = ""; }; CF3BD77AEAA56553289456BA /* SPMTests */ = { isa = PBXGroup; diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index e145ceb5c..5203cbc17 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -1610,7 +1610,8 @@ class ProjectGeneratorTests: XCTestCase { ] ) - let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen", group: "Packages/Feature")]) + let customLocalPackageGroup = "Packages/Feature" + let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen", group: customLocalPackageGroup)]) let pbxProject = try project.generatePbxProj(specValidate: false) let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) @@ -1619,6 +1620,17 @@ class ProjectGeneratorTests: XCTestCase { let frameworkPhases = nativeTarget.buildPhases.compactMap { $0 as? PBXFrameworksBuildPhase } + let packagesGroup = try unwrap(pbxProject.groups.first(where: { $0.name == "Packages" })) + let featureGroup = try unwrap(pbxProject.groups.first(where: { $0.name == "Feature" })) + + guard featureGroup.parent?.uuid == packagesGroup.uuid else { + return XCTFail("Packages group should be parent of Feature group") + } + + guard localPackageFile.parent?.uuid == featureGroup.uuid else { + return XCTFail("Packages group should be parent of Feature group") + } + guard let frameworkPhase = frameworkPhases.first else { return XCTFail("frameworkPhases should have more than one") } From 8b340b19d4c38fb5a61545217c7309e06d82c1d3 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Wed, 14 Feb 2024 21:47:40 +1100 Subject: [PATCH 220/284] update Rainbow --- Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.resolved b/Package.resolved index 7c9e9d087..3ae8a3daf 100644 --- a/Package.resolved +++ b/Package.resolved @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/onevcat/Rainbow.git", "state" : { - "revision" : "626c3d4b6b55354b4af3aa309f998fae9b31a3d9", - "version" : "3.2.0" + "revision" : "e0dada9cd44e3fa7ec3b867e49a8ddbf543e3df3", + "version" : "4.0.1" } }, { From d1110b1a7257dce79ae2b0c0f8d355d7b6fd9af7 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Wed, 14 Feb 2024 21:48:13 +1100 Subject: [PATCH 221/284] Update to 2.39.0 --- CHANGELOG.md | 16 +++++++++++++--- Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9950ae39e..12e890ffa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,25 @@ # Change Log ## Next Version -### Added -- Support Artifact Bundle #1388 @freddi-kit +## 2.39.0 ### Added -- Added support for String Catalogs (`.xcstrings`) #1421 @nicolasbosi95 +- Support Artifact Bundle #1388 @freddi-kit +- Added support for `.xcstrings` String Catalogs #1421 @nicolasbosi95 +- Added default `LD_RUNPATH_SEARCH_PATHS` for visionOS #1444 @Dahlgren +- Added `watchOS` as a supported cross platform destination #1438 @tatsuky + +### Fixed - Fixed custom local package groups not being created #1416 @JaapManenschijn +- Fixed spec validation error type #1439 @Lutzifer +- Create parent group for local package groups if it does not exist already #1417 @JaapManenschijn + +### Internal + +- Updated Rainbow version #1424 @nysander ## 2.38.0 diff --git a/Makefile b/Makefile index 959be62a6..1c30de3cb 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.38.0 +VERSION = 2.39.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 76a3b2af9..ab45ff279 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.38.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.39.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index d52d89ccc..b9d72d5bd 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.38.0") +let version = Version("2.39.0") let cli = XcodeGenCLI(version: version) cli.execute() From fd48b7eb073028b94ea5d0e888112c79fc272935 Mon Sep 17 00:00:00 2001 From: Erik Schwiebert Date: Wed, 14 Feb 2024 15:27:48 -0800 Subject: [PATCH 222/284] Add more C++ extensions to FileType.swift (#1446) --- Sources/ProjectSpec/FileType.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/ProjectSpec/FileType.swift b/Sources/ProjectSpec/FileType.swift index 1629bca59..185ac9515 100644 --- a/Sources/ProjectSpec/FileType.swift +++ b/Sources/ProjectSpec/FileType.swift @@ -80,6 +80,8 @@ extension FileType { "m": FileType(buildPhase: .sources), "mm": FileType(buildPhase: .sources), "cpp": FileType(buildPhase: .sources), + "cp": FileType(buildPhase: .sources), + "cxx": FileType(buildPhase: .sources), "c": FileType(buildPhase: .sources), "cc": FileType(buildPhase: .sources), "S": FileType(buildPhase: .sources), From 5bcbf3959dc2b9e070db788b19d3a1dd375321e8 Mon Sep 17 00:00:00 2001 From: "freddi(Yuki Aki)" Date: Thu, 15 Feb 2024 19:31:42 +0900 Subject: [PATCH 223/284] Fix crash bundle (#1448) * create availableModule to avoid crash on Bundle loading * remove unnecessary line --- Sources/XcodeGenKit/SettingsBuilder.swift | 47 ++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/Sources/XcodeGenKit/SettingsBuilder.swift b/Sources/XcodeGenKit/SettingsBuilder.swift index 81047de7a..b65079b9d 100644 --- a/Sources/XcodeGenKit/SettingsBuilder.swift +++ b/Sources/XcodeGenKit/SettingsBuilder.swift @@ -249,7 +249,7 @@ extension SettingsPresetFile { symlink.parent() + relativePath, ] + possibleSettingsPaths } - if let moduleResourcePath = Bundle.module.path(forResource: "SettingPresets", ofType: nil) { + if let moduleResourcePath = Bundle.availableModule?.path(forResource: "SettingPresets", ofType: nil) { possibleSettingsPaths.append(Path(moduleResourcePath) + "\(path).yml") } @@ -272,3 +272,48 @@ extension SettingsPresetFile { return buildSettings } } + +private class BundleFinder {} + +/// The default SPM generated `Bundle.module` crashes on runtime if there is no .bundle file. +/// Below implementation modified from generated `Bundle.module` code which call `fatalError` if .bundle file not found. +private extension Bundle { + /// Returns the resource bundle associated with the current Swift module. + static let availableModule: Bundle? = { + let bundleName = "XcodeGen_XcodeGenKit" + + let overrides: [URL] + #if DEBUG + // The 'PACKAGE_RESOURCE_BUNDLE_PATH' name is preferred since the expected value is a path. The + // check for 'PACKAGE_RESOURCE_BUNDLE_URL' will be removed when all clients have switched over. + // This removal is tracked by rdar://107766372. + if let override = ProcessInfo.processInfo.environment["PACKAGE_RESOURCE_BUNDLE_PATH"] + ?? ProcessInfo.processInfo.environment["PACKAGE_RESOURCE_BUNDLE_URL"] { + overrides = [URL(fileURLWithPath: override)] + } else { + overrides = [] + } + #else + overrides = [] + #endif + + let candidates = overrides + [ + // Bundle should be present here when the package is linked into an App. + Bundle.main.resourceURL, + + // Bundle should be present here when the package is linked into a framework. + Bundle(for: BundleFinder.self).resourceURL, + + // For command-line tools. + Bundle.main.bundleURL, + ] + + for candidate in candidates { + let bundlePath = candidate?.appendingPathComponent(bundleName + ".bundle") + if let bundle = bundlePath.flatMap(Bundle.init(url:)) { + return bundle + } + } + return nil + }() +} From 7b5f9fb672ec73f09ee94380a52d6573e69366ee Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 15 Feb 2024 21:37:53 +1100 Subject: [PATCH 224/284] pin xcodeproj version (#1449) --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index c8940fe45..474834940 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: "4.0.0"), - .package(url: "https://github.com/tuist/XcodeProj.git", from: "8.13.0"), + .package(url: "https://github.com/tuist/XcodeProj.git", exact: "8.13.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"), From 54fa9b2bfa860ac2d4d8a76c6d92bf8c758f2bfc Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 15 Feb 2024 21:35:41 +1100 Subject: [PATCH 225/284] Update to 2.39.1 --- CHANGELOG.md | 7 +++++++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12e890ffa..c4639cc36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## Next Version +## 2.39.1 + +### Fixed + +- Fixed bundle access crash #1448 @freddi-kit +- Pinned XcodeProj version to fix breaking changes when XcodeGen is used as a dependency #1449 @yonaskolb + ## 2.39.0 ### Added diff --git a/Makefile b/Makefile index 1c30de3cb..6ee85065d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.39.0 +VERSION = 2.39.1 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index ab45ff279..be065539a 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.39.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.39.1"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index b9d72d5bd..c1fc8e4a6 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.39.0") +let version = Version("2.39.1") let cli = XcodeGenCLI(version: version) cli.execute() From 2a367acb0f7928bc42210cbcdd31dcd778831c6b Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 15 Feb 2024 21:43:10 +1100 Subject: [PATCH 226/284] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4639cc36..a80e7321f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ ## 2.39.1 +### Added + +- Proper defaults for `.cp` and `.cxx` files #1447 @eschwieb + ### Fixed - Fixed bundle access crash #1448 @freddi-kit From 9df3e62734fd8a2f5af8f04337ba4d93a4a5370c Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Sun, 7 Apr 2024 21:27:24 +1000 Subject: [PATCH 227/284] fix commandLineArguments example --- Docs/ProjectSpec.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 326e17f3c..5548b0ac3 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -1140,12 +1140,16 @@ schemes: MyTarget2: [run, archive] run: config: prod-debug - commandLineArguments: "--option value" + commandLineArguments: + "-MyEnabledArg": true + "-MyDisabledArg": false environmentVariables: RUN_ENV_VAR: VALUE test: config: prod-debug - commandLineArguments: "--option testValue" + commandLineArguments: + "-MyEnabledArg": true + "-MyDisabledArg": false gatherCoverageData: true coverageTargets: - MyTarget1 From 6694943ad837f412f8ff5e9d59b9da133c0682b5 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Sun, 7 Apr 2024 22:33:42 +1000 Subject: [PATCH 228/284] add watchOS supported destination to docs --- Docs/ProjectSpec.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 5548b0ac3..dd7f08d62 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -483,6 +483,7 @@ This will provide a mix of default build settings for the chosen platform destin - `macOS` - `macCatalyst` - `visionOS` +- `watchOS` ```yaml targets: From 1645d419ce9abdcfaa3d917aabd7e2c9dc317fba Mon Sep 17 00:00:00 2001 From: Balazs Perlaki-Horvath <93591167+balazs-vimn@users.noreply.github.com> Date: Sun, 7 Apr 2024 14:38:04 +0200 Subject: [PATCH 229/284] Add shell to ExecuteAction (#1430) * Add shell to ExecuteAction * Update to 2.38.1 * Add shell argument to jsons --- Sources/ProjectSpec/Scheme.swift | 6 +++++- Sources/XcodeGenKit/SchemeGenerator.swift | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index db6aca739..bb0a4bb9a 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -88,10 +88,12 @@ public struct Scheme: Equatable { public var script: String public var name: String public var settingsTarget: String? - public init(name: String, script: String, settingsTarget: String? = nil) { + public var shell: String? + public init(name: String, script: String, shell: String? = nil, settingsTarget: String? = nil) { self.script = script self.name = name self.settingsTarget = settingsTarget + self.shell = shell } } @@ -400,6 +402,7 @@ extension Scheme.ExecutionAction: JSONObjectConvertible { script = try jsonDictionary.json(atKeyPath: "script") name = jsonDictionary.json(atKeyPath: "name") ?? "Run Script" settingsTarget = jsonDictionary.json(atKeyPath: "settingsTarget") + shell = jsonDictionary.json(atKeyPath: "shell") } } @@ -409,6 +412,7 @@ extension Scheme.ExecutionAction: JSONEncodable { "script": script, "name": name, "settingsTarget": settingsTarget, + "shell": shell ] } } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 1f2a08105..e379e799e 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -208,7 +208,12 @@ public class SchemeGenerator { .first { settingsTarget == $0.buildableReference.blueprintName }? .buildableReference } - return XCScheme.ExecutionAction(scriptText: action.script, title: action.name, environmentBuildable: environmentBuildable) + return XCScheme.ExecutionAction( + scriptText: action.script, + title: action.name, + shellToInvoke: action.shell, + environmentBuildable: environmentBuildable + ) } let schemeTarget: ProjectTarget? From 632ca2d41997a4327fce9d9cdd75856f24a35051 Mon Sep 17 00:00:00 2001 From: Hilton Campbell Date: Sun, 7 Apr 2024 06:18:24 -0700 Subject: [PATCH 230/284] Enable adding local Swift packages to the project root (#1413) * Enable adding local Swift packages to the project root * Update CHANGELOG.md --- CHANGELOG.md | 4 ++ Docs/ProjectSpec.md | 4 +- Sources/XcodeGenKit/SourceGenerator.swift | 10 ++- .../ProjectGeneratorTests.swift | 68 +++++++++++++++++++ 4 files changed, 81 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a80e7321f..a84fc1401 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Added + +- Added support for local Swift packages at the project root #1413 @hiltonc + ## 2.39.1 ### Added diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index dd7f08d62..fd821a6ef 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -147,7 +147,7 @@ Note that target names can also be changed by adding a `name` property to a targ - [ ] **transitivelyLinkDependencies**: **Bool** - If this is `true` then targets will link to the dependencies of their target dependencies. If a target should embed its dependencies, such as application and test bundles, it will embed these transitive dependencies as well. Some complex setups might want to set this to `false` and explicitly specify dependencies at every level. Targets can override this with [Target](#target).transitivelyLinkDependencies. Defaults to `false`. - [ ] **generateEmptyDirectories**: **Bool** - If this is `true` then empty directories will be added to project too else will be missed. Defaults to `false`. - [ ] **findCarthageFrameworks**: **Bool** - When this is set to `true`, all the individual frameworks for Carthage framework dependencies will automatically be found. This property can be overridden individually for each carthage dependency - for more details see See **findFrameworks** in the [Dependency](#dependency) section. Defaults to `false`. -- [ ] **localPackagesGroup**: **String** - The group name that local packages are put into. This defaults to `Packages` +- [ ] **localPackagesGroup**: **String** - The group name that local packages are put into. This defaults to `Packages`. Use `""` to specify the project root. - [ ] **fileTypes**: **[String: [FileType](#filetype)]** - A list of default file options for specific file extensions across the project. Values in [Sources](#sources) will overwrite these settings. - [ ] **preGenCommand**: **String** - A bash command to run before the project has been generated. If the project isn't generated due to no changes when using the cache then this won't run. This is useful for running things like generating resources files before the project is regenerated. - [ ] **postGenCommand**: **String** - A bash command to run after the project has been generated. If the project isn't generated due to no changes when using the cache then this won't run. This is useful for running things like `pod install` only if the project is actually regenerated. @@ -1245,7 +1245,7 @@ Swift packages are defined at a project level, and then linked to individual tar ### Local Package - [x] **path**: **String** - the path to the package in local. The path must be directory with a `Package.swift`. -- [ ] **group** : **String**- Optional path that specifies the location where the package will live in your xcode project. +- [ ] **group** : **String**- Optional path that specifies the location where the package will live in your xcode project. Use `""` to specify the project root. ```yml packages: diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index 3abc303e2..7ed90b3d6 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -59,7 +59,7 @@ class SourceGenerator { } let absolutePath = project.basePath + path.normalize() - + // Get the local package's relative path from the project root let fileReferencePath = try? absolutePath.relativePath(from: projectDirectory ?? project.basePath).string @@ -72,8 +72,12 @@ class SourceGenerator { ) ) - let parentGroups = parentGroup.components(separatedBy: "/") - createParentGroups(parentGroups, for: fileReference) + if parentGroup == "" { + rootGroups.insert(fileReference) + } else { + let parentGroups = parentGroup.components(separatedBy: "/") + createParentGroups(parentGroups, for: fileReference) + } } /// Collects an array complete of all `SourceFile` objects that make up the target based on the provided `TargetSource` definitions. diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 5203cbc17..44046460f 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -1642,6 +1642,74 @@ class ProjectGeneratorTests: XCTestCase { try expect(file.product?.productName) == "XcodeGen" } + $0.it("generates local swift packages at the top level") { + let app = Target( + name: "MyApp", + type: .application, + platform: .iOS, + dependencies: [ + Dependency(type: .package(products: []), reference: "XcodeGen"), + ] + ) + + let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen", group: "")]) + + let pbxProject = try project.generatePbxProj(specValidate: false) + let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) + let localPackageFile = try unwrap(pbxProject.fileReferences.first(where: { $0.path == "../XcodeGen" })) + try expect(localPackageFile.lastKnownFileType) == "folder" + + let mainGroup = try pbxProject.getMainGroup() + + try expect(mainGroup.children.contains(localPackageFile)) == true + + let frameworkPhases = nativeTarget.buildPhases.compactMap { $0 as? PBXFrameworksBuildPhase } + + guard let frameworkPhase = frameworkPhases.first else { + return XCTFail("frameworkPhases should have more than one") + } + + guard let file = frameworkPhase.files?.first else { + return XCTFail("frameworkPhase should have file") + } + + try expect(file.product?.productName) == "XcodeGen" + } + + $0.it("generates local swift package group at the top level") { + let app = Target( + name: "MyApp", + type: .application, + platform: .iOS, + dependencies: [ + Dependency(type: .package(products: []), reference: "XcodeGen"), + ] + ) + + let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen", group: nil)], options: .init(localPackagesGroup: "")) + + let pbxProject = try project.generatePbxProj(specValidate: false) + let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) + let localPackageFile = try unwrap(pbxProject.fileReferences.first(where: { $0.path == "../XcodeGen" })) + try expect(localPackageFile.lastKnownFileType) == "folder" + + let mainGroup = try pbxProject.getMainGroup() + + try expect(mainGroup.children.contains(localPackageFile)) == true + + let frameworkPhases = nativeTarget.buildPhases.compactMap { $0 as? PBXFrameworksBuildPhase } + + guard let frameworkPhase = frameworkPhases.first else { + return XCTFail("frameworkPhases should have more than one") + } + + guard let file = frameworkPhase.files?.first else { + return XCTFail("frameworkPhase should have file") + } + + try expect(file.product?.productName) == "XcodeGen" + } + $0.it("generates info.plist") { let plist = Plist(path: "Info.plist", attributes: ["UISupportedInterfaceOrientations": ["UIInterfaceOrientationPortrait", "UIInterfaceOrientationLandscapeLeft"]]) let tempPath = Path.temporary + "info" From ecb9b560aef15a9d73f46d241fa14b4054d2753a Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Mon, 8 Apr 2024 11:14:32 +1000 Subject: [PATCH 231/284] add xcprivacy to no build phase default (#1464) --- Sources/ProjectSpec/FileType.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/ProjectSpec/FileType.swift b/Sources/ProjectSpec/FileType.swift index 185ac9515..20edd2374 100644 --- a/Sources/ProjectSpec/FileType.swift +++ b/Sources/ProjectSpec/FileType.swift @@ -120,5 +120,6 @@ extension FileType { "apns": FileType(buildPhase: BuildPhaseSpec.none), "pch": FileType(buildPhase: BuildPhaseSpec.none), "xctestplan": FileType(buildPhase: BuildPhaseSpec.none), + "xcprivacy": FileType(buildPhase: BuildPhaseSpec.none), ] } From 03017410027ba244f277e03e38d05d3d3c3544fd Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Mon, 8 Apr 2024 11:27:13 +1000 Subject: [PATCH 232/284] Update to 2.40.0 --- CHANGELOG.md | 9 ++++++++- Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a84fc1401..70d6db109 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,16 @@ ## Next Version +## 2.40.0 + ### Added -- Added support for local Swift packages at the project root #1413 @hiltonc +- Added support for local Swift packages at the project root by specifying a "" group #1413 @hiltonc +- Added a custom `shell` to a scheme's pre and post actions #1430 @balazs-vimn + +### Changed + +- `.xcprivacy` files are now not added to any build phases by default #1464 @yonaskolb ## 2.39.1 diff --git a/Makefile b/Makefile index 6ee85065d..9455463b0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.39.1 +VERSION = 2.40.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index be065539a..6cce510cb 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.39.1"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.40.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index c1fc8e4a6..446017205 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.39.1") +let version = Version("2.40.0") let cli = XcodeGenCLI(version: version) cli.execute() From bc08f53505e54f7bb2cef70fc9840004f0f8be69 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Wed, 10 Apr 2024 20:46:22 +1000 Subject: [PATCH 233/284] Revert "add xcprivacy to no build phase default (#1464)" This reverts commit ecb9b560aef15a9d73f46d241fa14b4054d2753a. --- Sources/ProjectSpec/FileType.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Sources/ProjectSpec/FileType.swift b/Sources/ProjectSpec/FileType.swift index 20edd2374..185ac9515 100644 --- a/Sources/ProjectSpec/FileType.swift +++ b/Sources/ProjectSpec/FileType.swift @@ -120,6 +120,5 @@ extension FileType { "apns": FileType(buildPhase: BuildPhaseSpec.none), "pch": FileType(buildPhase: BuildPhaseSpec.none), "xctestplan": FileType(buildPhase: BuildPhaseSpec.none), - "xcprivacy": FileType(buildPhase: BuildPhaseSpec.none), ] } From 9816466703aede482c7436fddc6535684a7a9168 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Wed, 10 Apr 2024 20:49:49 +1000 Subject: [PATCH 234/284] Update to 2.40.1 --- CHANGELOG.md | 6 ++++++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70d6db109..c62677ff2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Next Version +## 2.40.1 + +### Fixed + +- Reverted `.xcprivacy` handling. They will now again be treated as resources by default @yonaskolb + ## 2.40.0 ### Added diff --git a/Makefile b/Makefile index 9455463b0..7069ae5d5 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.40.0 +VERSION = 2.40.1 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 6cce510cb..04317fcf1 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.40.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.40.1"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 446017205..37b11e0c5 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.40.0") +let version = Version("2.40.1") let cli = XcodeGenCLI(version: version) cli.execute() From 447cc7f9acf76a61ac8e40821ff6c8f8c3768226 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Wed, 10 Apr 2024 20:59:59 +1000 Subject: [PATCH 235/284] remove homebrew step from release process now handled by a bot --- Makefile | 6 ------ RELEASE.md | 1 - 2 files changed, 7 deletions(-) diff --git a/Makefile b/Makefile index 7069ae5d5..f68bbbf0d 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,6 @@ INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) SHARE_PATH = $(PREFIX)/share/$(EXECUTABLE_NAME) CURRENT_PATH = $(PWD) REPO = https://github.com/yonaskolb/$(TOOL_NAME) -RELEASE_TAR = $(REPO)/archive/$(VERSION).tar.gz -SHA = $(shell curl -L -s $(RELEASE_TAR) | shasum -a 256 | sed 's/ .*//') SWIFT_BUILD_FLAGS = --disable-sandbox -c release --arch arm64 --arch x86_64 BUILD_PATH = $(shell swift build $(SWIFT_BUILD_FLAGS) --show-bin-path) EXECUTABLE_PATH = $(BUILD_PATH)/$(EXECUTABLE_NAME) @@ -42,10 +40,6 @@ release: publish: archive brew echo "published $(VERSION)" -brew: - brew update - brew bump-formula-pr --url=$(RELEASE_TAR) XcodeGen - archive: build ./scripts/archive.sh "$(EXECUTABLE_PATH)" swift package plugin --allow-writing-to-package-directory generate-artifact-bundle \ diff --git a/RELEASE.md b/RELEASE.md index ebd890a8f..42e9ff786 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -8,4 +8,3 @@ 1. Push commit and tag to github 1. Create release from tag on GitHub using the version number and relevant changelog contents 1. Run `make archive` and upload `xcodegen.zip` and `xcodegen.artifactbundle.zip` to the github release -1. Run `make brew` which will open a PR on homebrew core \ No newline at end of file From 17acb4dc610f46052f2a4e8df9387837e91d697f Mon Sep 17 00:00:00 2001 From: Wolfgang Lutz Date: Thu, 25 Apr 2024 03:28:06 +0200 Subject: [PATCH 236/284] Update Examples.md (#1472) We no longer use XcodeGen for this (because we switched this to pure SPM) --- Docs/Examples.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Docs/Examples.md b/Docs/Examples.md index b2120985c..fdabac855 100644 --- a/Docs/Examples.md +++ b/Docs/Examples.md @@ -2,7 +2,6 @@ These are a bunch of real world examples of XcodeGen project specs. Feel free to add your own via PR. -- [num42/RxUserDefaults](https://github.com/num42/RxUserDefaults/blob/master/Examples/CocoaPodsExample.yml) - [toshi0383/Bitrise-iOS](https://github.com/toshi0383/Bitrise-iOS/blob/master/project.yml) - [johndpope/swift-models](https://github.com/johndpope/swift-models/tree/stable/Inference) - [atelier-socle/AppRepositoryTemplate](https://github.com/atelier-socle/AppRepositoryTemplate/blob/master/project.yml) From 274ce7342c13ab0f773f6fa6e07c35539ba53659 Mon Sep 17 00:00:00 2001 From: Tatsuki Otsuka Date: Fri, 17 May 2024 22:00:09 +0900 Subject: [PATCH 237/284] Disallow the "watchOS" supported destination for multiplatform apps (#1470) * Reject multiplatform apps that support the watchOS destination This commit also fixes existing test cases. * Add test cases * Update docs * Update changelog --- CHANGELOG.md | 4 +++ Docs/ProjectSpec.md | 2 +- Sources/ProjectSpec/SpecValidation.swift | 6 +++++ Sources/ProjectSpec/SpecValidationError.swift | 3 +++ Tests/ProjectSpecTests/ProjectSpecTests.swift | 26 +++++++++++++++++++ .../ProjectGeneratorTests.swift | 8 +++--- 6 files changed, 44 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c62677ff2..257cd75cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Fixed + +- Fixed `supportedDestinations` validation when it contains watchOS for multiplatform apps. #1470 @tatsuky + ## 2.40.1 ### Fixed diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index fd821a6ef..430e54e4e 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -500,7 +500,7 @@ targets: destinationFilters: [iOS] ``` -Note that the definition of supported destinations can be applied to every type of bundle making everything more easy to manage (app targets, unit tests, UI tests etc). +Note that the definition of supported destinations can be applied to almost every type of bundle making everything more easy to manage (app targets, unit tests, UI tests etc). App targets currently do not support the watchOS destination. Create a separate target using `platform` for watchOS apps. See Apple's [Configuring a multiplatform app](https://developer.apple.com/documentation/xcode/configuring-a-multiplatform-app-target) for details. ### Sources diff --git a/Sources/ProjectSpec/SpecValidation.swift b/Sources/ProjectSpec/SpecValidation.swift index 9bf43e1a5..a34fb3d4e 100644 --- a/Sources/ProjectSpec/SpecValidation.swift +++ b/Sources/ProjectSpec/SpecValidation.swift @@ -185,6 +185,12 @@ extension Project { errors.append(.unexpectedTargetPlatformForSupportedDestinations(target: target.name, platform: target.platform)) } + if let supportedDestinations = target.supportedDestinations, + target.type.isApp, + supportedDestinations.contains(.watchOS) { + errors.append(.containsWatchOSDestinationForMultiplatformApp(target: target.name)) + } + if target.supportedDestinations?.contains(.macOS) == true, target.supportedDestinations?.contains(.macCatalyst) == true { diff --git a/Sources/ProjectSpec/SpecValidationError.swift b/Sources/ProjectSpec/SpecValidationError.swift index 1840a9bd1..6e93de0ef 100644 --- a/Sources/ProjectSpec/SpecValidationError.swift +++ b/Sources/ProjectSpec/SpecValidationError.swift @@ -19,6 +19,7 @@ public struct SpecValidationError: Error, CustomStringConvertible { case invalidTargetSchemeTest(target: String, testTarget: String) case invalidTargetPlatformForSupportedDestinations(target: String) case unexpectedTargetPlatformForSupportedDestinations(target: String, platform: Platform) + case containsWatchOSDestinationForMultiplatformApp(target: String) case multipleMacPlatformsInSupportedDestinations(target: String) case missingTargetPlatformInSupportedDestinations(target: String, platform: Platform) case invalidSchemeTarget(scheme: String, target: String, action: String) @@ -66,6 +67,8 @@ public struct SpecValidationError: Error, CustomStringConvertible { return "Target \(target.quoted) has multiple definitions of mac platforms in supported destinations" case let .missingTargetPlatformInSupportedDestinations(target, platform): return "Target \(target.quoted) has platform \(platform.rawValue.quoted) that is missing in supported destinations" + case let .containsWatchOSDestinationForMultiplatformApp(target): + return "Multiplatform app \(target.quoted) cannot contain watchOS in \"supportedDestinations\". Create a separate target using \"platform\" for watchOS apps" case let .invalidConfigFile(configFile, config): return "Invalid config file \(configFile.quoted) for config \(config.quoted)" case let .invalidSchemeTarget(scheme, target, action): diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 5f1f48546..b6d5f0174 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -203,6 +203,32 @@ class ProjectSpecTests: XCTestCase { try expectValidationError(project, .unexpectedTargetPlatformForSupportedDestinations(target: "target1", platform: .watchOS)) } + $0.it("watchOS in multiplatform app's supported destinations") { + var project = baseProject + project.targets = [ + Target( + name: "target1", + type: .application, + platform: .auto, + supportedDestinations: [.watchOS] + ) + ] + try expectValidationError(project, .containsWatchOSDestinationForMultiplatformApp(target: "target1")) + } + + $0.it("watchOS in non-app's supported destinations") { + var project = baseProject + project.targets = [ + Target( + name: "target1", + type: .framework, + platform: .auto, + supportedDestinations: [.watchOS] + ) + ] + try expectNoValidationError(project, .containsWatchOSDestinationForMultiplatformApp(target: "target1")) + } + $0.it("multiple definitions of mac platform in supported destinations") { var project = baseProject project.targets = [ diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 44046460f..f34d487c0 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -485,8 +485,8 @@ class ProjectGeneratorTests: XCTestCase { try expect(targetConfig1.buildSettings["CODE_SIGN_IDENTITY"] as? String) == "iPhone Developer" } - $0.it("supportedDestinations merges settings - iOS, watchOS") { - let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.iOS, .watchOS]) + $0.it("supportedDestinations merges settings - iOS, watchOS (framework)") { + let target = Target(name: "Target", type: .framework, platform: .auto, supportedDestinations: [.iOS, .watchOS]) let project = Project(name: "", targets: [target]) let pbxProject = try project.generatePbxProj() @@ -499,8 +499,8 @@ class ProjectGeneratorTests: XCTestCase { try expect(targetConfig1.buildSettings["SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD"] as? Bool) == true } - $0.it("supportedDestinations merges settings - visionOS, watchOS") { - let target = Target(name: "Target", type: .application, platform: .auto, supportedDestinations: [.visionOS, .watchOS]) + $0.it("supportedDestinations merges settings - visionOS, watchOS (framework)") { + let target = Target(name: "Target", type: .framework, platform: .auto, supportedDestinations: [.visionOS, .watchOS]) let project = Project(name: "", targets: [target]) let pbxProject = try project.generatePbxProj() From d99e4486475593fddcffe2cd44e76174b8cf294e Mon Sep 17 00:00:00 2001 From: John Flanagan <91548783+jflan-dd@users.noreply.github.com> Date: Fri, 17 May 2024 08:14:20 -0500 Subject: [PATCH 238/284] Include folder (SPM packages) in group sorting logic (#1466) --- Sources/XcodeGenKit/PBXProjGenerator.swift | 8 +- .../PBXProjGeneratorTests.swift | 90 +++++++++++++++++++ 2 files changed, 96 insertions(+), 2 deletions(-) diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 82e87f2c7..73ea0339b 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -631,8 +631,8 @@ public class PBXProjGenerator { } if let order = groupOrdering?.order { - let files = group.children.filter { $0 is PBXFileReference } - var groups = group.children.filter { $0 is PBXGroup } + let files = group.children.filter { !$0.isGroupOrFolder } + var groups = group.children.filter { $0.isGroupOrFolder } var filteredGroups = [PBXFileElement]() @@ -1626,6 +1626,10 @@ extension Platform { } extension PBXFileElement { + /// - returns: `true` if the element is a group or a folder reference. Likely an SPM package. + var isGroupOrFolder: Bool { + self is PBXGroup || (self as? PBXFileReference)?.lastKnownFileType == "folder" + } public func getSortOrder(groupSortPosition: SpecOptions.GroupSortPosition) -> Int { if type(of: self).isa == "PBXGroup" { diff --git a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift index 7ffa5242a..b067fa564 100644 --- a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift @@ -259,6 +259,96 @@ class PBXProjGeneratorTests: XCTestCase { .map { $0.nameOrPath } try expect(screenGroups) == ["mainScreen1.swift", "mainScreen2.swift", "View", "Presenter", "Interactor", "Entities", "Assembly"] } + + $0.it("sorts SPM packages") { + var options = SpecOptions() + options.groupSortPosition = .top + options.groupOrdering = [ + GroupOrdering( + order: [ + "Sources", + "Resources", + "Tests", + "Packages", + "Support files", + "Configurations", + ] + ), + GroupOrdering( + pattern: "Packages", + order: [ + "FeatureA", + "FeatureB", + "Common", + ] + ), + ] + + let directories = """ + Configurations: + - file.swift + Resources: + - file.swift + Sources: + - MainScreen: + - mainScreen1.swift + - mainScreen2.swift + - Assembly: + - file.swift + - Entities: + - file.swift + - Interactor: + - file.swift + - Presenter: + - file.swift + - View: + - file.swift + Support files: + - file.swift + Packages: + - Common: + - Package.swift + - FeatureA: + - Package.swift + - FeatureB: + - Package.swift + Tests: + - file.swift + UITests: + - file.swift + """ + try createDirectories(directories) + + let target = Target(name: "Test", type: .application, platform: .iOS, sources: ["Configurations", "Resources", "Sources", "Support files", "Tests", "UITests"]) + let project = Project( + basePath: directoryPath, + name: "Test", + targets: [target], + packages: [ + "Common": .local(path: "Packages/Common", group: nil), + "FeatureA": .local(path: "Packages/FeatureA", group: nil), + "FeatureB": .local(path: "Packages/FeatureB", group: nil), + ], + options: options + ) + let projGenerator = PBXProjGenerator(project: project) + + let pbxProj = try project.generatePbxProj() + let group = try pbxProj.getMainGroup() + + projGenerator.setupGroupOrdering(group: group) + + let mainGroups = group.children.map { $0.nameOrPath } + try expect(mainGroups) == ["Sources", "Resources", "Tests", "Packages", "Support files", "Configurations", "UITests", "Products"] + + let packages = group.children + .first { $0.nameOrPath == "Packages" } + .flatMap { $0 as? PBXGroup }? + .children + .map(\.nameOrPath) + + try expect(packages) == ["FeatureA", "FeatureB", "Common"] + } } } From aa79a3ed0bc32734f72ffcff76be46d6cd996ef6 Mon Sep 17 00:00:00 2001 From: Tyler Milner Date: Mon, 20 May 2024 06:26:31 -0500 Subject: [PATCH 239/284] Fix typo in README (#1452) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 04317fcf1..2fa71f967 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ Options: - **--use-cache**: Used to prevent unnecessarily generating the project. If this is set, then a cache file will be written to when a project is generated. If `xcodegen` is later run but the spec and all the files it contains are the same, the project won't be generated. - **--cache-path**: A custom path to use for your cache file. This defaults to `~/.xcodegen/cache/{PROJECT_SPEC_PATH_HASH}` -There are other commands as well such as `xcodegen dump` which lets out output the resolved spec in many different formats, or write it to a file. Use `xcodegen help` to see more detailed usage information. +There are other commands as well such as `xcodegen dump` which lets one output the resolved spec in many different formats, or write it to a file. Use `xcodegen help` to see more detailed usage information. ## Dependency Diagrams
From 576739bcb5e1fb07e108c692d07d668cfae02f2f Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Mon, 20 May 2024 21:32:24 +1000 Subject: [PATCH 240/284] Add cache command (#1476) * add cache command * docs: update git hook info --- Docs/FAQ.md | 12 +++-- .../XcodeGenCLI/Commands/CacheCommand.swift | 44 +++++++++++++++++++ .../XcodeGenCLI/Commands/DumpCommand.swift | 2 +- .../Commands/GenerateCommand.swift | 23 +--------- .../XcodeGenCLI/Commands/ProjectCommand.swift | 21 +++++++++ Sources/XcodeGenCLI/XcodeGenCLI.swift | 1 + 6 files changed, 76 insertions(+), 27 deletions(-) create mode 100644 Sources/XcodeGenCLI/Commands/CacheCommand.swift diff --git a/Docs/FAQ.md b/Docs/FAQ.md index a5a6fbb10..03d108afc 100644 --- a/Docs/FAQ.md +++ b/Docs/FAQ.md @@ -9,10 +9,14 @@ Absolutely. You will get the most out of XcodeGen by adding your project to your >Note that you can run `xcodegen` as a step in your build process on CI. ## What happens when I switch branches -If files were added or removed in the new checkout you will most likely need to run `xcodegen` again so that your project will reference all your files. Unfortunately this is a manual step at the moment, but in the future this could be automated. - -For now you can always add xcodegen as a git `post-checkout` hook. -It's recommended to use `--use-cache` so that the project is not needlessly generated. +If files were added or removed in the new checkout you will most likely need to run `xcodegen` again so that your project will reference all your files. + +It's recommended to set up some [git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) to automate the process: +- run `xcodegen generate --use-cache` on the following hooks. This will make sure the project is up to date when checking out, merging and rebasing + - post-checkout + - post-rewrite + - post-merge +- run `xcodegen cache` on `post-commit`. This will make sure that when switching branches the cache will be updated in case you made local changes, or are ammending a commit that added a new file. ## Can I use CocoaPods Yes, you will just need to run `pod install` after the project is generated to integrate Cocoapods changes. diff --git a/Sources/XcodeGenCLI/Commands/CacheCommand.swift b/Sources/XcodeGenCLI/Commands/CacheCommand.swift new file mode 100644 index 000000000..70a14a241 --- /dev/null +++ b/Sources/XcodeGenCLI/Commands/CacheCommand.swift @@ -0,0 +1,44 @@ +import Foundation +import PathKit +import ProjectSpec +import SwiftCLI +import XcodeGenKit +import XcodeProj +import Version + +class CacheCommand: ProjectCommand { + + @Key("--cache-path", description: "Where the cache file will be loaded from and save to. Defaults to ~/.xcodegen/cache/{SPEC_PATH_HASH}") + var cacheFilePath: Path? + + init(version: Version) { + super.init(version: version, + name: "cache", + shortDescription: "Write the project cache") + } + + override func execute(specLoader: SpecLoader, projectSpecPath: Path, project: Project) throws { + + let cacheFilePath = self.cacheFilePath ?? Path("~/.xcodegen/cache/\(projectSpecPath.absolute().string.md5)").absolute() + + var cacheFile: CacheFile? + + // generate cache + do { + cacheFile = try specLoader.generateCacheFile() + } catch { + throw GenerationError.projectSpecParsingError(error) + } + + // write cache + if let cacheFile = cacheFile { + do { + try cacheFilePath.parent().mkpath() + try cacheFilePath.write(cacheFile.string) + success("Wrote cache to \(cacheFilePath)") + } catch { + info("Failed to write cache: \(error.localizedDescription)") + } + } + } +} diff --git a/Sources/XcodeGenCLI/Commands/DumpCommand.swift b/Sources/XcodeGenCLI/Commands/DumpCommand.swift index b3da9dcca..7e054062e 100644 --- a/Sources/XcodeGenCLI/Commands/DumpCommand.swift +++ b/Sources/XcodeGenCLI/Commands/DumpCommand.swift @@ -49,7 +49,7 @@ class DumpCommand: ProjectCommand { try file.parent().mkpath() try file.write(output) } else { - stdout.print(output) + success(output) } } } diff --git a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift index b607b09b3..385846e5d 100644 --- a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift +++ b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift @@ -8,9 +8,6 @@ import Version class GenerateCommand: ProjectCommand { - @Flag("-q", "--quiet", description: "Suppress all informational and success output") - var quiet: Bool - @Flag("-c", "--use-cache", description: "Use a cache for the xcodegen spec. This will prevent unnecessarily generating the project if nothing has changed") var useCache: Bool @@ -46,7 +43,7 @@ class GenerateCommand: ProjectCommand { Path("~/.xcodegen/cache/\(projectSpecPath.absolute().string.md5)").absolute() var cacheFile: CacheFile? - // read cache + // generate cache if useCache || self.cacheFilePath != nil { do { cacheFile = try specLoader.generateCacheFile() @@ -138,22 +135,4 @@ class GenerateCommand: ProjectCommand { try Task.run(bash: command, directory: projectDirectory.absolute().string) } } - - func info(_ string: String) { - if !quiet { - stdout.print(string) - } - } - - func warning(_ string: String) { - if !quiet { - stdout.print(string.yellow) - } - } - - func success(_ string: String) { - if !quiet { - stdout.print(string.green) - } - } } diff --git a/Sources/XcodeGenCLI/Commands/ProjectCommand.swift b/Sources/XcodeGenCLI/Commands/ProjectCommand.swift index 894dbc5ba..9f3b013c8 100644 --- a/Sources/XcodeGenCLI/Commands/ProjectCommand.swift +++ b/Sources/XcodeGenCLI/Commands/ProjectCommand.swift @@ -12,6 +12,9 @@ class ProjectCommand: Command { let name: String let shortDescription: String + @Flag("-q", "--quiet", description: "Suppress all informational and success output") + var quiet: Bool + @Key("-s", "--spec", description: "The path to the project spec file. Defaults to project.yml. (It is also possible to link to multiple spec files by comma separating them. Note that all other flags will be the same.)") var spec: String? @@ -58,4 +61,22 @@ class ProjectCommand: Command { } func execute(specLoader: SpecLoader, projectSpecPath: Path, project: Project) throws {} + + func info(_ string: String) { + if !quiet { + stdout.print(string) + } + } + + func warning(_ string: String) { + if !quiet { + stdout.print(string.yellow) + } + } + + func success(_ string: String) { + if !quiet { + stdout.print(string.green) + } + } } diff --git a/Sources/XcodeGenCLI/XcodeGenCLI.swift b/Sources/XcodeGenCLI/XcodeGenCLI.swift index 42afef037..8d6a69c59 100644 --- a/Sources/XcodeGenCLI/XcodeGenCLI.swift +++ b/Sources/XcodeGenCLI/XcodeGenCLI.swift @@ -15,6 +15,7 @@ public class XcodeGenCLI { description: "Generates Xcode projects", commands: [ generateCommand, + CacheCommand(version: version), DumpCommand(version: version), ] ) From 1b0720d1391016f0c4407ad0d6c18ed2a57b6329 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Mon, 20 May 2024 21:37:00 +1000 Subject: [PATCH 241/284] Update to 2.41.0 --- CHANGELOG.md | 10 ++++++++++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 257cd75cf..d60e150fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ ## Next Version +## 2.41.0 + +### Added + +- Added `xcodegen cache` command that writes the cache. Useful for `post-commit` git hook integration #1476 @yonaskolb + +### Changed + +- Include folders in file sorting #1466 @jflan-dd + ### Fixed - Fixed `supportedDestinations` validation when it contains watchOS for multiplatform apps. #1470 @tatsuky diff --git a/Makefile b/Makefile index f68bbbf0d..d32a730f0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.40.1 +VERSION = 2.41.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 2fa71f967..9de566ec0 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.40.1"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.41.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 37b11e0c5..74fa4eb8c 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.40.1") +let version = Version("2.41.0") let cli = XcodeGenCLI(version: version) cli.execute() From f51719ce29f835eb866a6e05f633a4d55f66c0bb Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 21 May 2024 11:28:45 +1000 Subject: [PATCH 242/284] Update cache hook docs --- Docs/FAQ.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Docs/FAQ.md b/Docs/FAQ.md index 03d108afc..9d1096816 100644 --- a/Docs/FAQ.md +++ b/Docs/FAQ.md @@ -13,10 +13,10 @@ If files were added or removed in the new checkout you will most likely need to It's recommended to set up some [git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) to automate the process: - run `xcodegen generate --use-cache` on the following hooks. This will make sure the project is up to date when checking out, merging and rebasing - - post-checkout - - post-rewrite - - post-merge -- run `xcodegen cache` on `post-commit`. This will make sure that when switching branches the cache will be updated in case you made local changes, or are ammending a commit that added a new file. + - `post-checkout` + - `post-rewrite` + - `post-merge` +- run `xcodegen cache` on `pre-commit`. This will make sure that when switching branches the cache will be updated in case you made local changes, or are ammending a commit that added a new file. ## Can I use CocoaPods Yes, you will just need to run `pod install` after the project is generated to integrate Cocoapods changes. From 7eb5e9bd06b8a45630694d4a71c6f60ed3c6d8b9 Mon Sep 17 00:00:00 2001 From: Kohki Miki Date: Tue, 2 Jul 2024 16:06:02 +0900 Subject: [PATCH 243/284] Remove GraphViz feature (#1485) * Remove GraphViz to pass build on Xcode 16 * Update documentations --- CHANGELOG.md | 2 + Package.resolved | 9 -- Package.swift | 2 - README.md | 22 ---- .../XcodeGenCLI/Commands/DumpCommand.swift | 3 - Sources/XcodeGenKit/GraphVizGenerator.swift | 66 ----------- .../GraphVizGeneratorTests.swift | 104 ------------------ 7 files changed, 2 insertions(+), 206 deletions(-) delete mode 100644 Sources/XcodeGenKit/GraphVizGenerator.swift delete mode 100644 Tests/XcodeGenKitTests/GraphVizGeneratorTests.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index d60e150fe..20f017b6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +- Removed `xcodegen dump --type graphviz` feature. @giginet + ## 2.41.0 ### Added diff --git a/Package.resolved b/Package.resolved index 3ae8a3daf..15a998c0e 100644 --- a/Package.resolved +++ b/Package.resolved @@ -18,15 +18,6 @@ "version" : "0.0.6" } }, - { - "identity" : "graphviz", - "kind" : "remoteSourceControl", - "location" : "https://github.com/SwiftDocOrg/GraphViz.git", - "state" : { - "revision" : "70bebcf4597b9ce33e19816d6bbd4ba9b7bdf038", - "version" : "0.2.0" - } - }, { "identity" : "jsonutilities", "kind" : "remoteSourceControl", diff --git a/Package.swift b/Package.swift index 474834940..829372e8d 100644 --- a/Package.swift +++ b/Package.swift @@ -19,7 +19,6 @@ let package = Package( .package(url: "https://github.com/tuist/XcodeProj.git", exact: "8.13.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"), .package(url: "https://github.com/freddi-kit/ArtifactBundleGen", exact: "0.0.6") ], targets: [ @@ -41,7 +40,6 @@ let package = Package( "XcodeProj", "PathKit", "XcodeGenCore", - "GraphViz", ], resources: [ .copy("SettingPresets") ]), diff --git a/README.md b/README.md index 9de566ec0..68688e1c1 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,6 @@ The project spec is a YAML or JSON file that defines your targets, configuration - ✅ Distribute your spec amongst multiple files for easy **sharing** and overriding - ✅ Easily create **multi-platform** frameworks - ✅ Integrate **Carthage** frameworks without any work -- ✅ Export **Dependency Diagrams** to view in [Graphviz](https://www.graphviz.org) Given an example project spec: @@ -138,27 +137,6 @@ Options: There are other commands as well such as `xcodegen dump` which lets one output the resolved spec in many different formats, or write it to a file. Use `xcodegen help` to see more detailed usage information. -## Dependency Diagrams -
- Click to expand! - -#### How to export dependency diagrams: - -To stdout: - -``` -xcodegen dump --type graphviz -``` - -To a file: - -``` -xcodegen dump --type graphviz --file Graph.viz -``` - -During implementation, `graphviz` formatting was validated using [GraphvizOnline](https://dreampuf.github.io/GraphvizOnline/), [WebGraphviz](http://www.webgraphviz.com), and [Graphviz on MacOS](https://graphviz.org). -
- ## Editing ```shell git clone https://github.com/yonaskolb/XcodeGen.git diff --git a/Sources/XcodeGenCLI/Commands/DumpCommand.swift b/Sources/XcodeGenCLI/Commands/DumpCommand.swift index 7e054062e..b0d59a612 100644 --- a/Sources/XcodeGenCLI/Commands/DumpCommand.swift +++ b/Sources/XcodeGenCLI/Commands/DumpCommand.swift @@ -41,8 +41,6 @@ class DumpCommand: ProjectCommand { output = try Yams.dump(object: project.toJSONDictionary()) case .summary: output = project.debugDescription - case .graphviz: - output = GraphVizGenerator().generateModuleGraphViz(targets: project.targets) } if let file = file { @@ -61,7 +59,6 @@ private enum DumpType: String, ConvertibleFromString, CaseIterable { case parsedJSON = "parsed-json" case parsedYaml = "parsed-yaml" case summary - case graphviz static var defaultValue: DumpType { .yaml } } diff --git a/Sources/XcodeGenKit/GraphVizGenerator.swift b/Sources/XcodeGenKit/GraphVizGenerator.swift deleted file mode 100644 index e7e97b02f..000000000 --- a/Sources/XcodeGenKit/GraphVizGenerator.swift +++ /dev/null @@ -1,66 +0,0 @@ -import DOT -import Foundation -import GraphViz -import ProjectSpec - -extension Dependency { - var graphVizName: String { - switch self.type { - case .bundle, .package, .sdk, .framework, .carthage: - return "[\(self.type)]\\n\(reference)" - case .target: - return reference - } - } -} - -extension Dependency.DependencyType: CustomStringConvertible { - public var description: String { - switch self { - case .bundle: return "bundle" - case .package: return "package" - case .framework: return "framework" - case .carthage: return "carthage" - case .sdk: return "sdk" - case .target: return "target" - } - } -} - -extension Node { - init(target: Target) { - self.init(target.name) - self.shape = .box - } - - init(dependency: Dependency) { - self.init(dependency.reference) - self.shape = .box - self.label = dependency.graphVizName - } -} - -public class GraphVizGenerator { - - public init() {} - - public func generateModuleGraphViz(targets: [Target]) -> String { - return DOTEncoder().encode(generateGraph(targets: targets)) - } - - func generateGraph(targets: [Target]) -> Graph { - var graph = Graph(directed: true) - targets.forEach { target in - target.dependencies.forEach { dependency in - let from = Node(target: target) - graph.append(from) - let to = Node(dependency: dependency) - graph.append(to) - var edge = Edge(from: from, to: to) - edge.style = .dashed - graph.append(edge) - } - } - return graph - } -} diff --git a/Tests/XcodeGenKitTests/GraphVizGeneratorTests.swift b/Tests/XcodeGenKitTests/GraphVizGeneratorTests.swift deleted file mode 100644 index 69af964c6..000000000 --- a/Tests/XcodeGenKitTests/GraphVizGeneratorTests.swift +++ /dev/null @@ -1,104 +0,0 @@ -import ProjectSpec -import Spectre -@testable import XcodeGenKit -import XCTest - -private let app = Target( - name: "MyApp", - type: .application, - platform: .iOS, - settings: Settings(buildSettings: ["SETTING_1": "VALUE"]), - dependencies: [ - Dependency(type: .target, reference: "MyInternalFramework"), - Dependency(type: .bundle, reference: "Resources"), - Dependency(type: .carthage(findFrameworks: true, linkType: .static), reference: "MyStaticFramework"), - Dependency(type: .carthage(findFrameworks: true, linkType: .dynamic), reference: "MyDynamicFramework"), - Dependency(type: .framework, reference: "MyExternalFramework"), - Dependency(type: .package(products: ["MyPackage"]), reference: "MyPackage"), - Dependency(type: .sdk(root: "MySDK"), reference: "MySDK"), - ] -) - -private let framework = Target( - name: "MyFramework", - type: .framework, - platform: .iOS, - settings: Settings(buildSettings: ["SETTING_2": "VALUE"]) -) - -private let uiTest = Target( - name: "MyAppUITests", - type: .uiTestBundle, - platform: .iOS, - settings: Settings(buildSettings: ["SETTING_3": "VALUE"]), - dependencies: [Dependency(type: .target, reference: "MyApp")] -) - -private let targets = [app, framework, uiTest] - -class GraphVizGeneratorTests: XCTestCase { - - func testGraphOutput() throws { - describe { - let graph = GraphVizGenerator().generateGraph(targets: targets) - $0.it("generates the expected number of nodes") { - try expect(graph.nodes.count) == 16 - } - $0.it("generates box nodes") { - try expect(graph.nodes.filter { $0.shape == .box }.count) == 16 - } - $0.it("generates the expected carthage nodes") { - try expect(graph.nodes.filter { $0.label?.contains("[carthage]") ?? false }.count) == 2 - } - $0.it("generates the expected sdk nodes") { - try expect(graph.nodes.filter { $0.label?.contains("[sdk]") ?? false }.count) == 1 - } - $0.it("generates the expected Framework nodes") { - try expect(graph.nodes.filter { $0.label?.contains("[framework]") ?? false }.count) == 1 - } - $0.it("generates the expected package nodes") { - try expect(graph.nodes.filter { $0.label?.contains("[package]") ?? false }.count) == 1 - } - $0.it("generates the expected bundle nodes") { - try expect(graph.nodes.filter { $0.label?.contains("[bundle]") ?? false }.count) == 1 - } - $0.it("generates the expected edges") { - try expect(graph.edges.count) == 8 - } - $0.it("generates dashed edges") { - try expect(graph.edges.filter { $0.style == .dashed }.count) == 8 - } - $0.it("generates the expected output") { - let output = GraphVizGenerator().generateModuleGraphViz(targets: targets) - try expect(output) == """ - digraph { - MyApp [shape=box] - MyInternalFramework [label=MyInternalFramework shape=box] - MyApp [shape=box] - Resources [label="[bundle]\\nResources" shape=box] - MyApp [shape=box] - MyStaticFramework [label="[carthage]\\nMyStaticFramework" shape=box] - MyApp [shape=box] - MyDynamicFramework [label="[carthage]\\nMyDynamicFramework" shape=box] - MyApp [shape=box] - MyExternalFramework [label="[framework]\\nMyExternalFramework" shape=box] - MyApp [shape=box] - MyPackage [label="[package]\\nMyPackage" shape=box] - MyApp [shape=box] - MySDK [label="[sdk]\\nMySDK" shape=box] - MyAppUITests [shape=box] - MyApp [label=MyApp shape=box] - MyApp -> MyInternalFramework [style=dashed] - MyApp -> Resources [style=dashed] - MyApp -> MyStaticFramework [style=dashed] - MyApp -> MyDynamicFramework [style=dashed] - MyApp -> MyExternalFramework [style=dashed] - MyApp -> MyPackage [style=dashed] - MyApp -> MySDK [style=dashed] - MyAppUITests -> MyApp [style=dashed] - } - """ - } - } - } -} From f8842228c5c067f35a2993f0a7820b929f175eb7 Mon Sep 17 00:00:00 2001 From: Ernesto Cambuston Date: Wed, 3 Jul 2024 04:41:03 -0700 Subject: [PATCH 244/284] Test action macroExpansion allows unavailable buildable reference. (#1471) * fix buildable ref * fix test * add test --- Sources/XcodeGenKit/SchemeGenerator.swift | 4 +- .../SchemeGeneratorTests.swift | 40 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index e379e799e..db3114d84 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -286,10 +286,12 @@ public class SchemeGenerator { let testPlans = scheme.test?.testPlans.enumerated().map { index, testPlan in XCScheme.TestPlanReference(reference: "container:\(testPlan.path)", default: defaultTestPlanIndex == index) } ?? [] + let testBuildableEntries = buildActionEntries.filter({ $0.buildFor.contains(.testing) }) + testBuildTargetEntries + let testMacroExpansionBuildableRef = testBuildableEntries.map(\.buildableReference).contains(buildableReference) ? buildableReference : testBuildableEntries.first?.buildableReference let testAction = XCScheme.TestAction( buildConfiguration: scheme.test?.config ?? defaultDebugConfig.name, - macroExpansion: buildableReference, + macroExpansion: testMacroExpansionBuildableRef, testables: testables, testPlans: testPlans.isEmpty ? nil : testPlans, preActions: scheme.test?.preActions.map(getExecutionAction) ?? [], diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index b5f392d38..31af67475 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -479,6 +479,46 @@ class SchemeGeneratorTests: XCTestCase { try expect(xcscheme.launchAction?.macroExpansion?.buildableName) == "MyApp.app" } + $0.it("generates scheme with macroExpansion from tests when the main target is not part of the scheme") { + let app = Target( + name: "MyApp", + type: .application, + platform: .iOS, + dependencies: [] + ) + + let mockApp = Target( + name: "MockApp", + type: .application, + platform: .iOS, + dependencies: [] + ) + + let testBundle = Target( + name: "TestBundle", + type: .unitTestBundle, + platform: .iOS + ) + let appTarget = Scheme.BuildTarget(target: .local(app.name), buildTypes: [.running]) + let mockAppTarget = Scheme.BuildTarget(target: .local(mockApp.name), buildTypes: [.testing]) + let testBundleTarget = Scheme.BuildTarget(target: .local(testBundle.name), buildTypes: [.testing]) + + let scheme = Scheme( + name: "TestScheme", + build: Scheme.Build(targets: [appTarget, mockAppTarget, testBundleTarget]), + run: Scheme.Run(config: "Debug", macroExpansion: "MyApp") + ) + let project = Project( + name: "test", + targets: [app, mockApp, testBundle], + schemes: [scheme] + ) + let xcodeProject = try project.generateXcodeProject() + + let xcscheme = try unwrap(xcodeProject.sharedData?.schemes.first) + try expect(xcscheme.testAction?.macroExpansion?.buildableName) == "MockApp.app" + } + $0.it("generates scheme with test target of local swift package") { let targetScheme = TargetScheme( testTargets: [Scheme.Test.TestTarget(targetReference: TestableTargetReference(name: "XcodeGenKitTests", location: .package("XcodeGen")))]) From 45151c2882731c08442ef24bf6b5e18d998731c4 Mon Sep 17 00:00:00 2001 From: Ernesto Cambuston Date: Tue, 9 Jul 2024 19:19:30 -0700 Subject: [PATCH 245/284] Allow changing macro expansions on test actions. (#1468) * Allow to override test macroExpansions * update doc * style * Address feedback from PR * fix build * add toJSONValue encoding --- Docs/ProjectSpec.md | 2 +- Sources/ProjectSpec/Scheme.swift | 7 +++- Sources/XcodeGenKit/SchemeGenerator.swift | 11 +++++- .../SchemeGeneratorTests.swift | 35 +++++++++++++++++++ 4 files changed, 52 insertions(+), 3 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 430e54e4e..fa5f7fe05 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -1039,7 +1039,7 @@ The different actions share some properties: - [ ] **askForAppToLaunch**: **Bool** - `run` and `profile` actions can define the executable set to ask to launch. This defaults to false. - [ ] **launchAutomaticallySubstyle**: **String** - `run` action can define the launch automatically substyle ('2' for extensions). - [ ] **storeKitConfiguration**: **String** - `run` action can specify a storekit configuration. See [Options](#options). -- [ ] **macroExpansion**: **String** - `run` action can define the macro expansion from other target. This defaults to nil. +- [ ] **macroExpansion**: **String** - `run` and `test` action can define the macro expansion from other target. This defaults to nil. ### Execution Action diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index bb0a4bb9a..a476b71a6 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -220,6 +220,7 @@ public struct Scheme: Equatable { public var captureScreenshotsAutomatically: Bool public var deleteScreenshotsWhenEachTestSucceeds: Bool public var testPlans: [TestPlan] + public var macroExpansion: String? public struct TestTarget: Equatable, ExpressibleByStringLiteral { @@ -286,7 +287,8 @@ public struct Scheme: Equatable { debugEnabled: Bool = debugEnabledDefault, customLLDBInit: String? = nil, captureScreenshotsAutomatically: Bool = captureScreenshotsAutomaticallyDefault, - deleteScreenshotsWhenEachTestSucceeds: Bool = deleteScreenshotsWhenEachTestSucceedsDefault + deleteScreenshotsWhenEachTestSucceeds: Bool = deleteScreenshotsWhenEachTestSucceedsDefault, + macroExpansion: String? = nil ) { self.config = config self.gatherCoverageData = gatherCoverageData @@ -304,6 +306,7 @@ public struct Scheme: Equatable { self.customLLDBInit = customLLDBInit self.captureScreenshotsAutomatically = captureScreenshotsAutomatically self.deleteScreenshotsWhenEachTestSucceeds = deleteScreenshotsWhenEachTestSucceeds + self.macroExpansion = macroExpansion } public var shouldUseLaunchSchemeArgsEnv: Bool { @@ -620,6 +623,7 @@ extension Scheme.Test: JSONObjectConvertible { customLLDBInit = jsonDictionary.json(atKeyPath: "customLLDBInit") captureScreenshotsAutomatically = jsonDictionary.json(atKeyPath: "captureScreenshotsAutomatically") ?? Scheme.Test.captureScreenshotsAutomaticallyDefault deleteScreenshotsWhenEachTestSucceeds = jsonDictionary.json(atKeyPath: "deleteScreenshotsWhenEachTestSucceeds") ?? Scheme.Test.deleteScreenshotsWhenEachTestSucceedsDefault + macroExpansion = jsonDictionary.json(atKeyPath: "macroExpansion") } } @@ -636,6 +640,7 @@ extension Scheme.Test: JSONEncodable { "language": language, "region": region, "coverageTargets": coverageTargets.map { $0.reference }, + "macroExpansion": macroExpansion ] if gatherCoverageData != Scheme.Test.gatherCoverageDataDefault { diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index db3114d84..ac100e89f 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -289,9 +289,18 @@ public class SchemeGenerator { let testBuildableEntries = buildActionEntries.filter({ $0.buildFor.contains(.testing) }) + testBuildTargetEntries let testMacroExpansionBuildableRef = testBuildableEntries.map(\.buildableReference).contains(buildableReference) ? buildableReference : testBuildableEntries.first?.buildableReference + let testMacroExpansion: XCScheme.BuildableReference = buildActionEntries.first( + where: { value in + if let macroExpansion = scheme.test?.macroExpansion { + return value.buildableReference.blueprintName == macroExpansion + } + return false + } + )?.buildableReference ?? testMacroExpansionBuildableRef ?? buildableReference + let testAction = XCScheme.TestAction( buildConfiguration: scheme.test?.config ?? defaultDebugConfig.name, - macroExpansion: testMacroExpansionBuildableRef, + macroExpansion: testMacroExpansion, testables: testables, testPlans: testPlans.isEmpty ? nil : testPlans, preActions: scheme.test?.preActions.map(getExecutionAction) ?? [], diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index 31af67475..07f63a925 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -476,6 +476,41 @@ class SchemeGeneratorTests: XCTestCase { let xcodeProject = try project.generateXcodeProject() let xcscheme = try unwrap(xcodeProject.sharedData?.schemes.first) + try expect(xcscheme.testAction?.macroExpansion?.buildableName) == "MyApp.app" + try expect(xcscheme.launchAction?.macroExpansion?.buildableName) == "MyApp.app" + } + + $0.it("allows to override test macroExpansion") { + let app = Target( + name: "MyApp", + type: .application, + platform: .iOS, + dependencies: [Dependency(type: .target, reference: "MyAppExtension", embed: false)] + ) + + let `extension` = Target( + name: "MyAppExtension", + type: .appExtension, + platform: .iOS + ) + let appTarget = Scheme.BuildTarget(target: .local(app.name), buildTypes: [.running]) + let extensionTarget = Scheme.BuildTarget(target: .local(`extension`.name), buildTypes: [.running]) + + let scheme = Scheme( + name: "TestScheme", + build: Scheme.Build(targets: [appTarget, extensionTarget]), + run: Scheme.Run(config: "Debug", macroExpansion: "MyApp"), + test: .init(macroExpansion: "MyAppExtension") + ) + let project = Project( + name: "test", + targets: [app, `extension`], + schemes: [scheme] + ) + let xcodeProject = try project.generateXcodeProject() + + let xcscheme = try unwrap(xcodeProject.sharedData?.schemes.first) + try expect(xcscheme.testAction?.macroExpansion?.buildableName) == "MyAppExtension.appex" try expect(xcscheme.launchAction?.macroExpansion?.buildableName) == "MyApp.app" } From 02f9ea4e51e0a4a4cdb945a3249359f9bcd256e1 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Thu, 11 Jul 2024 20:49:03 +1000 Subject: [PATCH 246/284] update changelog --- CHANGELOG.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20f017b6d..df2f9029f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,19 @@ ## Next Version -- Removed `xcodegen dump --type graphviz` feature. @giginet +## 2.42.0 + +### Added + +- Added `macroExpansion` to test actions in schemes #1468 @erneestoc + +### Changed + +- Better default macroExpansion target in schemes #1471 @erneestoc + +### Removed + +- Removed `xcodegen dump --type graphviz` as graphviz no longer builds in Swift 6 and is no longer maintained. If anyone uses this feature and wishes to keep it, please submit a PR providing a suitable alternative. #1485 @giginet ## 2.41.0 From 5af3bf37975d26e4d28ad45bdee73acccb89f525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20H=C3=B6pfner?= Date: Thu, 11 Jul 2024 13:19:37 +0200 Subject: [PATCH 247/284] Add support for local Swift packages in Xcode 15 (#1465) * Add support for local Swift packages in Xcode 15 Solves yonaskolb/XcodeGen#1396 * Updated CHANGELOG.md * add test for local package creation --------- Co-authored-by: Yonas Kolb --- CHANGELOG.md | 1 + Package.resolved | 4 ++-- Package.swift | 2 +- Sources/XcodeGenKit/PBXProjGenerator.swift | 13 +++++++++---- Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj | 13 +++++++++++++ Tests/XcodeGenKitTests/ProjectGeneratorTests.swift | 4 ++++ 6 files changed, 30 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df2f9029f..cfe7bf7c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### Added +- Better support for local Swift packages in Xcode 15 #1465 @kinnarr - Added `macroExpansion` to test actions in schemes #1468 @erneestoc ### Changed diff --git a/Package.resolved b/Package.resolved index 15a998c0e..b4c35e437 100644 --- a/Package.resolved +++ b/Package.resolved @@ -77,8 +77,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/tuist/XcodeProj.git", "state" : { - "revision" : "6e60fb55271c80f83a186c9b1b4982fd991cfc0a", - "version" : "8.13.0" + "revision" : "447c159b0c5fb047a024fd8d942d4a76cf47dde0", + "version" : "8.16.0" } }, { diff --git a/Package.swift b/Package.swift index 829372e8d..8e32c5858 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: "4.0.0"), - .package(url: "https://github.com/tuist/XcodeProj.git", exact: "8.13.0"), + .package(url: "https://github.com/tuist/XcodeProj.git", exact: "8.16.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/freddi-kit/ArtifactBundleGen", exact: "0.0.6") diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 73ea0339b..a5f667afd 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -22,6 +22,7 @@ public class PBXProjGenerator { var targetFileReferences: [String: PBXFileReference] = [:] var sdkFileReferences: [String: PBXFileReference] = [:] var packageReferences: [String: XCRemoteSwiftPackageReference] = [:] + var localPackageReferences: [String: XCLocalSwiftPackageReference] = [:] var carthageFrameworksByPlatform: [String: Set] = [:] var frameworkFiles: [PBXFileElement] = [] @@ -30,7 +31,6 @@ public class PBXProjGenerator { var generated = false private var projects: [ProjectReference: PBXProj] = [:] - lazy private var localPackageReferences: [String] = project.packages.compactMap { $0.value.isLocal ? $0.key : nil } public init(project: Project, projectDirectory: Path? = nil) { self.project = project @@ -170,6 +170,10 @@ public class PBXProjGenerator { packageReferences[name] = packageReference addObject(packageReference) case let .local(path, group): + let packageReference = XCLocalSwiftPackageReference(relativePath: path) + localPackageReferences[name] = packageReference + addObject(packageReference) + try sourceGenerator.createLocalPackage(path: Path(path), group: group.map { Path($0) }) } } @@ -310,7 +314,8 @@ public class PBXProjGenerator { } pbxProject.knownRegions = knownRegions.sorted() - pbxProject.packages = packageReferences.sorted { $0.key < $1.key }.map { $1 } + pbxProject.remotePackages = packageReferences.sorted { $0.key < $1.key }.map { $1 } + pbxProject.localPackages = localPackageReferences.sorted { $0.key < $1.key }.map { $1 } let allTargets: [PBXTarget] = targetObjects.valueArray + targetAggregateObjects.valueArray pbxProject.targets = allTargets @@ -945,7 +950,7 @@ public class PBXProjGenerator { // If package's reference is none and there is no specified package in localPackages, // then ignore the package specified as dependency. - if packageReference == nil, !localPackageReferences.contains(dependency.reference) { + if packageReference == nil, localPackageReferences[dependency.reference] == nil { continue } @@ -1469,7 +1474,7 @@ public class PBXProjGenerator { func makePackagePluginDependency(for target: ProjectTarget) -> [PBXTargetDependency] { target.buildToolPlugins.compactMap { buildToolPlugin in let packageReference = packageReferences[buildToolPlugin.package] - if packageReference == nil, !localPackageReferences.contains(buildToolPlugin.package) { + if packageReference == nil, localPackageReferences[buildToolPlugin.package] == nil { return nil } diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index 1d15e475f..2e33e2c09 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -251,6 +251,8 @@ 5BA91390AE78D2EE15C60091 /* XCRemoteSwiftPackageReference "Codability" */, 348C81C327DB1710B742C370 /* XCRemoteSwiftPackageReference "Prefire" */, E3887F3CB2C069E70D98092F /* XCRemoteSwiftPackageReference "SwiftRoaring" */, + 630A8CE9F2BE39704ED9D461 /* XCLocalSwiftPackageReference "FooFeature" */, + C6539B364583AE96C18CE377 /* XCLocalSwiftPackageReference "../../.." */, ); projectDirPath = ""; projectRoot = ""; @@ -662,6 +664,17 @@ }; /* End XCRemoteSwiftPackageReference section */ +/* Begin XCLocalSwiftPackageReference section */ + 630A8CE9F2BE39704ED9D461 /* XCLocalSwiftPackageReference "FooFeature" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = FooFeature; + }; + C6539B364583AE96C18CE377 /* XCLocalSwiftPackageReference "../../.." */ = { + isa = XCLocalSwiftPackageReference; + relativePath = ../../..; + }; +/* End XCLocalSwiftPackageReference section */ + /* Begin XCSwiftPackageProductDependency section */ 15DB49096E2978F6BCA8D604 /* FooUI */ = { isa = XCSwiftPackageProductDependency; diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index f34d487c0..5db44698a 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -1586,6 +1586,10 @@ class ProjectGeneratorTests: XCTestCase { let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) let localPackageFile = try unwrap(pbxProject.fileReferences.first(where: { $0.path == "../XcodeGen" })) try expect(localPackageFile.lastKnownFileType) == "folder" + + let localPackageReference = try unwrap(pbxProject.rootObject?.localPackages.first) + try expect(pbxProject.rootObject?.localPackages.count) == 1 + try expect(localPackageReference.relativePath) == "../XcodeGen" let frameworkPhases = nativeTarget.buildPhases.compactMap { $0 as? PBXFrameworksBuildPhase } From 82c6ab9bbd5b6075fc0887d897733fc0c4ffc9ab Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 11 Jul 2024 21:20:06 +1000 Subject: [PATCH 248/284] Update to 2.42.0 --- Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d32a730f0..931fe9d8e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.41.0 +VERSION = 2.42.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 68688e1c1..4f00069f6 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.41.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.42.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 74fa4eb8c..0c4e2e25c 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.41.0") +let version = Version("2.42.0") let cli = XcodeGenCLI(version: version) cli.execute() From 5802171853d1a8fe9452f4fdbbe39e33ff682286 Mon Sep 17 00:00:00 2001 From: Wolfgang Lutz Date: Fri, 12 Jul 2024 02:08:38 +0200 Subject: [PATCH 249/284] fix typo from #1418 (#1486) * fix typo from #1418 * fix more typos found using https://github.com/client9/misspell --- CHANGELOG.md | 6 +++--- .../Project.xcodeproj/project.pbxproj | 16 ++++++++++++++++ Tests/Fixtures/TestProject/project.yml | 2 +- Tests/ProjectSpecTests/ProjectSpecTests.swift | 4 ++-- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfe7bf7c5..1892fa416 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -339,7 +339,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen #### Added - Allow specifying a `github` name like `JohnSundell/Ink` instead of a full `url` for Swift Packages #1029 @yonaskolb -- Added explicity `LastUpgradeCheck` and `LastUpgradeVersion` override support so it's possible to override these properties without using the `project.xcodeVersion`. [1013](https://github.com/yonaskolb/XcodeGen/pull/1013) @Andre113 +- Added explicit `LastUpgradeCheck` and `LastUpgradeVersion` override support so it's possible to override these properties without using the `project.xcodeVersion`. [1013](https://github.com/yonaskolb/XcodeGen/pull/1013) @Andre113 - Added `macroExpansion` for `run` in `schemes` #1036 @freddi-kit - Added `askForAppToLaunch` for `profile` in `schemes` #1035 @freddi-kit - Added support for selectedTests in schemes `Test` configuration. #913 @ooodin @@ -711,7 +711,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen #### Added -- Added ability to automatically find all the frameworks for Carthage dependencies via the global `options.findCarthageFrameworks` or dependency specfic `dependency.findFrameworks`. See the [Carthage](Docs/Usage.md#carthage) usage docs for more info #506 @rpassis @yonaskolb +- Added ability to automatically find all the frameworks for Carthage dependencies via the global `options.findCarthageFrameworks` or dependency specific `dependency.findFrameworks`. See the [Carthage](Docs/Usage.md#carthage) usage docs for more info #506 @rpassis @yonaskolb - Added support for nested target templates #534 @tomquist - Added ability to define `templateAttributes` within a target to be able to parameterize templates. #533 @tomquist - Added ability to set `link` to false in framework dependencies #532 @dimatosaurus @@ -770,7 +770,7 @@ Some support for Xcode Test Plans has been added. For now test plans are not gen #### Fixed - Fixed XPC Service package type in generated `Info.plist` #435 @alvarhansen -- Fixed phase ordering for modulemap and static libary header Copy File phases. [402](https://github.com/yonaskolb/XcodeGen/pull/402) @brentleyjones +- Fixed phase ordering for modulemap and static library header Copy File phases. [402](https://github.com/yonaskolb/XcodeGen/pull/402) @brentleyjones - Fixed intermittent errors when running multiple `xcodegen`s concurrently #450 @bryansum - Fixed `--project` argument not working #437 @yonaskolb - Fixed unit tests not hooking up to host applications properly by default. They now generate a `TEST_HOST` and a `TestTargetID` #452 @yonaskolb diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 7328f510f..09b541bf6 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -25,6 +25,7 @@ /* Begin PBXBuildFile section */ 01BFA2C4D9C5BBC72C015AA8 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 02F9D686CBA6068A8EE58026 /* StaticLibrary_ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D0C79A8C750EC0DE748C463 /* StaticLibrary_ObjC.m */; }; + 03D1147528CED90EC1D844CE /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7F9636B706AC92629D0B48 /* XCTest.framework */; }; 03FFCE664129864A8F167C2F /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E4CCE342955E0E934BE533 /* FrameworkFile.swift */; }; 052D6B4572FBF002286865D7 /* CrossOverlayFramework.swiftcrossimport in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8DD7A61B07AD2F91BDECC255 /* CrossOverlayFramework.swiftcrossimport */; }; 06F1750F0E45E4822F806523 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 576675973B56A96047CB4944 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -116,6 +117,7 @@ 71A2AAC5934BDC9EDB6F0D9E /* libStaticLibrary_ObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B221F5A689AD7D3AD52F56B8 /* libStaticLibrary_ObjC.a */; }; 747CAE14D196F5652E93353C /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 2E1E747C7BC434ADB80CC269 /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; 75F2774F183838AF34CA9B8A /* StaticLibrary_ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D0C79A8C750EC0DE748C463 /* StaticLibrary_ObjC.m */; }; + 76156B580B30704346296641 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7F9636B706AC92629D0B48 /* XCTest.framework */; }; 768648ED7E93B6D888574144 /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = F2950763C4C568CC85021D18 /* module.modulemap */; }; 76DC6A4B18F434BAC239CC4A /* DriverKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A428E67153BB40184F37BE /* DriverKit.framework */; }; 778F71CA1CC4BEECDACAD8B9 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -141,6 +143,7 @@ 9DF5931DAD58C35B830A0A75 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B76E17CE3574081D5BF45B44 /* Result.framework */; }; A1588BF3BFFE1DF7409CBA10 /* Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */; }; A1AEAAB53EAEDA1C307871FA /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB178D03E75929F3F5B10C56 /* Result.framework */; }; + A496E1DB82E16DA4099D1411 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7F9636B706AC92629D0B48 /* XCTest.framework */; }; A59B3F08914812573AFF6C2D /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FD4A16C7B8FEB7F97F3CBE3F /* libz.dylib */; }; A7438C77A05D83E7016CF044 /* Framework2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A0DC40025AB59B688E758829 /* Framework2.framework */; }; A7D1A9942302569A9515696A /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D296BB7355994040E197A1EE /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -783,6 +786,7 @@ 469B630D28015F0EDC456F6B /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; 46DD8F9AAC104BDB63793625 /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; 4BF4D16042A80576D259160C /* Model 3.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Model 3.xcdatamodel"; sourceTree = ""; }; + 4C7F9636B706AC92629D0B48 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 5116B3B58070BCD09F1487BA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 553D289724905857912C7A1D /* outputList.xcfilelist */ = {isa = PBXFileReference; lastKnownFileType = text.xcfilelist; path = outputList.xcfilelist; sourceTree = ""; }; 576675973B56A96047CB4944 /* MyFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyFramework.h; sourceTree = ""; }; @@ -942,6 +946,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + A496E1DB82E16DA4099D1411 /* XCTest.framework in Frameworks */, 5E0369B907E239D1E6884ECF /* TestFramework.framework in Frameworks */, EDE8DD3CB36D65C300A53D1E /* swift-tagged.framework in Frameworks */, ); @@ -955,6 +960,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 8189054F985D26094EE77069 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 03D1147528CED90EC1D844CE /* XCTest.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 9B861C58E640BD4AD391900C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -967,6 +980,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 76156B580B30704346296641 /* XCTest.framework in Frameworks */, E4D0F435405DABCB51C5B684 /* TestFramework.framework in Frameworks */, 32956CD11BD6B02E64F5D8D1 /* swift-tagged.framework in Frameworks */, ); @@ -1567,6 +1581,7 @@ 0BC75409252FF15F540FBB7B /* libEndpointSecurity.tbd */, FD4A16C7B8FEB7F97F3CBE3F /* libz.dylib */, 5B785B1161553A7DD6DA4255 /* NetworkExtension.framework */, + 4C7F9636B706AC92629D0B48 /* XCTest.framework */, ); name = Frameworks; sourceTree = ""; @@ -1768,6 +1783,7 @@ buildPhases = ( 2F72F6483B3356C11F79ACCF /* Headers */, 902C8700CD150C726365CB8A /* Sources */, + 8189054F985D26094EE77069 /* Frameworks */, ); buildRules = ( ); diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 54b33454f..cc4ec4e68 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -383,7 +383,7 @@ targets: - path: Framework excludes: - "*.xcodeproj" - depencencies: + dependencies: - sdk: Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework root: DEVELOPER_DIR diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index b6d5f0174..08a9f0c37 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -547,7 +547,7 @@ class ProjectSpecTests: XCTestCase { try expectValidationError(project, .multipleDefaultTestPlans) } - $0.it("fails on packages has not plugin packge reference") { + $0.it("fails on packages has not plugin package reference") { var project = baseProject project.targets = [ Target( @@ -562,7 +562,7 @@ class ProjectSpecTests: XCTestCase { try expectValidationError(project, .invalidPluginPackageReference(plugin: "plugin", package: "package")) } - $0.it("allow on packages has plugin packge reference") { + $0.it("allow on packages has plugin package reference") { var project = baseProject project.packages["package"] = .remote(url: "url", versionRequirement: .branch("branch")) project.targets = [ From adfb8c001b9efd70b440225a82a2df8989473c6a Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Mon, 20 May 2024 21:38:55 +1000 Subject: [PATCH 250/284] remove brew references from makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 931fe9d8e..1768faed6 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ SWIFT_BUILD_FLAGS = --disable-sandbox -c release --arch arm64 --arch x86_64 BUILD_PATH = $(shell swift build $(SWIFT_BUILD_FLAGS) --show-bin-path) EXECUTABLE_PATH = $(BUILD_PATH)/$(EXECUTABLE_NAME) -.PHONY: install build uninstall format_code brew release +.PHONY: install build uninstall format_code release install: build mkdir -p $(PREFIX)/bin @@ -37,7 +37,7 @@ release: git commit -m "Update to $(VERSION)" #git tag $(VERSION) -publish: archive brew +publish: archive echo "published $(VERSION)" archive: build From 8beb3b2d2d557974638684f04495357521074c1c Mon Sep 17 00:00:00 2001 From: Mizuo Nagayama <33952656+ozumin@users.noreply.github.com> Date: Tue, 6 Aug 2024 05:35:27 +0900 Subject: [PATCH 251/284] fix plural in ProjectSpec.md (#1487) --- Docs/ProjectSpec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index fa5f7fe05..d5891695f 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -1039,7 +1039,7 @@ The different actions share some properties: - [ ] **askForAppToLaunch**: **Bool** - `run` and `profile` actions can define the executable set to ask to launch. This defaults to false. - [ ] **launchAutomaticallySubstyle**: **String** - `run` action can define the launch automatically substyle ('2' for extensions). - [ ] **storeKitConfiguration**: **String** - `run` action can specify a storekit configuration. See [Options](#options). -- [ ] **macroExpansion**: **String** - `run` and `test` action can define the macro expansion from other target. This defaults to nil. +- [ ] **macroExpansion**: **String** - `run` and `test` actions can define the macro expansion from other target. This defaults to nil. ### Execution Action From d5656b6e4064df5ca9e9ff406a5396551e5e3037 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Thu, 29 Aug 2024 20:54:35 +1000 Subject: [PATCH 252/284] Fix typo "suger" -> "sugar" (#1499) Love the tool. Noticed a little typo in the docs. Thanks! --- Docs/ProjectSpec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index d5891695f..5dfec8f3d 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -1071,7 +1071,7 @@ A target can be one of a 2 types: - **name**: **String** - The name of the target. - **target**: **[Testable Target Reference](#testable-target-reference)** - The information of the target. You can specify more detailed information than `name:`. -As syntax suger, you can also specify **[Testable Target Reference](#testable-target-reference)** without `target`. +As syntax sugar, you can also specify **[Testable Target Reference](#testable-target-reference)** without `target`. #### Other Parameters From 2cf88e8088b6c1531080b10d2bfb169e2dc22379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=2E=20St=C3=B8vring?= Date: Thu, 12 Sep 2024 03:33:30 +0200 Subject: [PATCH 253/284] Runs pre-gen command before validating project (#1500) --- Sources/XcodeGenCLI/Commands/GenerateCommand.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift index 385846e5d..8ae7ba860 100644 --- a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift +++ b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift @@ -69,6 +69,11 @@ class GenerateCommand: ProjectCommand { } } + // run pre gen command + if let command = project.options.preGenCommand { + try Task.run(bash: command, directory: projectDirectory.absolute().string) + } + // validate project do { try project.validateMinimumXcodeGenVersion(version) @@ -77,11 +82,6 @@ class GenerateCommand: ProjectCommand { throw GenerationError.validationError(error) } - // run pre gen command - if let command = project.options.preGenCommand { - try Task.run(bash: command, directory: projectDirectory.absolute().string) - } - // generate plists info("⚙️ Generating plists...") let fileWriter = FileWriter(project: project) From a51a548a83e5644ffc839c9066d27331d560d2b6 Mon Sep 17 00:00:00 2001 From: Marcos Griselli <14804033+marcosgriselli@users.noreply.github.com> Date: Sun, 27 Oct 2024 02:34:50 -0700 Subject: [PATCH 254/284] Skip failing test on Linux until upstream fix (#1517) * Skip failing test on Linux * Skip more tests * Skip more tests * One more skip --- Sources/TestSupport/TestHelpers.swift | 8 ++++++++ Tests/FixtureTests/FixtureTests.swift | 3 ++- Tests/PerformanceTests/PerformanceTests.swift | 3 +++ Tests/XcodeGenKitTests/ProjectGeneratorTests.swift | 3 ++- Tests/XcodeGenKitTests/SchemeGeneratorTests.swift | 3 ++- Tests/XcodeGenKitTests/SourceGeneratorTests.swift | 3 ++- 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Sources/TestSupport/TestHelpers.swift b/Sources/TestSupport/TestHelpers.swift index 62cbaab33..757856dff 100644 --- a/Sources/TestSupport/TestHelpers.swift +++ b/Sources/TestSupport/TestHelpers.swift @@ -124,3 +124,11 @@ extension XCTestCase { describe(name, test) } } + + +public func skipIfNecessary() throws { + #if os(Linux) && swift(<6.0.2) + // https://github.com/swiftlang/swift-foundation/pull/1002 + throw XCTSkip("Skipping test on Linux until PropertyListDecoder issues are fixed.") + #endif +} \ No newline at end of file diff --git a/Tests/FixtureTests/FixtureTests.swift b/Tests/FixtureTests/FixtureTests.swift index 19cdcdb05..c638098f7 100644 --- a/Tests/FixtureTests/FixtureTests.swift +++ b/Tests/FixtureTests/FixtureTests.swift @@ -8,7 +8,8 @@ import TestSupport class FixtureTests: XCTestCase { - func testProjectFixture() { + func testProjectFixture() throws { + try skipIfNecessary() describe { $0.it("generates Test Project") { try generateXcodeProject(specPath: fixturePath + "TestProject/AnotherProject/project.yml") diff --git a/Tests/PerformanceTests/PerformanceTests.swift b/Tests/PerformanceTests/PerformanceTests.swift index 48f604c04..c1a3d2b03 100644 --- a/Tests/PerformanceTests/PerformanceTests.swift +++ b/Tests/PerformanceTests/PerformanceTests.swift @@ -1,6 +1,7 @@ import Foundation import PathKit import ProjectSpec +import TestSupport import XcodeGenKit import XcodeProj import XCTest @@ -62,6 +63,7 @@ class FixturePerformanceTests: XCTestCase { } func testFixtureGeneration() throws { + try skipIfNecessary() let project = try Project(path: specPath) measure { let generator = ProjectGenerator(project: project) @@ -70,6 +72,7 @@ class FixturePerformanceTests: XCTestCase { } func testFixtureWriting() throws { + try skipIfNecessary() let project = try Project(path: specPath) let generator = ProjectGenerator(project: project) let xcodeProject = try generator.generateXcodeProject(userName: "someUser") diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 5db44698a..194dc0823 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -275,7 +275,8 @@ class ProjectGeneratorTests: XCTestCase { } } - func testTargets() { + func testTargets() throws { + try skipIfNecessary() describe { let project = Project(name: "test", targets: targets) diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index 07f63a925..3aad22c5e 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -41,7 +41,8 @@ private let uiTest = Target( class SchemeGeneratorTests: XCTestCase { - func testSchemes() { + func testSchemes() throws { + try skipIfNecessary() describe { let buildTarget = Scheme.BuildTarget(target: .local(app.name)) diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index 89405629c..bdf955cef 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -9,7 +9,8 @@ import TestSupport class SourceGeneratorTests: XCTestCase { - func testSourceGenerator() { + func testSourceGenerator() throws { + try skipIfNecessary() describe { let directoryPath = Path("TestDirectory") From 126339f1c8ad9a78a4270f243ad7840cf626aa11 Mon Sep 17 00:00:00 2001 From: Dale <1363082+dalemyers@users.noreply.github.com> Date: Mon, 2 Dec 2024 21:44:05 +0000 Subject: [PATCH 255/284] Run preGenCommand before checking the cache (#1519) The preGenCommand may generate files, change paths, etc. If we run this after checking the cache, it never gets the chance to run if the cache hasn't changed. Running it before checking the cache lets us make these changes and _then_ we can check the cache to see if we need to regenerate or not. Co-authored-by: Dale Myers --- Sources/XcodeGenCLI/Commands/GenerateCommand.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift index 8ae7ba860..8b7e27b5c 100644 --- a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift +++ b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift @@ -39,6 +39,11 @@ class GenerateCommand: ProjectCommand { let projectPath = projectDirectory + "\(project.name).xcodeproj" + // run pre gen command before we use the cache as the scripts may change it + if let command = project.options.preGenCommand { + try Task.run(bash: command, directory: projectDirectory.absolute().string) + } + let cacheFilePath = self.cacheFilePath ?? Path("~/.xcodegen/cache/\(projectSpecPath.absolute().string.md5)").absolute() var cacheFile: CacheFile? @@ -69,11 +74,6 @@ class GenerateCommand: ProjectCommand { } } - // run pre gen command - if let command = project.options.preGenCommand { - try Task.run(bash: command, directory: projectDirectory.absolute().string) - } - // validate project do { try project.validateMinimumXcodeGenVersion(version) From 681e320867ef43ff23b4dcf2bf277c832f5b00cb Mon Sep 17 00:00:00 2001 From: Zewu Chen <39866572+zewuchen@users.noreply.github.com> Date: Sun, 29 Dec 2024 01:19:06 -0300 Subject: [PATCH 256/284] Add improvement of performance in SpecValidation on validateSettings (#1522) --- Sources/ProjectSpec/SpecValidation.swift | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Sources/ProjectSpec/SpecValidation.swift b/Sources/ProjectSpec/SpecValidation.swift index a34fb3d4e..3cb9d8aac 100644 --- a/Sources/ProjectSpec/SpecValidation.swift +++ b/Sources/ProjectSpec/SpecValidation.swift @@ -17,27 +17,30 @@ extension Project { errors.append(.invalidSettingsGroup(group)) } } + for config in settings.configSettings.keys { - if !configs.contains(where: { $0.name.lowercased().contains(config.lowercased()) }) { - if !options.disabledValidations.contains(.missingConfigs) { - errors.append(.invalidBuildSettingConfig(config)) - } + if !configs.contains(where: { $0.name.lowercased().contains(config.lowercased()) }), + !options.disabledValidations.contains(.missingConfigs) { + errors.append(.invalidBuildSettingConfig(config)) } } if settings.buildSettings.count == configs.count { var allConfigs = true - for buildSetting in settings.buildSettings.keys { + outerLoop: for buildSetting in settings.buildSettings.keys { var isConfig = false for config in configs { if config.name.lowercased().contains(buildSetting.lowercased()) { isConfig = true + break } } if !isConfig { allConfigs = false + break outerLoop } } + if allConfigs { errors.append(.invalidPerConfigSettings) } From 1aa7e281b7a09d8c45fca6635f9020eba36add92 Mon Sep 17 00:00:00 2001 From: Marcos Griselli <14804033+marcosgriselli@users.noreply.github.com> Date: Sat, 28 Dec 2024 20:57:28 -0800 Subject: [PATCH 257/284] Fix Swift 6 warnings (#1513) --- Sources/ProjectSpec/Decoding.swift | 13 +++++++++++-- Sources/ProjectSpec/Scheme.swift | 4 ++-- Sources/ProjectSpec/SwiftPackage.swift | 2 +- Sources/ProjectSpec/VersionExtensions.swift | 2 +- Sources/XcodeGenCLI/Arguments.swift | 2 +- Sources/XcodeGenKit/CarthageVersionLoader.swift | 2 +- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Sources/ProjectSpec/Decoding.swift b/Sources/ProjectSpec/Decoding.swift index 24d158d91..e193a7f10 100644 --- a/Sources/ProjectSpec/Decoding.swift +++ b/Sources/ProjectSpec/Decoding.swift @@ -13,14 +13,15 @@ extension Dictionary where Key: JSONKey { let keys = Array(dictionary.keys) var itemResults: [Result] = Array(repeating: .failure(defaultError), count: keys.count) itemResults.withUnsafeMutableBufferPointer { buffer in + let bufferWrapper = BufferWrapper(buffer: buffer) DispatchQueue.concurrentPerform(iterations: dictionary.count) { idx in do { let key = keys[idx] let jsonDictionary: JSONDictionary = try dictionary.json(atKeyPath: .key(key)) let item = try T(name: key, jsonDictionary: jsonDictionary) - buffer[idx] = .success(item) + bufferWrapper.buffer[idx] = .success(item) } catch { - buffer[idx] = .failure(error) + bufferWrapper.buffer[idx] = .failure(error) } } } @@ -49,6 +50,14 @@ extension Dictionary where Key: JSONKey { } } +private final class BufferWrapper: @unchecked Sendable { + var buffer: UnsafeMutableBufferPointer + + init(buffer: UnsafeMutableBufferPointer) { + self.buffer = buffer + } +} + public protocol NamedJSONDictionaryConvertible { init(name: String, jsonDictionary: JSONDictionary) throws diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index a476b71a6..204d05c35 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -878,7 +878,7 @@ extension Scheme.Build: JSONEncodable { } } -extension BuildType: JSONPrimitiveConvertible { +extension BuildType: JSONUtilities.JSONPrimitiveConvertible { public typealias JSONType = String @@ -910,7 +910,7 @@ extension BuildType: JSONEncodable { } } -extension XCScheme.EnvironmentVariable: JSONObjectConvertible { +extension XCScheme.EnvironmentVariable: JSONUtilities.JSONObjectConvertible { public static let enabledDefault = true private static func parseValue(_ value: Any) -> String { diff --git a/Sources/ProjectSpec/SwiftPackage.swift b/Sources/ProjectSpec/SwiftPackage.swift index 216a60617..55e273b98 100644 --- a/Sources/ProjectSpec/SwiftPackage.swift +++ b/Sources/ProjectSpec/SwiftPackage.swift @@ -101,7 +101,7 @@ extension SwiftPackage: JSONEncodable { } } -extension SwiftPackage.VersionRequirement: JSONObjectConvertible { +extension SwiftPackage.VersionRequirement: JSONUtilities.JSONObjectConvertible { public init(jsonDictionary: JSONDictionary) throws { if jsonDictionary["exactVersion"] != nil { diff --git a/Sources/ProjectSpec/VersionExtensions.swift b/Sources/ProjectSpec/VersionExtensions.swift index 0b67ce605..3ab52d65a 100644 --- a/Sources/ProjectSpec/VersionExtensions.swift +++ b/Sources/ProjectSpec/VersionExtensions.swift @@ -8,7 +8,7 @@ import Foundation import Version -extension Version: ExpressibleByStringLiteral { +extension Version: Swift.ExpressibleByStringLiteral { public static func parse(_ string: String) throws -> Version { if let version = Version(tolerant: string) { diff --git a/Sources/XcodeGenCLI/Arguments.swift b/Sources/XcodeGenCLI/Arguments.swift index fef7c7981..88f6c34f7 100644 --- a/Sources/XcodeGenCLI/Arguments.swift +++ b/Sources/XcodeGenCLI/Arguments.swift @@ -2,7 +2,7 @@ import Foundation import PathKit import SwiftCLI -extension Path: ConvertibleFromString { +extension Path: SwiftCLI.ConvertibleFromString { public init?(input: String) { self.init(input) diff --git a/Sources/XcodeGenKit/CarthageVersionLoader.swift b/Sources/XcodeGenKit/CarthageVersionLoader.swift index 4a15a634a..20eb26079 100644 --- a/Sources/XcodeGenKit/CarthageVersionLoader.swift +++ b/Sources/XcodeGenKit/CarthageVersionLoader.swift @@ -73,7 +73,7 @@ struct CarthageVersionFile: Decodable { } } -extension Platform: CodingKey { +extension Platform: Swift.CodingKey { public var stringValue: String { carthageName From 5644662e5be9ab3b1a4416ccf992e12734662059 Mon Sep 17 00:00:00 2001 From: Juri Pakaste Date: Sun, 29 Dec 2024 15:41:41 +0200 Subject: [PATCH 258/284] Respect relativePaths in local package paths (#1498) * Respect relativePaths in local package paths Before this a local package defined in an included file would not respect relativePaths: true. This fixes #1497. * Test local package with relative path * add relative paths support to localPackages syntax --------- Co-authored-by: Yonas Kolb --- Sources/ProjectSpec/Project.swift | 2 ++ Sources/ProjectSpec/SwiftPackage.swift | 10 ++++++++++ .../paths_test/included_paths_test.yml | 2 ++ .../LocalPackage/.gitignore | 8 ++++++++ .../LocalPackage/Package.swift | 20 +++++++++++++++++++ .../Sources/LocalPackage/LocalPackage.swift | 2 ++ .../paths_test/relative_local_package/inc.yml | 3 +++ Tests/ProjectSpecTests/SpecLoadingTests.swift | 4 ++++ 8 files changed, 51 insertions(+) create mode 100644 Tests/Fixtures/paths_test/relative_local_package/LocalPackage/.gitignore create mode 100644 Tests/Fixtures/paths_test/relative_local_package/LocalPackage/Package.swift create mode 100644 Tests/Fixtures/paths_test/relative_local_package/LocalPackage/Sources/LocalPackage/LocalPackage.swift create mode 100644 Tests/Fixtures/paths_test/relative_local_package/inc.yml diff --git a/Sources/ProjectSpec/Project.swift b/Sources/ProjectSpec/Project.swift index aa873bcfe..201cd0f88 100644 --- a/Sources/ProjectSpec/Project.swift +++ b/Sources/ProjectSpec/Project.swift @@ -241,6 +241,8 @@ extension Project: PathContainer { .object("aggregateTargets", AggregateTarget.pathProperties), .object("schemes", Scheme.pathProperties), .object("projectReferences", ProjectReference.pathProperties), + .object("packages", SwiftPackage.pathProperties), + .string("localPackages") ] } } diff --git a/Sources/ProjectSpec/SwiftPackage.swift b/Sources/ProjectSpec/SwiftPackage.swift index 55e273b98..e82ea2c0e 100644 --- a/Sources/ProjectSpec/SwiftPackage.swift +++ b/Sources/ProjectSpec/SwiftPackage.swift @@ -127,3 +127,13 @@ extension SwiftPackage.VersionRequirement: JSONUtilities.JSONObjectConvertible { } } } + +extension SwiftPackage: PathContainer { + static var pathProperties: [PathProperty] { + [ + .dictionary([ + .string("path"), + ]), + ] + } +} diff --git a/Tests/Fixtures/paths_test/included_paths_test.yml b/Tests/Fixtures/paths_test/included_paths_test.yml index a8d4fbb0e..2fe651969 100644 --- a/Tests/Fixtures/paths_test/included_paths_test.yml +++ b/Tests/Fixtures/paths_test/included_paths_test.yml @@ -1,6 +1,8 @@ include: - recursive_test/recursive_test.yml - same_relative_path_test/same_relative_path_test.yml + - path: relative_local_package/inc.yml + relativePaths: true configFiles: IncludedConfig: config projectReferences: diff --git a/Tests/Fixtures/paths_test/relative_local_package/LocalPackage/.gitignore b/Tests/Fixtures/paths_test/relative_local_package/LocalPackage/.gitignore new file mode 100644 index 000000000..0023a5340 --- /dev/null +++ b/Tests/Fixtures/paths_test/relative_local_package/LocalPackage/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/Tests/Fixtures/paths_test/relative_local_package/LocalPackage/Package.swift b/Tests/Fixtures/paths_test/relative_local_package/LocalPackage/Package.swift new file mode 100644 index 000000000..84af3c9f8 --- /dev/null +++ b/Tests/Fixtures/paths_test/relative_local_package/LocalPackage/Package.swift @@ -0,0 +1,20 @@ +// swift-tools-version: 5.7 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "LocalPackage", + products: [ + // Products define the executables and libraries a package produces, making them visible to other packages. + .library( + name: "LocalPackage", + targets: ["LocalPackage"] + ) + ], + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .target(name: "LocalPackage") + ] +) diff --git a/Tests/Fixtures/paths_test/relative_local_package/LocalPackage/Sources/LocalPackage/LocalPackage.swift b/Tests/Fixtures/paths_test/relative_local_package/LocalPackage/Sources/LocalPackage/LocalPackage.swift new file mode 100644 index 000000000..08b22b80f --- /dev/null +++ b/Tests/Fixtures/paths_test/relative_local_package/LocalPackage/Sources/LocalPackage/LocalPackage.swift @@ -0,0 +1,2 @@ +// The Swift Programming Language +// https://docs.swift.org/swift-book diff --git a/Tests/Fixtures/paths_test/relative_local_package/inc.yml b/Tests/Fixtures/paths_test/relative_local_package/inc.yml new file mode 100644 index 000000000..5f3bd94be --- /dev/null +++ b/Tests/Fixtures/paths_test/relative_local_package/inc.yml @@ -0,0 +1,3 @@ +packages: + LocalPackage: + path: LocalPackage diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 6a81c0907..055088f9d 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -193,6 +193,10 @@ class SpecLoadingTests: XCTestCase { test: .init(testPlans: [.init(path: "paths_test/TestPlan.xctestplan")]) ) ] + + try expect(project.packages) == [ + "LocalPackage": .local(path: "paths_test/relative_local_package/LocalPackage", group: nil), + ] } $0.it("respects directory expansion preference") { From 2f1fbf2a91f0c1d2e9d19a1379c34e619667fc6b Mon Sep 17 00:00:00 2001 From: Ilja Iwas <2284114+iljaiwas@users.noreply.github.com> Date: Mon, 17 Feb 2025 05:52:50 +0100 Subject: [PATCH 259/284] add rule to copy app extensions ('.appex') to product's Plugins directory (#1531) --- Sources/ProjectSpec/BuildPhaseSpec.swift | 6 ++++++ Sources/ProjectSpec/FileType.swift | 1 + 2 files changed, 7 insertions(+) diff --git a/Sources/ProjectSpec/BuildPhaseSpec.swift b/Sources/ProjectSpec/BuildPhaseSpec.swift index 716e1bec8..6227ced02 100644 --- a/Sources/ProjectSpec/BuildPhaseSpec.swift +++ b/Sources/ProjectSpec/BuildPhaseSpec.swift @@ -27,6 +27,12 @@ public enum BuildPhaseSpec: Equatable { phaseOrder: .postCompile ) + public static let plugins = CopyFilesSettings( + destination: .plugins, + subpath: "$(CONTENTS_FOLDER_PATH)/PlugIns", + phaseOrder: .postCompile + ) + public enum Destination: String { case absolutePath case productsDirectory diff --git a/Sources/ProjectSpec/FileType.swift b/Sources/ProjectSpec/FileType.swift index 185ac9515..361fba0c4 100644 --- a/Sources/ProjectSpec/FileType.swift +++ b/Sources/ProjectSpec/FileType.swift @@ -110,6 +110,7 @@ extension FileType { // copyfiles "xpc": FileType(buildPhase: .copyFiles(.xpcServices)), + "appex": FileType(buildPhase: .copyFiles(.plugins)), // no build phase (not resources) "xcconfig": FileType(buildPhase: BuildPhaseSpec.none), From b1e03f0f4635bce6f7922bf7cf2ad4921f02d211 Mon Sep 17 00:00:00 2001 From: Steven Sheldon Date: Sun, 16 Feb 2025 21:01:59 -0800 Subject: [PATCH 260/284] Fix checking optional group existence relative to the working dir (#1529) --- Sources/XcodeGenKit/SourceGenerator.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index 7ed90b3d6..0b8f93b70 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -664,7 +664,7 @@ class SourceGenerator { sourceFiles.append(sourceFile) case .group: - if targetSource.optional && !Path(targetSource.path).exists { + if targetSource.optional && !path.exists { // This group is missing, so if's optional just return an empty array return [] } From 434dfeca2e54100497e558bd324c4f4c3ac3478b Mon Sep 17 00:00:00 2001 From: Maxim Krouk <40476363+maximkrouk@users.noreply.github.com> Date: Mon, 17 Feb 2025 06:08:54 +0100 Subject: [PATCH 261/284] Add excludeFromProject option for local packages (#1512) --- .gitignore | 1 + Docs/ProjectSpec.md | 2 + Sources/ProjectSpec/Project.swift | 2 +- Sources/ProjectSpec/SpecValidation.swift | 2 +- Sources/ProjectSpec/SwiftPackage.swift | 13 +++-- Sources/XcodeGenKit/PBXProjGenerator.swift | 10 ++-- Sources/XcodeGenKit/SchemeGenerator.swift | 2 +- Tests/ProjectSpecTests/ProjectSpecTests.swift | 2 +- Tests/ProjectSpecTests/SpecLoadingTests.swift | 10 ++-- .../PBXProjGeneratorTests.swift | 6 +- .../ProjectGeneratorTests.swift | 56 ++++++++++++++++--- .../SchemeGeneratorTests.swift | 4 +- 12 files changed, 79 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index cf9a40a53..cb21d3e8f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ XcodeGen.xcodeproj xcodegen.zip xcodegen.artifactbundle.zip .vscode/launch.json +DerivedData diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 5dfec8f3d..6780e13d8 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -1246,6 +1246,7 @@ Swift packages are defined at a project level, and then linked to individual tar - [x] **path**: **String** - the path to the package in local. The path must be directory with a `Package.swift`. - [ ] **group** : **String**- Optional path that specifies the location where the package will live in your xcode project. Use `""` to specify the project root. +- [ ] **excludeFromProject** : **String**- Optional flag to exclude the package from the generated project (useful if the package is already added via xcworkspace and the project is not intended for standalone use), defaults to `false` ```yml packages: @@ -1260,6 +1261,7 @@ packages: AppFeature: path: ../Packages group: Domains/AppFeature + excludeFromProject: false ``` ## Project Reference diff --git a/Sources/ProjectSpec/Project.swift b/Sources/ProjectSpec/Project.swift index 201cd0f88..527a7b9ab 100644 --- a/Sources/ProjectSpec/Project.swift +++ b/Sources/ProjectSpec/Project.swift @@ -202,7 +202,7 @@ extension Project { packages.merge(localPackages.reduce(into: [String: SwiftPackage]()) { // Project name will be obtained by resolved abstractpath's lastComponent for dealing with some path case, like "../" let packageName = (basePath + Path($1).normalize()).lastComponent - $0[packageName] = .local(path: $1, group: nil) + $0[packageName] = .local(path: $1, group: nil, excludeFromProject: false) } ) } diff --git a/Sources/ProjectSpec/SpecValidation.swift b/Sources/ProjectSpec/SpecValidation.swift index 3cb9d8aac..4aa9c7926 100644 --- a/Sources/ProjectSpec/SpecValidation.swift +++ b/Sources/ProjectSpec/SpecValidation.swift @@ -57,7 +57,7 @@ extension Project { } for (name, package) in packages { - if case let .local(path, _) = package, !(basePath + Path(path).normalize()).exists { + if case let .local(path, _, _) = package, !(basePath + Path(path).normalize()).exists { errors.append(.invalidLocalPackage(name)) } } diff --git a/Sources/ProjectSpec/SwiftPackage.swift b/Sources/ProjectSpec/SwiftPackage.swift index e82ea2c0e..0e752c5f2 100644 --- a/Sources/ProjectSpec/SwiftPackage.swift +++ b/Sources/ProjectSpec/SwiftPackage.swift @@ -10,7 +10,7 @@ public enum SwiftPackage: Equatable { static let githubPrefix = "https://github.com/" case remote(url: String, versionRequirement: VersionRequirement) - case local(path: String, group: String?) + case local(path: String, group: String?, excludeFromProject: Bool) public var isLocal: Bool { if case .local = self { @@ -23,10 +23,10 @@ public enum SwiftPackage: Equatable { extension SwiftPackage: JSONObjectConvertible { public init(jsonDictionary: JSONDictionary) throws { - if let path: String = jsonDictionary.json(atKeyPath: "path"), let customLocation: String = jsonDictionary.json(atKeyPath: "group") { - self = .local(path: path, group: customLocation) - } else if let path: String = jsonDictionary.json(atKeyPath: "path") { - self = .local(path: path, group: nil) + if let path: String = jsonDictionary.json(atKeyPath: "path") { + let customLocation: String? = jsonDictionary.json(atKeyPath: "group") + let excludeFromProject: Bool = jsonDictionary.json(atKeyPath: "excludeFromProject") ?? false + self = .local(path: path, group: customLocation, excludeFromProject: excludeFromProject) } else { let versionRequirement: VersionRequirement = try VersionRequirement(jsonDictionary: jsonDictionary) try Self.validateVersion(versionRequirement: versionRequirement) @@ -92,9 +92,10 @@ extension SwiftPackage: JSONEncodable { dictionary["revision"] = revision } return dictionary - case let .local(path, group): + case let .local(path, group, excludeFromProject): dictionary["path"] = path dictionary["group"] = group + dictionary["excludeFromProject"] = excludeFromProject } return dictionary diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index a5f667afd..f4d486a04 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -169,12 +169,14 @@ public class PBXProjGenerator { let packageReference = XCRemoteSwiftPackageReference(repositoryURL: url, versionRequirement: versionRequirement) packageReferences[name] = packageReference addObject(packageReference) - case let .local(path, group): + case let .local(path, group, excludeFromProject): let packageReference = XCLocalSwiftPackageReference(relativePath: path) localPackageReferences[name] = packageReference - addObject(packageReference) - - try sourceGenerator.createLocalPackage(path: Path(path), group: group.map { Path($0) }) + + if !excludeFromProject { + addObject(packageReference) + try sourceGenerator.createLocalPackage(path: Path(path), group: group.map { Path($0) }) + } } } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index ac100e89f..90ef213ad 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -173,7 +173,7 @@ public class SchemeGenerator { switch target.location { case .package(let packageName): guard let package = self.project.getPackage(packageName), - case let .local(path, _) = package else { + case let .local(path, _, _) = package else { throw SchemeGenerationError.missingPackage(packageName) } return XCScheme.BuildableReference( diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 08a9f0c37..311597ad2 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -137,7 +137,7 @@ class ProjectSpecTests: XCTestCase { project.settings = invalidSettings project.configFiles = ["invalidConfig": "invalidConfigFile"] project.fileGroups = ["invalidFileGroup"] - project.packages = ["invalidLocalPackage": .local(path: "invalidLocalPackage", group: nil)] + project.packages = ["invalidLocalPackage": .local(path: "invalidLocalPackage", group: nil, excludeFromProject: false)] project.settingGroups = ["settingGroup1": Settings( configSettings: ["invalidSettingGroupConfig": [:]], groups: ["invalidSettingGroupSettingGroup"] diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 055088f9d..7a00f65ef 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -1489,10 +1489,10 @@ class SpecLoadingTests: XCTestCase { "package6": .remote(url: "package.git", versionRequirement: .range(from: "1.2.0", to: "1.2.5")), "package7": .remote(url: "package.git", versionRequirement: .exact("1.2.2")), "package8": .remote(url: "package.git", versionRequirement: .upToNextMajorVersion("4.0.0-beta.5")), - "package9": .local(path: "package/package", group: nil), + "package9": .local(path: "package/package", group: nil, excludeFromProject: false), "package10": .remote(url: "https://github.com/yonaskolb/XcodeGen", versionRequirement: .exact("1.2.2")), - "XcodeGen": .local(path: "../XcodeGen", group: nil), - "package11": .local(path: "../XcodeGen", group: "Packages/Feature"), + "XcodeGen": .local(path: "../XcodeGen", group: nil, excludeFromProject: false), + "package11": .local(path: "../XcodeGen", group: "Packages/Feature", excludeFromProject: false), ], options: .init(localPackagesGroup: "MyPackages")) let dictionary: [String: Any] = [ @@ -1521,8 +1521,8 @@ class SpecLoadingTests: XCTestCase { $0.it("parses old local package format") { let project = Project(name: "spm", packages: [ - "XcodeGen": .local(path: "../XcodeGen", group: nil), - "Yams": .local(path: "Yams", group: nil), + "XcodeGen": .local(path: "../XcodeGen", group: nil, excludeFromProject: false), + "Yams": .local(path: "Yams", group: nil, excludeFromProject: false), ], options: .init(localPackagesGroup: "MyPackages")) let dictionary: [String: Any] = [ diff --git a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift index b067fa564..31873cdcf 100644 --- a/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/PBXProjGeneratorTests.swift @@ -325,9 +325,9 @@ class PBXProjGeneratorTests: XCTestCase { name: "Test", targets: [target], packages: [ - "Common": .local(path: "Packages/Common", group: nil), - "FeatureA": .local(path: "Packages/FeatureA", group: nil), - "FeatureB": .local(path: "Packages/FeatureB", group: nil), + "Common": .local(path: "Packages/Common", group: nil, excludeFromProject: false), + "FeatureA": .local(path: "Packages/FeatureA", group: nil, excludeFromProject: false), + "FeatureB": .local(path: "Packages/FeatureB", group: nil, excludeFromProject: false), ], options: options ) diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 194dc0823..64f9f5e4c 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -1548,7 +1548,7 @@ class ProjectGeneratorTests: XCTestCase { let project = Project(name: "test", targets: [app], packages: [ "XcodeGen": .remote(url: "http://github.com/yonaskolb/XcodeGen", versionRequirement: .branch("master")), "Codability": .remote(url: "http://github.com/yonaskolb/Codability", versionRequirement: .exact("1.0.0")), - "Yams": .local(path: "../Yams", group: nil), + "Yams": .local(path: "../Yams", group: nil, excludeFromProject: false), ], options: .init(localPackagesGroup: "MyPackages")) let pbxProject = try project.generatePbxProj(specValidate: false) @@ -1581,7 +1581,7 @@ class ProjectGeneratorTests: XCTestCase { ] ) - let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen", group: nil)]) + let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen", group: nil, excludeFromProject: false)]) let pbxProject = try project.generatePbxProj(specValidate: false) let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) @@ -1604,7 +1604,49 @@ class ProjectGeneratorTests: XCTestCase { try expect(file.product?.productName) == "XcodeGen" } - + + $0.it("excludes local swift packages from generated project if needed") { + let app = Target( + name: "MyApp", + type: .application, + platform: .iOS, + dependencies: [ + Dependency(type: .package(products: ["XcodeGen"]), reference: "XcodeGen"), + ] + ) + + let project = Project( + name: "test", + targets: [app], + packages: [ + "XcodeGen": .local( + path: "../XcodeGen", + group: nil, + excludeFromProject: true + ) + ] + ) + + let pbxProject = try project.generatePbxProj(specValidate: false) + let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) + let localPackageFile = pbxProject.fileReferences.first(where: { $0.path == "../XcodeGen" }) + + try expect(localPackageFile).to.beNil() + try expect(pbxProject.rootObject?.localPackages.count) == 0 + + let frameworkPhases = nativeTarget.buildPhases.compactMap { $0 as? PBXFrameworksBuildPhase } + + guard let frameworkPhase = frameworkPhases.first else { + return XCTFail("frameworkPhases should have more than one") + } + + guard let file = frameworkPhase.files?.first else { + return XCTFail("frameworkPhase should have file") + } + + try expect(file.product?.productName) == "XcodeGen" + } + $0.it("generates local swift packages with custom xcode path") { let app = Target( name: "MyApp", @@ -1616,7 +1658,7 @@ class ProjectGeneratorTests: XCTestCase { ) let customLocalPackageGroup = "Packages/Feature" - let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen", group: customLocalPackageGroup)]) + let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen", group: customLocalPackageGroup, excludeFromProject: false)]) let pbxProject = try project.generatePbxProj(specValidate: false) let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) @@ -1657,7 +1699,7 @@ class ProjectGeneratorTests: XCTestCase { ] ) - let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen", group: "")]) + let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen", group: "", excludeFromProject: false)]) let pbxProject = try project.generatePbxProj(specValidate: false) let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) @@ -1691,7 +1733,7 @@ class ProjectGeneratorTests: XCTestCase { ] ) - let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen", group: nil)], options: .init(localPackagesGroup: "")) + let project = Project(name: "test", targets: [app], packages: ["XcodeGen": .local(path: "../XcodeGen", group: nil, excludeFromProject: false)], options: .init(localPackagesGroup: "")) let pbxProject = try project.generatePbxProj(specValidate: false) let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) @@ -1867,7 +1909,7 @@ class ProjectGeneratorTests: XCTestCase { ) let project = Project(name: "test", targets: [app], packages: [ - "FooFeature": .local(path: "../FooFeature", group: nil) + "FooFeature": .local(path: "../FooFeature", group: nil, excludeFromProject: false) ], options: .init(localPackagesGroup: "MyPackages")) let pbxProject = try project.generatePbxProj(specValidate: false) diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index 3aad22c5e..d75272008 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -406,7 +406,7 @@ class SchemeGeneratorTests: XCTestCase { name: "test", targets: [framework], schemes: [scheme], - packages: ["XcodeGen": .local(path: "../", group: nil)], + packages: ["XcodeGen": .local(path: "../", group: nil, excludeFromProject: false)], projectReferences: [ ProjectReference(name: "TestProject", path: externalProject.string), ] @@ -570,7 +570,7 @@ class SchemeGeneratorTests: XCTestCase { let project = Project( name: "ios_test", targets: [app], - packages: ["XcodeGen": .local(path: "../", group: nil)] + packages: ["XcodeGen": .local(path: "../", group: nil, excludeFromProject: false)] ) let xcodeProject = try project.generateXcodeProject() let xcscheme = try unwrap(xcodeProject.sharedData?.schemes.first) From 05c36c39fe5a7fa873162f7a6c292b10291d82f7 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Mon, 17 Feb 2025 16:18:41 +1100 Subject: [PATCH 262/284] fix package init --- Tests/ProjectSpecTests/SpecLoadingTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 7a00f65ef..bc332e722 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -195,7 +195,7 @@ class SpecLoadingTests: XCTestCase { ] try expect(project.packages) == [ - "LocalPackage": .local(path: "paths_test/relative_local_package/LocalPackage", group: nil), + "LocalPackage": .local(path: "paths_test/relative_local_package/LocalPackage", group: nil, excludeFromProject: false), ] } From d1d04e8e638f10786fb9eb53dea2e97869422180 Mon Sep 17 00:00:00 2001 From: Alexandr Goncharov Date: Mon, 17 Feb 2025 08:29:25 +0300 Subject: [PATCH 263/284] Update package version (#1489) * Require swift tools version 5.9 * Update changelog * Use github workflow --------- Co-authored-by: Yonas Kolb --- .github/workflows/ci.yml | 32 +++++++++++------------ CHANGELOG.md | 4 +++ Package.swift | 56 ++++++++++++++++++++-------------------- 3 files changed, 48 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c41ae63e..856bdb52b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,26 +8,26 @@ jobs: name: Xcode ${{ matrix.xcode }} strategy: matrix: - xcode: ["14.3.1"] + xcode: ["15.3"] include: - - xcode: "14.3.1" - macos: macos-13 + - xcode: "15.3" + macos: macos-14 env: DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer steps: - - uses: actions/checkout@master - - name: Resolve - run: swift package resolve - - name: Build - run: swift build - - name: Test - run: set -o pipefail && swift test 2>&1 | xcpretty - - name: Gen fixtures - run: scripts/gen-fixtures.sh - - name: Check fixtures - run: scripts/diff-fixtures.sh - - name: Build fixtures - run: scripts/build-fixtures.sh + - uses: actions/checkout@master + - name: Resolve + run: swift package resolve + - name: Build + run: swift build + - name: Test + run: set -o pipefail && swift test 2>&1 | xcpretty + - name: Gen fixtures + run: scripts/gen-fixtures.sh + - name: Check fixtures + run: scripts/diff-fixtures.sh + - name: Build fixtures + run: scripts/build-fixtures.sh run-linux: runs-on: ubuntu-latest name: Linux diff --git a/CHANGELOG.md b/CHANGELOG.md index 1892fa416..a1237ff1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next Version +### Fixed + +- Require swift-tools-version 5.9. #1489 @0111b + ## 2.42.0 ### Added diff --git a/Package.swift b/Package.swift index 8e32c5858..ff5c70a61 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.7 +// swift-tools-version:5.9 import PackageDescription @@ -24,69 +24,69 @@ let package = Package( targets: [ .executableTarget(name: "XcodeGen", dependencies: [ "XcodeGenCLI", - "Version", + .product(name: "Version", package: "Version"), ]), .target(name: "XcodeGenCLI", dependencies: [ "XcodeGenKit", "ProjectSpec", - "SwiftCLI", - "Rainbow", - "PathKit", - "Version", + .product(name: "SwiftCLI", package: "SwiftCLI"), + .product(name: "Rainbow", package: "Rainbow"), + .product(name: "PathKit", package: "PathKit"), + .product(name: "Version", package: "Version"), ]), .target(name: "XcodeGenKit", dependencies: [ "ProjectSpec", - "JSONUtilities", - "XcodeProj", - "PathKit", + .product(name: "JSONUtilities", package: "JSONUtilities"), + .product(name: "XcodeProj", package: "XcodeProj"), + .product(name: "PathKit", package: "PathKit"), "XcodeGenCore", ], resources: [ .copy("SettingPresets") ]), .target(name: "ProjectSpec", dependencies: [ - "JSONUtilities", - "XcodeProj", - "Yams", + .product(name: "JSONUtilities", package: "JSONUtilities"), + .product(name: "XcodeProj", package: "XcodeProj"), + .product(name: "Yams", package: "yams"), "XcodeGenCore", - "Version", + .product(name: "Version", package: "Version"), ]), .target(name: "XcodeGenCore", dependencies: [ - "PathKit", - "Yams", + .product(name: "PathKit", package: "PathKit"), + .product(name: "Yams", package: "yams"), ]), .target(name: "TestSupport", dependencies: [ - "XcodeProj", - "Spectre", - "PathKit", + .product(name: "XcodeProj", package: "XcodeProj"), + .product(name: "Spectre", package: "Spectre"), + .product(name: "PathKit", package: "PathKit"), ]), .testTarget(name: "XcodeGenKitTests", dependencies: [ "XcodeGenKit", - "Spectre", - "PathKit", + .product(name: "Spectre", package: "Spectre"), + .product(name: "PathKit", package: "PathKit"), "TestSupport", ]), .testTarget(name: "FixtureTests", dependencies: [ "XcodeGenKit", - "Spectre", - "PathKit", + .product(name: "Spectre", package: "Spectre"), + .product(name: "PathKit", package: "PathKit"), "TestSupport", ]), .testTarget(name: "XcodeGenCoreTests", dependencies: [ "XcodeGenCore", - "Spectre", - "PathKit", + .product(name: "Spectre", package: "Spectre"), + .product(name: "PathKit", package: "PathKit"), "TestSupport", ]), .testTarget(name: "ProjectSpecTests", dependencies: [ "ProjectSpec", - "Spectre", - "PathKit", + .product(name: "Spectre", package: "Spectre"), + .product(name: "PathKit", package: "PathKit"), "TestSupport", ]), .testTarget(name: "PerformanceTests", dependencies: [ "XcodeGenKit", - "Spectre", - "PathKit", + .product(name: "Spectre", package: "Spectre"), + .product(name: "PathKit", package: "PathKit"), "TestSupport", ]), ] From 68b0d1206fbd593dd2eb461a817619e714ab13db Mon Sep 17 00:00:00 2001 From: Vakhid Betrakhmadov Date: Mon, 17 Feb 2025 06:07:29 +0000 Subject: [PATCH 264/284] Support preferred screen capture format in scheme test action (#1450) * Support preferred screen capture format in scheme test action (resolves #1443) * preferredScreenCaptureFormat decoding test --------- Co-authored-by: Yonas Kolb --- Docs/ProjectSpec.md | 1 + Sources/ProjectSpec/Scheme.swift | 17 ++++++++- Sources/XcodeGenKit/SchemeGenerator.swift | 1 + Tests/ProjectSpecTests/SpecLoadingTests.swift | 6 ++-- .../SchemeGeneratorTests.swift | 36 +++++++++++++++++++ 5 files changed, 58 insertions(+), 3 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 6780e13d8..33fa386c1 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -1064,6 +1064,7 @@ A multiline script can be written using the various YAML multiline methods, for - [ ] **captureScreenshotsAutomatically**: **Bool** - indicates whether screenshots should be captured automatically while UI Testing. This defaults to true. - [ ] **deleteScreenshotsWhenEachTestSucceeds**: **Bool** - whether successful UI tests should cause automatically-captured screenshots to be deleted. If `captureScreenshotsAutomatically` is false, this value is ignored. This defaults to true. - [ ] **testPlans**: **[[Test Plan](#test-plan)]** - List of test plan locations that will be referenced in the scheme. +- [ ] **preferredScreenCaptureFormat**: **String** - automatic screen capture format to use while UI Testing. Possible values are `screenshots`, `screenRecording`. Default is `screenRecording`. #### Test Target A target can be one of a 2 types: diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index 204d05c35..9e4e6171e 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -203,6 +203,7 @@ public struct Scheme: Equatable { public static let debugEnabledDefault = true public static let captureScreenshotsAutomaticallyDefault = true public static let deleteScreenshotsWhenEachTestSucceedsDefault = true + public static let preferredScreenCaptureFormatDefault = XCScheme.TestAction.ScreenCaptureFormat.screenRecording public var config: String? public var gatherCoverageData: Bool @@ -221,6 +222,7 @@ public struct Scheme: Equatable { public var deleteScreenshotsWhenEachTestSucceeds: Bool public var testPlans: [TestPlan] public var macroExpansion: String? + public var preferredScreenCaptureFormat: XCScheme.TestAction.ScreenCaptureFormat public struct TestTarget: Equatable, ExpressibleByStringLiteral { @@ -288,7 +290,8 @@ public struct Scheme: Equatable { customLLDBInit: String? = nil, captureScreenshotsAutomatically: Bool = captureScreenshotsAutomaticallyDefault, deleteScreenshotsWhenEachTestSucceeds: Bool = deleteScreenshotsWhenEachTestSucceedsDefault, - macroExpansion: String? = nil + macroExpansion: String? = nil, + preferredScreenCaptureFormat: XCScheme.TestAction.ScreenCaptureFormat = preferredScreenCaptureFormatDefault ) { self.config = config self.gatherCoverageData = gatherCoverageData @@ -307,6 +310,7 @@ public struct Scheme: Equatable { self.captureScreenshotsAutomatically = captureScreenshotsAutomatically self.deleteScreenshotsWhenEachTestSucceeds = deleteScreenshotsWhenEachTestSucceeds self.macroExpansion = macroExpansion + self.preferredScreenCaptureFormat = preferredScreenCaptureFormat } public var shouldUseLaunchSchemeArgsEnv: Bool { @@ -624,6 +628,7 @@ extension Scheme.Test: JSONObjectConvertible { captureScreenshotsAutomatically = jsonDictionary.json(atKeyPath: "captureScreenshotsAutomatically") ?? Scheme.Test.captureScreenshotsAutomaticallyDefault deleteScreenshotsWhenEachTestSucceeds = jsonDictionary.json(atKeyPath: "deleteScreenshotsWhenEachTestSucceeds") ?? Scheme.Test.deleteScreenshotsWhenEachTestSucceedsDefault macroExpansion = jsonDictionary.json(atKeyPath: "macroExpansion") + preferredScreenCaptureFormat = jsonDictionary.json(atKeyPath: "preferredScreenCaptureFormat") ?? Scheme.Test.preferredScreenCaptureFormatDefault } } @@ -667,6 +672,10 @@ extension Scheme.Test: JSONEncodable { dict["deleteScreenshotsWhenEachTestSucceeds"] = deleteScreenshotsWhenEachTestSucceeds } + if preferredScreenCaptureFormat != Scheme.Test.preferredScreenCaptureFormatDefault { + dict["preferredScreenCaptureFormat"] = preferredScreenCaptureFormat.toJSONValue() + } + return dict } } @@ -1018,3 +1027,9 @@ extension XCScheme.LaunchAction.GPUValidationMode: JSONEncodable { } } } + +extension XCScheme.TestAction.ScreenCaptureFormat: JSONEncodable { + public func toJSONValue() -> Any { + rawValue + } +} diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 90ef213ad..c6366cf4f 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -317,6 +317,7 @@ public class SchemeGenerator { language: scheme.test?.language, region: scheme.test?.region, systemAttachmentLifetime: scheme.test?.systemAttachmentLifetime, + preferredScreenCaptureFormat: scheme.test?.preferredScreenCaptureFormat, customLLDBInitFile: scheme.test?.customLLDBInit ) diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index bc332e722..2fd6e7db0 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -1028,7 +1028,8 @@ class SpecLoadingTests: XCTestCase { [ "path": "Path/Plan2.xctestplan" ] - ] + ], + "preferredScreenCaptureFormat": "screenshots", ], "management": [ "isShown": false, @@ -1082,7 +1083,8 @@ class SpecLoadingTests: XCTestCase { testPlans: [ .init(path: "Path/Plan.xctestplan"), .init(path: "Path/Plan2.xctestplan") - ] + ], + preferredScreenCaptureFormat: .screenshots ) try expect(scheme.test) == expectedTest diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index d75272008..edad2183b 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -644,6 +644,42 @@ class SchemeGeneratorTests: XCTestCase { .init(reference: "container:\(testPlanPath2)", default: true), ] } + + $0.it("generates scheme with screenshots as preferred screen capture format") { + let scheme = Scheme( + name: "MyScheme", + build: Scheme.Build(targets: [buildTarget]), + run: Scheme.Run(config: "Debug"), + test: Scheme.Test(config: "Debug", preferredScreenCaptureFormat: .screenshots) + ) + let project = Project( + name: "test", + targets: [app, framework], + schemes: [scheme] + ) + let xcodeProject = try project.generateXcodeProject() + + let xcscheme = try unwrap(xcodeProject.sharedData?.schemes.first) + try expect(xcscheme.testAction?.preferredScreenCaptureFormat) == .screenshots + } + + $0.it("generates scheme with screen recording as preferred screen capture format") { + let scheme = Scheme( + name: "MyScheme", + build: Scheme.Build(targets: [buildTarget]), + run: Scheme.Run(config: "Debug"), + test: Scheme.Test(config: "Debug", preferredScreenCaptureFormat: .screenRecording) + ) + let project = Project( + name: "test", + targets: [app, framework], + schemes: [scheme] + ) + let xcodeProject = try project.generateXcodeProject() + + let xcscheme = try unwrap(xcodeProject.sharedData?.schemes.first) + try expect(xcscheme.testAction?.preferredScreenCaptureFormat) == .screenRecording + } } } From 9acab4a54e3f5a39ce824a6ab593211622864714 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Mon, 17 Feb 2025 22:03:51 +1100 Subject: [PATCH 265/284] fix test failure when run from through Xcode --- Sources/XcodeGenKit/PBXProjGenerator.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index f4d486a04..584e33afd 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -1536,7 +1536,7 @@ public class PBXProjGenerator { if path.isFile { return path.lastComponent == "Info.plist" ? path : nil } else { - return path.first(where: { $0.lastComponent == "Info.plist" }) + return path.first(where: { $0.lastComponent == "Info.plist" })?.absolute() } } .first From 6c94e2975f026d34149d283112a387381aab73ed Mon Sep 17 00:00:00 2001 From: Kohki Miki Date: Mon, 17 Feb 2025 20:40:58 +0900 Subject: [PATCH 266/284] Support Xcode 15.4 and Xcode 16.0 Beta on GitHub Action (#1493) * Support Xcode 16 on GitHub Action * Fix Xcode version * provide GITHUB_ACCESS_TOKEN for carthage --------- Co-authored-by: Kohki Miki Co-authored-by: Yonas Kolb --- .github/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 856bdb52b..fda76be5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,10 +8,12 @@ jobs: name: Xcode ${{ matrix.xcode }} strategy: matrix: - xcode: ["15.3"] + xcode: ["15.4", "16.0"] include: - - xcode: "15.3" - macos: macos-14 + - xcode: "15.4" + macos: macos-15 + - xcode: "16.0" + macos: macos-15 env: DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer steps: @@ -27,6 +29,8 @@ jobs: - name: Check fixtures run: scripts/diff-fixtures.sh - name: Build fixtures + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: scripts/build-fixtures.sh run-linux: runs-on: ubuntu-latest From 9e8343b1a61b81188da4520108bdfc25628ad620 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Sat, 5 Apr 2025 14:46:41 +1100 Subject: [PATCH 267/284] fix ci (#1537) * remove carthage from building test project * get test fixture compiling --- .../AnotherProject.xcodeproj/project.pbxproj | 18 + .../TestProject/AnotherProject/project.yml | 6 + .../Project.xcodeproj/project.pbxproj | 562 +----------------- ...xcstrings => LocalizableStrings.xcstrings} | 0 .../xcshareddata/swiftpm/Package.resolved | 15 + Tests/Fixtures/TestProject/build.sh | 11 - Tests/Fixtures/TestProject/project.yml | 15 +- 7 files changed, 62 insertions(+), 565 deletions(-) rename Tests/Fixtures/TestProject/String Catalogs/{Localizable.xcstrings => LocalizableStrings.xcstrings} (100%) create mode 100644 Tests/Fixtures/TestProject/Workspace.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj index 67468978a..a16b6c196 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj @@ -328,6 +328,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -343,6 +344,7 @@ 1CE986A8B593E707AB71BDBA /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -436,6 +438,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -457,6 +460,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -478,6 +482,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -493,6 +498,7 @@ 49FA7F235A6CA1F941192151 /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -505,6 +511,7 @@ 4D621C4C28C8614EA5D6ADC2 /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -529,6 +536,7 @@ 56ADF89C9058B2C25F6C80CE /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -603,6 +611,7 @@ 58F418B6745A09C6479FDD6E /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -615,6 +624,7 @@ 5F14CE04E33ACD729A0EE6B6 /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -633,6 +643,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -678,6 +689,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -693,6 +705,7 @@ 816E80EA88CB645CE988138C /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -705,6 +718,7 @@ 9BD6CAD5463121A1C3FED138 /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -781,6 +795,7 @@ C7A4FCD4E277AD34B36E5185 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -817,6 +832,7 @@ E7907C46C6282D78E009083B /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -829,6 +845,7 @@ FB66976FF75B2B0B255D5AA4 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -841,6 +858,7 @@ FD9323224BE5A91248B7BEF2 /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/Tests/Fixtures/TestProject/AnotherProject/project.yml b/Tests/Fixtures/TestProject/AnotherProject/project.yml index 3c0cc4867..c66f2c5e9 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/project.yml +++ b/Tests/Fixtures/TestProject/AnotherProject/project.yml @@ -8,12 +8,18 @@ targets: BundleX: type: bundle platform: iOS + settings: + GENERATE_INFOPLIST_FILE: YES BundleY: type: bundle platform: iOS + settings: + GENERATE_INFOPLIST_FILE: YES ExternalTarget: type: framework platform: iOS + settings: + GENERATE_INFOPLIST_FILE: YES IncludedLegacy: type: "" platform: iOS diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 09b541bf6..f9a1d2641 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -30,9 +30,7 @@ 052D6B4572FBF002286865D7 /* CrossOverlayFramework.swiftcrossimport in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8DD7A61B07AD2F91BDECC255 /* CrossOverlayFramework.swiftcrossimport */; }; 06F1750F0E45E4822F806523 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 576675973B56A96047CB4944 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0786F9C725AD215C4F915BB5 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 078FAAF5C2B851C7D5EA714F /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D296BB7355994040E197A1EE /* Result.framework */; }; 079B6E02AF21664AB08E621C /* TestProjectUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 587B9E9A3533E965CA602B76 /* TestProjectUITests.swift */; }; - 07EDA4085F0E7EE1471DC64F /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 0927149520F12314CE8B4079 /* TestFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E43116070AFEF5D8C3A5A957 /* TestFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 0932FB6FB887D7D6F7727CB7 /* Driver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 432E2C071A4B6B3757BEA13E /* Driver.cpp */; }; 09617AB755651FFEB2564CBC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F1A2F579A6F79C62DDA0571 /* AppDelegate.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; @@ -41,12 +39,10 @@ 0D0E2466833FC2636B92C43D /* Swinject in Frameworks */ = {isa = PBXBuildFile; platformFilter = ios; productRef = D7917D10F77DA9D69937D493 /* Swinject */; }; 0F99AECCB4691803C791CDCE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2FC2A8A829CE71B1CF415FF7 /* Main.storyboard */; }; 15129B8D9ED000BDA1FEEC27 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23A2F16890ECF2EE3FED72AE /* AppDelegate.swift */; }; - 1551370B0ACAC632E15C853B /* SwiftyJSON.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF47010E7368583405AA50CB /* SwiftyJSON.framework */; }; 1B485D6584C3B47AC58831C6 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18722C61B05FFF4CC63D5755 /* ContentView.swift */; platformFilters = (tvos, ); }; 1BC891D89980D82738D963F3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 74FBDFA5CB063F6001AD8ACD /* Main.storyboard */; }; 1E03FC7312293997599C6435 /* Empty.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 068EDF47F0B087F6A4052AC0 /* Empty.h */; }; 1E2A4D61E96521FF7123D7B0 /* XPC Service.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 22237B8EBD9E6BE8EBC8735F /* XPC Service.xpc */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 1E457F55331FD2C3E8E00BE2 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 1EFFFE113C5E54A91148D3EB /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E4CCE342955E0E934BE533 /* FrameworkFile.swift */; }; 1F9168A43FD8E2FCC2699E14 /* Documentation.docc in Sources */ = {isa = PBXBuildFile; fileRef = B5C943D39DD7812CAB94B614 /* Documentation.docc */; settings = {COMPILER_FLAGS = "-Werror"; }; }; 204958B9AD868004CCE6B779 /* App_watchOS Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; @@ -55,7 +51,6 @@ 212BCB51DAF3212993DDD49E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D51CC8BCCBD68A90E90A3207 /* Assets.xcassets */; }; 21425F6DE3D493B6F1E33D21 /* Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */; }; 216B220EC7961DF7CA9188B7 /* StaticLibrary_ObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5A2B916A11DCC2565241359F /* StaticLibrary_ObjC.h */; }; - 21CA04F29CD0DEB0DD27B808 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; }; 262891CCD5F74316610437FA /* Framework2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EF21DF245F66BEF5446AAEF /* Framework2.framework */; platformFilter = ios; settings = {ATTRIBUTES = (Weak, ); }; }; 265B6A05C0198FD2EB485173 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93C033648A37D95027845BD3 /* main.swift */; }; 2698ED273D0A5820B28CAD20 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D52EC9AA9FFD3B690C355068 /* LaunchScreen.storyboard */; platformFilters = (ios, ); }; @@ -66,9 +61,7 @@ 2B940E57041A72E6A39B6BF0 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C872631362DDBAFCE71E5C66 /* Interface.storyboard */; }; 2C7C03B45571A13D472D6B23 /* iMessageApp.app in Resources */ = {isa = PBXBuildFile; fileRef = 9A87A926D563773658FB87FE /* iMessageApp.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 2FAE950E8FF2E7C0F7FF1FE9 /* Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */; }; - 307B5322FC5A220652BA6FE0 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D296BB7355994040E197A1EE /* Result.framework */; }; 3133B36F3898A27A2B1C56FC /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; - 32956CD11BD6B02E64F5D8D1 /* swift-tagged.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E4841131C451A658AC8596C /* swift-tagged.framework */; }; 3318F40C855184C18197ED30 /* StaticLibrary_ObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D0C79A8C750EC0DE748C463 /* StaticLibrary_ObjC.m */; }; 339578307B9266AB3D7722D9 /* File2.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC56891DA7446EAC8C2F27EB /* File2.swift */; }; 3535891EC86283BB5064E7E1 /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 2E1E747C7BC434ADB80CC269 /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -86,7 +79,6 @@ 4B862F11762F6BB54E97E401 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 576675973B56A96047CB4944 /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4C1504A05321046B3ED7A839 /* Framework2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB055761199DF36DB0C629A6 /* Framework2.framework */; }; 4CB673A7C0C11E04F8544BDB /* Contacts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB2B6A77D39CD5602F2125F /* Contacts.framework */; }; - 4CCBDB0492AB3542B2AB6D94 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = AEDB7833B8AE2126630D6FCB /* Localizable.xcstrings */; }; 4DA7140FF84DBF39961F3409 /* NetworkSystemExtension.systemextension in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = 2049B6DD2AFE85F9DC9F3EB3 /* NetworkSystemExtension.systemextension */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 4F6481557E2BEF8D749C37E3 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 187E665975BB5611AF0F27E1 /* main.m */; }; 5126CD91C2CB41C9B14B6232 /* DriverKitDriver.dext in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = 83B5EC7EF81F7E4B6F426D4E /* DriverKitDriver.dext */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; @@ -105,7 +97,6 @@ 632774E7F21CCB386A76B2A8 /* MessagesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B198242976C3395E31FE000A /* MessagesViewController.swift */; }; 63D8E7F00276736EDA62D227 /* Framework2.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3EF21DF245F66BEF5446AAEF /* Framework2.framework */; platformFilter = ios; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 65B3BAC02D5FAE632719C984 /* Model.xcmappingmodel in Sources */ = {isa = PBXBuildFile; fileRef = BF59AC868D227C92CA8B1B57 /* Model.xcmappingmodel */; }; - 65EBD2D87F1F5FDA63F8C027 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; }; 666AA5F3F63C8FD7C68A6CC5 /* MyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A58A16491CDDF968B0D56DE /* MyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 666DEC173BC78C7641AB22EC /* File1.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE1343F2238429D4DA9D830B /* File1.swift */; }; 66C3C5E3C13325F351A3008F /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = F2950763C4C568CC85021D18 /* module.modulemap */; }; @@ -120,18 +111,16 @@ 76156B580B30704346296641 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7F9636B706AC92629D0B48 /* XCTest.framework */; }; 768648ED7E93B6D888574144 /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = F2950763C4C568CC85021D18 /* module.modulemap */; }; 76DC6A4B18F434BAC239CC4A /* DriverKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A428E67153BB40184F37BE /* DriverKit.framework */; }; - 778F71CA1CC4BEECDACAD8B9 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 76F3F9A5E2A4623430374F31 /* LocalizableStrings.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = E66ABD3EB14C9D63DEF5C532 /* LocalizableStrings.xcstrings */; }; 77C3CB285572EA4BB7E201A7 /* App_Clip.app in Embed App Clips */ = {isa = PBXBuildFile; fileRef = 38DB679FF1CF4E379D1AB103 /* App_Clip.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 7A0DABBEA55B06E148C665A8 /* StaticLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AC91042453E18DF74BA1C0F /* StaticLibrary.swift */; }; 7A8C78212CEAC6452DFAB00E /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; - 7C8FF0B857E390417134C10F /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D296BB7355994040E197A1EE /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 7F658343A505B824321E086B /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 2E1E747C7BC434ADB80CC269 /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; 803B7CE086CFBA409F9D1ED7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 108BB29172D27BE3BD1E7F35 /* Assets.xcassets */; }; 818D448D4DDD6649B5B26098 /* example.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 28360ECA4D727FAA58557A81 /* example.mp4 */; settings = {ASSET_TAGS = (tag1, tag2, ); }; }; 81DFAB3A7633CE97929B9B2A /* Framework.framework in Embed Dependencies */ = {isa = PBXBuildFile; fileRef = 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 8267B75289E9D6C7B38FC426 /* DriverKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A428E67153BB40184F37BE /* DriverKit.framework */; }; 87927928A8A3460166ACB819 /* SwiftFileInDotPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F430AABE04B7499B458D9DB /* SwiftFileInDotPath.swift */; settings = {COMPILER_FLAGS = "-Werror"; }; }; - 8C941A6EF08069CB3CB88FC1 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 900CFAD929CAEE3861127627 /* MyBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 7B5068D64404C61A67A18458 /* MyBundle.bundle */; }; 94FD20C3EA5EBCEC8783740C /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = BDCA996D141DD8A16B18D68F /* GoogleService-Info.plist */; }; 95DD9941E1529FD2AE1A191D /* StaticLibrary_ObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5A2B916A11DCC2565241359F /* StaticLibrary_ObjC.h */; }; @@ -140,18 +129,14 @@ 9AB50B81C29243936BB419E4 /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; 9C92B7C89E5F0A10A34F5AA4 /* Framework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 9D80BD5FAE6BE61CFD74CF1B /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5F527F2590C14956518174 /* FrameworkFile.swift */; }; - 9DF5931DAD58C35B830A0A75 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B76E17CE3574081D5BF45B44 /* Result.framework */; }; A1588BF3BFFE1DF7409CBA10 /* Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */; }; - A1AEAAB53EAEDA1C307871FA /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB178D03E75929F3F5B10C56 /* Result.framework */; }; A496E1DB82E16DA4099D1411 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7F9636B706AC92629D0B48 /* XCTest.framework */; }; A59B3F08914812573AFF6C2D /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FD4A16C7B8FEB7F97F3CBE3F /* libz.dylib */; }; A7438C77A05D83E7016CF044 /* Framework2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A0DC40025AB59B688E758829 /* Framework2.framework */; }; - A7D1A9942302569A9515696A /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D296BB7355994040E197A1EE /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; A90C4C147AD175DB9F7B5114 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03CD22B8CD2E91BB97CC534E /* main.swift */; }; A949422315536EACDF8DD78A /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B785B1161553A7DD6DA4255 /* NetworkExtension.framework */; }; A9548E5DCFE92236494164DF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE1F06D99242F4223D081F0D /* LaunchScreen.storyboard */; }; AFF19412E9B35635D3AF48CB /* XPC_Service.m in Sources */ = {isa = PBXBuildFile; fileRef = 148B7C933698BCC4F1DBA979 /* XPC_Service.m */; }; - B142965C5AE9C6200BF65802 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; platformFilter = maccatalyst; }; B18C121B0A4D43ED8149D8E2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 79325B44B19B83EC6CEDBCC5 /* LaunchScreen.storyboard */; }; B20617116B230DED1F7AF5E5 /* libStaticLibrary_ObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B221F5A689AD7D3AD52F56B8 /* libStaticLibrary_ObjC.a */; }; B2D43A31C184E34EF9CB743C /* Framework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -161,8 +146,6 @@ B502EF8F7605CBD038298F23 /* CrossOverlayFramework.swiftcrossimport in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8DD7A61B07AD2F91BDECC255 /* CrossOverlayFramework.swiftcrossimport */; }; B9F3C9E77019EC3423A7F5D8 /* TestProjectTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87DF9DCA8399E3214A7E27CF /* TestProjectTests.swift */; }; BAA1C1E3828F5D43546AF997 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BB1B49A91B892152D68ED76 /* libc++.tbd */; }; - BB06A57E259D0D2A001EA21F /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - BD1419893577E6CEDF8CBA83 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; BFCCC56337A5D9D513C1C791 /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = F2950763C4C568CC85021D18 /* module.modulemap */; }; C093BF20B99FE892D0F06B2D /* libEndpointSecurity.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BC75409252FF15F540FBB7B /* libEndpointSecurity.tbd */; }; C3672B561F456794151C047C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4C3FE6B986506724DAB5D0F /* ViewController.swift */; }; @@ -190,7 +173,6 @@ E7B40B34D8807F43A3805381 /* ExternalTarget.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6ADE654A3459AFDA2CC0CD3 /* ExternalTarget.framework */; }; E8A135F768448632F8D77C8F /* StandaloneAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3571E41E19A5AB8AAAB04109 /* StandaloneAssets.xcassets */; }; EDB55692D392FD09C3FCFBF6 /* libStaticLibrary_ObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 86169DEEDEAF09AB89C8A31D /* libStaticLibrary_ObjC.a */; }; - EDE8DD3CB36D65C300A53D1E /* swift-tagged.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E4841131C451A658AC8596C /* swift-tagged.framework */; }; F4D77E81B0539EA5F4F141A6 /* EndpointSecuritySystemExtension.systemextension in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = E5E0A80CCE8F8DB662DCD2D0 /* EndpointSecuritySystemExtension.systemextension */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; F5D71267BB5A326BDD69D532 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E55F45EACB0F382722D61C8D /* Assets.xcassets */; }; F6537CE373C94809E6653758 /* Headers in Headers */ = {isa = PBXBuildFile; fileRef = 2E1E747C7BC434ADB80CC269 /* Headers */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -453,17 +435,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 05D615CB74F875917AA8C9B0 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 8C941A6EF08069CB3CB88FC1 /* Result.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; 06FAE8D6834F982AA934B3E8 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -475,18 +446,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 08DA9F1F0ED13AC054003B27 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 1E457F55331FD2C3E8E00BE2 /* Result.framework in Embed Frameworks */, - 778F71CA1CC4BEECDACAD8B9 /* Result.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; 096753D5DAA26D110F699A7F /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -504,7 +463,6 @@ dstSubfolderSpec = 10; files = ( 0927149520F12314CE8B4079 /* TestFramework.framework in Embed Frameworks */, - 07EDA4085F0E7EE1471DC64F /* Result.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -531,17 +489,6 @@ name = "Embed Foundation Extensions"; runOnlyForDeploymentPostprocessing = 0; }; - 6CB76DFA8662672C4245AF41 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 7C8FF0B857E390417134C10F /* Result.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; 7FAF0BBB3DE701EBE5DBE810 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -615,8 +562,6 @@ dstSubfolderSpec = 10; files = ( 535A98A3E3B74E09891D977F /* TestFramework.framework in Embed Frameworks */, - BD1419893577E6CEDF8CBA83 /* Result.framework in Embed Frameworks */, - BB06A57E259D0D2A001EA21F /* Result.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -687,17 +632,6 @@ name = "Embed Foundation Extensions"; runOnlyForDeploymentPostprocessing = 0; }; - F8CDEFED6ED131A09041F995 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - A7D1A9942302569A9515696A /* Result.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; FB79B30FEA6073A29B4D9FCC /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -739,9 +673,7 @@ 0B9D98D935F2C69A1F5BA539 /* App_macOS_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = App_macOS_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 0BB1B49A91B892152D68ED76 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; 0BC75409252FF15F540FBB7B /* libEndpointSecurity.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libEndpointSecurity.tbd; path = usr/lib/libEndpointSecurity.tbd; sourceTree = SDKROOT; }; - 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "App_watchOS Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; - 0E4841131C451A658AC8596C /* swift-tagged.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = "swift-tagged.framework"; sourceTree = ""; }; 0F5BD97AF0F94A15A5B7DDB7 /* Standalone.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Standalone.swift; sourceTree = ""; }; 102A08142A31E44F4ED52649 /* base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = base.xcconfig; sourceTree = ""; }; 108BB29172D27BE3BD1E7F35 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -843,16 +775,13 @@ AAA49985DFFE797EE8416887 /* inputList.xcfilelist */ = {isa = PBXFileReference; lastKnownFileType = text.xcfilelist; path = inputList.xcfilelist; sourceTree = ""; }; AB055761199DF36DB0C629A6 /* Framework2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; AEBCA8CFF769189C0D52031E /* App_iOS.xctestplan */ = {isa = PBXFileReference; path = App_iOS.xctestplan; sourceTree = ""; }; - AEDB7833B8AE2126630D6FCB /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = ""; }; AEEFDE76B5FEC833403C0869 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; B17B8D9C9B391332CD176A35 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LocalizedStoryboard.storyboard; sourceTree = ""; }; B198242976C3395E31FE000A /* MessagesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagesViewController.swift; sourceTree = ""; }; B1C33BB070583BE3B0EC0E68 /* App_iOS.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = App_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; B221F5A689AD7D3AD52F56B8 /* libStaticLibrary_ObjC.a */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = archive.ar; path = libStaticLibrary_ObjC.a; sourceTree = BUILT_PRODUCTS_DIR; }; B5C943D39DD7812CAB94B614 /* Documentation.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = Documentation.docc; sourceTree = ""; }; - B76E17CE3574081D5BF45B44 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; BA040F1F7D6CA08878323A55 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - BB178D03E75929F3F5B10C56 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; BB677D970923F663D846D7E0 /* BundleY.bundle */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = BundleY.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; BC56891DA7446EAC8C2F27EB /* File2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = File2.swift; path = Group2/File2.swift; sourceTree = ""; }; BDCA996D141DD8A16B18D68F /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "GoogleService-Info.plist"; sourceTree = ""; }; @@ -868,7 +797,6 @@ CB77A637470A3CDA2BDDBE99 /* App_iOS_Tests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = App_iOS_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; D132EA69984F32DA9DC727B6 /* TestProjectTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestProjectTests.swift; sourceTree = ""; }; D21BB1B6FA5A025305B223BA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - D296BB7355994040E197A1EE /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = ""; }; D51CC8BCCBD68A90E90A3207 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; D52EC9AA9FFD3B690C355068 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; D629E142AB87C681D4EC90F7 /* iMessageExtension.appex */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "wrapper.app-extension"; path = iMessageExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -884,6 +812,7 @@ E43116070AFEF5D8C3A5A957 /* TestFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TestFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E55F45EACB0F382722D61C8D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; E5E0A80CCE8F8DB662DCD2D0 /* EndpointSecuritySystemExtension.systemextension */ = {isa = PBXFileReference; explicitFileType = "wrapper.system-extension"; includeInIndex = 0; path = EndpointSecuritySystemExtension.systemextension; sourceTree = BUILT_PRODUCTS_DIR; }; + E66ABD3EB14C9D63DEF5C532 /* LocalizableStrings.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = LocalizableStrings.xcstrings; sourceTree = ""; }; E9672EF8FE1DDC8DE0705129 /* PushNotificationPayload.apns */ = {isa = PBXFileReference; lastKnownFileType = text; path = PushNotificationPayload.apns; sourceTree = ""; }; EDCC70978B8AD49373DA0DE0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; EE1343F2238429D4DA9D830B /* File1.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = File1.swift; path = Group/File1.swift; sourceTree = ""; }; @@ -897,7 +826,6 @@ FD4A16C7B8FEB7F97F3CBE3F /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; FDB2B6A77D39CD5602F2125F /* Contacts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Contacts.framework; path = System/Library/Frameworks/Contacts.framework; sourceTree = SDKROOT; }; FED40A89162E446494DDE7C7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - FF47010E7368583405AA50CB /* SwiftyJSON.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = SwiftyJSON.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -909,10 +837,8 @@ 4CB673A7C0C11E04F8544BDB /* Contacts.framework in Frameworks */, 262891CCD5F74316610437FA /* Framework2.framework in Frameworks */, 2FAE950E8FF2E7C0F7FF1FE9 /* Framework.framework in Frameworks */, - B142965C5AE9C6200BF65802 /* Result.framework in Frameworks */, B20617116B230DED1F7AF5E5 /* libStaticLibrary_ObjC.a in Frameworks */, 0D0E2466833FC2636B92C43D /* Swinject in Frameworks */, - 1551370B0ACAC632E15C853B /* SwiftyJSON.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -921,7 +847,6 @@ buildActionMask = 2147483647; files = ( 4C1504A05321046B3ED7A839 /* Framework2.framework in Frameworks */, - A1AEAAB53EAEDA1C307871FA /* Result.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -938,7 +863,6 @@ buildActionMask = 2147483647; files = ( A7438C77A05D83E7016CF044 /* Framework2.framework in Frameworks */, - 9DF5931DAD58C35B830A0A75 /* Result.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -948,7 +872,6 @@ files = ( A496E1DB82E16DA4099D1411 /* XCTest.framework in Frameworks */, 5E0369B907E239D1E6884ECF /* TestFramework.framework in Frameworks */, - EDE8DD3CB36D65C300A53D1E /* swift-tagged.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -968,21 +891,12 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9B861C58E640BD4AD391900C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 21CA04F29CD0DEB0DD27B808 /* Result.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; A688549B76B3FDC56A56735D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 76156B580B30704346296641 /* XCTest.framework in Frameworks */, E4D0F435405DABCB51C5B684 /* TestFramework.framework in Frameworks */, - 32956CD11BD6B02E64F5D8D1 /* swift-tagged.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -994,7 +908,6 @@ 76DC6A4B18F434BAC239CC4A /* DriverKit.framework in Frameworks */, 21425F6DE3D493B6F1E33D21 /* Framework.framework in Frameworks */, A949422315536EACDF8DD78A /* NetworkExtension.framework in Frameworks */, - 078FAAF5C2B851C7D5EA714F /* Result.framework in Frameworks */, EDB55692D392FD09C3FCFBF6 /* libStaticLibrary_ObjC.a in Frameworks */, C093BF20B99FE892D0F06B2D /* libEndpointSecurity.tbd in Frameworks */, BAA1C1E3828F5D43546AF997 /* libc++.tbd in Frameworks */, @@ -1002,21 +915,12 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - C2323597C6777A02E1FF671C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 307B5322FC5A220652BA6FE0 /* Result.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; DFDFD9EDAD45D89D1080FC5D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( D5D493E4A7AD63860E1399DD /* ExternalTarget.framework in Frameworks */, A1588BF3BFFE1DF7409CBA10 /* Framework.framework in Frameworks */, - 65EBD2D87F1F5FDA63F8C027 /* Result.framework in Frameworks */, 71A2AAC5934BDC9EDB6F0D9E /* libStaticLibrary_ObjC.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1066,18 +970,6 @@ path = App_iOS_UITests; sourceTree = ""; }; - 12809A79ACE69F501A5FE815 /* Carthage */ = { - isa = PBXGroup; - children = ( - DBF93518FC96D95A54552713 /* iOS */, - 912A7321F662FE41BAAEED67 /* Mac */, - D557819B1EE5B42A0A3DD4D1 /* tvOS */, - 2935454D05445817952E145D /* watchOS */, - ); - name = Carthage; - path = Carthage/Build; - sourceTree = ""; - }; 1A57D1EE1FBC13598F6B5CB0 /* Framework */ = { isa = PBXGroup; children = ( @@ -1118,14 +1010,6 @@ path = App_iOS; sourceTree = ""; }; - 2935454D05445817952E145D /* watchOS */ = { - isa = PBXGroup; - children = ( - BB178D03E75929F3F5B10C56 /* Result.framework */, - ); - path = watchOS; - sourceTree = ""; - }; 293D0FF827366B513839236A = { isa = PBXGroup; children = ( @@ -1277,7 +1161,7 @@ 6E0D17C5B4E6F01B89254309 /* String Catalogs */ = { isa = PBXGroup; children = ( - AEDB7833B8AE2126630D6FCB /* Localizable.xcstrings */, + E66ABD3EB14C9D63DEF5C532 /* LocalizableStrings.xcstrings */, ); path = "String Catalogs"; sourceTree = ""; @@ -1346,14 +1230,6 @@ path = Tool; sourceTree = ""; }; - 912A7321F662FE41BAAEED67 /* Mac */ = { - isa = PBXGroup; - children = ( - D296BB7355994040E197A1EE /* Result.framework */, - ); - path = Mac; - sourceTree = ""; - }; 99EF37D6DEE914E180236A91 /* EndpointSecurity Extension */ = { isa = PBXGroup; children = ( @@ -1522,14 +1398,6 @@ path = App_supportedDestinations; sourceTree = ""; }; - D557819B1EE5B42A0A3DD4D1 /* tvOS */ = { - isa = PBXGroup; - children = ( - B76E17CE3574081D5BF45B44 /* Result.framework */, - ); - path = tvOS; - sourceTree = ""; - }; D7929BCBA599BD85A3B8A039 /* Projects */ = { isa = PBXGroup; children = ( @@ -1538,16 +1406,6 @@ name = Projects; sourceTree = ""; }; - DBF93518FC96D95A54552713 /* iOS */ = { - isa = PBXGroup; - children = ( - 0C5AC2545AE4D4F7F44E2E9B /* Result.framework */, - 0E4841131C451A658AC8596C /* swift-tagged.framework */, - FF47010E7368583405AA50CB /* SwiftyJSON.framework */, - ); - path = iOS; - sourceTree = ""; - }; ED8625A7E716E1BA50AB88AB /* CrossOverlayFramework */ = { isa = PBXGroup; children = ( @@ -1574,7 +1432,6 @@ FC1515684236259C50A7747F /* Frameworks */ = { isa = PBXGroup; children = ( - 12809A79ACE69F501A5FE815 /* Carthage */, FDB2B6A77D39CD5602F2125F /* Contacts.framework */, C0A428E67153BB40184F37BE /* DriverKit.framework */, 0BB1B49A91B892152D68ED76 /* libc++.tbd */, @@ -1759,7 +1616,6 @@ FB79B30FEA6073A29B4D9FCC /* CopyFiles */, A6E1C88C073F8CC6B5B072B6 /* Frameworks */, DE875E9A37F7CB9C347AEFA0 /* Embed System Extensions */, - F8CDEFED6ED131A09041F995 /* Embed Frameworks */, CF6B94E7B2D2312582A526F5 /* Embed Dependencies */, ); buildRules = ( @@ -1801,7 +1657,6 @@ 6F573D15DE1F149EF128C492 /* Sources */, 8508BA1B733839E314AF2853 /* Resources */, 865AAD9909027AC34D1374EA /* CopyFiles */, - 37182EC208DBF03DB1BAF452 /* Carthage */, 117840B4DBC04099F6779D00 /* Frameworks */, E8BC0F358D693454E5027ECC /* Copy Bundle Resources */, 94FF9CA021C43301BA069930 /* Embed App Clips */, @@ -1978,7 +1833,6 @@ buildPhases = ( AE7971E1CA54D23C264E6541 /* Sources */, 4A6E8F3A477AA5F67A8EB733 /* Resources */, - 8F8EE32AFABD8FEF97625325 /* Carthage */, ); buildRules = ( ); @@ -2048,7 +1902,6 @@ buildPhases = ( 54B4D7ADCE0441B5A91DE22D /* Headers */, D1F422E9C4DD531AA88418C9 /* Sources */, - C2323597C6777A02E1FF671C /* Frameworks */, 3D0637F4554EAD6FA48105BF /* MyScript */, ); buildRules = ( @@ -2137,7 +1990,6 @@ buildConfigurationList = 62C52A55CB8D3BD9A055FD14 /* Build configuration list for PBXNativeTarget "App_macOS_Tests" */; buildPhases = ( 8A616537E6E1BEAB59E069C7 /* Sources */, - 6CB76DFA8662672C4245AF41 /* Embed Frameworks */, ); buildRules = ( ); @@ -2203,7 +2055,6 @@ buildConfigurationList = 129D9E77D45A66B1C78578F2 /* Build configuration list for PBXNativeTarget "App_Clip_UITests" */; buildPhases = ( 2E1429F0FB524A2BCFC61DF1 /* Sources */, - 05D615CB74F875917AA8C9B0 /* Embed Frameworks */, ); buildRules = ( ); @@ -2269,7 +2120,6 @@ buildPhases = ( 0D09E5BA6B8442DC0ABB8AA6 /* Headers */, 40A4456A24F99A01E340C032 /* Sources */, - 9B861C58E640BD4AD391900C /* Frameworks */, 43E9CD3CEA3FE8944C659368 /* MyScript */, ); buildRules = ( @@ -2356,7 +2206,6 @@ buildPhases = ( 6F11C066A401E4F02A1188EB /* Sources */, AFA07EE1616E0EE7065760C9 /* Resources */, - E5D02C719D4534BBA65A54BE /* Carthage */, DFDFD9EDAD45D89D1080FC5D /* Frameworks */, 848740AD60C4329197FF876B /* Embed Frameworks */, ); @@ -2440,7 +2289,6 @@ buildConfigurationList = 68CC35789B0DB020E2CFC517 /* Build configuration list for PBXNativeTarget "App_iOS_UITests" */; buildPhases = ( 7334BD12862A3CED4BE1C6B5 /* Sources */, - 08DA9F1F0ED13AC054003B27 /* Embed Frameworks */, ); buildRules = ( ); @@ -2621,7 +2469,7 @@ A9548E5DCFE92236494164DF /* LaunchScreen.storyboard in Resources */, 6E8F8303759824631C8D9DA3 /* Localizable.strings in Resources */, E5DD0AD6F7AE1DD4AF98B83E /* Localizable.stringsdict in Resources */, - 4CCBDB0492AB3542B2AB6D94 /* Localizable.xcstrings in Resources */, + 76F3F9A5E2A4623430374F31 /* LocalizableStrings.xcstrings in Resources */, 2A7EB1A9A365A7EC5D49AFCF /* LocalizedStoryboard.storyboard in Resources */, 49A4B8937BB5520B36EA33F0 /* Main.storyboard in Resources */, 900CFAD929CAEE3861127627 /* MyBundle.bundle in Resources */, @@ -2688,22 +2536,6 @@ shellPath = /bin/sh; shellScript = "ditto \"${SCRIPT_INPUT_FILE_0}\" \"${SCRIPT_OUTPUT_FILE_0}\"\n"; }; - 37182EC208DBF03DB1BAF452 /* Carthage */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(SRCROOT)/Carthage/Build/iOS/Result.framework", - ); - name = Carthage; - outputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Result.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh -l"; - shellScript = "carthage copy-frameworks\n"; - }; 3D0637F4554EAD6FA48105BF /* MyScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -2777,22 +2609,6 @@ shellPath = /bin/sh; shellScript = "echo \"You ran a script\"\n"; }; - 8F8EE32AFABD8FEF97625325 /* Carthage */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(SRCROOT)/Carthage/Build/watchOS/Result.framework", - ); - name = Carthage; - outputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Result.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh -l"; - shellScript = "carthage copy-frameworks\n"; - }; BA454AAC926EDFCDA9226CBC /* MyScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -2850,22 +2666,6 @@ shellPath = /bin/sh; shellScript = "echo \"do the thing\""; }; - E5D02C719D4534BBA65A54BE /* Carthage */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(SRCROOT)/Carthage/Build/iOS/Result.framework", - ); - name = Carthage; - outputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Result.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh -l"; - shellScript = "carthage copy-frameworks\n"; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -3491,10 +3291,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-watchOS"; @@ -3596,11 +3392,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_UITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -3623,6 +3414,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -3640,10 +3432,6 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = App_Clip/Clip.entitlements; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = App_Clip/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -3690,11 +3478,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -3734,10 +3517,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = App_Clip_UITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -3755,11 +3534,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_UITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -3777,11 +3551,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_UITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -3814,10 +3583,6 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = "App_watchOS Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -3850,11 +3615,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -3912,10 +3672,6 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = App_macOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -3962,10 +3718,6 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = "App_watchOS Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4023,11 +3775,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_UITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4059,10 +3806,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = "App_macOS/App-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4269,10 +4012,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/tvOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -4298,10 +4037,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -4377,6 +4112,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4394,11 +4130,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4416,11 +4147,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4438,11 +4164,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4459,6 +4180,7 @@ 31931061043C66589547105C /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -4497,10 +4219,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = App_Clip_UITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4587,10 +4305,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = App_Clip_UITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4608,10 +4322,6 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = App_Clip/Clip.entitlements; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = App_Clip/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4645,10 +4355,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = "App_macOS/App-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4696,10 +4402,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/tvOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -4725,6 +4427,7 @@ 414544E2FA4DE102442A71CD /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -4776,10 +4479,6 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = App_macOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4817,10 +4516,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = "App_macOS/App-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4881,10 +4576,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = App_Clip_UITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4950,10 +4641,6 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = "App_watchOS Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -5041,10 +4728,6 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = "App_watchOS Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -5062,10 +4745,6 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = App_Clip/Clip.entitlements; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = App_Clip/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -5086,10 +4765,6 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = App_macOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -5107,10 +4782,6 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = App_macOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -5167,10 +4838,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -5203,11 +4870,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -5227,10 +4889,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = App_Clip_UITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -5253,10 +4911,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -5318,10 +4972,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -5346,10 +4996,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/tvOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -5388,10 +5034,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/tvOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -5472,10 +5114,6 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = "App_watchOS Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -5498,10 +5136,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -5534,6 +5168,7 @@ 64EC1B53D612851D51D18FD2 /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -5554,10 +5189,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -5696,6 +5327,7 @@ 71529460FB00BCDF2064C57F /* Staging Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -5794,11 +5426,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -5846,11 +5473,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -5892,10 +5514,6 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = App_Clip/Clip.entitlements; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = App_Clip/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -5914,6 +5532,7 @@ 7D73A7FB339A39293BD2DB9E /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -6004,10 +5623,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -6051,10 +5666,6 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = App_Clip/Clip.entitlements; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = App_Clip/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -6073,6 +5684,7 @@ 85E6B40848AC2A0B1F921553 /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -6175,10 +5787,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -6221,6 +5829,7 @@ 917341F64B3A9B883FE942AD /* Production Release */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -6247,6 +5856,7 @@ 924BB9ED8B14A02ABF88CC23 /* Production Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -6293,10 +5903,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = "App_macOS/App-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -6344,6 +5950,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -6390,10 +5997,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-watchOS"; @@ -6425,10 +6028,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = "App_macOS/App-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -6453,10 +6052,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -6604,10 +6199,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/tvOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -6669,11 +6260,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -6768,10 +6354,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -6901,11 +6483,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -6970,6 +6547,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -7001,11 +6579,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -7044,6 +6617,7 @@ B227B91964080DEF6C426483 /* Test Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -7174,6 +6748,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -7190,6 +6765,7 @@ B7EBD1A3A3A7E66100F5C845 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -7229,10 +6805,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-watchOS"; @@ -7286,11 +6858,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -7307,6 +6874,7 @@ BA21E149424C2D03E5E50EC1 /* Test Release */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -7337,11 +6905,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_UITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -7386,11 +6949,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -7569,10 +7127,6 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = App_Clip/Clip.entitlements; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = App_Clip/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -7597,6 +7151,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -7614,11 +7169,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -7641,10 +7191,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-watchOS"; @@ -7729,10 +7275,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = "App_macOS/App-Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -7826,11 +7368,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -7854,10 +7391,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -7896,10 +7429,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-watchOS"; @@ -7916,11 +7445,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -8028,10 +7552,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/tvOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -8120,10 +7640,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -8165,11 +7681,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_UITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -8207,10 +7718,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.project.Framework-watchOS"; @@ -8302,11 +7809,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -8324,11 +7826,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)/Carthage/Build/iOS/Static", - ); INFOPLIST_FILE = App_iOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -8438,6 +7935,7 @@ EBA3332D0144AAAA57630865 /* Staging Release */ = { isa = XCBuildConfiguration; buildSettings = { + GENERATE_INFOPLIST_FILE = YES; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -8453,10 +7951,6 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = App_macOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -8576,10 +8070,6 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); INFOPLIST_FILE = App_Clip_UITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -8597,10 +8087,6 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/watchOS", - ); INFOPLIST_FILE = "App_watchOS Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -8664,10 +8150,6 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/Mac", - ); INFOPLIST_FILE = App_macOS_Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/Tests/Fixtures/TestProject/String Catalogs/Localizable.xcstrings b/Tests/Fixtures/TestProject/String Catalogs/LocalizableStrings.xcstrings similarity index 100% rename from Tests/Fixtures/TestProject/String Catalogs/Localizable.xcstrings rename to Tests/Fixtures/TestProject/String Catalogs/LocalizableStrings.xcstrings diff --git a/Tests/Fixtures/TestProject/Workspace.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Tests/Fixtures/TestProject/Workspace.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000..7bde3b823 --- /dev/null +++ b/Tests/Fixtures/TestProject/Workspace.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,15 @@ +{ + "originHash" : "43ca8cdf31efddefed0c1a55ebf00893877282d5a9bda294cd149edd4e559706", + "pins" : [ + { + "identity" : "swinject", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Swinject/Swinject", + "state" : { + "revision" : "b1d92a53159fe45e162c307183aec9be15e4e7ae", + "version" : "2.8.0" + } + } + ], + "version" : 3 +} diff --git a/Tests/Fixtures/TestProject/build.sh b/Tests/Fixtures/TestProject/build.sh index 590d02387..fb3e191de 100755 --- a/Tests/Fixtures/TestProject/build.sh +++ b/Tests/Fixtures/TestProject/build.sh @@ -1,17 +1,6 @@ #!/bin/bash set -e -XCODE_VERSION=$(/usr/libexec/PlistBuddy -c "Print :DTXcode" "$(xcode-select -p)/../Info.plist") - -CARTHAGE_DYNAMIC_FRAMEWORKS=(Result) -CARTHAGE_STATIC_FRAMEWORKS=(SwiftyJSON swift-nonempty) - -XCODE_XCCONFIG_FILE="$PWD/carthage_dynamic.xcconfig" \ - carthage bootstrap $CARTHAGE_DYNAMIC_FRAMEWORKS --cache-builds - -XCODE_XCCONFIG_FILE="$PWD/carthage_static.xcconfig" \ - carthage bootstrap $CARTHAGE_STATIC_FRAMEWORKS --cache-builds - echo " ⚙️ Building iOS app" xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_iOS Test" -configuration "Test Debug" -xcconfig fixtures.xcconfig diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index cc4ec4e68..27f0a4fa0 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -163,7 +163,7 @@ targets: resourceTags: - tag1 - tag2 - - String Catalogs/Localizable.xcstrings + - String Catalogs/LocalizableStrings.xcstrings settings: INFOPLIST_FILE: App_iOS/Info.plist PRODUCT_BUNDLE_IDENTIFIER: com.project.app @@ -171,11 +171,6 @@ targets: - target: Framework_iOS platformFilter: all - target: StaticLibrary_ObjC_iOS - - carthage: Result - platformFilter: macOS - - carthage: SwiftyJSON - linkType: static - platformFilter: iOS - target: Framework2_iOS weak: true platformFilter: iOS @@ -275,9 +270,6 @@ targets: App_watchOS Extension settings: PRODUCT_BUNDLE_IDENTIFIER: com.project.app.watch.extension - dependencies: - - carthage: Result - link: false iMessageApp: type: application.messages @@ -364,7 +356,6 @@ targets: - name: MyScript path: scripts/script.sh dependencies: - - carthage: Result - target: StaticLibrary_ObjC_${platform} - target: Framework2_${platform} platforms: [tvOS, watchOS] @@ -402,8 +393,6 @@ targets: dependencies: - target: App_iOS - target: TestFramework - - carthage: swift-tagged - linkType: static App_iOS_UITests: type: bundle.ui-testing platform: iOS @@ -459,8 +448,6 @@ targets: dependencies: - target: App_Clip - target: TestFramework - - carthage: swift-tagged - linkType: static App_Clip_UITests: type: bundle.ui-testing From 26de8f1c9bb609434561dce6536426605fe0ceb6 Mon Sep 17 00:00:00 2001 From: Shaun Harrison Date: Sat, 5 Apr 2025 01:10:18 -0400 Subject: [PATCH 268/284] Support relative paths for fileGroups in includes (#1534) --- Sources/ProjectSpec/Project.swift | 3 ++- Tests/Fixtures/duplicated_include/duplicated_import_sut.yml | 3 ++- Tests/Fixtures/paths_test/included_paths_test.yml | 3 +++ Tests/Fixtures/paths_test/relative_file_groups/TestFile.md | 1 + Tests/Fixtures/paths_test/relative_file_groups/inc.yml | 2 ++ Tests/ProjectSpecTests/SpecLoadingTests.swift | 2 ++ 6 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 Tests/Fixtures/paths_test/relative_file_groups/TestFile.md create mode 100644 Tests/Fixtures/paths_test/relative_file_groups/inc.yml diff --git a/Sources/ProjectSpec/Project.swift b/Sources/ProjectSpec/Project.swift index 527a7b9ab..72daf0324 100644 --- a/Sources/ProjectSpec/Project.swift +++ b/Sources/ProjectSpec/Project.swift @@ -242,7 +242,8 @@ extension Project: PathContainer { .object("schemes", Scheme.pathProperties), .object("projectReferences", ProjectReference.pathProperties), .object("packages", SwiftPackage.pathProperties), - .string("localPackages") + .string("localPackages"), + .string("fileGroups") ] } } diff --git a/Tests/Fixtures/duplicated_include/duplicated_import_sut.yml b/Tests/Fixtures/duplicated_include/duplicated_import_sut.yml index 5ade0abe7..5a1ea7603 100644 --- a/Tests/Fixtures/duplicated_include/duplicated_import_sut.yml +++ b/Tests/Fixtures/duplicated_include/duplicated_import_sut.yml @@ -2,7 +2,8 @@ include: - duplicated_import_transitive.yml - duplicated_import_root.yml - duplicated_import_root.yml - - different_path/duplicated_import_root.yml + - path: different_path/duplicated_import_root.yml + relativePaths: false name: DuplicatedImportDependent targets: IncludedTarget: diff --git a/Tests/Fixtures/paths_test/included_paths_test.yml b/Tests/Fixtures/paths_test/included_paths_test.yml index 2fe651969..93a400fd4 100644 --- a/Tests/Fixtures/paths_test/included_paths_test.yml +++ b/Tests/Fixtures/paths_test/included_paths_test.yml @@ -1,8 +1,11 @@ +name: IncludedPathsTest include: - recursive_test/recursive_test.yml - same_relative_path_test/same_relative_path_test.yml - path: relative_local_package/inc.yml relativePaths: true + - path: relative_file_groups/inc.yml + relativePaths: true configFiles: IncludedConfig: config projectReferences: diff --git a/Tests/Fixtures/paths_test/relative_file_groups/TestFile.md b/Tests/Fixtures/paths_test/relative_file_groups/TestFile.md new file mode 100644 index 000000000..49de0ae4e --- /dev/null +++ b/Tests/Fixtures/paths_test/relative_file_groups/TestFile.md @@ -0,0 +1 @@ +This is a test file for relative file groups diff --git a/Tests/Fixtures/paths_test/relative_file_groups/inc.yml b/Tests/Fixtures/paths_test/relative_file_groups/inc.yml new file mode 100644 index 000000000..bd89ac32e --- /dev/null +++ b/Tests/Fixtures/paths_test/relative_file_groups/inc.yml @@ -0,0 +1,2 @@ +fileGroups: + - TestFile.md diff --git a/Tests/ProjectSpecTests/SpecLoadingTests.swift b/Tests/ProjectSpecTests/SpecLoadingTests.swift index 2fd6e7db0..c0bbb281d 100644 --- a/Tests/ProjectSpecTests/SpecLoadingTests.swift +++ b/Tests/ProjectSpecTests/SpecLoadingTests.swift @@ -197,6 +197,8 @@ class SpecLoadingTests: XCTestCase { try expect(project.packages) == [ "LocalPackage": .local(path: "paths_test/relative_local_package/LocalPackage", group: nil, excludeFromProject: false), ] + + try expect(project.fileGroups.contains("paths_test/relative_file_groups/TestFile.md")) == true } $0.it("respects directory expansion preference") { From 172a4947041a71404be6d9aab13af0016566f169 Mon Sep 17 00:00:00 2001 From: Marcos Griselli <14804033+marcosgriselli@users.noreply.github.com> Date: Sun, 6 Apr 2025 02:50:09 -0700 Subject: [PATCH 269/284] Update Xcodeproj to `8.24.3` (#1515) * Update Xcodeproj to 8.24.3 * Bump macOS version * maintain support for removed gpuValidationMode enum --------- Co-authored-by: Yonas Kolb --- Docs/ProjectSpec.md | 2 +- Package.resolved | 4 +- Package.swift | 2 +- Sources/ProjectSpec/Scheme.swift | 45 +++------- Sources/XcodeGenKit/PBXProjGenerator.swift | 2 + Sources/XcodeGenKit/SchemeGenerator.swift | 2 +- Sources/XcodeGenKit/Version.swift | 4 + .../Project.xcodeproj/project.pbxproj | 10 +++ .../SPM/SPM.xcodeproj/project.pbxproj | 28 +++--- .../AnotherProject.xcodeproj/project.pbxproj | 10 +++ .../Project.xcodeproj/project.pbxproj | 86 +++++++++++++++++++ Tests/Fixtures/TestProject/project.yml | 2 +- .../TestProject.xcodeproj/project.pbxproj | 6 ++ .../ProjectGeneratorTests.swift | 4 +- 14 files changed, 156 insertions(+), 51 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 33fa386c1..83166e9c4 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -1028,7 +1028,7 @@ The different actions share some properties: - [ ] **postActions**: **[[Execution Action](#execution-action)]** - Scripts that are run *after* the action - [ ] **environmentVariables**: **[[Environment Variable](#environment-variable)]** or **[String:String]** - `run`, `test` and `profile` actions can define the environment variables. When passing a dictionary, every key-value entry maps to a corresponding variable that is enabled. - [ ] **enableGPUFrameCaptureMode**: **GPUFrameCaptureMode** - Property value set for `GPU Frame Capture`. Possible values are `autoEnabled`, `metal`, `openGL`, `disabled`. Default is `autoEnabled`. -- [ ] **enableGPUValidationMode**: **GPUValidationMode** - Property value set for `Metal API Validation`. Possible values are `enabled`, `disabled`, `extended`. Default is `enabled`. +- [ ] **enableGPUValidationMode**: **Bool** - Property value set for `Metal API Validation`. This defaults to true. - [ ] **disableMainThreadChecker**: **Bool** - `run` and `test` actions can define a boolean that indicates that 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 - [ ] **disableThreadPerformanceChecker**: **Bool** - `run` action can define a boolean that indicates that this scheme should disable the Thread Performance Checker. This defaults to false diff --git a/Package.resolved b/Package.resolved index b4c35e437..237f873fa 100644 --- a/Package.resolved +++ b/Package.resolved @@ -77,8 +77,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/tuist/XcodeProj.git", "state" : { - "revision" : "447c159b0c5fb047a024fd8d942d4a76cf47dde0", - "version" : "8.16.0" + "revision" : "dc3b87a4e69f9cd06c6cb16199f5d0472e57ef6b", + "version" : "8.24.3" } }, { diff --git a/Package.swift b/Package.swift index ff5c70a61..99c7649c0 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: "4.0.0"), - .package(url: "https://github.com/tuist/XcodeProj.git", exact: "8.16.0"), + .package(url: "https://github.com/tuist/XcodeProj.git", exact: "8.24.3"), .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/freddi-kit/ArtifactBundleGen", exact: "0.0.6") diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index 9e4e6171e..e417fcf0f 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -131,6 +131,7 @@ public struct Scheme: Equatable { public static let stopOnEveryMainThreadCheckerIssueDefault = false public static let disableThreadPerformanceCheckerDefault = false public static let debugEnabledDefault = true + public static let enableGPUValidationModeDefault = true public var config: String? public var commandLineArguments: [String: Bool] @@ -138,7 +139,7 @@ public struct Scheme: Equatable { public var postActions: [ExecutionAction] public var environmentVariables: [XCScheme.EnvironmentVariable] public var enableGPUFrameCaptureMode: XCScheme.LaunchAction.GPUFrameCaptureMode - public var enableGPUValidationMode: XCScheme.LaunchAction.GPUValidationMode + public var enableGPUValidationMode: Bool public var disableMainThreadChecker: Bool public var stopOnEveryMainThreadCheckerIssue: Bool public var disableThreadPerformanceChecker: Bool @@ -161,7 +162,7 @@ public struct Scheme: Equatable { postActions: [ExecutionAction] = [], environmentVariables: [XCScheme.EnvironmentVariable] = [], enableGPUFrameCaptureMode: XCScheme.LaunchAction.GPUFrameCaptureMode = XCScheme.LaunchAction.defaultGPUFrameCaptureMode, - enableGPUValidationMode: XCScheme.LaunchAction.GPUValidationMode = XCScheme.LaunchAction.GPUValidationMode.enabled, + enableGPUValidationMode: Bool = enableGPUValidationModeDefault, disableMainThreadChecker: Bool = disableMainThreadCheckerDefault, stopOnEveryMainThreadCheckerIssue: Bool = stopOnEveryMainThreadCheckerIssueDefault, disableThreadPerformanceChecker: Bool = disableThreadPerformanceCheckerDefault, @@ -488,10 +489,16 @@ extension Scheme.Run: JSONObjectConvertible { } else { enableGPUFrameCaptureMode = XCScheme.LaunchAction.defaultGPUFrameCaptureMode } + + // support deprecated gpuValidationMode enum that was removed from XcodeProj if let gpuValidationMode: String = jsonDictionary.json(atKeyPath: "enableGPUValidationMode") { - enableGPUValidationMode = XCScheme.LaunchAction.GPUValidationMode.fromJSONValue(gpuValidationMode) + switch gpuValidationMode { + case "enabled", "extended": enableGPUValidationMode = true + case "disabled": enableGPUValidationMode = false + default: enableGPUValidationMode = Scheme.Run.enableGPUValidationModeDefault + } } else { - enableGPUValidationMode = XCScheme.LaunchAction.defaultGPUValidationMode + enableGPUValidationMode = jsonDictionary.json(atKeyPath: "enableGPUValidationMode") ?? Scheme.Run.enableGPUValidationModeDefault } disableMainThreadChecker = jsonDictionary.json(atKeyPath: "disableMainThreadChecker") ?? Scheme.Run.disableMainThreadCheckerDefault stopOnEveryMainThreadCheckerIssue = jsonDictionary.json(atKeyPath: "stopOnEveryMainThreadCheckerIssue") ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault @@ -539,8 +546,8 @@ extension Scheme.Run: JSONEncodable { dict["enableGPUFrameCaptureMode"] = enableGPUFrameCaptureMode.toJSONValue() } - if enableGPUValidationMode != XCScheme.LaunchAction.defaultGPUValidationMode { - dict["enableGPUValidationMode"] = enableGPUValidationMode.toJSONValue() + if enableGPUValidationMode != Scheme.Run.enableGPUValidationModeDefault { + dict["enableGPUValidationMode"] = enableGPUValidationMode } if disableMainThreadChecker != Scheme.Run.disableMainThreadCheckerDefault { @@ -1002,32 +1009,6 @@ extension XCScheme.LaunchAction.GPUFrameCaptureMode: JSONEncodable { } } -extension XCScheme.LaunchAction.GPUValidationMode: JSONEncodable { - public func toJSONValue() -> Any { - switch self { - case .enabled: - return "enabled" - case .disabled: - return "disabled" - case .extended: - return "extended" - } - } - - static func fromJSONValue(_ string: String) -> XCScheme.LaunchAction.GPUValidationMode { - switch string { - case "enabled": - return .enabled - case "disabled": - return .disabled - case "extended": - return .extended - default: - fatalError("Invalid enableGPUValidationMode value. Valid values are: enable, disable, extended") - } - } -} - extension XCScheme.TestAction.ScreenCaptureFormat: JSONEncodable { public func toJSONValue() -> Any { rawValue diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 584e33afd..c7f5f2d1f 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -102,6 +102,8 @@ public class PBXProjGenerator { name: project.name, buildConfigurationList: buildConfigList, compatibilityVersion: project.compatibilityVersion, + preferredProjectObjectVersion: Int(project.objectVersion), + minimizedProjectReferenceProxies: project.minimizedProjectReferenceProxies, mainGroup: mainGroup, developmentRegion: developmentRegion ) diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index c6366cf4f..69ad80faf 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -358,7 +358,7 @@ public class SchemeGenerator { allowLocationSimulation: allowLocationSimulation, locationScenarioReference: locationScenarioReference, enableGPUFrameCaptureMode: scheme.run?.enableGPUFrameCaptureMode ?? XCScheme.LaunchAction.defaultGPUFrameCaptureMode, - enableGPUValidationMode: scheme.run?.enableGPUValidationMode ?? XCScheme.LaunchAction.defaultGPUValidationMode, + disableGPUValidationMode: !(scheme.run?.enableGPUValidationMode ?? Scheme.Run.enableGPUValidationModeDefault), disableMainThreadChecker: scheme.run?.disableMainThreadChecker ?? Scheme.Run.disableMainThreadCheckerDefault, disablePerformanceAntipatternChecker: scheme.run?.disableThreadPerformanceChecker ?? Scheme.Run.disableThreadPerformanceCheckerDefault, stopOnEveryMainThreadCheckerIssue: scheme.run?.stopOnEveryMainThreadCheckerIssue ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault, diff --git a/Sources/XcodeGenKit/Version.swift b/Sources/XcodeGenKit/Version.swift index 0f4fed636..57618046d 100644 --- a/Sources/XcodeGenKit/Version.swift +++ b/Sources/XcodeGenKit/Version.swift @@ -18,6 +18,10 @@ extension Project { var objectVersion: UInt { 54 } + + var minimizedProjectReferenceProxies: Int { + 1 + } } public struct XCodeVersion { diff --git a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj index a9c8a23cb..eb6cf67fe 100644 --- a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj @@ -254,6 +254,8 @@ dependencies = ( ); name = Framework_tvOS; + packageProductDependencies = ( + ); productName = Framework_tvOS; productReference = 7D67F1C1BFBACE101DE7DB51 /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -270,6 +272,8 @@ dependencies = ( ); name = Framework_macOS; + packageProductDependencies = ( + ); productName = Framework_macOS; productReference = 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -286,6 +290,8 @@ dependencies = ( ); name = Framework_watchOS; + packageProductDependencies = ( + ); productName = Framework_watchOS; productReference = 6177CC6263783487E93F7F4D /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -302,6 +308,8 @@ dependencies = ( ); name = Framework_iOS; + packageProductDependencies = ( + ); productName = Framework_iOS; productReference = 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -326,6 +334,8 @@ en, ); mainGroup = 293D0FF827366B513839236A; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 54; projectDirPath = ""; projectRoot = ""; targets = ( diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index 2e33e2c09..59311f725 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -16,6 +16,8 @@ D287BAAB664D1A024D9DD57E /* PBXTargetDependency */, ); name = AggTarget; + packageProductDependencies = ( + ); productName = AggTarget; }; /* End PBXAggregateTarget section */ @@ -168,6 +170,8 @@ 8693351DA9DBE579AC9DD513 /* PBXTargetDependency */, ); name = Tests; + packageProductDependencies = ( + ); productName = Tests; productReference = 0613661C0D45064E81E80C37 /* Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -247,6 +251,7 @@ en, ); mainGroup = 218F6C96DF9E182F526258CF; + minimizedProjectReferenceProxies = 1; packageReferences = ( 5BA91390AE78D2EE15C60091 /* XCRemoteSwiftPackageReference "Codability" */, 348C81C327DB1710B742C370 /* XCRemoteSwiftPackageReference "Prefire" */, @@ -254,6 +259,7 @@ 630A8CE9F2BE39704ED9D461 /* XCLocalSwiftPackageReference "FooFeature" */, C6539B364583AE96C18CE377 /* XCLocalSwiftPackageReference "../../.." */, ); + preferredProjectObjectVersion = 54; projectDirPath = ""; projectRoot = ""; targets = ( @@ -637,6 +643,17 @@ }; /* End XCConfigurationList section */ +/* Begin XCLocalSwiftPackageReference section */ + 630A8CE9F2BE39704ED9D461 /* XCLocalSwiftPackageReference "FooFeature" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = FooFeature; + }; + C6539B364583AE96C18CE377 /* XCLocalSwiftPackageReference "../../.." */ = { + isa = XCLocalSwiftPackageReference; + relativePath = ../../..; + }; +/* End XCLocalSwiftPackageReference section */ + /* Begin XCRemoteSwiftPackageReference section */ 348C81C327DB1710B742C370 /* XCRemoteSwiftPackageReference "Prefire" */ = { isa = XCRemoteSwiftPackageReference; @@ -664,17 +681,6 @@ }; /* End XCRemoteSwiftPackageReference section */ -/* Begin XCLocalSwiftPackageReference section */ - 630A8CE9F2BE39704ED9D461 /* XCLocalSwiftPackageReference "FooFeature" */ = { - isa = XCLocalSwiftPackageReference; - relativePath = FooFeature; - }; - C6539B364583AE96C18CE377 /* XCLocalSwiftPackageReference "../../.." */ = { - isa = XCLocalSwiftPackageReference; - relativePath = ../../..; - }; -/* End XCLocalSwiftPackageReference section */ - /* Begin XCSwiftPackageProductDependency section */ 15DB49096E2978F6BCA8D604 /* FooUI */ = { isa = XCSwiftPackageProductDependency; diff --git a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj index a16b6c196..f5742caaa 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj @@ -55,6 +55,8 @@ dependencies = ( ); name = IncludedLegacy; + packageProductDependencies = ( + ); passBuildSettingsInEnvironment = 0; productName = IncludedLegacy; }; @@ -71,6 +73,8 @@ dependencies = ( ); name = BundleY; + packageProductDependencies = ( + ); productName = BundleY; productReference = F1EFFCA88BFC3A1DD2D89DA7 /* BundleY.bundle */; productType = "com.apple.product-type.bundle"; @@ -85,6 +89,8 @@ dependencies = ( ); name = BundleX; + packageProductDependencies = ( + ); productName = BundleX; productReference = 6023D61BF2C57E6AE09CE7A3 /* BundleX.bundle */; productType = "com.apple.product-type.bundle"; @@ -100,6 +106,8 @@ dependencies = ( ); name = ExternalTarget; + packageProductDependencies = ( + ); productName = ExternalTarget; productReference = D6340FC7DEBC81E0127BAFD6 /* ExternalTarget.framework */; productType = "com.apple.product-type.framework"; @@ -123,6 +131,8 @@ en, ); mainGroup = 4E8CFA4275C972686621210C; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 54; projectDirPath = ""; projectRoot = ""; targets = ( diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index f9a1d2641..1898ccc66 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -18,6 +18,8 @@ 106CDB4BCFD183241A565E6C /* PBXTargetDependency */, ); name = SuperTarget; + packageProductDependencies = ( + ); productName = SuperTarget; }; /* End PBXAggregateTarget section */ @@ -1588,6 +1590,8 @@ dependencies = ( ); name = IncludedLegacy; + packageProductDependencies = ( + ); passBuildSettingsInEnvironment = 0; productName = IncludedLegacy; }; @@ -1601,6 +1605,8 @@ dependencies = ( ); name = Legacy; + packageProductDependencies = ( + ); passBuildSettingsInEnvironment = 1; productName = Legacy; }; @@ -1629,6 +1635,8 @@ B95DA92D1265C094E71B4A5D /* PBXTargetDependency */, ); name = App_macOS; + packageProductDependencies = ( + ); productName = App_macOS; productReference = 33F6DCDC37D2E66543D4965D /* App_macOS.app */; productType = "com.apple.product-type.application"; @@ -1646,6 +1654,8 @@ dependencies = ( ); name = TestFramework; + packageProductDependencies = ( + ); productName = TestFramework; productReference = E43116070AFEF5D8C3A5A957 /* TestFramework.framework */; productType = "com.apple.product-type.framework"; @@ -1695,6 +1705,8 @@ dependencies = ( ); name = Tool; + packageProductDependencies = ( + ); productName = Tool; productReference = BECEA4A483ADEB8158F640B3 /* Tool */; productType = "com.apple.product-type.tool"; @@ -1712,6 +1724,8 @@ dependencies = ( ); name = CrossOverlayFramework_iOS; + packageProductDependencies = ( + ); productName = CrossOverlayFramework_iOS; productReference = 8FE05BF7897ECFD58B7AC8B1 /* CrossOverlayFramework.framework */; productType = "com.apple.product-type.framework"; @@ -1728,6 +1742,8 @@ dependencies = ( ); name = StaticLibrary_ObjC_iOS; + packageProductDependencies = ( + ); productName = StaticLibrary_ObjC_iOS; productReference = B221F5A689AD7D3AD52F56B8 /* libStaticLibrary_ObjC.a */; productType = "com.apple.product-type.library.static"; @@ -1743,6 +1759,8 @@ dependencies = ( ); name = iMessageStickersExtension; + packageProductDependencies = ( + ); productName = iMessageStickersExtension; productReference = C53ACB2962FED621389C36A2 /* iMessageStickersExtension.appex */; productType = "com.apple.product-type.app-extension.messages-sticker-pack"; @@ -1759,6 +1777,8 @@ dependencies = ( ); name = StaticLibrary_Swift; + packageProductDependencies = ( + ); productName = StaticLibrary_Swift; productReference = 8CB86294FB939FE6E90932E1 /* libStaticLibrary_Swift.a */; productType = "com.apple.product-type.library.static"; @@ -1775,6 +1795,8 @@ dependencies = ( ); name = iMessageExtension; + packageProductDependencies = ( + ); productName = iMessageExtension; productReference = D629E142AB87C681D4EC90F7 /* iMessageExtension.appex */; productType = "com.apple.product-type.app-extension.messages"; @@ -1792,6 +1814,8 @@ 62DA64F61B337719A2CF993D /* PBXTargetDependency */, ); name = App_watchOS; + packageProductDependencies = ( + ); productName = App_watchOS; productReference = A680BE9F68A255B0FB291AE6 /* App_watchOS.app */; productType = "com.apple.product-type.application.watchapp2"; @@ -1806,6 +1830,8 @@ dependencies = ( ); name = BundleY; + packageProductDependencies = ( + ); productName = BundleY; productReference = BB677D970923F663D846D7E0 /* BundleY.bundle */; productType = "com.apple.product-type.bundle"; @@ -1823,6 +1849,8 @@ dependencies = ( ); name = CrossOverlayFramework_macOS; + packageProductDependencies = ( + ); productName = CrossOverlayFramework_macOS; productReference = E0F31A9DE15B210D101AFC81 /* CrossOverlayFramework.framework */; productType = "com.apple.product-type.framework"; @@ -1839,6 +1867,8 @@ dependencies = ( ); name = "App_watchOS Extension"; + packageProductDependencies = ( + ); productName = "App_watchOS Extension"; productReference = 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */; productType = "com.apple.product-type.watchkit2-extension"; @@ -1856,6 +1886,8 @@ dependencies = ( ); name = CrossOverlayFramework_tvOS; + packageProductDependencies = ( + ); productName = CrossOverlayFramework_tvOS; productReference = 0095836FE59395511E0CB4F0 /* CrossOverlayFramework.framework */; productType = "com.apple.product-type.framework"; @@ -1872,6 +1904,8 @@ dependencies = ( ); name = DriverKitDriver; + packageProductDependencies = ( + ); productName = DriverKitDriver; productReference = 83B5EC7EF81F7E4B6F426D4E /* DriverKitDriver.dext */; productType = "com.apple.product-type.driver-extension"; @@ -1892,6 +1926,8 @@ CE96B0951433713033A03DCD /* PBXTargetDependency */, ); name = Framework_tvOS; + packageProductDependencies = ( + ); productName = Framework_tvOS; productReference = 7D67F1C1BFBACE101DE7DB51 /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -1910,6 +1946,8 @@ AD555A4814F2D294E2AC72D8 /* PBXTargetDependency */, ); name = Framework_macOS; + packageProductDependencies = ( + ); productName = Framework_macOS; productReference = 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -1926,6 +1964,8 @@ dependencies = ( ); name = StaticLibrary_ObjC_macOS; + packageProductDependencies = ( + ); productName = StaticLibrary_ObjC_macOS; productReference = 86169DEEDEAF09AB89C8A31D /* libStaticLibrary_ObjC.a */; productType = "com.apple.product-type.library.static"; @@ -1945,6 +1985,8 @@ 2D1B4333107E10912508724E /* PBXTargetDependency */, ); name = App_Clip_Tests; + packageProductDependencies = ( + ); productName = App_Clip_Tests; productReference = 3FC04772130400920D68A167 /* App_Clip_Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -1961,6 +2003,8 @@ dependencies = ( ); name = Framework2_watchOS; + packageProductDependencies = ( + ); productName = Framework2_watchOS; productReference = AB055761199DF36DB0C629A6 /* Framework2.framework */; productType = "com.apple.product-type.framework"; @@ -1981,6 +2025,8 @@ 35DF16CA4A1F88140CF69620 /* PBXTargetDependency */, ); name = Framework_watchOS; + packageProductDependencies = ( + ); productName = Framework_watchOS; productReference = 6177CC6263783487E93F7F4D /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -1997,6 +2043,8 @@ 8B1B6143B8996B3CF0FE61C5 /* PBXTargetDependency */, ); name = App_macOS_Tests; + packageProductDependencies = ( + ); productName = App_macOS_Tests; productReference = 0B9D98D935F2C69A1F5BA539 /* App_macOS_Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -2013,6 +2061,8 @@ dependencies = ( ); name = StaticLibrary_ObjC_watchOS; + packageProductDependencies = ( + ); productName = StaticLibrary_ObjC_watchOS; productReference = 46DD8F9AAC104BDB63793625 /* libStaticLibrary_ObjC.a */; productType = "com.apple.product-type.library.static"; @@ -2030,6 +2080,8 @@ 053FF4219E7A0E38E90071B0 /* PBXTargetDependency */, ); name = iMessageApp; + packageProductDependencies = ( + ); productName = iMessageApp; productReference = 9A87A926D563773658FB87FE /* iMessageApp.app */; productType = "com.apple.product-type.application.messages"; @@ -2046,6 +2098,8 @@ dependencies = ( ); name = Framework2_tvOS; + packageProductDependencies = ( + ); productName = Framework2_tvOS; productReference = A0DC40025AB59B688E758829 /* Framework2.framework */; productType = "com.apple.product-type.framework"; @@ -2062,6 +2116,8 @@ 1341A437B2D0402F4F4CEA51 /* PBXTargetDependency */, ); name = App_Clip_UITests; + packageProductDependencies = ( + ); productName = App_Clip_UITests; productReference = 7C7EC00B53FF878007F6ECAB /* App_Clip_UITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; @@ -2078,6 +2134,8 @@ dependencies = ( ); name = StaticLibrary_ObjC_tvOS; + packageProductDependencies = ( + ); productName = StaticLibrary_ObjC_tvOS; productReference = 469B630D28015F0EDC456F6B /* libStaticLibrary_ObjC.a */; productType = "com.apple.product-type.library.static"; @@ -2094,6 +2152,8 @@ dependencies = ( ); name = EndpointSecuritySystemExtension; + packageProductDependencies = ( + ); productName = EndpointSecuritySystemExtension; productReference = E5E0A80CCE8F8DB662DCD2D0 /* EndpointSecuritySystemExtension.systemextension */; productType = "com.apple.product-type.system-extension"; @@ -2110,6 +2170,8 @@ dependencies = ( ); name = NetworkSystemExtension; + packageProductDependencies = ( + ); productName = NetworkSystemExtension; productReference = 2049B6DD2AFE85F9DC9F3EB3 /* NetworkSystemExtension.systemextension */; productType = "com.apple.product-type.system-extension"; @@ -2128,6 +2190,8 @@ 486D84E583999BAA22C679EC /* PBXTargetDependency */, ); name = Framework_iOS; + packageProductDependencies = ( + ); productName = Framework_iOS; productReference = 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -2143,6 +2207,8 @@ dependencies = ( ); name = EntitledApp; + packageProductDependencies = ( + ); productName = EntitledApp; productReference = 7D700FA699849D2F95216883 /* EntitledApp.app */; productType = "com.apple.product-type.application"; @@ -2180,6 +2246,8 @@ dependencies = ( ); name = CrossOverlayFramework_watchOS; + packageProductDependencies = ( + ); productName = CrossOverlayFramework_watchOS; productReference = 89EB41A001D8BF26431C5798 /* CrossOverlayFramework.framework */; productType = "com.apple.product-type.framework"; @@ -2196,6 +2264,8 @@ dependencies = ( ); name = Framework2_iOS; + packageProductDependencies = ( + ); productName = Framework2_iOS; productReference = 3EF21DF245F66BEF5446AAEF /* Framework2.framework */; productType = "com.apple.product-type.framework"; @@ -2217,6 +2287,8 @@ CFEACC1CED73B52EA1CCD054 /* PBXTargetDependency */, ); name = App_Clip; + packageProductDependencies = ( + ); productName = App_Clip; productReference = 38DB679FF1CF4E379D1AB103 /* App_Clip.app */; productType = "com.apple.product-type.application.on-demand-install-capable"; @@ -2231,6 +2303,8 @@ dependencies = ( ); name = BundleX; + packageProductDependencies = ( + ); productName = BundleX; productReference = 84317819C92F78425870E483 /* BundleX.bundle */; productType = "com.apple.product-type.bundle"; @@ -2250,6 +2324,8 @@ 6AE62A40F64046B597B07801 /* PBXTargetDependency */, ); name = App_iOS_Tests; + packageProductDependencies = ( + ); productName = App_iOS_Tests; productReference = CB77A637470A3CDA2BDDBE99 /* App_iOS_Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -2265,6 +2341,8 @@ dependencies = ( ); name = ExternalTarget; + packageProductDependencies = ( + ); productName = ExternalTarget; productReference = 2385A62F6C6EE8D461EE19F2 /* ExternalTarget.framework */; productType = "com.apple.product-type.framework"; @@ -2280,6 +2358,8 @@ dependencies = ( ); name = "XPC Service"; + packageProductDependencies = ( + ); productName = "XPC Service"; productReference = 22237B8EBD9E6BE8EBC8735F /* XPC Service.xpc */; productType = "com.apple.product-type.xpc-service"; @@ -2296,6 +2376,8 @@ 49587048934568C2182DA825 /* PBXTargetDependency */, ); name = App_iOS_UITests; + packageProductDependencies = ( + ); productName = App_iOS_UITests; productReference = 13EEAB58665D79C15184D9D0 /* App_iOS_UITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; @@ -2312,6 +2394,8 @@ dependencies = ( ); name = Framework2_macOS; + packageProductDependencies = ( + ); productName = Framework2_macOS; productReference = 2233774B86539B1574D206B0 /* Framework2.framework */; productType = "com.apple.product-type.framework"; @@ -2355,9 +2439,11 @@ en, ); mainGroup = 293D0FF827366B513839236A; + minimizedProjectReferenceProxies = 1; packageReferences = ( 4EDA79334592CBBA0E507AD2 /* XCRemoteSwiftPackageReference "Swinject" */, ); + preferredProjectObjectVersion = 54; projectDirPath = ""; projectReferences = ( { diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index 27f0a4fa0..69e850a90 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -491,7 +491,7 @@ schemes: defaultLocation: Honolulu, HI, USA customLLDBInit: ${SRCROOT}/.lldbinit enableGPUFrameCaptureMode: "disabled" - enableGPUValidationMode: "disabled" + enableGPUValidationMode: false storeKitConfiguration: "App_iOS/Configuration.storekit" macroExpansion: App_iOS test: diff --git a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj index 3318273cf..e48b84f42 100644 --- a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj @@ -42,6 +42,8 @@ dependencies = ( ); name = ExternalTarget; + packageProductDependencies = ( + ); productName = ExternalTarget; productReference = 9194D98A5CC4C58074AED541 /* ExternalTarget.framework */; productType = "com.apple.product-type.framework"; @@ -56,6 +58,8 @@ dependencies = ( ); name = Shared_TargetScheme; + packageProductDependencies = ( + ); productName = Shared_TargetScheme; productReference = 5FE827133AD803E389008F92 /* Shared_TargetScheme.bundle */; productType = "com.apple.product-type.bundle"; @@ -80,6 +84,8 @@ en, ); mainGroup = 2D08B11F4EE060D112B7BCA1; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 54; projectDirPath = ""; projectRoot = ""; targets = ( diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 64f9f5e4c..7a42dcb9d 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -1554,12 +1554,12 @@ class ProjectGeneratorTests: XCTestCase { let pbxProject = try project.generatePbxProj(specValidate: false) let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) - let projectSpecDependency = try unwrap(nativeTarget.packageProductDependencies.first(where: { $0.productName == "ProjectSpec" })) + let projectSpecDependency = try unwrap(nativeTarget.packageProductDependencies?.first(where: { $0.productName == "ProjectSpec" })) try expect(projectSpecDependency.package?.name) == "XcodeGen" try expect(projectSpecDependency.package?.versionRequirement) == .branch("master") - let codabilityDependency = try unwrap(nativeTarget.packageProductDependencies.first(where: { $0.productName == "Codability" })) + let codabilityDependency = try unwrap(nativeTarget.packageProductDependencies?.first(where: { $0.productName == "Codability" })) try expect(codabilityDependency.package?.name) == "Codability" try expect(codabilityDependency.package?.versionRequirement) == .exact("1.0.0") From 490ee83b590a9ec5f97edfdabb83851b6b03abfc Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Sun, 6 Apr 2025 19:22:03 +1000 Subject: [PATCH 270/284] update changelog --- CHANGELOG.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1237ff1c..50aa45a77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,32 @@ ## Next Version +### Added + +- Added `excludeFromProject` from local packages #1512 @maximkrouk +- Added support for `preferredScreenCaptureFormat` in schemes #1450 @vakhidbetrakhmadov + +### Changes + +- `.appex` files are now copied to plugins directory by default #1531 @iljaiwas +- The `preGenCommand` is now run before validation and caching #1500 #1519 @simonbs @dalemyers +- Improve performance of spec validation #1522 @zewuchen +- The `enableGPUValidationMode` enum is deprecated and is now a boolean #1515 @marcosgriselli @yonaskolb + ### Fixed -- Require swift-tools-version 5.9. #1489 @0111b +- **Breaking**: `fileGroups` are now relative paths when in included files, like other paths #1534 @shnhrrsn +- **Breaking**: Local package paths are now relative paths when in included files, like other paths #1498 @juri +- Optional groups are no longer skipped when missing and generating projects from a different directory #1529 @SSheldon + +### Internal + +- Fix Swift 6.0 warnings #1513 @marcosgriselli +- Update package swift tools to 5.9 #1489 @0111b +- Add Xcode 16 to CI #1439 @giginet +- Fix test project building on CI #1537 @yonaskolb +- Skip failing tests on Linux #1517 @marcosgriselli +- XcodeProj updated to 8.24.3 #1515 @marcosgriselli @yonaskolb ## 2.42.0 From 7193eb447a6f60061f069e07bc1efd32d73c0e19 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 15 Apr 2025 22:49:48 +1000 Subject: [PATCH 271/284] Update to 2.43.0 --- CHANGELOG.md | 2 ++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50aa45a77..059ad11b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Version +## 2.43.0 + ### Added - Added `excludeFromProject` from local packages #1512 @maximkrouk diff --git a/Makefile b/Makefile index 1768faed6..6370bcd4a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.42.0 +VERSION = 2.43.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 4f00069f6..e60989200 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.42.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.43.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 0c4e2e25c..1222a4aa0 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.42.0") +let version = Version("2.43.0") let cli = XcodeGenCLI(version: version) cli.execute() From 2b933a94ec4a989392a79bfddd344ff1664eaef1 Mon Sep 17 00:00:00 2001 From: Kohki Miki Date: Tue, 20 May 2025 11:12:25 +0900 Subject: [PATCH 272/284] Update CI equipments and drop Xcode 15 support (#1548) --- .github/workflows/ci.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fda76be5f..f7b12ba66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,16 +4,11 @@ on: pull_request: {} jobs: run: - runs-on: ${{ matrix.macos }} + runs-on: macos-15 name: Xcode ${{ matrix.xcode }} strategy: matrix: - xcode: ["15.4", "16.0"] - include: - - xcode: "15.4" - macos: macos-15 - - xcode: "16.0" - macos: macos-15 + xcode: ["16.0", "16.3"] env: DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer steps: From 53cb43cb66908a28812d7629d03fed94c9827a24 Mon Sep 17 00:00:00 2001 From: Ryu <87907656+Ryu0118@users.noreply.github.com> Date: Fri, 6 Jun 2025 23:23:21 +0900 Subject: [PATCH 273/284] Add validation to ensure that settings.configs values are dictionaries, in order to prevent misuse (#1547) * Add validation to ensure settings.configs values are dictionaries to prevent misuse * Add tests for invalid settings.configs value formats * Replaced with filter and split into a function * Rename invalidConfigsFormat to invalidConfigsMappingFormat * Add comments to explain invalid fixture * Rename test fixture * Update CHANGELOG.md * Correct grammer * Use KeyPath instead of closure * Rename validateMappingStyleInConfig to extractValidConfigs * Add a document comment for extractValidConfigs(from:) * Use old testing api and remove EquatableErrorBox * Rename test case to use "mapping" instead of "dictionary" * Add ValidSettingsExtractor to encapsulate the logic for converting a dictionary to Settings * Add settings validation for both Target and AggregateTarget * Add tests for invalid settings.configs in Target and AggregateTarget * Add document comments for ValidSettingsExtractor * Rename ValidSettingsExtractor to BuildSettingsExtractor * Add settings validation for settingGroups * Add tests for settingGroups * Rename extract to parse * Refactor * Update Tests/ProjectSpecTests/InvalidConfigsFormatTests.swift --------- Co-authored-by: Yonas Kolb --- CHANGELOG.md | 3 ++ Sources/ProjectSpec/AggregateTarget.swift | 2 +- .../ProjectSpec/BuildSettingsExtractor.swift | 37 ++++++++++++++++ Sources/ProjectSpec/Project.swift | 8 ++-- Sources/ProjectSpec/Settings.swift | 23 +++++++++- Sources/ProjectSpec/SpecParsingError.swift | 3 ++ Sources/ProjectSpec/Target.swift | 2 +- ...gs_value_non_mapping_aggregate_targets.yml | 24 +++++++++++ ...nfigs_value_non_mapping_setting_groups.yml | 19 ++++++++ ...lid_configs_value_non_mapping_settings.yml | 11 +++++ ...alid_configs_value_non_mapping_targets.yml | 15 +++++++ .../InvalidConfigsFormatTests.swift | 43 +++++++++++++++++++ 12 files changed, 184 insertions(+), 6 deletions(-) create mode 100644 Sources/ProjectSpec/BuildSettingsExtractor.swift create mode 100644 Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_aggregate_targets.yml create mode 100644 Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_setting_groups.yml create mode 100644 Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_settings.yml create mode 100644 Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_targets.yml create mode 100644 Tests/ProjectSpecTests/InvalidConfigsFormatTests.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index 059ad11b3..a3ed1916f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Next Version +### Fixed +- Added validation to ensure that all values in `settings.configs` are mappings. Previously, passing non-mapping values did not raise an error, making it difficult to detect misconfigurations. Now, `SpecParsingError.invalidConfigsMappingFormat` is thrown if misused. #1547 @Ryu0118 + ## 2.43.0 ### Added diff --git a/Sources/ProjectSpec/AggregateTarget.swift b/Sources/ProjectSpec/AggregateTarget.swift index 1a3225c40..9bea7098c 100644 --- a/Sources/ProjectSpec/AggregateTarget.swift +++ b/Sources/ProjectSpec/AggregateTarget.swift @@ -60,7 +60,7 @@ extension AggregateTarget: NamedJSONDictionaryConvertible { public init(name: String, jsonDictionary: JSONDictionary) throws { self.name = jsonDictionary.json(atKeyPath: "name") ?? name targets = jsonDictionary.json(atKeyPath: "targets") ?? [] - settings = jsonDictionary.json(atKeyPath: "settings") ?? .empty + settings = try BuildSettingsParser(jsonDictionary: jsonDictionary).parse() configFiles = jsonDictionary.json(atKeyPath: "configFiles") ?? [:] buildScripts = jsonDictionary.json(atKeyPath: "buildScripts") ?? [] buildToolPlugins = jsonDictionary.json(atKeyPath: "buildToolPlugins") ?? [] diff --git a/Sources/ProjectSpec/BuildSettingsExtractor.swift b/Sources/ProjectSpec/BuildSettingsExtractor.swift new file mode 100644 index 000000000..1dfeb93de --- /dev/null +++ b/Sources/ProjectSpec/BuildSettingsExtractor.swift @@ -0,0 +1,37 @@ +import Foundation +import JSONUtilities + +/// A helper for extracting and validating the `Settings` object from a JSON dictionary. +struct BuildSettingsParser { + let jsonDictionary: JSONDictionary + + /// Attempts to extract and parse the `Settings` from the dictionary. + /// + /// - Returns: A valid `Settings` object + func parse() throws -> Settings { + do { + return try jsonDictionary.json(atKeyPath: "settings") + } catch let specParsingError as SpecParsingError { + // Re-throw `SpecParsingError` to prevent the misuse of settings.configs. + throw specParsingError + } catch { + // Ignore all errors except `SpecParsingError` + return .empty + } + } + + /// Attempts to extract and parse setting groups from the dictionary with fallback defaults. + /// + /// - Returns: Parsed setting groups or default groups if parsing fails + func parseSettingGroups() throws -> [String: Settings] { + do { + return try jsonDictionary.json(atKeyPath: "settingGroups", invalidItemBehaviour: .fail) + } catch let specParsingError as SpecParsingError { + // Re-throw `SpecParsingError` to prevent the misuse of settingGroups. + throw specParsingError + } catch { + // Ignore all errors except `SpecParsingError` + return jsonDictionary.json(atKeyPath: "settingPresets") ?? [:] + } + } +} diff --git a/Sources/ProjectSpec/Project.swift b/Sources/ProjectSpec/Project.swift index 72daf0324..70fb9bc33 100644 --- a/Sources/ProjectSpec/Project.swift +++ b/Sources/ProjectSpec/Project.swift @@ -171,11 +171,13 @@ extension Project { self.basePath = basePath let jsonDictionary = Project.resolveProject(jsonDictionary: jsonDictionary) + let buildSettingsParser = BuildSettingsParser(jsonDictionary: jsonDictionary) name = try jsonDictionary.json(atKeyPath: "name") - settings = jsonDictionary.json(atKeyPath: "settings") ?? .empty - settingGroups = jsonDictionary.json(atKeyPath: "settingGroups") - ?? jsonDictionary.json(atKeyPath: "settingPresets") ?? [:] + + settings = try buildSettingsParser.parse() + settingGroups = try buildSettingsParser.parseSettingGroups() + let configs: [String: String] = jsonDictionary.json(atKeyPath: "configs") ?? [:] self.configs = configs.isEmpty ? Config.defaultConfigs : configs.map { Config(name: $0, type: ConfigType(rawValue: $1)) }.sorted { $0.name < $1.name } diff --git a/Sources/ProjectSpec/Settings.swift b/Sources/ProjectSpec/Settings.swift index f59006a72..b3b366a86 100644 --- a/Sources/ProjectSpec/Settings.swift +++ b/Sources/ProjectSpec/Settings.swift @@ -28,7 +28,8 @@ public struct Settings: Equatable, JSONObjectConvertible, CustomStringConvertibl groups = jsonDictionary.json(atKeyPath: "groups") ?? jsonDictionary.json(atKeyPath: "presets") ?? [] let buildSettingsDictionary: JSONDictionary = jsonDictionary.json(atKeyPath: "base") ?? [:] buildSettings = buildSettingsDictionary - configSettings = jsonDictionary.json(atKeyPath: "configs") ?? [:] + + self.configSettings = try Self.extractValidConfigs(from: jsonDictionary) } else { buildSettings = jsonDictionary configSettings = [:] @@ -36,6 +37,26 @@ public struct Settings: Equatable, JSONObjectConvertible, CustomStringConvertibl } } + /// Extracts and validates the `configs` mapping from the given JSON dictionary. + /// - Parameter jsonDictionary: The JSON dictionary to extract `configs` from. + /// - Returns: A dictionary mapping configuration names to `Settings` objects. + private static func extractValidConfigs(from jsonDictionary: JSONDictionary) throws -> [String: Settings] { + guard let configSettings = jsonDictionary["configs"] as? JSONDictionary else { + return [:] + } + + let invalidConfigKeys = Set( + configSettings.filter { !($0.value is JSONDictionary) } + .map(\.key) + ) + + guard invalidConfigKeys.isEmpty else { + throw SpecParsingError.invalidConfigsMappingFormat(keys: invalidConfigKeys) + } + + return try jsonDictionary.json(atKeyPath: "configs") + } + public static func == (lhs: Settings, rhs: Settings) -> Bool { NSDictionary(dictionary: lhs.buildSettings).isEqual(to: rhs.buildSettings) && lhs.configSettings == rhs.configSettings && diff --git a/Sources/ProjectSpec/SpecParsingError.swift b/Sources/ProjectSpec/SpecParsingError.swift index b875eadce..57db99f2e 100644 --- a/Sources/ProjectSpec/SpecParsingError.swift +++ b/Sources/ProjectSpec/SpecParsingError.swift @@ -15,6 +15,7 @@ public enum SpecParsingError: Error, CustomStringConvertible { case unknownBreakpointActionType(String) case unknownBreakpointActionConveyanceType(String) case unknownBreakpointActionSoundName(String) + case invalidConfigsMappingFormat(keys: Set) public var description: String { switch self { @@ -46,6 +47,8 @@ public enum SpecParsingError: Error, CustomStringConvertible { return "Unknown Breakpoint Action conveyance type: \(type)" case let .unknownBreakpointActionSoundName(name): return "Unknown Breakpoint Action sound name: \(name)" + case let .invalidConfigsMappingFormat(keys): + return "Invalid format: The value for \"\(keys.sorted().joined(separator: ", "))\" in `configs` must be mapping format" } } } diff --git a/Sources/ProjectSpec/Target.swift b/Sources/ProjectSpec/Target.swift index 3b9f2c535..781994f42 100644 --- a/Sources/ProjectSpec/Target.swift +++ b/Sources/ProjectSpec/Target.swift @@ -316,7 +316,7 @@ extension Target: NamedJSONDictionaryConvertible { deploymentTarget = nil } - settings = jsonDictionary.json(atKeyPath: "settings") ?? .empty + settings = try BuildSettingsParser(jsonDictionary: jsonDictionary).parse() configFiles = jsonDictionary.json(atKeyPath: "configFiles") ?? [:] if let source: String = jsonDictionary.json(atKeyPath: "sources") { sources = [TargetSource(path: source)] diff --git a/Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_aggregate_targets.yml b/Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_aggregate_targets.yml new file mode 100644 index 000000000..293e384df --- /dev/null +++ b/Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_aggregate_targets.yml @@ -0,0 +1,24 @@ +name: InvalidConfigsValueNonMappingAggregateTargets + +# This fixture tests validation of `settings.configs` under an aggregate target. +# Here, `invalid_key0` and `invalid_key1` are scalar values (not mappings), +# so parsing should throw SpecParsingError.invalidConfigsMappingFormat. +targets: + valid_target1: + type: application + platform: iOS + valid_target2: + type: application + platform: iOS + +aggregateTargets: + invalid_target: + targets: + - valid_target1 + - valid_target2 + settings: + configs: + invalid_key0: value0 + debug: + valid_key: value1 + invalid_key1: value2 diff --git a/Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_setting_groups.yml b/Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_setting_groups.yml new file mode 100644 index 000000000..90822c24f --- /dev/null +++ b/Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_setting_groups.yml @@ -0,0 +1,19 @@ +name: InvalidConfigsValueNonMappingSettingGroups + +# This fixture tests validation of `settings.configs` under an aggregate target. +# Here, `invalid_key0` and `invalid_key1` are scalar values (not mappings), +# so parsing should throw SpecParsingError.invalidConfigsMappingFormat. +settingGroups: + invalid_preset: + configs: + invalid_key0: value0 + debug: + valid_key: value1 + invalid_key1: value2 +targets: + invalid_target: + type: application + platform: iOS + settings: + groups: + - invalid_preset diff --git a/Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_settings.yml b/Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_settings.yml new file mode 100644 index 000000000..431804b70 --- /dev/null +++ b/Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_settings.yml @@ -0,0 +1,11 @@ +name: InvalidConfigsValueNonMappingSettings + +# This fixture tests validation of `settings.configs` at the top level. +# Here, `invalid_key0` and `invalid_key1` are scalar values (not mappings), +# so parsing should throw SpecParsingError.invalidConfigsMappingFormat. +settings: + configs: + invalid_key0: value0 + debug: + valid_key: value1 + invalid_key1: value2 diff --git a/Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_targets.yml b/Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_targets.yml new file mode 100644 index 000000000..84a803bce --- /dev/null +++ b/Tests/Fixtures/invalid_configs/invalid_configs_value_non_mapping_targets.yml @@ -0,0 +1,15 @@ +name: InvalidConfigsValueNonMappingTargets + +# This fixture tests nested validation of `settings.configs` under a target. +# Here, `invalid_key0` and `invalid_key1` are scalar values (not mappings), +# so parsing should throw SpecParsingError.invalidConfigsMappingFormat. +targets: + invalid_target: + type: application + platform: iOS + settings: + configs: + invalid_key0: value0 + debug: + valid_key: value1 + invalid_key1: value2 diff --git a/Tests/ProjectSpecTests/InvalidConfigsFormatTests.swift b/Tests/ProjectSpecTests/InvalidConfigsFormatTests.swift new file mode 100644 index 000000000..96a7540d1 --- /dev/null +++ b/Tests/ProjectSpecTests/InvalidConfigsFormatTests.swift @@ -0,0 +1,43 @@ +import ProjectSpec +import Testing +import TestSupport +import PathKit + +struct InvalidConfigsMappingFormatTests { + struct InvalidConfigsTestArguments { + var fixturePath: Path + var expectedError: SpecParsingError + } + + private static var testArguments: [InvalidConfigsTestArguments] { + let invalidConfigsFixturePath: Path = fixturePath + "invalid_configs" + return [ + InvalidConfigsTestArguments( + fixturePath: invalidConfigsFixturePath + "invalid_configs_value_non_mapping_settings.yml", + expectedError: SpecParsingError.invalidConfigsMappingFormat(keys: ["invalid_key0", "invalid_key1"]) + ), + InvalidConfigsTestArguments( + fixturePath: invalidConfigsFixturePath + "invalid_configs_value_non_mapping_targets.yml", + expectedError: SpecParsingError.invalidConfigsMappingFormat(keys: ["invalid_key0", "invalid_key1"]) + ), + InvalidConfigsTestArguments( + fixturePath: invalidConfigsFixturePath + "invalid_configs_value_non_mapping_aggregate_targets.yml", + expectedError: SpecParsingError.invalidConfigsMappingFormat(keys: ["invalid_key0", "invalid_key1"]) + ), + InvalidConfigsTestArguments( + fixturePath: invalidConfigsFixturePath + "invalid_configs_value_non_mapping_setting_groups.yml", + expectedError: SpecParsingError.invalidConfigsMappingFormat(keys: ["invalid_key0", "invalid_key1"]) + ) + ] + } + + @Test("throws invalidConfigsMappingFormat for non-mapping configs entries", arguments: testArguments) + func testInvalidConfigsMappingFormat(_ arguments: InvalidConfigsTestArguments) throws { + #expect { + try Project(path: arguments.fixturePath) + } throws: { actualError in + (actualError as any CustomStringConvertible).description + == arguments.expectedError.description + } + } +} From c32aa4cc9461bd6347596e2dfb47b34924757ea7 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 17 Jul 2025 15:15:43 +1000 Subject: [PATCH 274/284] Synced folders (#1541) * update xcodeproj to 8.27.7 * add syncedFolder source type * drop xcode 15 support * Rely on fileReference instead of adding new synchronizedRootGroup (#1557) * fix: don't include untracked children in cache --------- Co-authored-by: Kirill Yakimovich --- Docs/ProjectSpec.md | 5 +++ Package.resolved | 8 ++-- Package.swift | 2 +- Sources/ProjectSpec/CacheFile.swift | 2 +- Sources/ProjectSpec/Project.swift | 22 +++++++++-- Sources/ProjectSpec/SourceType.swift | 1 + Sources/ProjectSpec/SpecOptions.swift | 6 ++- Sources/XcodeGenKit/PBXProjGenerator.swift | 6 +++ Sources/XcodeGenKit/SourceGenerator.swift | 38 ++++++++++++++++++- Sources/XcodeGenKit/Version.swift | 2 +- Sources/XcodeGenKit/XCProjExtensions.swift | 2 + .../Project.xcodeproj/project.pbxproj | 6 +-- .../SPM/SPM.xcodeproj/project.pbxproj | 6 +-- .../xcshareddata/xcschemes/App.xcscheme | 6 ++- .../AnotherProject.xcodeproj/project.pbxproj | 6 +-- .../TestProject/App_iOS/AppDelegate.swift | 8 +++- .../Project.xcodeproj/project.pbxproj | 20 +++++++++- .../xcshareddata/xcschemes/App_Clip.xcscheme | 6 ++- .../xcschemes/App_Scheme.xcscheme | 4 +- .../xcschemes/App_iOS Production.xcscheme | 6 ++- .../xcschemes/App_iOS Staging.xcscheme | 6 ++- .../xcschemes/App_iOS Test.xcscheme | 6 ++- .../TestProject/SyncedFolder/SyncedFile.swift | 4 ++ Tests/Fixtures/TestProject/project.yml | 2 + .../TestProject.xcodeproj/project.pbxproj | 6 +-- .../SourceGeneratorTests.swift | 36 ++++++++++++++++++ 26 files changed, 179 insertions(+), 43 deletions(-) create mode 100644 Tests/Fixtures/TestProject/SyncedFolder/SyncedFile.swift diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 83166e9c4..5a4aa0dde 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -153,6 +153,10 @@ Note that target names can also be changed by adding a `name` property to a targ - [ ] **postGenCommand**: **String** - A bash command to run after the project has been generated. If the project isn't generated due to no changes when using the cache then this won't run. This is useful for running things like `pod install` only if the project is actually regenerated. - [ ] **useBaseInternationalization**: **Bool** If this is `false` and your project does not include resources located in a **Base.lproj** directory then `Base` will not be included in the projects 'known regions'. The default value is `true`. - [ ] **schemePathPrefix**: **String** - A path prefix for relative paths in schemes, such as StoreKitConfiguration. The default is `"../../"`, which is suitable for non-workspace projects. For use in workspaces, use `"../"`. +- [ ] **defaultSourceDirectoryType**: **String** - When a [Target source](#target-source) doesn't specify a type and is a directory, this is the type that will be used. If nothing is specified for either then `group` will be used. + - `group` (default) + - `folder` + - `syncedFolder` ```yaml options: @@ -542,6 +546,7 @@ A source can be provided via a string (the path) or an object of the form: - `file`: a file reference with a parent group will be created (Default for files or directories with extensions) - `group`: a group with all it's containing files. (Default for directories without extensions) - `folder`: a folder reference. + - `syncedFolder`: Xcode 16's synchronized folders, also knows as buildable folders - [ ] **headerVisibility**: **String** - The visibility of any headers. This defaults to `public`, but can be either: - `public` - `private` diff --git a/Package.resolved b/Package.resolved index 237f873fa..671959c8b 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/tadija/AEXML.git", "state" : { - "revision" : "38f7d00b23ecd891e1ee656fa6aeebd6ba04ecc3", - "version" : "4.6.1" + "revision" : "db806756c989760b35108146381535aec231092b", + "version" : "4.7.0" } }, { @@ -77,8 +77,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/tuist/XcodeProj.git", "state" : { - "revision" : "dc3b87a4e69f9cd06c6cb16199f5d0472e57ef6b", - "version" : "8.24.3" + "revision" : "b1caa062d4aaab3e3d2bed5fe0ac5f8ce9bf84f4", + "version" : "8.27.7" } }, { diff --git a/Package.swift b/Package.swift index 99c7649c0..ab86ad008 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: "4.0.0"), - .package(url: "https://github.com/tuist/XcodeProj.git", exact: "8.24.3"), + .package(url: "https://github.com/tuist/XcodeProj.git", exact: "8.27.7"), .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/freddi-kit/ArtifactBundleGen", exact: "0.0.6") diff --git a/Sources/ProjectSpec/CacheFile.swift b/Sources/ProjectSpec/CacheFile.swift index c9c64692b..95e87014f 100644 --- a/Sources/ProjectSpec/CacheFile.swift +++ b/Sources/ProjectSpec/CacheFile.swift @@ -10,7 +10,7 @@ public class CacheFile { guard #available(OSX 10.13, *) else { return nil } - let files = Set(project.allFiles) + let files = Set(project.allTrackedFiles) .map { ((try? $0.relativePath(from: project.basePath)) ?? $0).string } .sorted { $0.localizedStandardCompare($1) == .orderedAscending } .joined(separator: "\n") diff --git a/Sources/ProjectSpec/Project.swift b/Sources/ProjectSpec/Project.swift index 70fb9bc33..e872a27bf 100644 --- a/Sources/ProjectSpec/Project.swift +++ b/Sources/ProjectSpec/Project.swift @@ -252,7 +252,7 @@ extension Project: PathContainer { extension Project { - public var allFiles: [Path] { + public var allTrackedFiles: [Path] { var files: [Path] = [] files.append(contentsOf: configFilePaths) for fileGroup in fileGroups { @@ -270,8 +270,12 @@ extension Project { files.append(contentsOf: target.configFilePaths) for source in target.sources { let sourcePath = basePath + source.path - let sourceChildren = (try? sourcePath.recursiveChildren()) ?? [] - files.append(contentsOf: sourceChildren) + + let type = source.type ?? options.defaultSourceDirectoryType ?? .group + if type.projectTracksChildren { + let sourceChildren = (try? sourcePath.recursiveChildren()) ?? [] + files.append(contentsOf: sourceChildren) + } files.append(sourcePath) } } @@ -279,6 +283,18 @@ extension Project { } } +extension SourceType { + + var projectTracksChildren: Bool { + switch self { + case .file: false + case .folder: false + case .group: true + case .syncedFolder: false + } + } +} + extension BuildSettingsContainer { fileprivate var configFilePaths: [Path] { diff --git a/Sources/ProjectSpec/SourceType.swift b/Sources/ProjectSpec/SourceType.swift index 77ce4ffe7..9fe009321 100644 --- a/Sources/ProjectSpec/SourceType.swift +++ b/Sources/ProjectSpec/SourceType.swift @@ -11,4 +11,5 @@ public enum SourceType: String { case group case file case folder + case syncedFolder } diff --git a/Sources/ProjectSpec/SpecOptions.swift b/Sources/ProjectSpec/SpecOptions.swift index a5df4e28d..c10c34698 100644 --- a/Sources/ProjectSpec/SpecOptions.swift +++ b/Sources/ProjectSpec/SpecOptions.swift @@ -37,6 +37,7 @@ public struct SpecOptions: Equatable { public var postGenCommand: String? public var useBaseInternationalization: Bool public var schemePathPrefix: String + public var defaultSourceDirectoryType: SourceType? public enum ValidationType: String { case missingConfigs @@ -100,7 +101,8 @@ public struct SpecOptions: Equatable { preGenCommand: String? = nil, postGenCommand: String? = nil, useBaseInternationalization: Bool = useBaseInternationalizationDefault, - schemePathPrefix: String = schemePathPrefixDefault + schemePathPrefix: String = schemePathPrefixDefault, + defaultSourceDirectoryType: SourceType? = nil ) { self.minimumXcodeGenVersion = minimumXcodeGenVersion self.carthageBuildPath = carthageBuildPath @@ -127,6 +129,7 @@ public struct SpecOptions: Equatable { self.postGenCommand = postGenCommand self.useBaseInternationalization = useBaseInternationalization self.schemePathPrefix = schemePathPrefix + self.defaultSourceDirectoryType = defaultSourceDirectoryType } } @@ -160,6 +163,7 @@ extension SpecOptions: JSONObjectConvertible { postGenCommand = jsonDictionary.json(atKeyPath: "postGenCommand") useBaseInternationalization = jsonDictionary.json(atKeyPath: "useBaseInternationalization") ?? SpecOptions.useBaseInternationalizationDefault schemePathPrefix = jsonDictionary.json(atKeyPath: "schemePathPrefix") ?? SpecOptions.schemePathPrefixDefault + defaultSourceDirectoryType = jsonDictionary.json(atKeyPath: "defaultSourceDirectoryType") if jsonDictionary["fileTypes"] != nil { fileTypes = try jsonDictionary.json(atKeyPath: "fileTypes") } else { diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index c7f5f2d1f..8dcad5afb 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -1454,6 +1454,12 @@ public class PBXProjGenerator { if !target.isLegacy { targetObject.productType = target.type } + + // add fileSystemSynchronizedGroups + let synchronizedRootGroups = sourceFiles.compactMap { $0.fileReference as? PBXFileSystemSynchronizedRootGroup } + if !synchronizedRootGroups.isEmpty { + targetObject.fileSystemSynchronizedGroups = synchronizedRootGroups + } } private func makePlatformFilter(for filter: Dependency.PlatformFilter) -> String? { diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index 0b8f93b70..e6c9948f8 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -687,6 +687,32 @@ class SourceGenerator { sourceFiles += groupSourceFiles sourceReference = group + case .syncedFolder: + + let relativePath = (try? path.relativePath(from: project.basePath)) ?? path + + let syncedRootGroup = PBXFileSystemSynchronizedRootGroup( + sourceTree: .group, + path: relativePath.string, + name: targetSource.name, + explicitFileTypes: [:], + exceptions: [], + explicitFolders: [] + ) + addObject(syncedRootGroup) + sourceReference = syncedRootGroup + + // TODO: adjust if hasCustomParent == true + rootGroups.insert(syncedRootGroup) + + let sourceFile = generateSourceFile( + targetType: targetType, + targetSource: targetSource, + path: path, + fileReference: syncedRootGroup, + buildPhases: buildPhases + ) + sourceFiles.append(sourceFile) } if hasCustomParent { @@ -703,7 +729,17 @@ class SourceGenerator { /// /// While `TargetSource` declares `type`, its optional and in the event that the value is not defined then we must resolve a sensible default based on the path of the source. private func resolvedTargetSourceType(for targetSource: TargetSource, at path: Path) -> SourceType { - return targetSource.type ?? (path.isFile || path.extension != nil ? .file : .group) + if let chosenType = targetSource.type { + return chosenType + } else { + if path.isFile || path.extension != nil { + return .file + } else if let sourceType = project.options.defaultSourceDirectoryType { + return sourceType + } else { + return .group + } + } } private func createParentGroups(_ parentGroups: [String], for fileElement: PBXFileElement) { diff --git a/Sources/XcodeGenKit/Version.swift b/Sources/XcodeGenKit/Version.swift index 57618046d..007d26f64 100644 --- a/Sources/XcodeGenKit/Version.swift +++ b/Sources/XcodeGenKit/Version.swift @@ -16,7 +16,7 @@ extension Project { } var objectVersion: UInt { - 54 + 70 } var minimizedProjectReferenceProxies: Int { diff --git a/Sources/XcodeGenKit/XCProjExtensions.swift b/Sources/XcodeGenKit/XCProjExtensions.swift index ec3f2763b..33d3f5b67 100644 --- a/Sources/XcodeGenKit/XCProjExtensions.swift +++ b/Sources/XcodeGenKit/XCProjExtensions.swift @@ -38,6 +38,8 @@ extension PBXProj { string += "\n 🌎 " + variantGroup.nameOrPath } else if let versionGroup = child as? XCVersionGroup { string += "\n 🔢 " + versionGroup.nameOrPath + } else if let syncedFolder = child as? PBXFileSystemSynchronizedRootGroup { + string += "\n 📁 " + syncedFolder.nameOrPath } } return string diff --git a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj index eb6cf67fe..3289e3bdd 100644 --- a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 70; objects = { /* Begin PBXBuildFile section */ @@ -322,8 +322,6 @@ attributes = { BuildIndependentTargetsInParallel = YES; LastUpgradeCheck = 1430; - TargetAttributes = { - }; }; buildConfigurationList = D91E14E36EC0B415578456F2 /* Build configuration list for PBXProject "Project" */; compatibilityVersion = "Xcode 14.0"; @@ -335,7 +333,7 @@ ); mainGroup = 293D0FF827366B513839236A; minimizedProjectReferenceProxies = 1; - preferredProjectObjectVersion = 54; + preferredProjectObjectVersion = 70; projectDirPath = ""; projectRoot = ""; targets = ( diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index 59311f725..7918465d3 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 70; objects = { /* Begin PBXAggregateTarget section */ @@ -239,8 +239,6 @@ attributes = { BuildIndependentTargetsInParallel = YES; LastUpgradeCheck = 1430; - TargetAttributes = { - }; }; buildConfigurationList = 425866ADA259DB93FC4AF1E3 /* Build configuration list for PBXProject "SPM" */; compatibilityVersion = "Xcode 14.0"; @@ -259,7 +257,7 @@ 630A8CE9F2BE39704ED9D461 /* XCLocalSwiftPackageReference "FooFeature" */, C6539B364583AE96C18CE377 /* XCLocalSwiftPackageReference "../../.." */, ); - preferredProjectObjectVersion = 54; + preferredProjectObjectVersion = 70; projectDirPath = ""; projectRoot = ""; targets = ( diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme b/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme index 353d320e0..298045bf8 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/xcshareddata/xcschemes/App.xcscheme @@ -40,7 +40,8 @@ + skipped = "NO" + parallelizable = "NO"> + skipped = "NO" + parallelizable = "NO"> Bool { - // Override point for customization after application launch. + + // file from a framework _ = FrameworkStruct() + // Standalone files added to project by path-to-file. _ = standaloneHello() + + // file in a synced folder + _ = SyncedStruct() + return true } } diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 1898ccc66..ce031a8c8 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 70; objects = { /* Begin PBXAggregateTarget section */ @@ -830,6 +830,18 @@ FED40A89162E446494DDE7C7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ +/* Begin PBXFileSystemSynchronizedRootGroup section */ + AE2AB2772F70DFFF402AA02B /* SyncedFolder */ = { + isa = PBXFileSystemSynchronizedRootGroup; + explicitFileTypes = { + }; + explicitFolders = ( + ); + path = SyncedFolder; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + /* Begin PBXFrameworksBuildPhase section */ 117840B4DBC04099F6779D00 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; @@ -1050,6 +1062,7 @@ 2E1E747C7BC434ADB80CC269 /* Headers */, 6B1603BA83AA0C7B94E45168 /* ResourceFolder */, 6BBE762F36D94AB6FFBFE834 /* SomeFile */, + AE2AB2772F70DFFF402AA02B /* SyncedFolder */, 79DC4A1E4D2E0D3A215179BC /* Bundles */, FC1515684236259C50A7747F /* Frameworks */, AC523591AC7BE9275003D2DB /* Products */, @@ -1686,6 +1699,9 @@ E8C078B0A2A2B0E1D35694D5 /* PBXTargetDependency */, 981D116D40DBA0407D0E0E94 /* PBXTargetDependency */, ); + fileSystemSynchronizedGroups = ( + AE2AB2772F70DFFF402AA02B /* SyncedFolder */, + ); name = App_iOS; packageProductDependencies = ( D7917D10F77DA9D69937D493 /* Swinject */, @@ -2443,7 +2459,7 @@ packageReferences = ( 4EDA79334592CBBA0E507AD2 /* XCRemoteSwiftPackageReference "Swinject" */, ); - preferredProjectObjectVersion = 54; + preferredProjectObjectVersion = 70; projectDirPath = ""; projectReferences = ( { diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme index b5a5eda3a..6959dff88 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Clip.xcscheme @@ -40,7 +40,8 @@ + skipped = "NO" + parallelizable = "NO"> + skipped = "NO" + parallelizable = "NO"> + skipped = "NO" + parallelizable = "NO"> + skipped = "NO" + parallelizable = "NO"> + skipped = "NO" + parallelizable = "NO"> + skipped = "NO" + parallelizable = "NO"> + skipped = "NO" + parallelizable = "NO"> + skipped = "NO" + parallelizable = "NO"> + skipped = "NO" + parallelizable = "NO"> Date: Thu, 17 Jul 2025 08:30:32 +0300 Subject: [PATCH 275/284] Use USER env var instead of LOGNAME (#1559) During user switch with su/sudo in system LOGNAME may not be initialised, but USER env var is always exist. --- Sources/XcodeGenCLI/Commands/GenerateCommand.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift index 8b7e27b5c..d0e4eabe9 100644 --- a/Sources/XcodeGenCLI/Commands/GenerateCommand.swift +++ b/Sources/XcodeGenCLI/Commands/GenerateCommand.swift @@ -100,7 +100,7 @@ class GenerateCommand: ProjectCommand { do { let projectGenerator = ProjectGenerator(project: project) - guard let userName = ProcessInfo.processInfo.environment["LOGNAME"] else { + guard let userName = ProcessInfo.processInfo.environment["USER"] else { throw GenerationError.missingUsername } From ae42dd5b193035f2ab388552dd24c3e4a2eff672 Mon Sep 17 00:00:00 2001 From: Himanshu Kumar <7786778+hi-kumar@users.noreply.github.com> Date: Wed, 16 Jul 2025 22:48:00 -0700 Subject: [PATCH 276/284] Address Sanitizer options in run/test schemes (#1550) * Expose address sanitizer flags in run and test BuildActions in Schemes * Update testJSONEncodable to test the new fields * Also test the asan setting values for run scheme * Update changelog --------- Co-authored-by: Yonas Kolb --- CHANGELOG.md | 3 + Sources/ProjectSpec/Scheme.swift | 74 ++++++++++++++++++- Sources/XcodeGenKit/SchemeGenerator.swift | 8 ++ Tests/ProjectSpecTests/ProjectSpecTests.swift | 8 ++ 4 files changed, 92 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3ed1916f..ddfbace26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Next Version +### Added +- Added sanitizer options to run and test actions in Scheme #1550 @hi-kumar + ### Fixed - Added validation to ensure that all values in `settings.configs` are mappings. Previously, passing non-mapping values did not raise an error, making it difficult to detect misconfigurations. Now, `SpecParsingError.invalidConfigsMappingFormat` is thrown if misused. #1547 @Ryu0118 diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index e417fcf0f..a83dff585 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -127,6 +127,10 @@ public struct Scheme: Equatable { } public struct Run: BuildAction { + public static let enableAddressSanitizerDefault = false + public static let enableASanStackUseAfterReturnDefault = false + public static let enableThreadSanitizerDefault = false + public static let enableUBSanitizerDefault = false public static let disableMainThreadCheckerDefault = false public static let stopOnEveryMainThreadCheckerIssueDefault = false public static let disableThreadPerformanceCheckerDefault = false @@ -140,6 +144,10 @@ public struct Scheme: Equatable { public var environmentVariables: [XCScheme.EnvironmentVariable] public var enableGPUFrameCaptureMode: XCScheme.LaunchAction.GPUFrameCaptureMode public var enableGPUValidationMode: Bool + public var enableAddressSanitizer: Bool + public var enableASanStackUseAfterReturn: Bool + public var enableThreadSanitizer: Bool + public var enableUBSanitizer: Bool public var disableMainThreadChecker: Bool public var stopOnEveryMainThreadCheckerIssue: Bool public var disableThreadPerformanceChecker: Bool @@ -163,6 +171,10 @@ public struct Scheme: Equatable { environmentVariables: [XCScheme.EnvironmentVariable] = [], enableGPUFrameCaptureMode: XCScheme.LaunchAction.GPUFrameCaptureMode = XCScheme.LaunchAction.defaultGPUFrameCaptureMode, enableGPUValidationMode: Bool = enableGPUValidationModeDefault, + enableAddressSanitizer: Bool = enableAddressSanitizerDefault, + enableASanStackUseAfterReturn: Bool = enableASanStackUseAfterReturnDefault, + enableThreadSanitizer: Bool = enableThreadSanitizerDefault, + enableUBSanitizer: Bool = enableUBSanitizerDefault, disableMainThreadChecker: Bool = disableMainThreadCheckerDefault, stopOnEveryMainThreadCheckerIssue: Bool = stopOnEveryMainThreadCheckerIssueDefault, disableThreadPerformanceChecker: Bool = disableThreadPerformanceCheckerDefault, @@ -181,6 +193,10 @@ public struct Scheme: Equatable { self.preActions = preActions self.postActions = postActions self.environmentVariables = environmentVariables + self.enableAddressSanitizer = enableAddressSanitizer + self.enableASanStackUseAfterReturn = enableASanStackUseAfterReturn + self.enableThreadSanitizer = enableThreadSanitizer + self.enableUBSanitizer = enableUBSanitizer self.disableMainThreadChecker = disableMainThreadChecker self.enableGPUFrameCaptureMode = enableGPUFrameCaptureMode self.enableGPUValidationMode = enableGPUValidationMode @@ -200,6 +216,10 @@ public struct Scheme: Equatable { public struct Test: BuildAction { public static let gatherCoverageDataDefault = false + public static let enableAddressSanitizerDefault = false + public static let enableASanStackUseAfterReturnDefault = false + public static let enableThreadSanitizerDefault = false + public static let enableUBSanitizerDefault = false public static let disableMainThreadCheckerDefault = false public static let debugEnabledDefault = true public static let captureScreenshotsAutomaticallyDefault = true @@ -209,6 +229,10 @@ public struct Scheme: Equatable { public var config: String? public var gatherCoverageData: Bool public var coverageTargets: [TestableTargetReference] + public var enableAddressSanitizer: Bool + public var enableASanStackUseAfterReturn: Bool + public var enableThreadSanitizer: Bool + public var enableUBSanitizer: Bool public var disableMainThreadChecker: Bool public var commandLineArguments: [String: Bool] public var targets: [TestTarget] @@ -276,6 +300,10 @@ public struct Scheme: Equatable { config: String? = nil, gatherCoverageData: Bool = gatherCoverageDataDefault, coverageTargets: [TestableTargetReference] = [], + enableAddressSanitizer: Bool = enableAddressSanitizerDefault, + enableASanStackUseAfterReturn: Bool = enableASanStackUseAfterReturnDefault, + enableThreadSanitizer: Bool = enableThreadSanitizerDefault, + enableUBSanitizer: Bool = enableUBSanitizerDefault, disableMainThreadChecker: Bool = disableMainThreadCheckerDefault, randomExecutionOrder: Bool = false, parallelizable: Bool = false, @@ -297,6 +325,10 @@ public struct Scheme: Equatable { self.config = config self.gatherCoverageData = gatherCoverageData self.coverageTargets = coverageTargets + self.enableAddressSanitizer = enableAddressSanitizer + self.enableASanStackUseAfterReturn = enableASanStackUseAfterReturn + self.enableThreadSanitizer = enableThreadSanitizer + self.enableUBSanitizer = enableUBSanitizer self.disableMainThreadChecker = disableMainThreadChecker self.commandLineArguments = commandLineArguments self.targets = targets @@ -500,6 +532,10 @@ extension Scheme.Run: JSONObjectConvertible { } else { enableGPUValidationMode = jsonDictionary.json(atKeyPath: "enableGPUValidationMode") ?? Scheme.Run.enableGPUValidationModeDefault } + enableAddressSanitizer = jsonDictionary.json(atKeyPath: "enableAddressSanitizer") ?? Scheme.Run.enableAddressSanitizerDefault + enableASanStackUseAfterReturn = jsonDictionary.json(atKeyPath: "enableASanStackUseAfterReturn") ?? Scheme.Run.enableASanStackUseAfterReturnDefault + enableThreadSanitizer = jsonDictionary.json(atKeyPath: "enableThreadSanitizer") ?? Scheme.Run.enableThreadSanitizerDefault + enableUBSanitizer = jsonDictionary.json(atKeyPath: "enableUBSanitizer") ?? Scheme.Run.enableUBSanitizerDefault disableMainThreadChecker = jsonDictionary.json(atKeyPath: "disableMainThreadChecker") ?? Scheme.Run.disableMainThreadCheckerDefault stopOnEveryMainThreadCheckerIssue = jsonDictionary.json(atKeyPath: "stopOnEveryMainThreadCheckerIssue") ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault disableThreadPerformanceChecker = jsonDictionary.json(atKeyPath: "disableThreadPerformanceChecker") ?? Scheme.Run.disableThreadPerformanceCheckerDefault @@ -550,6 +586,22 @@ extension Scheme.Run: JSONEncodable { dict["enableGPUValidationMode"] = enableGPUValidationMode } + if enableAddressSanitizer != Scheme.Run.enableAddressSanitizerDefault { + dict["enableAddressSanitizer"] = enableAddressSanitizer + } + + if enableASanStackUseAfterReturn != Scheme.Run.enableASanStackUseAfterReturnDefault { + dict["enableASanStackUseAfterReturn"] = enableASanStackUseAfterReturn + } + + if enableThreadSanitizer != Scheme.Run.enableThreadSanitizerDefault { + dict["enableThreadSanitizer"] = enableThreadSanitizer + } + + if enableUBSanitizer != Scheme.Run.enableUBSanitizerDefault { + dict["enableUBSanitizer"] = enableUBSanitizer + } + if disableMainThreadChecker != Scheme.Run.disableMainThreadCheckerDefault { dict["disableMainThreadChecker"] = disableMainThreadChecker } @@ -608,7 +660,11 @@ extension Scheme.Test: JSONObjectConvertible { } else { coverageTargets = [] } - + + enableAddressSanitizer = jsonDictionary.json(atKeyPath: "enableAddressSanitizer") ?? Scheme.Test.enableAddressSanitizerDefault + enableASanStackUseAfterReturn = jsonDictionary.json(atKeyPath: "enableASanStackUseAfterReturn") ?? Scheme.Test.enableASanStackUseAfterReturnDefault + enableThreadSanitizer = jsonDictionary.json(atKeyPath: "enableThreadSanitizer") ?? Scheme.Test.enableThreadSanitizerDefault + enableUBSanitizer = jsonDictionary.json(atKeyPath: "enableUBSanitizer") ?? Scheme.Test.enableUBSanitizerDefault disableMainThreadChecker = jsonDictionary.json(atKeyPath: "disableMainThreadChecker") ?? Scheme.Test.disableMainThreadCheckerDefault commandLineArguments = jsonDictionary.json(atKeyPath: "commandLineArguments") ?? [:] if let targets = jsonDictionary["targets"] as? [Any] { @@ -659,6 +715,22 @@ extension Scheme.Test: JSONEncodable { dict["gatherCoverageData"] = gatherCoverageData } + if enableAddressSanitizer != Scheme.Test.enableAddressSanitizerDefault { + dict["enableAddressSanitizer"] = enableAddressSanitizer + } + + if enableASanStackUseAfterReturn != Scheme.Test.enableASanStackUseAfterReturnDefault { + dict["enableASanStackUseAfterReturn"] = enableASanStackUseAfterReturn + } + + if enableThreadSanitizer != Scheme.Test.enableThreadSanitizerDefault { + dict["enableThreadSanitizer"] = enableThreadSanitizer + } + + if enableUBSanitizer != Scheme.Test.enableUBSanitizerDefault { + dict["enableUBSanitizer"] = enableUBSanitizer + } + if disableMainThreadChecker != Scheme.Test.disableMainThreadCheckerDefault { dict["disableMainThreadChecker"] = disableMainThreadChecker } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 69ad80faf..8cb89cb40 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -311,6 +311,10 @@ public class SchemeGenerator { codeCoverageEnabled: scheme.test?.gatherCoverageData ?? Scheme.Test.gatherCoverageDataDefault, codeCoverageTargets: coverageBuildableTargets, onlyGenerateCoverageForSpecifiedTargets: !coverageBuildableTargets.isEmpty, + enableAddressSanitizer: scheme.test?.enableAddressSanitizer ?? Scheme.Test.enableAddressSanitizerDefault, + enableASanStackUseAfterReturn: scheme.test?.enableASanStackUseAfterReturn ?? Scheme.Test.enableASanStackUseAfterReturnDefault, + enableThreadSanitizer: scheme.test?.enableThreadSanitizer ?? Scheme.Test.enableThreadSanitizerDefault, + enableUBSanitizer: scheme.test?.enableUBSanitizer ?? Scheme.Test.enableUBSanitizerDefault, disableMainThreadChecker: scheme.test?.disableMainThreadChecker ?? Scheme.Test.disableMainThreadCheckerDefault, commandlineArguments: testCommandLineArgs, environmentVariables: testVariables, @@ -359,6 +363,10 @@ public class SchemeGenerator { locationScenarioReference: locationScenarioReference, enableGPUFrameCaptureMode: scheme.run?.enableGPUFrameCaptureMode ?? XCScheme.LaunchAction.defaultGPUFrameCaptureMode, disableGPUValidationMode: !(scheme.run?.enableGPUValidationMode ?? Scheme.Run.enableGPUValidationModeDefault), + enableAddressSanitizer: scheme.run?.enableAddressSanitizer ?? Scheme.Run.enableAddressSanitizerDefault, + enableASanStackUseAfterReturn: scheme.run?.enableASanStackUseAfterReturn ?? Scheme.Run.enableASanStackUseAfterReturnDefault, + enableThreadSanitizer: scheme.run?.enableThreadSanitizer ?? Scheme.Run.enableThreadSanitizerDefault, + enableUBSanitizer: scheme.run?.enableUBSanitizer ?? Scheme.Run.enableUBSanitizerDefault, disableMainThreadChecker: scheme.run?.disableMainThreadChecker ?? Scheme.Run.disableMainThreadCheckerDefault, disablePerformanceAntipatternChecker: scheme.run?.disableThreadPerformanceChecker ?? Scheme.Run.disableThreadPerformanceCheckerDefault, stopOnEveryMainThreadCheckerIssue: scheme.run?.stopOnEveryMainThreadCheckerIssue ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault, diff --git a/Tests/ProjectSpecTests/ProjectSpecTests.swift b/Tests/ProjectSpecTests/ProjectSpecTests.swift index 311597ad2..3ae878ac4 100644 --- a/Tests/ProjectSpecTests/ProjectSpecTests.swift +++ b/Tests/ProjectSpecTests/ProjectSpecTests.swift @@ -768,10 +768,18 @@ class ProjectSpecTests: XCTestCase { value: "bar", enabled: false)], enableGPUFrameCaptureMode: .openGL, + enableAddressSanitizer: true, + enableASanStackUseAfterReturn: true, + enableThreadSanitizer: true, + enableUBSanitizer: true, launchAutomaticallySubstyle: "2", storeKitConfiguration: "Configuration.storekit"), test: Scheme.Test(config: "Config", gatherCoverageData: true, + enableAddressSanitizer: true, + enableASanStackUseAfterReturn: true, + enableThreadSanitizer: true, + enableUBSanitizer: true, disableMainThreadChecker: true, randomExecutionOrder: false, parallelizable: false, From a19bbe47911b24a63b9beb1f2b132e3371ef60e9 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 17 Jul 2025 15:30:47 +1000 Subject: [PATCH 277/284] Update to 2.44.0 # Conflicts: # CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddfbace26..630125bc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,19 @@ ## Next Version +## 2.44.0 + ### Added +- Basic support for Xcode 16's synchronized folders #1541 @yonaskolb + - `TargetSource.type` can now be `syncedFolder` + - `Options.defaultSourceDirectoryType` can be set to `syncedFolder` for the default type in all sources in the project (defaults to `group`) + - Benefits include faster generation and no cache invalidation or need to regenerate when files are added or removed from these folders + - Note that not all TargetSource options like excludes are supported, just a simple path. Please test and see what is missing in your projects - Added sanitizer options to run and test actions in Scheme #1550 @hi-kumar ### Fixed - Added validation to ensure that all values in `settings.configs` are mappings. Previously, passing non-mapping values did not raise an error, making it difficult to detect misconfigurations. Now, `SpecParsingError.invalidConfigsMappingFormat` is thrown if misused. #1547 @Ryu0118 +- Use `USER` instead of `LOGNAME` for XCUserData #1559 @KostyaSha ## 2.43.0 diff --git a/Makefile b/Makefile index 6370bcd4a..24768c2a9 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.43.0 +VERSION = 2.44.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index e60989200..9e6d58316 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.43.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.44.0"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 1222a4aa0..07a99a7e3 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.43.0") +let version = Version("2.44.0") let cli = XcodeGenCLI(version: version) cli.execute() From fa7358b6fcb19125e7eb02ea0c576cb48c55c806 Mon Sep 17 00:00:00 2001 From: Craig Siemens Date: Mon, 21 Jul 2025 21:47:04 -0600 Subject: [PATCH 278/284] Map parallelizable true to parallelization all to match the behaviour from Xcodeproj 8.24.3 (#1565) --- Sources/XcodeGenKit/SchemeGenerator.swift | 2 +- .../xcshareddata/xcschemes/App_Scheme.xcscheme | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 8cb89cb40..aa99923f4 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -260,7 +260,7 @@ public class SchemeGenerator { return XCScheme.TestableReference( skipped: testTarget.skipped, - parallelizable: testTarget.parallelizable, + parallelization: testTarget.parallelizable ? .all : .none, randomExecutionOrdering: testTarget.randomExecutionOrder, buildableReference: testBuildEntries.buildableReference, locationScenarioReference: locationScenarioReference, diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme index e80ea10b9..7da7c0252 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/xcshareddata/xcschemes/App_Scheme.xcscheme @@ -60,6 +60,7 @@ Date: Tue, 22 Jul 2025 11:14:34 +0200 Subject: [PATCH 279/284] set correct version for xcode 16 (#1563) * set correct version for xcode 16 see: https://github.com/CocoaPods/Xcodeproj/blob/master/lib/xcodeproj/constants.rb#L134 * update test fixtures --------- Co-authored-by: Fels, Jakob --- Sources/XcodeGenKit/Version.swift | 2 +- .../CarthageProject/Project.xcodeproj/project.pbxproj | 4 ++-- Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj | 4 ++-- .../AnotherProject/AnotherProject.xcodeproj/project.pbxproj | 4 ++-- Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj | 4 ++-- .../scheme_test/TestProject.xcodeproj/project.pbxproj | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Sources/XcodeGenKit/Version.swift b/Sources/XcodeGenKit/Version.swift index 007d26f64..7b7246e9b 100644 --- a/Sources/XcodeGenKit/Version.swift +++ b/Sources/XcodeGenKit/Version.swift @@ -16,7 +16,7 @@ extension Project { } var objectVersion: UInt { - 70 + 77 } var minimizedProjectReferenceProxies: Int { diff --git a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj index 3289e3bdd..5b62b8139 100644 --- a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 70; + objectVersion = 77; objects = { /* Begin PBXBuildFile section */ @@ -333,7 +333,7 @@ ); mainGroup = 293D0FF827366B513839236A; minimizedProjectReferenceProxies = 1; - preferredProjectObjectVersion = 70; + preferredProjectObjectVersion = 77; projectDirPath = ""; projectRoot = ""; targets = ( diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index 7918465d3..b25b23fbd 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 70; + objectVersion = 77; objects = { /* Begin PBXAggregateTarget section */ @@ -257,7 +257,7 @@ 630A8CE9F2BE39704ED9D461 /* XCLocalSwiftPackageReference "FooFeature" */, C6539B364583AE96C18CE377 /* XCLocalSwiftPackageReference "../../.." */, ); - preferredProjectObjectVersion = 70; + preferredProjectObjectVersion = 77; projectDirPath = ""; projectRoot = ""; targets = ( diff --git a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj index c23cbc73d..00cc84622 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 70; + objectVersion = 77; objects = { /* Begin PBXFileReference section */ @@ -130,7 +130,7 @@ ); mainGroup = 4E8CFA4275C972686621210C; minimizedProjectReferenceProxies = 1; - preferredProjectObjectVersion = 70; + preferredProjectObjectVersion = 77; projectDirPath = ""; projectRoot = ""; targets = ( diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index ce031a8c8..6aa8bed91 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 70; + objectVersion = 77; objects = { /* Begin PBXAggregateTarget section */ @@ -2459,7 +2459,7 @@ packageReferences = ( 4EDA79334592CBBA0E507AD2 /* XCRemoteSwiftPackageReference "Swinject" */, ); - preferredProjectObjectVersion = 70; + preferredProjectObjectVersion = 77; projectDirPath = ""; projectReferences = ( { diff --git a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj index 4623c988d..baed78ca9 100644 --- a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 70; + objectVersion = 77; objects = { /* Begin PBXFileReference section */ @@ -83,7 +83,7 @@ ); mainGroup = 2D08B11F4EE060D112B7BCA1; minimizedProjectReferenceProxies = 1; - preferredProjectObjectVersion = 70; + preferredProjectObjectVersion = 77; projectDirPath = ""; projectRoot = ""; targets = ( From 3251691527378637d1935a2582c8f7d2b968b8a0 Mon Sep 17 00:00:00 2001 From: George Navarro Date: Tue, 22 Jul 2025 02:16:05 -0700 Subject: [PATCH 280/284] Feature: Custom Working Directory (#1543) * Added `customWorkingDirectory` and `useCustomWorkingDirectory` properties to `Scheme.Run` * Use new `customWorkingDirectory` and `useCustomWorkingDirectory` when generating `XCScheme.LaunchAction` * Updated ProjectSpec.md to document new `customWorkingDirectory` and `useCustomWorkingDirectory` properties * Fix for not setting customWorkingDirectory in the toJSONValue function * Added test to make sure usCustomWorkingDirectory value is true when the customWorkingDirectory is set to non nil * Change to infer the value of SchemaGenerator.LaunchAction.useCustomWorkingDirectory based on the value of Schema.Run.customWorkingDirectory * Removed useCustomWorkingDirectory from the project spec now that it is no longer user defined. --- Docs/ProjectSpec.md | 1 + Sources/ProjectSpec/Scheme.swift | 9 ++++++++- Sources/XcodeGenKit/SchemeGenerator.swift | 2 ++ Tests/XcodeGenKitTests/SchemeGeneratorTests.swift | 7 +++++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 5a4aa0dde..c1a6259ca 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -1059,6 +1059,7 @@ A multiline script can be written using the various YAML multiline methods, for ### Run Action - [ ] **executable**: **String** - the name of the target to launch as an executable. Defaults to the first runnable build target in the scheme, or the first build target if a runnable build target is not found - [ ] **customLLDBInit**: **String** - the absolute path to the custom `.lldbinit` file +- [ ] **customWorkingDirectory**: **String** - a path to use as the working directory when launching the executable. ### Test Action diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index a83dff585..a19951fe8 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -161,6 +161,7 @@ public struct Scheme: Equatable { public var storeKitConfiguration: String? public var customLLDBInit: String? public var macroExpansion: String? + public var customWorkingDirectory: String? public init( config: String? = nil, @@ -186,7 +187,8 @@ public struct Scheme: Equatable { simulateLocation: SimulateLocation? = nil, storeKitConfiguration: String? = nil, customLLDBInit: String? = nil, - macroExpansion: String? = nil + macroExpansion: String? = nil, + customWorkingDirectory: String? = nil ) { self.config = config self.commandLineArguments = commandLineArguments @@ -211,6 +213,7 @@ public struct Scheme: Equatable { self.storeKitConfiguration = storeKitConfiguration self.customLLDBInit = customLLDBInit self.macroExpansion = macroExpansion + self.customWorkingDirectory = customWorkingDirectory } } @@ -559,6 +562,7 @@ extension Scheme.Run: JSONObjectConvertible { } customLLDBInit = jsonDictionary.json(atKeyPath: "customLLDBInit") macroExpansion = jsonDictionary.json(atKeyPath: "macroExpansion") + customWorkingDirectory = jsonDictionary.json(atKeyPath: "customWorkingDirectory") } } @@ -627,6 +631,9 @@ extension Scheme.Run: JSONEncodable { if let customLLDBInit = customLLDBInit { dict["customLLDBInit"] = customLLDBInit } + if let customWorkingDirectory = customWorkingDirectory { + dict["customWorkingDirectory"] = customWorkingDirectory + } return dict } } diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index aa99923f4..c29faac4b 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -359,6 +359,8 @@ public class SchemeGenerator { selectedDebuggerIdentifier: selectedDebuggerIdentifier(for: schemeTarget, run: scheme.run), selectedLauncherIdentifier: selectedLauncherIdentifier(for: schemeTarget, run: scheme.run), askForAppToLaunch: scheme.run?.askForAppToLaunch, + customWorkingDirectory: scheme.run?.customWorkingDirectory, + useCustomWorkingDirectory: scheme.run?.customWorkingDirectory != nil, allowLocationSimulation: allowLocationSimulation, locationScenarioReference: locationScenarioReference, enableGPUFrameCaptureMode: scheme.run?.enableGPUFrameCaptureMode ?? XCScheme.LaunchAction.defaultGPUFrameCaptureMode, diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index edad2183b..d876b3f8b 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -53,7 +53,7 @@ class SchemeGeneratorTests: XCTestCase { let scheme = try Scheme( name: "MyScheme", build: Scheme.Build(targets: [buildTarget], preActions: [preAction]), - run: Scheme.Run(config: "Debug", enableGPUFrameCaptureMode: .metal, askForAppToLaunch: true, launchAutomaticallySubstyle: "2", simulateLocation: simulateLocation, storeKitConfiguration: storeKitConfiguration, customLLDBInit: "/sample/.lldbinit"), + run: Scheme.Run(config: "Debug", enableGPUFrameCaptureMode: .metal, askForAppToLaunch: true, launchAutomaticallySubstyle: "2", simulateLocation: simulateLocation, storeKitConfiguration: storeKitConfiguration, customLLDBInit: "/sample/.lldbinit", customWorkingDirectory: "/test"), test: Scheme.Test(config: "Debug", targets: [ Scheme.Test.TestTarget(targetReference: TestableTargetReference(framework.name), location: "test.gpx"), Scheme.Test.TestTarget(targetReference: TestableTargetReference(framework.name), location: "New York, NY, USA") @@ -114,7 +114,10 @@ class SchemeGeneratorTests: XCTestCase { try expect(xcscheme.launchAction?.enableGPUFrameCaptureMode) == .metal try expect(xcscheme.testAction?.customLLDBInitFile) == "/test/.lldbinit" try expect(xcscheme.testAction?.systemAttachmentLifetime).to.beNil() - + + try expect(xcscheme.launchAction?.useCustomWorkingDirectory) == true + try expect(xcscheme.launchAction?.customWorkingDirectory) == "/test" + try expect(xcscheme.testAction?.testables[0].locationScenarioReference?.referenceType) == "0" try expect(xcscheme.testAction?.testables[0].locationScenarioReference?.identifier) == "../test.gpx" From 8b3a68319bb6dda8cabbb6421e42ccc2d3925320 Mon Sep 17 00:00:00 2001 From: Roman Podymov Date: Tue, 22 Jul 2025 11:21:49 +0200 Subject: [PATCH 281/284] Handle major.minor for SPM (#1546) * Custom error handler * Check for error reason and expected type * Improvements * Update CHANGELOG.md * Update master (#1) * Update CI equipments and drop Xcode 15 support (#1548) * Add validation to ensure that settings.configs values are dictionaries, in order to prevent misuse (#1547) * Add validation to ensure settings.configs values are dictionaries to prevent misuse * Add tests for invalid settings.configs value formats * Replaced with filter and split into a function * Rename invalidConfigsFormat to invalidConfigsMappingFormat * Add comments to explain invalid fixture * Rename test fixture * Update CHANGELOG.md * Correct grammer * Use KeyPath instead of closure * Rename validateMappingStyleInConfig to extractValidConfigs * Add a document comment for extractValidConfigs(from:) * Use old testing api and remove EquatableErrorBox * Rename test case to use "mapping" instead of "dictionary" * Add ValidSettingsExtractor to encapsulate the logic for converting a dictionary to Settings * Add settings validation for both Target and AggregateTarget * Add tests for invalid settings.configs in Target and AggregateTarget * Add document comments for ValidSettingsExtractor * Rename ValidSettingsExtractor to BuildSettingsExtractor * Add settings validation for settingGroups * Add tests for settingGroups * Rename extract to parse * Refactor * Update Tests/ProjectSpecTests/InvalidConfigsFormatTests.swift --------- Co-authored-by: Yonas Kolb * Synced folders (#1541) * update xcodeproj to 8.27.7 * add syncedFolder source type * drop xcode 15 support * Rely on fileReference instead of adding new synchronizedRootGroup (#1557) * fix: don't include untracked children in cache --------- Co-authored-by: Kirill Yakimovich * Use USER env var instead of LOGNAME (#1559) During user switch with su/sudo in system LOGNAME may not be initialised, but USER env var is always exist. * Address Sanitizer options in run/test schemes (#1550) * Expose address sanitizer flags in run and test BuildActions in Schemes * Update testJSONEncodable to test the new fields * Also test the asan setting values for run scheme * Update changelog --------- Co-authored-by: Yonas Kolb * Update to 2.44.0 # Conflicts: # CHANGELOG.md --------- Co-authored-by: Kohki Miki Co-authored-by: Ryu <87907656+Ryu0118@users.noreply.github.com> Co-authored-by: Yonas Kolb Co-authored-by: Kirill Yakimovich Co-authored-by: Kanstantsin Shautsou Co-authored-by: Himanshu Kumar <7786778+hi-kumar@users.noreply.github.com> * Revert * Refactoring started * func json(atKeyPath keyPath: String) -> String? * All cases --------- Co-authored-by: Kohki Miki Co-authored-by: Ryu <87907656+Ryu0118@users.noreply.github.com> Co-authored-by: Yonas Kolb Co-authored-by: Kirill Yakimovich Co-authored-by: Kanstantsin Shautsou Co-authored-by: Himanshu Kumar <7786778+hi-kumar@users.noreply.github.com> --- CHANGELOG.md | 1 + Sources/ProjectSpec/SwiftPackage.swift | 51 ++++++++++++------- .../SPM/SPM.xcodeproj/project.pbxproj | 25 +++++++-- Tests/Fixtures/SPM/project.yml | 4 ++ 4 files changed, 59 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 630125bc7..362254637 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ - **Breaking**: `fileGroups` are now relative paths when in included files, like other paths #1534 @shnhrrsn - **Breaking**: Local package paths are now relative paths when in included files, like other paths #1498 @juri - Optional groups are no longer skipped when missing and generating projects from a different directory #1529 @SSheldon +- Handle major.minor SPM packages versions #1546 @RomanPodymov ### Internal diff --git a/Sources/ProjectSpec/SwiftPackage.swift b/Sources/ProjectSpec/SwiftPackage.swift index 0e752c5f2..2ec58f6c3 100644 --- a/Sources/ProjectSpec/SwiftPackage.swift +++ b/Sources/ProjectSpec/SwiftPackage.swift @@ -105,24 +105,39 @@ extension SwiftPackage: JSONEncodable { extension SwiftPackage.VersionRequirement: JSONUtilities.JSONObjectConvertible { public init(jsonDictionary: JSONDictionary) throws { - if jsonDictionary["exactVersion"] != nil { - self = try .exact(jsonDictionary.json(atKeyPath: "exactVersion")) - } else if jsonDictionary["version"] != nil { - self = try .exact(jsonDictionary.json(atKeyPath: "version")) - } else if jsonDictionary["revision"] != nil { - self = try .revision(jsonDictionary.json(atKeyPath: "revision")) - } else if jsonDictionary["branch"] != nil { - self = try .branch(jsonDictionary.json(atKeyPath: "branch")) - } else if jsonDictionary["minVersion"] != nil && jsonDictionary["maxVersion"] != nil { - let minimum: String = try jsonDictionary.json(atKeyPath: "minVersion") - let maximum: String = try jsonDictionary.json(atKeyPath: "maxVersion") - self = .range(from: minimum, to: maximum) - } else if jsonDictionary["minorVersion"] != nil { - self = try .upToNextMinorVersion(jsonDictionary.json(atKeyPath: "minorVersion")) - } else if jsonDictionary["majorVersion"] != nil { - self = try .upToNextMajorVersion(jsonDictionary.json(atKeyPath: "majorVersion")) - } else if jsonDictionary["from"] != nil { - self = try .upToNextMajorVersion(jsonDictionary.json(atKeyPath: "from")) + func json(atKeyPath keyPath: String) -> String? { + if jsonDictionary[keyPath] != nil { + do { + let value: String = try jsonDictionary.json(atKeyPath: .init(rawValue: keyPath)) + return value + } catch { + do { + let value: Double = try jsonDictionary.json(atKeyPath: .init(rawValue: keyPath)) + return String(value) + } catch { + return nil + } + } + } + return nil + } + + if let exactVersion = json(atKeyPath: "exactVersion") { + self = .exact(exactVersion) + } else if let version = json(atKeyPath: "version") { + self = .exact(version) + } else if let revision = json(atKeyPath: "revision") { + self = .revision(revision) + } else if let branch = json(atKeyPath: "branch") { + self = .branch(branch) + } else if let minVersion = json(atKeyPath: "minVersion"), let maxVersion = json(atKeyPath: "maxVersion") { + self = .range(from: minVersion, to: maxVersion) + } else if let minorVersion = json(atKeyPath: "minorVersion") { + self = .upToNextMinorVersion(minorVersion) + } else if let majorVersion = json(atKeyPath: "majorVersion") { + self = .upToNextMajorVersion(majorVersion) + } else if let from = json(atKeyPath: "from") { + self = .upToNextMajorVersion(from) } else { throw SpecParsingError.unknownPackageRequirement(jsonDictionary) } diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index b25b23fbd..eef5a9d73 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -25,15 +25,16 @@ /* Begin PBXBuildFile section */ 23C6626698DE560017A89F2F /* XcodeGen in Frameworks */ = {isa = PBXBuildFile; productRef = 6F7DEA2D82649EDF903FBDBD /* XcodeGen */; }; 2DA7998902987953B119E4CE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26F7EFEE613987D1E1258A60 /* AppDelegate.swift */; }; - 36CE2E6187D9709BAD9EF807 /* FooUI in Frameworks */ = {isa = PBXBuildFile; productRef = 927CB19D94339CC9960E930C /* FooUI */; }; + 36CE2E6187D9709BAD9EF807 /* FooDomain in Frameworks */ = {isa = PBXBuildFile; productRef = 8D2DC638BEF7FDF23907E134 /* FooDomain */; }; 3986ED6965842721C46C0452 /* SwiftRoaringDynamic in Frameworks */ = {isa = PBXBuildFile; productRef = DC73B269C8B0C0BF6912842C /* SwiftRoaringDynamic */; }; 4CC663B42B270404EF5FD037 /* libStaticLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CAB5625F6FEA668410ED5482 /* libStaticLibrary.a */; }; 9AD886A88D3E4A1B5E900687 /* SPMTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7970A2253B14A9B27C307FAC /* SPMTests.swift */; }; 9C4AD0711D706FD3ED0E436D /* StaticLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61C17B77601A9D1B7895AB42 /* StaticLibrary.swift */; }; - AF8E362713B9D28EA9A5C9FC /* FooDomain in Frameworks */ = {isa = PBXBuildFile; productRef = 8D2DC638BEF7FDF23907E134 /* FooDomain */; }; + AF8E362713B9D28EA9A5C9FC /* SwiftLocation in Frameworks */ = {isa = PBXBuildFile; productRef = 04F71F974C4771232AF4FEC2 /* SwiftLocation */; }; B89EA0F3859878A1DCF7BAFD /* SwiftRoaringDynamic in Embed Frameworks */ = {isa = PBXBuildFile; productRef = DC73B269C8B0C0BF6912842C /* SwiftRoaringDynamic */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; CE46CBA5671B951B546C8673 /* Codability in Frameworks */ = {isa = PBXBuildFile; productRef = 16E6FE01D5BD99F78D4A17E2 /* Codability */; settings = {ATTRIBUTES = (Weak, ); }; }; E368431019ABC696E4FFC0CF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4E22B8BCC18A29EFE1DE3BE4 /* Assets.xcassets */; }; + ECC4F5F3B3D1391712A7AFE3 /* FooUI in Frameworks */ = {isa = PBXBuildFile; productRef = 927CB19D94339CC9960E930C /* FooUI */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -90,8 +91,9 @@ 3986ED6965842721C46C0452 /* SwiftRoaringDynamic in Frameworks */, 4CC663B42B270404EF5FD037 /* libStaticLibrary.a in Frameworks */, 23C6626698DE560017A89F2F /* XcodeGen in Frameworks */, - AF8E362713B9D28EA9A5C9FC /* FooDomain in Frameworks */, - 36CE2E6187D9709BAD9EF807 /* FooUI in Frameworks */, + AF8E362713B9D28EA9A5C9FC /* SwiftLocation in Frameworks */, + 36CE2E6187D9709BAD9EF807 /* FooDomain in Frameworks */, + ECC4F5F3B3D1391712A7AFE3 /* FooUI in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -224,6 +226,7 @@ 16E6FE01D5BD99F78D4A17E2 /* Codability */, DC73B269C8B0C0BF6912842C /* SwiftRoaringDynamic */, 6F7DEA2D82649EDF903FBDBD /* XcodeGen */, + 04F71F974C4771232AF4FEC2 /* SwiftLocation */, 8D2DC638BEF7FDF23907E134 /* FooDomain */, 927CB19D94339CC9960E930C /* FooUI */, ); @@ -253,6 +256,7 @@ packageReferences = ( 5BA91390AE78D2EE15C60091 /* XCRemoteSwiftPackageReference "Codability" */, 348C81C327DB1710B742C370 /* XCRemoteSwiftPackageReference "Prefire" */, + 63B845B0C9058076DD19CA85 /* XCRemoteSwiftPackageReference "SwiftLocation" */, E3887F3CB2C069E70D98092F /* XCRemoteSwiftPackageReference "SwiftRoaring" */, 630A8CE9F2BE39704ED9D461 /* XCLocalSwiftPackageReference "FooFeature" */, C6539B364583AE96C18CE377 /* XCLocalSwiftPackageReference "../../.." */, @@ -669,6 +673,14 @@ minimumVersion = 0.2.1; }; }; + 63B845B0C9058076DD19CA85 /* XCRemoteSwiftPackageReference "SwiftLocation" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/malcommac/SwiftLocation"; + requirement = { + kind = exactVersion; + version = 6.0; + }; + }; E3887F3CB2C069E70D98092F /* XCRemoteSwiftPackageReference "SwiftRoaring" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/piotte13/SwiftRoaring"; @@ -680,6 +692,11 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 04F71F974C4771232AF4FEC2 /* SwiftLocation */ = { + isa = XCSwiftPackageProductDependency; + package = 63B845B0C9058076DD19CA85 /* XCRemoteSwiftPackageReference "SwiftLocation" */; + productName = SwiftLocation; + }; 15DB49096E2978F6BCA8D604 /* FooUI */ = { isa = XCSwiftPackageProductDependency; productName = FooUI; diff --git a/Tests/Fixtures/SPM/project.yml b/Tests/Fixtures/SPM/project.yml index 266f102e7..7e8b3b064 100644 --- a/Tests/Fixtures/SPM/project.yml +++ b/Tests/Fixtures/SPM/project.yml @@ -9,6 +9,9 @@ packages: Prefire: url: https://github.com/BarredEwe/Prefire majorVersion: 1.4.1 + SwiftLocation: + url: https://github.com/malcommac/SwiftLocation + exactVersion: 6.0 XcodeGen: path: ../../.. #XcodeGen itself group: SPM @@ -39,6 +42,7 @@ targets: embed: true - target: StaticLibrary - package: XcodeGen + - package: SwiftLocation - package: FooFeature products: - FooDomain From 21ac9944b0ab546a07422dbed86f33dd2ebd76f8 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 22 Jul 2025 19:29:49 +1000 Subject: [PATCH 282/284] Update to 2.44.1 --- CHANGELOG.md | 8 +++++++- Makefile | 2 +- README.md | 2 +- Sources/XcodeGen/main.swift | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 362254637..bc18bf44d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## Next Version +## 2.44.1 + +### Fixed +- Set the correct object version of 77 for Xcode 16 projects @jakobfelsatdm #1563 +- Support major.minor SPM package versions which would otherwise fail to decode to a string in yaml specs #1546 @RomanPodymov +- Fix regression for `parallelizable` in scheme. It now resolves to "Enabled" and not "Swift Testing Only" #1565 @CraigSiemens + ## 2.44.0 ### Added @@ -35,7 +42,6 @@ - **Breaking**: `fileGroups` are now relative paths when in included files, like other paths #1534 @shnhrrsn - **Breaking**: Local package paths are now relative paths when in included files, like other paths #1498 @juri - Optional groups are no longer skipped when missing and generating projects from a different directory #1529 @SSheldon -- Handle major.minor SPM packages versions #1546 @RomanPodymov ### Internal diff --git a/Makefile b/Makefile index 24768c2a9..79a374054 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = XcodeGen export EXECUTABLE_NAME = xcodegen -VERSION = 2.44.0 +VERSION = 2.44.1 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/README.md b/README.md index 9e6d58316..6a7ed7e77 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ swift run xcodegen Add the following to your Package.swift file's dependencies: ```swift -.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.44.0"), +.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.44.1"), ``` And then import wherever needed: `import XcodeGenKit` diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 07a99a7e3..577fe92b1 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -3,6 +3,6 @@ import ProjectSpec import XcodeGenCLI import Version -let version = Version("2.44.0") +let version = Version("2.44.1") let cli = XcodeGenCLI(version: version) cli.execute() From d35562f4abb4d89a17422c3a4995a0ae37e54dc0 Mon Sep 17 00:00:00 2001 From: George Navarro Date: Thu, 24 Jul 2025 20:27:54 -0700 Subject: [PATCH 283/284] Update ArtifactBundleGen to 0.0.8 (#1570) --- Package.resolved | 4 ++-- Package.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Package.resolved b/Package.resolved index 671959c8b..c4dd4b065 100644 --- a/Package.resolved +++ b/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/freddi-kit/ArtifactBundleGen", "state" : { - "revision" : "707e4ccc4b1c7e48e881cd5ea91e493a95df24bf", - "version" : "0.0.6" + "revision" : "33f4a65acb296dcde04aeb828b6850fcf9dceb6c", + "version" : "0.0.8" } }, { diff --git a/Package.swift b/Package.swift index ab86ad008..eb1cad2c2 100644 --- a/Package.swift +++ b/Package.swift @@ -19,7 +19,7 @@ let package = Package( .package(url: "https://github.com/tuist/XcodeProj.git", exact: "8.27.7"), .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/freddi-kit/ArtifactBundleGen", exact: "0.0.6") + .package(url: "https://github.com/freddi-kit/ArtifactBundleGen", exact: "0.0.8") ], targets: [ .executableTarget(name: "XcodeGen", dependencies: [ From 140cd5ee65ab7fbf7da6c5ea56c4e71c61ac8292 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Sun, 15 Feb 2026 23:57:14 +1100 Subject: [PATCH 284/284] Fix CI: add explicit xcodebuild destinations and update Xcode matrix (#1594) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add explicit -destination flags to build.sh — newer Xcode versions no longer auto-select a build destination, causing "Found no destinations for the scheme" errors - Update CI matrix to Xcode 16.4 and 26.2 — Xcode 16.0-16.3 simulator runtimes are no longer installed on the macos-15 runner image - Add PRODUCT_BUNDLE_IDENTIFIER to ExternalTarget fixture — Xcode 26.x requires a bundle identifier for embedded frameworks Co-authored-by: Claude Opus 4.6 --- .github/workflows/ci.yml | 2 +- .../AnotherProject.xcodeproj/project.pbxproj | 6 ++++++ .../Fixtures/TestProject/AnotherProject/project.yml | 1 + .../TestProject/Project.xcodeproj/project.pbxproj | 12 ++++++------ Tests/Fixtures/TestProject/build.sh | 4 ++-- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7b12ba66..84679494b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: name: Xcode ${{ matrix.xcode }} strategy: matrix: - xcode: ["16.0", "16.3"] + xcode: ["16.4", "26.2"] env: DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer steps: diff --git a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj index 00cc84622..50593a11b 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj @@ -342,6 +342,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.external; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -452,6 +453,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.external; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -474,6 +476,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.external; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -496,6 +499,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.external; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -657,6 +661,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.external; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -703,6 +708,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + PRODUCT_BUNDLE_IDENTIFIER = com.project.external; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/Tests/Fixtures/TestProject/AnotherProject/project.yml b/Tests/Fixtures/TestProject/AnotherProject/project.yml index c66f2c5e9..f86b69aec 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/project.yml +++ b/Tests/Fixtures/TestProject/AnotherProject/project.yml @@ -20,6 +20,7 @@ targets: platform: iOS settings: GENERATE_INFOPLIST_FILE: YES + PRODUCT_BUNDLE_IDENTIFIER: com.project.external IncludedLegacy: type: "" platform: iOS diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 6aa8bed91..10ff1c3a2 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -3522,7 +3522,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.project.ExternalTarget; + PRODUCT_BUNDLE_IDENTIFIER = com.project.external; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -4220,7 +4220,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.project.ExternalTarget; + PRODUCT_BUNDLE_IDENTIFIER = com.project.external; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -6058,7 +6058,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.project.ExternalTarget; + PRODUCT_BUNDLE_IDENTIFIER = com.project.external; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -6655,7 +6655,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.project.ExternalTarget; + PRODUCT_BUNDLE_IDENTIFIER = com.project.external; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -6856,7 +6856,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.project.ExternalTarget; + PRODUCT_BUNDLE_IDENTIFIER = com.project.external; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -7259,7 +7259,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.project.ExternalTarget; + PRODUCT_BUNDLE_IDENTIFIER = com.project.external; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/Tests/Fixtures/TestProject/build.sh b/Tests/Fixtures/TestProject/build.sh index fb3e191de..ab575c203 100755 --- a/Tests/Fixtures/TestProject/build.sh +++ b/Tests/Fixtures/TestProject/build.sh @@ -3,10 +3,10 @@ set -e echo " ⚙️ Building iOS app" -xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_iOS Test" -configuration "Test Debug" -xcconfig fixtures.xcconfig +xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_iOS Test" -configuration "Test Debug" -xcconfig fixtures.xcconfig -destination 'generic/platform=iOS Simulator' echo "✅ Successfully built iOS app" echo " ⚙️ Building macOS app" -xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_macOS" -configuration "Test Debug" -xcconfig fixtures.xcconfig +xcodebuild -quiet -workspace Workspace.xcworkspace -scheme "App_macOS" -configuration "Test Debug" -xcconfig fixtures.xcconfig -destination 'generic/platform=macOS' echo "✅ Successfully built macOS app"