diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f1aded7..c97a88df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ - Fixed generated schemes for tool targets not setting the executable [#496](https://github.com/yonaskolb/XcodeGen/pull/496) @yonaskolb - Fixed resolving Carthage dependencies for iOS app with watchOS target. [465](https://github.com/yonaskolb/XcodeGen/pull/465) @raptorxcz +#### 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 diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index 97433993..c3c17418 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) } @@ -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..5acef3f1 100644 --- a/Sources/XcodeGenKit/Version.swift +++ b/Sources/XcodeGenKit/Version.swift @@ -11,6 +11,14 @@ extension Project { return "1.3" } + var compatabilityVersion: String { + 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 1769a65f..8979eb5c 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 */ @@ -1435,7 +1435,7 @@ }; }; buildConfigurationList = D91E14E36EC0B415578456F264E0161E /* Build configuration list for PBXProject "Project" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 9.3"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = (