File tree Expand file tree Collapse file tree 8 files changed +45
-9
lines changed
CarthageProject/Project.xcodeproj
AnotherProject/AnotherProject.xcodeproj
scheme_test/TestProject.xcodeproj Expand file tree Collapse file tree 8 files changed +45
-9
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ public class PBXProjGenerator {
102102 name: project. name,
103103 buildConfigurationList: buildConfigList,
104104 compatibilityVersion: project. compatibilityVersion,
105- preferredProjectObjectVersion: Int ( project. objectVersion ) ,
105+ preferredProjectObjectVersion: project. preferredProjectObjectVersion . map { Int ( $0 ) } ,
106106 minimizedProjectReferenceProxies: project. minimizedProjectReferenceProxies,
107107 mainGroup: mainGroup,
108108 developmentRegion: developmentRegion
Original file line number Diff line number Diff line change 1+ public extension ProjectFormat {
2+ static let `default` : ProjectFormat = . xcode16_0
3+ }
4+
5+ public enum ProjectFormat {
6+ case xcode16_3
7+ case xcode16_0
8+ case xcode15_3
9+ case xcode15_0
10+ case xcode14_0
11+
12+ public var objectVersion : UInt {
13+ switch self {
14+ case . xcode16_3: 90
15+ case . xcode16_0: 77
16+ case . xcode15_3: 63
17+ case . xcode15_0: 60
18+ case . xcode14_0: 56
19+ }
20+ }
21+
22+ public var preferredProjectObjectVersion : UInt ? {
23+ switch self {
24+ case . xcode16_3, . xcode16_0: objectVersion
25+ case . xcode15_3, . xcode15_0, . xcode14_0: nil
26+ }
27+ }
28+
29+ public var compatibilityVersion : String ? {
30+ switch self {
31+ case . xcode16_3, . xcode16_0: nil
32+ case . xcode15_3: " Xcode 15.3 "
33+ case . xcode15_0: " Xcode 15.0 "
34+ case . xcode14_0: " Xcode 14.0 "
35+ }
36+ }
37+ }
Original file line number Diff line number Diff line change @@ -11,12 +11,16 @@ extension Project {
1111 " 1.7 "
1212 }
1313
14- var compatibilityVersion : String {
15- " Xcode 14.0 "
14+ var compatibilityVersion : String ? {
15+ ProjectFormat . default . compatibilityVersion
1616 }
1717
1818 var objectVersion : UInt {
19- 77
19+ ProjectFormat . default. objectVersion
20+ }
21+
22+ var preferredProjectObjectVersion : UInt ? {
23+ ProjectFormat . default. preferredProjectObjectVersion
2024 }
2125
2226 var minimizedProjectReferenceProxies : Int {
Original file line number Diff line number Diff line change 324324 LastUpgradeCheck = 1430;
325325 };
326326 buildConfigurationList = D91E14E36EC0B415578456F2 /* Build configuration list for PBXProject "Project" */;
327- compatibilityVersion = "Xcode 14.0";
328327 developmentRegion = en;
329328 hasScannedForEncodings = 0;
330329 knownRegions = (
Original file line number Diff line number Diff line change 244244 LastUpgradeCheck = 1430;
245245 };
246246 buildConfigurationList = 425866ADA259DB93FC4AF1E3 /* Build configuration list for PBXProject "SPM" */;
247- compatibilityVersion = "Xcode 14.0";
248247 developmentRegion = en;
249248 hasScannedForEncodings = 0;
250249 knownRegions = (
Original file line number Diff line number Diff line change 122122 LastUpgradeCheck = 1430;
123123 };
124124 buildConfigurationList = 3DFC1105373EDB6483D4BC5D /* Build configuration list for PBXProject "AnotherProject" */;
125- compatibilityVersion = "Xcode 14.0";
126125 developmentRegion = en;
127126 hasScannedForEncodings = 0;
128127 knownRegions = (
Original file line number Diff line number Diff line change 24472447 );
24482448 };
24492449 buildConfigurationList = D91E14E36EC0B415578456F2 /* Build configuration list for PBXProject "Project" */;
2450- compatibilityVersion = "Xcode 14.0";
24512450 developmentRegion = en;
24522451 hasScannedForEncodings = 0;
24532452 knownRegions = (
Original file line number Diff line number Diff line change 7474 LastUpgradeCheck = 1430;
7575 };
7676 buildConfigurationList = E903F6E8184E2A86CEC31778 /* Build configuration list for PBXProject "TestProject" */;
77- compatibilityVersion = "Xcode 14.0";
7877 developmentRegion = en;
7978 hasScannedForEncodings = 0;
8079 knownRegions = (
You can’t perform that action at this time.
0 commit comments