File tree Expand file tree Collapse file tree 3 files changed +45
-4
lines changed Expand file tree Collapse file tree 3 files changed +45
-4
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 {
You can’t perform that action at this time.
0 commit comments