xcodeproj 1.21.0 → 1.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/lib/xcodeproj/command.rb +6 -3
- data/lib/xcodeproj/constants.rb +12 -3
- data/lib/xcodeproj/differ.rb +33 -2
- data/lib/xcodeproj/gem_version.rb +1 -1
- data/lib/xcodeproj/project/object/build_configuration.rb +1 -1
- data/lib/xcodeproj/project/object/build_rule.rb +7 -0
- data/lib/xcodeproj/project/object/file_reference.rb +3 -2
- data/lib/xcodeproj/project/object/group.rb +20 -1
- data/lib/xcodeproj/project/object/native_target.rb +7 -0
- data/lib/xcodeproj/project/object/reference_proxy.rb +19 -0
- data/lib/xcodeproj/project/object/root_object.rb +2 -2
- data/lib/xcodeproj/project/object/swift_package_local_reference.rb +34 -0
- data/lib/xcodeproj/project/object/swift_package_product_dependency.rb +3 -3
- data/lib/xcodeproj/project/object/swift_package_remote_reference.rb +2 -2
- data/lib/xcodeproj/project/object/target_dependency.rb +13 -6
- data/lib/xcodeproj/project/object.rb +1 -0
- data/lib/xcodeproj/project/project_helper.rb +2 -0
- data/lib/xcodeproj/scheme/test_action.rb +38 -0
- data/lib/xcodeproj/xcodebuild_helper.rb +10 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9280a3358b3ab5cb87a7d2a8823d1b2959cb63d7dd01c1af2cd7f2f603a4fc90
|
4
|
+
data.tar.gz: b902495ad29630ab972e83717ef522f868d28678b519cb5477deff6d94db5b53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6058d88e97109756e60077277e1a67eb22f26578987b1666aaede1bbb8222a712e509ce22d4834801e034a3dc733201c7c4eaa1b72b5bc36482f1dab71caee15
|
7
|
+
data.tar.gz: d87165c6807a48f37bdf045a2d7159410e6c8acc2be39c13db586266110912bce271b0f7f32f8d6e0c27619e60529c1a38a4d1707c40c7efb5327f3bfdcc5af3
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Xcodeproj
|
2
2
|
|
3
|
-
[![Build Status](https://
|
4
|
-
[![
|
5
|
-
[![
|
3
|
+
[![Build Status](https://github.com/CocoaPods/Xcodeproj/workflows/Specs/badge.svg)](https://github.com/CocoaPods/Xcodeproj/actions/workflows/Specs.yml)
|
4
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/40ae104586c859d3581e/maintainability)](https://codeclimate.com/github/CocoaPods/Xcodeproj/maintainability)
|
5
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/40ae104586c859d3581e/test_coverage)](https://codeclimate.com/github/CocoaPods/Xcodeproj/test_coverage)
|
6
6
|
|
7
7
|
Xcodeproj lets you create and modify Xcode projects from [Ruby][ruby].
|
8
8
|
Script boring management tasks or build Xcode-friendly libraries. Also includes
|
@@ -64,6 +64,7 @@ project.targets.each do |target|
|
|
64
64
|
config.build_settings['MY_CUSTOM_FLAG'] ||= 'TRUE'
|
65
65
|
end
|
66
66
|
end
|
67
|
+
project.save
|
67
68
|
```
|
68
69
|
|
69
70
|
## Command Line Tool
|
data/lib/xcodeproj/command.rb
CHANGED
@@ -33,11 +33,14 @@ module Xcodeproj
|
|
33
33
|
elsif projects.size > 1
|
34
34
|
raise Informative, 'There are more than one Xcode project documents ' \
|
35
35
|
'in the current working directory. Please specify ' \
|
36
|
-
'
|
36
|
+
'the project as the first argument, or specify ' \
|
37
|
+
'which to use with the --project option if using ' \
|
38
|
+
'target-diff.'
|
37
39
|
else
|
38
40
|
raise Informative, 'No Xcode project document found in the current ' \
|
39
|
-
'working directory. Please specify
|
40
|
-
'
|
41
|
+
'working directory. Please specify the project ' \
|
42
|
+
'as the first argument, or specify which to use ' \
|
43
|
+
'with the --project option if using target-diff.' \
|
41
44
|
end
|
42
45
|
@xcodeproj_path = Pathname.new(xcodeproj_path).expand_path
|
43
46
|
end
|
data/lib/xcodeproj/constants.rb
CHANGED
@@ -14,6 +14,10 @@ module Xcodeproj
|
|
14
14
|
#
|
15
15
|
LAST_KNOWN_TVOS_SDK = '14.0'
|
16
16
|
|
17
|
+
# @return [String] The last known visionOS SDK (unstable).
|
18
|
+
#
|
19
|
+
LAST_KNOWN_VISIONOS_SDK = '1.0'
|
20
|
+
|
17
21
|
# @return [String] The last known watchOS SDK (stable).
|
18
22
|
#
|
19
23
|
LAST_KNOWN_WATCHOS_SDK = '7.0'
|
@@ -32,15 +36,15 @@ module Xcodeproj
|
|
32
36
|
|
33
37
|
# @return [String] The last known object version to Xcodeproj.
|
34
38
|
#
|
35
|
-
LAST_KNOWN_OBJECT_VERSION =
|
39
|
+
LAST_KNOWN_OBJECT_VERSION = 60
|
36
40
|
|
37
41
|
# @return [String] The last known Xcode version to Xcodeproj.
|
38
42
|
#
|
39
|
-
LAST_UPGRADE_CHECK = '
|
43
|
+
LAST_UPGRADE_CHECK = '1500'
|
40
44
|
|
41
45
|
# @return [String] The last known Xcode version to Xcodeproj.
|
42
46
|
#
|
43
|
-
LAST_SWIFT_UPGRADE_CHECK = '
|
47
|
+
LAST_SWIFT_UPGRADE_CHECK = '1500'
|
44
48
|
|
45
49
|
# @return [String] The version of `.xcscheme` files supported by Xcodeproj
|
46
50
|
#
|
@@ -128,6 +132,8 @@ module Xcodeproj
|
|
128
132
|
# @return [Hash] The compatibility version string for different object versions.
|
129
133
|
#
|
130
134
|
COMPATIBILITY_VERSION_BY_OBJECT_VERSION = {
|
135
|
+
60 => 'Xcode 15.0',
|
136
|
+
56 => 'Xcode 14.0',
|
131
137
|
55 => 'Xcode 13.0',
|
132
138
|
54 => 'Xcode 12.0',
|
133
139
|
53 => 'Xcode 11.4',
|
@@ -212,6 +218,9 @@ module Xcodeproj
|
|
212
218
|
[:tvos] => {
|
213
219
|
'SDKROOT' => 'appletvos',
|
214
220
|
}.freeze,
|
221
|
+
[:visionos] => {
|
222
|
+
'SDKROOT' => 'xros',
|
223
|
+
}.freeze,
|
215
224
|
[:watchos] => {
|
216
225
|
'SDKROOT' => 'watchos',
|
217
226
|
}.freeze,
|
data/lib/xcodeproj/differ.rb
CHANGED
@@ -113,8 +113,8 @@ module Xcodeproj
|
|
113
113
|
ensure_class(value_2, Array)
|
114
114
|
return nil if value_1 == value_2
|
115
115
|
|
116
|
-
new_objects_value_1 = (value_1
|
117
|
-
new_objects_value_2 = (value_2
|
116
|
+
new_objects_value_1 = array_non_unique_diff(value_1, value_2)
|
117
|
+
new_objects_value_2 = array_non_unique_diff(value_2, value_1)
|
118
118
|
return nil if value_1.empty? && value_2.empty?
|
119
119
|
|
120
120
|
matched_diff = {}
|
@@ -234,6 +234,37 @@ module Xcodeproj
|
|
234
234
|
raise "Wrong type `#{object.inspect}`" unless object.is_a?(klass)
|
235
235
|
end
|
236
236
|
|
237
|
+
# Returns the difference between two arrays, taking into account the number of times an element
|
238
|
+
# repeats in both arrays.
|
239
|
+
#
|
240
|
+
# @param [Array] value_1
|
241
|
+
# First array to the difference operation.
|
242
|
+
#
|
243
|
+
# @param [Array] value_2
|
244
|
+
# Second array to the difference operation.
|
245
|
+
#
|
246
|
+
# @return [Array]
|
247
|
+
#
|
248
|
+
def self.array_non_unique_diff(value_1, value_2)
|
249
|
+
value_2_elements_by_count = value_2.reduce({}) do |hash, element|
|
250
|
+
updated_element_hash = hash.key?(element) ? { element => hash[element] + 1 } : { element => 1 }
|
251
|
+
hash.merge(updated_element_hash)
|
252
|
+
end
|
253
|
+
|
254
|
+
value_1_elements_by_deletions =
|
255
|
+
value_1.to_set.map do |element|
|
256
|
+
times_to_delete_element = value_2_elements_by_count[element] || 0
|
257
|
+
next [element, times_to_delete_element]
|
258
|
+
end.to_h
|
259
|
+
|
260
|
+
value_1.select do |element|
|
261
|
+
if value_1_elements_by_deletions[element] > 0
|
262
|
+
value_1_elements_by_deletions[element] -= 1
|
263
|
+
next false
|
264
|
+
end
|
265
|
+
next true
|
266
|
+
end
|
267
|
+
end
|
237
268
|
#-------------------------------------------------------------------------#
|
238
269
|
end
|
239
270
|
end
|
@@ -17,6 +17,13 @@ module Xcodeproj
|
|
17
17
|
#
|
18
18
|
attribute :compiler_spec, String
|
19
19
|
|
20
|
+
# @return [String] the discovered dependency file to use.
|
21
|
+
#
|
22
|
+
# @example
|
23
|
+
# `$(DERIVED_FILES_DIR)/$(INPUT_FILE_NAME).d`.
|
24
|
+
#
|
25
|
+
attribute :dependency_file, String
|
26
|
+
|
20
27
|
# @return [String] the type of the files that should be processed by
|
21
28
|
# this rule.
|
22
29
|
#
|
@@ -313,8 +313,7 @@ module Xcodeproj
|
|
313
313
|
end
|
314
314
|
|
315
315
|
# In addition to removing the file reference, this will also remove any
|
316
|
-
# items related to this reference
|
317
|
-
# Xcode project.
|
316
|
+
# items related to this reference.
|
318
317
|
#
|
319
318
|
# @see AbstractObject#remove_from_project
|
320
319
|
#
|
@@ -327,6 +326,8 @@ module Xcodeproj
|
|
327
326
|
project_reference[:product_group].remove_from_project
|
328
327
|
project.root_object.project_references.delete(project_reference)
|
329
328
|
end
|
329
|
+
|
330
|
+
build_files.each(&:remove_from_project)
|
330
331
|
super
|
331
332
|
end
|
332
333
|
|
@@ -441,13 +441,32 @@ module Xcodeproj
|
|
441
441
|
result = File.basename(x.display_name.downcase, '.*') <=> File.basename(y.display_name.downcase, '.*')
|
442
442
|
if result.zero?
|
443
443
|
result = File.extname(x.display_name.downcase) <=> File.extname(y.display_name.downcase)
|
444
|
-
if result.zero?
|
444
|
+
if result.zero? && !(x.path.nil? || y.path.nil?)
|
445
445
|
result = x.path.downcase <=> y.path.downcase
|
446
446
|
end
|
447
447
|
end
|
448
448
|
result
|
449
449
|
end
|
450
450
|
end
|
451
|
+
|
452
|
+
# @return [Array<PBXBuildFile>] the build files associated with the
|
453
|
+
# current reference proxy.
|
454
|
+
#
|
455
|
+
def build_files
|
456
|
+
referrers.grep(PBXBuildFile)
|
457
|
+
end
|
458
|
+
|
459
|
+
# In addition to removing the reference proxy, this will also remove any
|
460
|
+
# items related to this reference.
|
461
|
+
#
|
462
|
+
# @see AbstractObject#remove_from_project
|
463
|
+
#
|
464
|
+
# @return [void]
|
465
|
+
#
|
466
|
+
def remove_from_project
|
467
|
+
build_files.each(&:remove_from_project)
|
468
|
+
super
|
469
|
+
end
|
451
470
|
end
|
452
471
|
|
453
472
|
#-----------------------------------------------------------------------#
|
@@ -112,6 +112,8 @@ module Xcodeproj
|
|
112
112
|
:osx
|
113
113
|
elsif sdk.include? 'appletvos'
|
114
114
|
:tvos
|
115
|
+
elsif sdk.include? 'xros'
|
116
|
+
:visionos
|
115
117
|
elsif sdk.include? 'watchos'
|
116
118
|
:watchos
|
117
119
|
end
|
@@ -134,6 +136,7 @@ module Xcodeproj
|
|
134
136
|
:ios => 'IPHONEOS_DEPLOYMENT_TARGET',
|
135
137
|
:osx => 'MACOSX_DEPLOYMENT_TARGET',
|
136
138
|
:tvos => 'TVOS_DEPLOYMENT_TARGET',
|
139
|
+
:visionos => 'XROS_DEPLOYMENT_TARGET',
|
137
140
|
:watchos => 'WATCHOS_DEPLOYMENT_TARGET',
|
138
141
|
}.freeze
|
139
142
|
|
@@ -342,6 +345,10 @@ module Xcodeproj
|
|
342
345
|
group = project.frameworks_group['tvOS'] || project.frameworks_group.new_group('tvOS')
|
343
346
|
path_sdk_name = 'AppleTVOS'
|
344
347
|
path_sdk_version = sdk_version || Constants::LAST_KNOWN_TVOS_SDK
|
348
|
+
when :visionos
|
349
|
+
group = project.frameworks_group['visionOS'] || project.frameworks_group.new_group('visionOS')
|
350
|
+
path_sdk_name = 'XROS'
|
351
|
+
path_sdk_version = sdk_version || Constants::LAST_KNOWN_VISIONOS_SDK
|
345
352
|
when :watchos
|
346
353
|
group = project.frameworks_group['watchOS'] || project.frameworks_group.new_group('watchOS')
|
347
354
|
path_sdk_name = 'WatchOS'
|
@@ -61,6 +61,25 @@ module Xcodeproj
|
|
61
61
|
return path if path
|
62
62
|
super
|
63
63
|
end
|
64
|
+
|
65
|
+
# @return [Array<PBXBuildFile>] the build files associated with the
|
66
|
+
# current reference proxy.
|
67
|
+
#
|
68
|
+
def build_files
|
69
|
+
referrers.grep(PBXBuildFile)
|
70
|
+
end
|
71
|
+
|
72
|
+
# In addition to removing the reference proxy, this will also remove any
|
73
|
+
# items related to this reference.
|
74
|
+
#
|
75
|
+
# @see AbstractObject#remove_from_project
|
76
|
+
#
|
77
|
+
# @return [void]
|
78
|
+
#
|
79
|
+
def remove_from_project
|
80
|
+
build_files.each(&:remove_from_project)
|
81
|
+
super
|
82
|
+
end
|
64
83
|
end
|
65
84
|
end
|
66
85
|
end
|
@@ -62,9 +62,9 @@ module Xcodeproj
|
|
62
62
|
#
|
63
63
|
attribute :project_root, String, ''
|
64
64
|
|
65
|
-
# @return [Array<XCRemoteSwiftPackageReference>] the list of Swift package references.
|
65
|
+
# @return [Array<XCRemoteSwiftPackageReference, XCLocalSwiftPackageReference>] the list of Swift package references.
|
66
66
|
#
|
67
|
-
has_many :package_references, XCRemoteSwiftPackageReference
|
67
|
+
has_many :package_references, [XCRemoteSwiftPackageReference, XCLocalSwiftPackageReference]
|
68
68
|
|
69
69
|
# @return [Array<ObjectDictionary>] any reference to other projects.
|
70
70
|
#
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Xcodeproj
|
2
|
+
class Project
|
3
|
+
module Object
|
4
|
+
# This class represents a local Swift package reference.
|
5
|
+
#
|
6
|
+
class XCLocalSwiftPackageReference < AbstractObject
|
7
|
+
# @!group Attributes
|
8
|
+
|
9
|
+
# @return [String] the repository url this Swift package was installed from.
|
10
|
+
#
|
11
|
+
attribute :path, String
|
12
|
+
|
13
|
+
# @return [String] the repository path where the package is located relative
|
14
|
+
# to the Xcode project.
|
15
|
+
#
|
16
|
+
attribute :relative_path, String
|
17
|
+
|
18
|
+
# @!group AbstractObject Hooks
|
19
|
+
#--------------------------------------#
|
20
|
+
|
21
|
+
def ascii_plist_annotation
|
22
|
+
" #{isa} \"#{File.basename(display_name)}\" "
|
23
|
+
end
|
24
|
+
|
25
|
+
# @return [String] the path of the local Swift package reference.
|
26
|
+
#
|
27
|
+
def display_name
|
28
|
+
return relative_path if relative_path
|
29
|
+
super
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -6,9 +6,9 @@ module Xcodeproj
|
|
6
6
|
class XCSwiftPackageProductDependency < AbstractObject
|
7
7
|
# @!group Attributes
|
8
8
|
|
9
|
-
# @return [XCRemoteSwiftPackageReference] the Swift package reference.
|
9
|
+
# @return [XCRemoteSwiftPackageReference, XCLocalSwiftPackageReference] the Swift package reference.
|
10
10
|
#
|
11
|
-
has_one :package, XCRemoteSwiftPackageReference
|
11
|
+
has_one :package, [XCRemoteSwiftPackageReference, XCLocalSwiftPackageReference]
|
12
12
|
|
13
13
|
# @return [String] the product name of this Swift package.
|
14
14
|
#
|
@@ -17,7 +17,7 @@ module Xcodeproj
|
|
17
17
|
# @!group AbstractObject Hooks
|
18
18
|
#--------------------------------------#
|
19
19
|
|
20
|
-
# @return [String] the name of the Swift package.
|
20
|
+
# @return [String] the name of the Swift package product dependency.
|
21
21
|
#
|
22
22
|
def display_name
|
23
23
|
return product_name if product_name
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Xcodeproj
|
2
2
|
class Project
|
3
3
|
module Object
|
4
|
-
# This class represents a Swift package reference.
|
4
|
+
# This class represents a remote Swift package reference.
|
5
5
|
#
|
6
6
|
class XCRemoteSwiftPackageReference < AbstractObject
|
7
7
|
# @!group Attributes
|
@@ -21,7 +21,7 @@ module Xcodeproj
|
|
21
21
|
" #{isa} \"#{File.basename(display_name)}\" "
|
22
22
|
end
|
23
23
|
|
24
|
-
# @return [String] the name of the Swift package
|
24
|
+
# @return [String] the name of the remote Swift package reference.
|
25
25
|
#
|
26
26
|
def display_name
|
27
27
|
return repositoryURL if repositoryURL
|
@@ -30,9 +30,14 @@ module Xcodeproj
|
|
30
30
|
#
|
31
31
|
attribute :platform_filter, String
|
32
32
|
|
33
|
-
# @return [String] the
|
33
|
+
# @return [Array<String>] the platform filters for this target dependency.
|
34
34
|
#
|
35
|
-
attribute :
|
35
|
+
attribute :platform_filters, Array
|
36
|
+
|
37
|
+
# @return [XCSwiftPackageProductDependency] the Swift Package product
|
38
|
+
# for this target dependency.
|
39
|
+
#
|
40
|
+
has_one :product_ref, XCSwiftPackageProductDependency
|
36
41
|
|
37
42
|
public
|
38
43
|
|
@@ -45,20 +50,22 @@ module Xcodeproj
|
|
45
50
|
return name if name
|
46
51
|
return target.name if target
|
47
52
|
return target_proxy.remote_info if target_proxy
|
53
|
+
return product_ref.product_name if product_ref
|
48
54
|
end
|
49
55
|
|
50
56
|
def ascii_plist_annotation
|
51
57
|
" #{isa} "
|
52
58
|
end
|
53
59
|
|
54
|
-
# @return [String] uuid of the target
|
55
|
-
#
|
56
|
-
# target
|
57
|
-
#
|
60
|
+
# @return [String] the uuid of the target if the dependency is a native
|
61
|
+
# target, the uuid of the target in the sub-project if the
|
62
|
+
# dependency is a target proxy, nil if the dependency is a Swift
|
63
|
+
# Package.
|
58
64
|
#
|
59
65
|
def native_target_uuid
|
60
66
|
return target.uuid if target
|
61
67
|
return target_proxy.remote_global_id_string if target_proxy
|
68
|
+
return nil if product_ref
|
62
69
|
raise "Expected target or target_proxy, from which to fetch a uuid for target '#{display_name}'." \
|
63
70
|
"Find and clear the PBXTargetDependency entry with uuid '#{@uuid}' in your .xcodeproj."
|
64
71
|
end
|
@@ -519,6 +519,7 @@ end
|
|
519
519
|
|
520
520
|
# Now load the concrete subclasses.
|
521
521
|
require 'xcodeproj/project/object/swift_package_remote_reference'
|
522
|
+
require 'xcodeproj/project/object/swift_package_local_reference'
|
522
523
|
require 'xcodeproj/project/object/swift_package_product_dependency'
|
523
524
|
require 'xcodeproj/project/object/build_configuration'
|
524
525
|
require 'xcodeproj/project/object/build_file'
|
@@ -284,6 +284,8 @@ module Xcodeproj
|
|
284
284
|
settings['CLANG_ENABLE_OBJC_WEAK'] = 'NO' if deployment_target < '10.7'
|
285
285
|
when :tvos
|
286
286
|
settings['TVOS_DEPLOYMENT_TARGET'] = deployment_target
|
287
|
+
when :visionos
|
288
|
+
settings['XROS_DEPLOYMENT_TARGET'] = deployment_target
|
287
289
|
when :watchos
|
288
290
|
settings['WATCHOS_DEPLOYMENT_TARGET'] = deployment_target
|
289
291
|
end
|
@@ -151,6 +151,44 @@ module Xcodeproj
|
|
151
151
|
arguments
|
152
152
|
end
|
153
153
|
|
154
|
+
# @return [Array<BuildableReference>]
|
155
|
+
# The list of BuildableReference (code coverage targets) associated with this Test Action
|
156
|
+
#
|
157
|
+
def code_coverage_targets
|
158
|
+
return [] unless @xml_element.elements['CodeCoverageTargets']
|
159
|
+
|
160
|
+
@xml_element.elements['CodeCoverageTargets'].get_elements('BuildableReference').map do |node|
|
161
|
+
BuildableReference.new(node)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
# @param [Array<BuildableReference>] buildable_references
|
166
|
+
# Sets the list of BuildableReference (code coverage targets) associated with this Test Action
|
167
|
+
#
|
168
|
+
def code_coverage_targets=(buildable_references)
|
169
|
+
@xml_element.attributes['onlyGenerateCoverageForSpecifiedTargets'] = bool_to_string(true)
|
170
|
+
|
171
|
+
@xml_element.delete_element('CodeCoverageTargets')
|
172
|
+
coverage_targets_element = @xml_element.add_element('CodeCoverageTargets')
|
173
|
+
buildable_references.each do |reference|
|
174
|
+
coverage_targets_element.add_element(reference.xml_element)
|
175
|
+
end
|
176
|
+
|
177
|
+
code_coverage_targets
|
178
|
+
end
|
179
|
+
|
180
|
+
# @param [BuildableReference] buildable_reference
|
181
|
+
# Add a BuildableReference (code coverage target) to this Test Action
|
182
|
+
#
|
183
|
+
def add_code_coverage_target(buildable_reference)
|
184
|
+
@xml_element.attributes['onlyGenerateCoverageForSpecifiedTargets'] = bool_to_string(true)
|
185
|
+
|
186
|
+
coverage_targets_element = @xml_element.elements['CodeCoverageTargets'] || @xml_element.add_element('CodeCoverageTargets')
|
187
|
+
coverage_targets_element.add_element(buildable_reference.xml_element)
|
188
|
+
|
189
|
+
code_coverage_targets
|
190
|
+
end
|
191
|
+
|
154
192
|
#-------------------------------------------------------------------------#
|
155
193
|
|
156
194
|
class TestableReference < XMLElementWrapper
|
@@ -27,6 +27,13 @@ module Xcodeproj
|
|
27
27
|
versions_by_sdk[:tvos].sort.last
|
28
28
|
end
|
29
29
|
|
30
|
+
# @return [String] The version of the last visionOS sdk.
|
31
|
+
#
|
32
|
+
def last_visionos_sdk
|
33
|
+
parse_sdks_if_needed
|
34
|
+
versions_by_sdk[:visionos].sort.last
|
35
|
+
end
|
36
|
+
|
30
37
|
# @return [String] The version of the last watchOS sdk.
|
31
38
|
#
|
32
39
|
def last_watchos_sdk
|
@@ -53,6 +60,7 @@ module Xcodeproj
|
|
53
60
|
@versions_by_sdk[:osx] = []
|
54
61
|
@versions_by_sdk[:ios] = []
|
55
62
|
@versions_by_sdk[:tvos] = []
|
63
|
+
@versions_by_sdk[:visionos] = []
|
56
64
|
@versions_by_sdk[:watchos] = []
|
57
65
|
if xcodebuild_available?
|
58
66
|
sdks = parse_sdks_information(xcodebuild_sdks)
|
@@ -61,6 +69,7 @@ module Xcodeproj
|
|
61
69
|
when name == 'macosx' then @versions_by_sdk[:osx] << version
|
62
70
|
when name == 'iphoneos' then @versions_by_sdk[:ios] << version
|
63
71
|
when name == 'appletvos' then @versions_by_sdk[:tvos] << version
|
72
|
+
when name == 'xros' then @versions_by_sdk[:visionos] << version
|
64
73
|
when name == 'watchos' then @versions_by_sdk[:watchos] << version
|
65
74
|
end
|
66
75
|
end
|
@@ -82,7 +91,7 @@ module Xcodeproj
|
|
82
91
|
# is the name of the SDK and the second is the version.
|
83
92
|
#
|
84
93
|
def parse_sdks_information(output)
|
85
|
-
output.scan(/-sdk (macosx|iphoneos|watchos|appletvos)(.+\w)/)
|
94
|
+
output.scan(/-sdk (macosx|iphoneos|watchos|appletvos|xros)(.+\w)/)
|
86
95
|
end
|
87
96
|
|
88
97
|
# @return [String] The sdk information reported by xcodebuild.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcodeproj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.23.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Duran
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: atomos
|
@@ -149,6 +149,7 @@ files:
|
|
149
149
|
- lib/xcodeproj/project/object/native_target.rb
|
150
150
|
- lib/xcodeproj/project/object/reference_proxy.rb
|
151
151
|
- lib/xcodeproj/project/object/root_object.rb
|
152
|
+
- lib/xcodeproj/project/object/swift_package_local_reference.rb
|
152
153
|
- lib/xcodeproj/project/object/swift_package_product_dependency.rb
|
153
154
|
- lib/xcodeproj/project/object/swift_package_remote_reference.rb
|
154
155
|
- lib/xcodeproj/project/object/target_dependency.rb
|
@@ -201,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
202
|
- !ruby/object:Gem::Version
|
202
203
|
version: '0'
|
203
204
|
requirements: []
|
204
|
-
rubygems_version: 3.
|
205
|
+
rubygems_version: 3.1.6
|
205
206
|
signing_key:
|
206
207
|
specification_version: 3
|
207
208
|
summary: Create and modify Xcode projects from Ruby.
|