From e24fd1b68ed072f765c9a5f185362d868674239c Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 22 Jan 2019 15:56:42 +1100 Subject: [PATCH 1/3] update Xcode compatibility version --- Sources/XcodeGenKit/PBXProjGenerator.swift | 2 +- Sources/XcodeGenKit/Version.swift | 4 ++++ Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 661c1d68..aa28bf27 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -88,7 +88,7 @@ public class PBXProjGenerator { PBXProject( name: project.name, buildConfigurationList: buildConfigList, - compatibilityVersion: "Xcode 3.2", + compatibilityVersion: project.compatabilityVersion, mainGroup: mainGroup, developmentRegion: project.options.developmentLanguage ?? "en" ) diff --git a/Sources/XcodeGenKit/Version.swift b/Sources/XcodeGenKit/Version.swift index d37cebab..4ffa64b5 100644 --- a/Sources/XcodeGenKit/Version.swift +++ b/Sources/XcodeGenKit/Version.swift @@ -11,6 +11,10 @@ extension Project { return "1.3" } + var compatabilityVersion: String { + return "Xcode 9.3" + } + public func validateMinimumXcodeGenVersion(_ xcodeGenVersion: Version) throws { if let minimumXcodeGenVersion = options.minimumXcodeGenVersion, xcodeGenVersion < minimumXcodeGenVersion { throw SpecValidationError.ValidationError.invalidXcodeGenVersion(minimumVersion: minimumXcodeGenVersion, version: xcodeGenVersion) diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index dc0d55c3..8285e144 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -1407,7 +1407,7 @@ }; }; buildConfigurationList = D91E14E36EC0B415578456F264E0161E /* Build configuration list for PBXProject "Project" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 9.3"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( From 1c1da6a1f5f08dc22c21eee040362386b9d1f67a Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Tue, 22 Jan 2019 15:59:53 +1100 Subject: [PATCH 2/3] update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45950aa9..16333c68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ - 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 +#### Changed +- Updated the Xcode compatability version from 3.2 to 9.3 [#497](https://github.com/yonaskolb/XcodeGen/pull/497) @yonaskolb + ## 2.1.0 #### Added From 93f5492d4c17132f702ebda405e64d3ccffcdf2c Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 24 Jan 2019 23:34:54 +1100 Subject: [PATCH 3/3] update objectVersion from 46 to 50 --- Sources/XcodeGenKit/PBXProjGenerator.swift | 2 +- Sources/XcodeGenKit/Version.swift | 4 ++++ Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index aa28bf27..cfa176e9 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -27,7 +27,7 @@ public class PBXProjGenerator { public init(project: Project) { self.project = project - pbxProj = PBXProj(rootObject: nil, objectVersion: 46) + pbxProj = PBXProj(rootObject: nil, objectVersion: project.objectVersion) sourceGenerator = SourceGenerator(project: project, pbxProj: pbxProj) } diff --git a/Sources/XcodeGenKit/Version.swift b/Sources/XcodeGenKit/Version.swift index 4ffa64b5..5acef3f1 100644 --- a/Sources/XcodeGenKit/Version.swift +++ b/Sources/XcodeGenKit/Version.swift @@ -15,6 +15,10 @@ extension Project { return "Xcode 9.3" } + var objectVersion: UInt { + return 50 + } + public func validateMinimumXcodeGenVersion(_ xcodeGenVersion: Version) throws { if let minimumXcodeGenVersion = options.minimumXcodeGenVersion, xcodeGenVersion < minimumXcodeGenVersion { throw SpecValidationError.ValidationError.invalidXcodeGenVersion(minimumVersion: minimumXcodeGenVersion, version: xcodeGenVersion) diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 8285e144..d639be05 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 = 46; + objectVersion = 50; objects = { /* Begin PBXAggregateTarget section */