@@ -7,6 +7,10 @@ extension XCScheme {
77 public enum AttachmentLifetime : String {
88 case keepAlways, keepNever
99 }
10+
11+ public enum ScreenCaptureFormat : String {
12+ case screenshots, screenRecording
13+ }
1014
1115 // MARK: - Static
1216
@@ -35,6 +39,7 @@ extension XCScheme {
3539 public var language : String ?
3640 public var region : String ?
3741 public var systemAttachmentLifetime : AttachmentLifetime ?
42+ public var preferredScreenCaptureFormat : ScreenCaptureFormat ?
3843 public var userAttachmentLifetime : AttachmentLifetime ?
3944 public var customLLDBInitFile : String ?
4045
@@ -63,6 +68,7 @@ extension XCScheme {
6368 language: String ? = nil ,
6469 region: String ? = nil ,
6570 systemAttachmentLifetime: AttachmentLifetime ? = nil ,
71+ preferredScreenCaptureFormat: ScreenCaptureFormat ? = nil ,
6672 userAttachmentLifetime: AttachmentLifetime ? = nil ,
6773 customLLDBInitFile: String ? = nil ) {
6874 self . buildConfiguration = buildConfiguration
@@ -86,6 +92,7 @@ extension XCScheme {
8692 self . language = language
8793 self . region = region
8894 self . systemAttachmentLifetime = systemAttachmentLifetime
95+ self . preferredScreenCaptureFormat = preferredScreenCaptureFormat
8996 self . userAttachmentLifetime = userAttachmentLifetime
9097 self . customLLDBInitFile = customLLDBInitFile
9198 super. init ( preActions, postActions)
@@ -137,6 +144,8 @@ extension XCScheme {
137144
138145 systemAttachmentLifetime = element. attributes [ " systemAttachmentLifetime " ]
139146 . flatMap ( AttachmentLifetime . init ( rawValue: ) )
147+ preferredScreenCaptureFormat = element. attributes [ " preferredScreenCaptureFormat " ]
148+ . flatMap ( ScreenCaptureFormat . init ( rawValue: ) )
140149 userAttachmentLifetime = element. attributes [ " userAttachmentLifetime " ]
141150 . flatMap ( AttachmentLifetime . init ( rawValue: ) )
142151 customLLDBInitFile = element. attributes [ " customLLDBInitFile " ]
@@ -177,6 +186,14 @@ extension XCScheme {
177186 attributes [ " disableMainThreadChecker " ] = disableMainThreadChecker. xmlString
178187 }
179188 attributes [ " systemAttachmentLifetime " ] = systemAttachmentLifetime? . rawValue
189+
190+ switch preferredScreenCaptureFormat {
191+ case . screenshots:
192+ attributes [ " preferredScreenCaptureFormat " ] = preferredScreenCaptureFormat? . rawValue
193+ case . none, . screenRecording:
194+ break
195+ }
196+
180197 if case . keepAlways? = userAttachmentLifetime {
181198 attributes [ " userAttachmentLifetime " ] = userAttachmentLifetime? . rawValue
182199 }
@@ -253,6 +270,7 @@ extension XCScheme {
253270 language == rhs. language &&
254271 region == rhs. region &&
255272 systemAttachmentLifetime == rhs. systemAttachmentLifetime &&
273+ preferredScreenCaptureFormat == rhs. preferredScreenCaptureFormat &&
256274 userAttachmentLifetime == rhs. userAttachmentLifetime &&
257275 codeCoverageTargets == rhs. codeCoverageTargets &&
258276 customLLDBInitFile == rhs. customLLDBInitFile
0 commit comments