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 {
102
102
name: project. name,
103
103
buildConfigurationList: buildConfigList,
104
104
compatibilityVersion: project. compatibilityVersion,
105
- preferredProjectObjectVersion: Int ( project. objectVersion ) ,
105
+ preferredProjectObjectVersion: project. preferredProjectObjectVersion . map { Int ( $0 ) } ,
106
106
minimizedProjectReferenceProxies: project. minimizedProjectReferenceProxies,
107
107
mainGroup: mainGroup,
108
108
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 {
11
11
" 1.7 "
12
12
}
13
13
14
- var compatibilityVersion : String {
15
- " Xcode 14.0 "
14
+ var compatibilityVersion : String ? {
15
+ ProjectFormat . default . compatibilityVersion
16
16
}
17
17
18
18
var objectVersion : UInt {
19
- 77
19
+ ProjectFormat . default. objectVersion
20
+ }
21
+
22
+ var preferredProjectObjectVersion : UInt ? {
23
+ ProjectFormat . default. preferredProjectObjectVersion
20
24
}
21
25
22
26
var minimizedProjectReferenceProxies : Int {
You can’t perform that action at this time.
0 commit comments