xcodeproj 1.24.0 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b00b2ee1d752f42e42b42ce2eee72ed67d51d876460d11989d3c10d4d9db7ce
4
- data.tar.gz: bee25d68cd15f01f8f3d7740e3096d3d3023fed20ad2c14e78fd83cd1c56a3dc
3
+ metadata.gz: 8a7eaa9a8aac3a22a63fed1d450c23d5a2da12b02fee6a66e3d091f186d3ce90
4
+ data.tar.gz: 262b9ab5550dfc3b801a29471e75afdd2739e81804bbbe41513eb573c40dd45e
5
5
  SHA512:
6
- metadata.gz: c26d07901fd197b9bcf2f74aa922316404c9f77f2dc08c78a9ad97d4e2259ef56e38a2e06a25ccb16df9779c55750b23ccf8e6284548cb0ccb461327967cc0bd
7
- data.tar.gz: 353a4b09236f26a4f5e3f72e5a39e28cf5221beac0bad081a0947169edc7c0a474be8d92083a4c39a8b92663386bc8b4840fc834beab9ec8f5fc5108539cd9e4
6
+ metadata.gz: bf7bd8bff24ee471e8d52fb9d54d64c40b700e3d5e3732185dc5c6dfe1bd5c2c923f39ef58ca7b976c0810aec5432525c66b7ebb0c39e101f8a171b35b0864aa
7
+ data.tar.gz: 65def4b96f16a8022225a2218d50b21e94ef98f5d03808e1b1d1c72b6987a9f247fd0ff019e85310aa3c47da1bc131402e53ec2a154c3fdd82787b2caba5f3a5
@@ -341,7 +341,7 @@ module Xcodeproj
341
341
  # @return [Nil] if no include was found in the line.
342
342
  #
343
343
  def extract_include(line)
344
- regexp = /#include\s*"(.+)"/
344
+ regexp = /#include\??\s*"(.+)"/
345
345
  match = line.match(regexp)
346
346
  match[1] if match
347
347
  end
@@ -4,23 +4,23 @@ module Xcodeproj
4
4
  module Constants
5
5
  # @return [String] The last known iOS SDK (stable).
6
6
  #
7
- LAST_KNOWN_IOS_SDK = '14.0'
7
+ LAST_KNOWN_IOS_SDK = '18.0'
8
8
 
9
9
  # @return [String] The last known OS X SDK (stable).
10
10
  #
11
- LAST_KNOWN_OSX_SDK = '10.15'
11
+ LAST_KNOWN_OSX_SDK = '15.0'
12
12
 
13
13
  # @return [String] The last known tvOS SDK (stable).
14
14
  #
15
- LAST_KNOWN_TVOS_SDK = '14.0'
15
+ LAST_KNOWN_TVOS_SDK = '18.0'
16
16
 
17
17
  # @return [String] The last known visionOS SDK (unstable).
18
18
  #
19
- LAST_KNOWN_VISIONOS_SDK = '1.0'
19
+ LAST_KNOWN_VISIONOS_SDK = '2.0'
20
20
 
21
21
  # @return [String] The last known watchOS SDK (stable).
22
22
  #
23
- LAST_KNOWN_WATCHOS_SDK = '7.0'
23
+ LAST_KNOWN_WATCHOS_SDK = '11.0'
24
24
 
25
25
  # @return [String] The last known archive version to Xcodeproj.
26
26
  #
@@ -36,15 +36,15 @@ module Xcodeproj
36
36
 
37
37
  # @return [String] The last known object version to Xcodeproj.
38
38
  #
39
- LAST_KNOWN_OBJECT_VERSION = 60
39
+ LAST_KNOWN_OBJECT_VERSION = 77
40
40
 
41
41
  # @return [String] The last known Xcode version to Xcodeproj.
42
42
  #
43
- LAST_UPGRADE_CHECK = '1500'
43
+ LAST_UPGRADE_CHECK = '1600'
44
44
 
45
45
  # @return [String] The last known Xcode version to Xcodeproj.
46
46
  #
47
- LAST_SWIFT_UPGRADE_CHECK = '1500'
47
+ LAST_SWIFT_UPGRADE_CHECK = '1600'
48
48
 
49
49
  # @return [String] The version of `.xcscheme` files supported by Xcodeproj
50
50
  #
@@ -132,6 +132,8 @@ module Xcodeproj
132
132
  # @return [Hash] The compatibility version string for different object versions.
133
133
  #
134
134
  COMPATIBILITY_VERSION_BY_OBJECT_VERSION = {
135
+ 77 => 'Xcode 16.0',
136
+ 63 => 'Xcode 15.3',
135
137
  60 => 'Xcode 15.0',
136
138
  56 => 'Xcode 14.0',
137
139
  55 => 'Xcode 13.0',
@@ -1,5 +1,5 @@
1
1
  module Xcodeproj
2
2
  # The version of the xcodeproj gem.
3
3
  #
4
- VERSION = '1.24.0'.freeze unless defined? Xcodeproj::VERSION
4
+ VERSION = '1.27.0'.freeze unless defined? Xcodeproj::VERSION
5
5
  end
@@ -1,3 +1,5 @@
1
+ require 'xcodeproj/project/object/file_system_synchronized_root_group'
2
+
1
3
  module Xcodeproj
2
4
  class Project
3
5
  module Object
@@ -25,6 +27,20 @@ module Xcodeproj
25
27
  #
26
28
  has_one :base_configuration_reference, PBXFileReference
27
29
 
30
+ # @return [PBXFileSystemSynchronizedRootGroup] an optional reference to a group
31
+ # synchronized with the file system that contains a configuration file (`.xcconfig`).
32
+ #
33
+ # @note the configuration file relative path must be provided in `base_configuration_reference_relative_path`
34
+ #
35
+ has_one :base_configuration_reference_anchor, PBXFileSystemSynchronizedRootGroup
36
+
37
+ # @return [String] the relative path of a configuration file (`.xcconfig`)
38
+ # inside a group synchronized with the file system.
39
+ #
40
+ # @note the configuration file group must be provided in `base_configuration_reference_anchor`
41
+ #
42
+ attribute :base_configuration_reference_relative_path, String
43
+
28
44
  public
29
45
 
30
46
  # @!group AbstractObject Hooks
@@ -0,0 +1,62 @@
1
+ require 'xcodeproj/project/object_attributes'
2
+ require 'xcodeproj/project/object/helpers/groupable_helper'
3
+
4
+ module Xcodeproj
5
+ class Project
6
+ module Object
7
+ # This class represents a file system synchronized build file exception set.
8
+ class PBXFileSystemSynchronizedBuildFileExceptionSet < AbstractObject
9
+ # @return [AbstractTarget] The target to which this exception set applies.
10
+ #
11
+ has_one :target, AbstractTarget
12
+
13
+ # @return [Array<String>] The list of files in the group that are excluded from the target.
14
+ #
15
+ attribute :membership_exceptions, Array
16
+
17
+ # @return [Array<String>] The list of public headers.
18
+ #
19
+ attribute :public_headers, Array
20
+
21
+ # @return [Array<String>] The list of private headers.
22
+ #
23
+ attribute :private_headers, Array
24
+
25
+ # @return [Hash] The files with specific compiler flags.
26
+ #
27
+ attribute :additional_compiler_flags_by_relative_path, Hash
28
+
29
+ # @return [Hash] The files with specific attributes.
30
+ #
31
+ attribute :attributes_by_relative_path, Hash
32
+
33
+ # @return [Hash] The files with a platform filter.
34
+ #
35
+ attribute :platform_filters_by_relative_path, Hash
36
+
37
+ def display_name
38
+ "Exceptions for \"#{GroupableHelper.parent(self).display_name}\" folder in \"#{target.name}\" target"
39
+ end
40
+ end
41
+
42
+ # This class represents a file system synchronized group build phase membership exception set.
43
+ class PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet < AbstractObject
44
+ # @return [PBXSourcesBuildPhase, PBXCopyFilesBuildPhase] The build phase to which this exception set applies.
45
+ #
46
+ has_one :build_phase, [PBXSourcesBuildPhase, PBXCopyFilesBuildPhase]
47
+
48
+ # @return [Array<String>] The list of files in the group that are excluded from the build phase.
49
+ #
50
+ attribute :membership_exceptions, Array
51
+
52
+ # @return [Hash] The files with a platform filter.
53
+ #
54
+ attribute :platform_filters_by_relative_path, Hash
55
+
56
+ def display_name
57
+ "Exceptions for \"#{GroupableHelper.parent(self).display_name}\" folder in \"#{build_phase.name}\" build phase"
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,74 @@
1
+ require 'xcodeproj/project/object/file_system_synchronized_exception_set'
2
+
3
+ module Xcodeproj
4
+ class Project
5
+ module Object
6
+ # This class represents a file system synchronized root group.
7
+ class PBXFileSystemSynchronizedRootGroup < AbstractObject
8
+ # @return [String] the directory to which the path is relative.
9
+ #
10
+ # @note The accepted values are:
11
+ # - `<absolute>` for absolute paths
12
+ # - `<group>` for paths relative to the group
13
+ # - `SOURCE_ROOT` for paths relative to the project
14
+ # - `DEVELOPER_DIR` for paths relative to the developer
15
+ # directory.
16
+ # - `BUILT_PRODUCTS_DIR` for paths relative to the build
17
+ # products directory.
18
+ # - `SDKROOT` for paths relative to the SDK directory.
19
+ #
20
+ attribute :source_tree, String, '<group>'
21
+
22
+ # @return [String] the path to a folder in the file system.
23
+ #
24
+ attribute :path, String
25
+
26
+ # @return [String] Whether Xcode should use tabs for text alignment.
27
+ #
28
+ # @example
29
+ # `1`
30
+ #
31
+ attribute :uses_tabs, String
32
+
33
+ # @return [String] The width of the indent.
34
+ #
35
+ # @example
36
+ # `2`
37
+ #
38
+ attribute :indent_width, String
39
+
40
+ # @return [String] The width of the tabs.
41
+ #
42
+ # @example
43
+ # `2`
44
+ #
45
+ attribute :tab_width, String
46
+
47
+ # @return [String] Whether Xcode should wrap lines.
48
+ #
49
+ # @example
50
+ # `1`
51
+ #
52
+ attribute :wraps_lines, String
53
+
54
+ # @return [Array<PBXFileSystemSynchronizedBuildFileExceptionSet, PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet>]
55
+ # The list of exceptions applying to this group.
56
+ #
57
+ has_many :exceptions, [PBXFileSystemSynchronizedBuildFileExceptionSet, PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet]
58
+
59
+ # @return [Hash] The files in the group that have a file type defined explicitly.
60
+ #
61
+ attribute :explicit_file_types, Hash
62
+
63
+ # @return [Array] The folders in the group that are defined explicitly.
64
+ #
65
+ attribute :explicit_folders, Array
66
+
67
+ def display_name
68
+ return path if path
69
+ super
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
@@ -1,5 +1,6 @@
1
1
  require 'xcodeproj/project/object/helpers/groupable_helper'
2
2
  require 'xcodeproj/project/object/helpers/file_references_factory'
3
+ require 'xcodeproj/project/object/file_system_synchronized_root_group'
3
4
 
4
5
  module Xcodeproj
5
6
  class Project
@@ -13,7 +14,7 @@ module Xcodeproj
13
14
  # @return [ObjectList<PBXGroup, PBXFileReference>]
14
15
  # the objects contained by the group.
15
16
  #
16
- has_many :children, [PBXGroup, PBXFileReference, PBXReferenceProxy]
17
+ has_many :children, [PBXGroup, PBXFileReference, PBXReferenceProxy, PBXFileSystemSynchronizedRootGroup]
17
18
 
18
19
  # @return [String] the directory to which the path is relative.
19
20
  #
@@ -461,6 +461,11 @@ module Xcodeproj
461
461
  #
462
462
  has_many :build_phases, AbstractBuildPhase
463
463
 
464
+ # @return [ObjectList<PBXFileSystemSynchronizedRootGroup>] the file system synchronized
465
+ # groups containing files to include to build this target.
466
+ #
467
+ has_many :file_system_synchronized_groups, PBXFileSystemSynchronizedRootGroup
468
+
464
469
  public
465
470
 
466
471
  # @!group Helpers
@@ -684,19 +689,28 @@ module Xcodeproj
684
689
 
685
690
  def to_hash_as(method = :to_hash)
686
691
  hash_as = super
687
- if !hash_as['packageProductDependencies'].nil? && hash_as['packageProductDependencies'].empty?
688
- hash_as.delete('packageProductDependencies')
692
+ excluded_keys_for_serialization_when_empty.each do |key|
693
+ if !hash_as[key].nil? && hash_as[key].empty?
694
+ hash_as.delete(key)
695
+ end
689
696
  end
690
697
  hash_as
691
698
  end
692
699
 
693
700
  def to_ascii_plist
694
701
  plist = super
695
- if !plist.value['packageProductDependencies'].nil? && plist.value['packageProductDependencies'].empty?
696
- plist.value.delete('packageProductDependencies')
702
+ excluded_keys_for_serialization_when_empty.each do |key|
703
+ if !plist.value[key].nil? && plist.value[key].empty?
704
+ plist.value.delete(key)
705
+ end
697
706
  end
698
707
  plist
699
708
  end
709
+
710
+ # @return [Array<String>] array of keys to exclude from serialization when the value is empty
711
+ def excluded_keys_for_serialization_when_empty
712
+ %w(packageProductDependencies fileSystemSynchronizedGroups)
713
+ end
700
714
  end
701
715
 
702
716
  #-----------------------------------------------------------------------#
@@ -49,6 +49,14 @@ module Xcodeproj
49
49
  #
50
50
  has_one :main_group, PBXGroup
51
51
 
52
+ # @return [String] whether minimizes project reference proxies
53
+ #
54
+ attribute :minimized_project_reference_proxies, String, '0'
55
+
56
+ # @return [String] preferred project object version
57
+ #
58
+ attribute :preferred_project_object_version, String, Constants::LAST_KNOWN_OBJECT_VERSION.to_s
59
+
52
60
  # @return [PBXGroup] the group containing the references to products of
53
61
  # the project.
54
62
  #
@@ -533,3 +533,5 @@ require 'xcodeproj/project/object/native_target'
533
533
  require 'xcodeproj/project/object/root_object'
534
534
  require 'xcodeproj/project/object/target_dependency'
535
535
  require 'xcodeproj/project/object/reference_proxy'
536
+ require 'xcodeproj/project/object/file_system_synchronized_root_group'
537
+ require 'xcodeproj/project/object/file_system_synchronized_exception_set'
@@ -140,7 +140,7 @@ module Xcodeproj
140
140
  "for attribute: #{inspect}" unless acceptable
141
141
  else
142
142
  raise "[Xcodeproj] Type checking error: got `#{object.isa}` for " \
143
- "attribute: #{inspect}" unless acceptable
143
+ "attribute: #{inspect} - #{object.uuid} #{object.to_ascii_plist}" unless acceptable
144
144
  end
145
145
  end
146
146
 
@@ -221,11 +221,11 @@ module Xcodeproj
221
221
  end
222
222
 
223
223
  if archive_version.to_i > Constants::LAST_KNOWN_ARCHIVE_VERSION
224
- raise "[Xcodeproj] Unknown archive version (#{archive_version.to_i})."
224
+ UI.warn "[Xcodeproj] Archive version (#{archive_version.to_i}) is higher than the latest supported by xcodeproj (#{Constants::LAST_KNOWN_ARCHIVE_VERSION})."
225
225
  end
226
226
 
227
227
  if object_version.to_i > Constants::LAST_KNOWN_OBJECT_VERSION
228
- raise "[Xcodeproj] Unknown object version (#{object_version.to_i})."
228
+ UI.warn "[Xcodeproj] Xcode project version (#{object_version.to_i}) is higher than the latest supported by xcodeproj (#{Constants::LAST_KNOWN_OBJECT_VERSION})."
229
229
  end
230
230
 
231
231
  # Projects can have product_ref_groups that are not listed in the main_groups["Products"]
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.24.0
4
+ version: 1.27.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: 2024-01-28 00:00:00.000000000 Z
11
+ date: 2024-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: atomos
@@ -84,28 +84,34 @@ dependencies:
84
84
  requirements:
85
85
  - - "~>"
86
86
  - !ruby/object:Gem::Version
87
- version: 0.3.0
87
+ version: 0.4.0
88
88
  type: :runtime
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - "~>"
93
93
  - !ruby/object:Gem::Version
94
- version: 0.3.0
94
+ version: 0.4.0
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: rexml
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - "~>"
99
+ - - ">="
100
100
  - !ruby/object:Gem::Version
101
- version: 3.2.4
101
+ version: 3.3.6
102
+ - - "<"
103
+ - !ruby/object:Gem::Version
104
+ version: '4.0'
102
105
  type: :runtime
103
106
  prerelease: false
104
107
  version_requirements: !ruby/object:Gem::Requirement
105
108
  requirements:
106
- - - "~>"
109
+ - - ">="
107
110
  - !ruby/object:Gem::Version
108
- version: 3.2.4
111
+ version: 3.3.6
112
+ - - "<"
113
+ - !ruby/object:Gem::Version
114
+ version: '4.0'
109
115
  description: Xcodeproj lets you create and modify Xcode projects from Ruby. Script
110
116
  boring management tasks or build Xcode-friendly libraries. Also includes support
111
117
  for Xcode workspaces (.xcworkspace) and configuration files (.xcconfig).
@@ -142,6 +148,8 @@ files:
142
148
  - lib/xcodeproj/project/object/configuration_list.rb
143
149
  - lib/xcodeproj/project/object/container_item_proxy.rb
144
150
  - lib/xcodeproj/project/object/file_reference.rb
151
+ - lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb
152
+ - lib/xcodeproj/project/object/file_system_synchronized_root_group.rb
145
153
  - lib/xcodeproj/project/object/group.rb
146
154
  - lib/xcodeproj/project/object/helpers/build_settings_array_settings_by_object_version.rb
147
155
  - lib/xcodeproj/project/object/helpers/file_references_factory.rb
@@ -202,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
210
  - !ruby/object:Gem::Version
203
211
  version: '0'
204
212
  requirements: []
205
- rubygems_version: 3.2.3
213
+ rubygems_version: 3.5.22
206
214
  signing_key:
207
215
  specification_version: 3
208
216
  summary: Create and modify Xcode projects from Ruby.