From b1f0e0947b9b9897422e0d4b8e4fdf87839d3efa Mon Sep 17 00:00:00 2001 From: Brett-Best Date: Tue, 11 Jun 2024 08:48:06 +1000 Subject: [PATCH 01/14] Updated `constants.rb` to include Xcode 16.0 object version --- lib/xcodeproj/constants.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/xcodeproj/constants.rb b/lib/xcodeproj/constants.rb index 543a7b2f..2c0f772d 100644 --- a/lib/xcodeproj/constants.rb +++ b/lib/xcodeproj/constants.rb @@ -36,7 +36,7 @@ module Constants # @return [String] The last known object version to Xcodeproj. # - LAST_KNOWN_OBJECT_VERSION = 63 + LAST_KNOWN_OBJECT_VERSION = 73 # @return [String] The last known Xcode version to Xcodeproj. # @@ -132,6 +132,7 @@ module Constants # @return [Hash] The compatibility version string for different object versions. # COMPATIBILITY_VERSION_BY_OBJECT_VERSION = { + 73 => 'Xcode 16.0', 63 => 'Xcode 15.3', 60 => 'Xcode 15.0', 56 => 'Xcode 14.0', From 14cc373a296502e7e68f01b228ff3162da6f1d71 Mon Sep 17 00:00:00 2001 From: Brett-Best Date: Tue, 11 Jun 2024 09:35:33 +1000 Subject: [PATCH 02/14] Added root object attribute for `preferredProjectObjectVersion` --- lib/xcodeproj/project/object/root_object.rb | 4 ++++ spec/project/object/root_object_spec.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/xcodeproj/project/object/root_object.rb b/lib/xcodeproj/project/object/root_object.rb index 8737400f..c6b50e59 100644 --- a/lib/xcodeproj/project/object/root_object.rb +++ b/lib/xcodeproj/project/object/root_object.rb @@ -53,6 +53,10 @@ class PBXProject < AbstractObject # attribute :minimized_project_reference_proxies, String, '0' + # @return [String] preferred project object version + # + attribute :preferred_project_object_version, String, '73' + # @return [PBXGroup] the group containing the references to products of # the project. # diff --git a/spec/project/object/root_object_spec.rb b/spec/project/object/root_object_spec.rb index 45493fda..a656b8e8 100644 --- a/spec/project/object/root_object_spec.rb +++ b/spec/project/object/root_object_spec.rb @@ -43,6 +43,10 @@ module ProjectSpecs @root_object.minimized_project_reference_proxies.should == '0' end + it 'returns the preferred project object version' do + @root_object.preferred_project_object_version.should == '73' + end + it 'returns the products group' do @root_object.product_ref_group.class.should == PBXGroup end From 911838070b44dfe0f4ae2ced2e0db41dfcd19550 Mon Sep 17 00:00:00 2001 From: Brett-Best Date: Wed, 21 Aug 2024 20:34:15 +1000 Subject: [PATCH 03/14] Updated object versions for Xcode 16.0b6 --- lib/xcodeproj/constants.rb | 4 ++-- lib/xcodeproj/project/object/root_object.rb | 2 +- spec/project/object/root_object_spec.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/xcodeproj/constants.rb b/lib/xcodeproj/constants.rb index 2c0f772d..8935b6bd 100644 --- a/lib/xcodeproj/constants.rb +++ b/lib/xcodeproj/constants.rb @@ -36,7 +36,7 @@ module Constants # @return [String] The last known object version to Xcodeproj. # - LAST_KNOWN_OBJECT_VERSION = 73 + LAST_KNOWN_OBJECT_VERSION = 77 # @return [String] The last known Xcode version to Xcodeproj. # @@ -132,7 +132,7 @@ module Constants # @return [Hash] The compatibility version string for different object versions. # COMPATIBILITY_VERSION_BY_OBJECT_VERSION = { - 73 => 'Xcode 16.0', + 77 => 'Xcode 16.0', 63 => 'Xcode 15.3', 60 => 'Xcode 15.0', 56 => 'Xcode 14.0', diff --git a/lib/xcodeproj/project/object/root_object.rb b/lib/xcodeproj/project/object/root_object.rb index c6b50e59..1cd5e71d 100644 --- a/lib/xcodeproj/project/object/root_object.rb +++ b/lib/xcodeproj/project/object/root_object.rb @@ -55,7 +55,7 @@ class PBXProject < AbstractObject # @return [String] preferred project object version # - attribute :preferred_project_object_version, String, '73' + attribute :preferred_project_object_version, String, '77' # @return [PBXGroup] the group containing the references to products of # the project. diff --git a/spec/project/object/root_object_spec.rb b/spec/project/object/root_object_spec.rb index a656b8e8..f23f6ca4 100644 --- a/spec/project/object/root_object_spec.rb +++ b/spec/project/object/root_object_spec.rb @@ -44,7 +44,7 @@ module ProjectSpecs end it 'returns the preferred project object version' do - @root_object.preferred_project_object_version.should == '73' + @root_object.preferred_project_object_version.should == '77' end it 'returns the products group' do From a3b63577531f00adb01e87729399941969f5d593 Mon Sep 17 00:00:00 2001 From: Brett-Best Date: Mon, 2 Sep 2024 17:08:44 +1000 Subject: [PATCH 04/14] Added support for `PBXFileSystemSynchronizedRootGroup`s --- lib/xcodeproj/project/object.rb | 1 + .../object/file_system_synchronized_root_group.rb | 15 +++++++++++++++ lib/xcodeproj/project/object/group.rb | 3 ++- lib/xcodeproj/project/object/native_target.rb | 2 ++ 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 lib/xcodeproj/project/object/file_system_synchronized_root_group.rb diff --git a/lib/xcodeproj/project/object.rb b/lib/xcodeproj/project/object.rb index 8d2ecf0e..abb146c4 100644 --- a/lib/xcodeproj/project/object.rb +++ b/lib/xcodeproj/project/object.rb @@ -533,3 +533,4 @@ def inspect require 'xcodeproj/project/object/root_object' require 'xcodeproj/project/object/target_dependency' require 'xcodeproj/project/object/reference_proxy' +require 'xcodeproj/project/object/file_system_synchronized_root_group' diff --git a/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb b/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb new file mode 100644 index 00000000..3f934120 --- /dev/null +++ b/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb @@ -0,0 +1,15 @@ +module Xcodeproj + class Project + module Object + # This class represents a file system synchronized root group. + class PBXFileSystemSynchronizedRootGroup < AbstractObject + attribute :path, String + attribute :source_tree, String, 'group' + def display_name + return path if path + super + end + end + end + end +end diff --git a/lib/xcodeproj/project/object/group.rb b/lib/xcodeproj/project/object/group.rb index 7571eadd..51902dd3 100644 --- a/lib/xcodeproj/project/object/group.rb +++ b/lib/xcodeproj/project/object/group.rb @@ -1,5 +1,6 @@ require 'xcodeproj/project/object/helpers/groupable_helper' require 'xcodeproj/project/object/helpers/file_references_factory' +require 'xcodeproj/project/object/file_system_synchronized_root_group' module Xcodeproj class Project @@ -13,7 +14,7 @@ class PBXGroup < AbstractObject # @return [ObjectList] # the objects contained by the group. # - has_many :children, [PBXGroup, PBXFileReference, PBXReferenceProxy] + has_many :children, [PBXGroup, PBXFileReference, PBXReferenceProxy, PBXFileSystemSynchronizedRootGroup] # @return [String] the directory to which the path is relative. # diff --git a/lib/xcodeproj/project/object/native_target.rb b/lib/xcodeproj/project/object/native_target.rb index 87294ae2..f0635c63 100644 --- a/lib/xcodeproj/project/object/native_target.rb +++ b/lib/xcodeproj/project/object/native_target.rb @@ -29,6 +29,8 @@ class AbstractTarget < AbstractObject # has_many :dependencies, PBXTargetDependency + has_many :file_system_synchronized_groups, PBXFileSystemSynchronizedRootGroup + public # @!group Helpers From c8fe120fb697f1cb359cad5b3c10da404f0f198f Mon Sep 17 00:00:00 2001 From: Brett-Best Date: Wed, 11 Sep 2024 22:22:16 +1000 Subject: [PATCH 05/14] Added support for `PBXFileSystemSynchronizedBuildFileExceptionSet`s --- lib/xcodeproj/project/object.rb | 1 + ...em_synchronized_build_file_exception_set.rb | 18 ++++++++++++++++++ .../file_system_synchronized_root_group.rb | 4 ++++ 3 files changed, 23 insertions(+) create mode 100644 lib/xcodeproj/project/object/file_system_synchronized_build_file_exception_set.rb diff --git a/lib/xcodeproj/project/object.rb b/lib/xcodeproj/project/object.rb index abb146c4..bdfaa214 100644 --- a/lib/xcodeproj/project/object.rb +++ b/lib/xcodeproj/project/object.rb @@ -534,3 +534,4 @@ def inspect require 'xcodeproj/project/object/target_dependency' require 'xcodeproj/project/object/reference_proxy' require 'xcodeproj/project/object/file_system_synchronized_root_group' +require 'xcodeproj/project/object/file_system_synchronized_build_file_exception_set' diff --git a/lib/xcodeproj/project/object/file_system_synchronized_build_file_exception_set.rb b/lib/xcodeproj/project/object/file_system_synchronized_build_file_exception_set.rb new file mode 100644 index 00000000..e3ec498a --- /dev/null +++ b/lib/xcodeproj/project/object/file_system_synchronized_build_file_exception_set.rb @@ -0,0 +1,18 @@ +require 'xcodeproj/project/object_attributes' +require 'xcodeproj/project/object/helpers/groupable_helper' + +module Xcodeproj + class Project + module Object + # This class represents a file system synchronized build file exception set. + class PBXFileSystemSynchronizedBuildFileExceptionSet < AbstractObject + has_one :target, AbstractTarget + attribute :membership_exceptions, Array + + def display_name + "Exceptions for \"#{GroupableHelper.parent(self).display_name}\" folder in \"#{target.name}\" target" + end + end + end + end +end diff --git a/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb b/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb index 3f934120..5832ba97 100644 --- a/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb +++ b/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb @@ -1,3 +1,5 @@ +require 'xcodeproj/project/object/file_system_synchronized_build_file_exception_set' + module Xcodeproj class Project module Object @@ -5,6 +7,8 @@ module Object class PBXFileSystemSynchronizedRootGroup < AbstractObject attribute :path, String attribute :source_tree, String, 'group' + has_many :exceptions, PBXFileSystemSynchronizedBuildFileExceptionSet + def display_name return path if path super From fdec342eda319005984d32429acad13dbf67d96f Mon Sep 17 00:00:00 2001 From: Guillaume Roche-Chosson Date: Fri, 25 Oct 2024 23:19:46 +0200 Subject: [PATCH 06/14] Move `file_system_synchronized_groups` from AbstractTarget to PBXNativeTarget --- lib/xcodeproj/project/object/native_target.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/xcodeproj/project/object/native_target.rb b/lib/xcodeproj/project/object/native_target.rb index f0635c63..b8b36baa 100644 --- a/lib/xcodeproj/project/object/native_target.rb +++ b/lib/xcodeproj/project/object/native_target.rb @@ -29,8 +29,6 @@ class AbstractTarget < AbstractObject # has_many :dependencies, PBXTargetDependency - has_many :file_system_synchronized_groups, PBXFileSystemSynchronizedRootGroup - public # @!group Helpers @@ -463,6 +461,11 @@ class PBXNativeTarget < AbstractTarget # has_many :build_phases, AbstractBuildPhase + # @return [ObjectList] the file system synchronized + # groups containing files to include to build this target. + # + has_many :file_system_synchronized_groups, PBXFileSystemSynchronizedRootGroup + public # @!group Helpers From d74869033626d102a99dbb44c2d21c5c24398078 Mon Sep 17 00:00:00 2001 From: Guillaume Roche-Chosson Date: Fri, 25 Oct 2024 23:20:39 +0200 Subject: [PATCH 07/14] Add missing fields and some doc to PBXFileSystemSynchronizedRootGroup --- .../file_system_synchronized_root_group.rb | 60 ++++++++++++++++++- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb b/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb index 5832ba97..c13b9d2b 100644 --- a/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb +++ b/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb @@ -5,9 +5,65 @@ class Project module Object # This class represents a file system synchronized root group. class PBXFileSystemSynchronizedRootGroup < AbstractObject + + # @return [String] the directory to which the path is relative. + # + # @note The accepted values are: + # - `` for absolute paths + # - `` for paths relative to the group + # - `SOURCE_ROOT` for paths relative to the project + # - `DEVELOPER_DIR` for paths relative to the developer + # directory. + # - `BUILT_PRODUCTS_DIR` for paths relative to the build + # products directory. + # - `SDKROOT` for paths relative to the SDK directory. + # + attribute :source_tree, String, '' + + # @return [String] the path to a folder in the file system. + # attribute :path, String - attribute :source_tree, String, 'group' - has_many :exceptions, PBXFileSystemSynchronizedBuildFileExceptionSet + + # @return [String] Whether Xcode should use tabs for text alignment. + # + # @example + # `1` + # + attribute :uses_tabs, String + + # @return [String] The width of the indent. + # + # @example + # `2` + # + attribute :indent_width, String + + # @return [String] The width of the tabs. + # + # @example + # `2` + # + attribute :tab_width, String + + # @return [String] Whether Xcode should wrap lines. + # + # @example + # `1` + # + attribute :wraps_lines, String + + # @return [Array] + # The list of exceptions applying to this group. + # + has_many :exceptions, [PBXFileSystemSynchronizedBuildFileExceptionSet, PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet] + + # @return [Hash] The files in the group that have a file type defined explicitly. + # + attribute :explicit_file_types, Hash + + # @return [Array] The folders in the group that are defined explicitly. + # + attribute :explicit_folders, Array def display_name return path if path From f28e3d404f5cbc03383db45d4db1d4e9099530ca Mon Sep 17 00:00:00 2001 From: Guillaume Roche-Chosson Date: Fri, 25 Oct 2024 23:28:54 +0200 Subject: [PATCH 08/14] Add missing fields and some doc to PBXFileSystemSynchronizedBuildFileExceptionSet --- lib/xcodeproj/project/object.rb | 2 +- ...m_synchronized_build_file_exception_set.rb | 18 -------- .../file_system_synchronized_exception_set.rb | 46 +++++++++++++++++++ .../file_system_synchronized_root_group.rb | 2 +- 4 files changed, 48 insertions(+), 20 deletions(-) delete mode 100644 lib/xcodeproj/project/object/file_system_synchronized_build_file_exception_set.rb create mode 100644 lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb diff --git a/lib/xcodeproj/project/object.rb b/lib/xcodeproj/project/object.rb index bdfaa214..ce582c0a 100644 --- a/lib/xcodeproj/project/object.rb +++ b/lib/xcodeproj/project/object.rb @@ -534,4 +534,4 @@ def inspect require 'xcodeproj/project/object/target_dependency' require 'xcodeproj/project/object/reference_proxy' require 'xcodeproj/project/object/file_system_synchronized_root_group' -require 'xcodeproj/project/object/file_system_synchronized_build_file_exception_set' +require 'xcodeproj/project/object/file_system_synchronized_exception_set' diff --git a/lib/xcodeproj/project/object/file_system_synchronized_build_file_exception_set.rb b/lib/xcodeproj/project/object/file_system_synchronized_build_file_exception_set.rb deleted file mode 100644 index e3ec498a..00000000 --- a/lib/xcodeproj/project/object/file_system_synchronized_build_file_exception_set.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'xcodeproj/project/object_attributes' -require 'xcodeproj/project/object/helpers/groupable_helper' - -module Xcodeproj - class Project - module Object - # This class represents a file system synchronized build file exception set. - class PBXFileSystemSynchronizedBuildFileExceptionSet < AbstractObject - has_one :target, AbstractTarget - attribute :membership_exceptions, Array - - def display_name - "Exceptions for \"#{GroupableHelper.parent(self).display_name}\" folder in \"#{target.name}\" target" - end - end - end - end -end diff --git a/lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb b/lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb new file mode 100644 index 00000000..bea97fe7 --- /dev/null +++ b/lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb @@ -0,0 +1,46 @@ +require 'xcodeproj/project/object_attributes' +require 'xcodeproj/project/object/helpers/groupable_helper' + +module Xcodeproj + class Project + module Object + + # This class represents a file system synchronized build file exception set. + class PBXFileSystemSynchronizedBuildFileExceptionSet < AbstractObject + + # @return [AbstractTarget] The target to which this exception set applies. + # + has_one :target, AbstractTarget + + # @return [Array] The list of files in the group that are excluded from the target. + # + attribute :membership_exceptions, Array + + # @return [Array] The list of public headers. + # + attribute :public_headers, Array + + # @return [Array] The list of private headers. + # + attribute :private_headers, Array + + # @return [Hash] The files with specific compiler flags. + # + attribute :additional_compiler_flags_by_relative_path, Hash + + # @return [Hash] The files with specific attributes. + # + attribute :attributes_by_relative_path, Hash + + # @return [Hash] The files with a platform filter. + # + attribute :platform_filters_by_relative_path, Hash + + def display_name + "Exceptions for \"#{GroupableHelper.parent(self).display_name}\" folder in \"#{target.name}\" target" + end + end + + end + end +end diff --git a/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb b/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb index c13b9d2b..891908a6 100644 --- a/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb +++ b/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb @@ -1,4 +1,4 @@ -require 'xcodeproj/project/object/file_system_synchronized_build_file_exception_set' +require 'xcodeproj/project/object/file_system_synchronized_exception_set' module Xcodeproj class Project From e3eed930ee0716565059b6d616d5d57e30cd7da7 Mon Sep 17 00:00:00 2001 From: Guillaume Roche-Chosson Date: Fri, 25 Oct 2024 23:29:07 +0200 Subject: [PATCH 09/14] Add PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet --- .../file_system_synchronized_exception_set.rb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb b/lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb index bea97fe7..702569c7 100644 --- a/lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb +++ b/lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb @@ -41,6 +41,26 @@ def display_name end end + # This class represents a file system synchronized group build phase membership exception set. + class PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet < AbstractObject + + # @return [PBXSourcesBuildPhase] The build phase to which this exception set applies. + # + has_one :build_phase, PBXSourcesBuildPhase + + # @return [Array] The list of files in the group that are excluded from the build phase. + # + attribute :membership_exceptions, Array + + # @return [Hash] The files with a platform filter. + # + attribute :platform_filters_by_relative_path, Hash + + def display_name + "Exceptions for \"#{GroupableHelper.parent(self).display_name}\" folder in \"#{build_phase.name}\" build phase" + end + end + end end end From 6473e9254057b66735aa0c903f340618a970008a Mon Sep 17 00:00:00 2001 From: Guillaume Roche-Chosson Date: Fri, 25 Oct 2024 23:31:34 +0200 Subject: [PATCH 10/14] Add `base_configuration_reference_` fields to XCBuildConfiguration --- .../project/object/build_configuration.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/xcodeproj/project/object/build_configuration.rb b/lib/xcodeproj/project/object/build_configuration.rb index 9c5b8d69..8e8b94fc 100644 --- a/lib/xcodeproj/project/object/build_configuration.rb +++ b/lib/xcodeproj/project/object/build_configuration.rb @@ -1,3 +1,5 @@ +require 'xcodeproj/project/object/file_system_synchronized_root_group' + module Xcodeproj class Project module Object @@ -25,6 +27,20 @@ class XCBuildConfiguration < AbstractObject # has_one :base_configuration_reference, PBXFileReference + # @return [PBXFileSystemSynchronizedRootGroup] an optional reference to a group + # synchronized with the file system that contains a configuration file (`.xcconfig`). + # + # @note the configuration file relative path must be provided in `base_configuration_reference_relative_path` + # + has_one :base_configuration_reference_anchor, PBXFileSystemSynchronizedRootGroup + + # @return [String] the relative path of a configuration file (`.xcconfig`) + # inside a group synchronized with the file system. + # + # @note the configuration file group must be provided in `base_configuration_reference_anchor` + # + attribute :base_configuration_reference_relative_path, String + public # @!group AbstractObject Hooks From d6d937afc1e70a8ad778d51a193a379bbf410b35 Mon Sep 17 00:00:00 2001 From: Eric Amorde Date: Sat, 26 Oct 2024 13:34:14 -0700 Subject: [PATCH 11/14] Exclude fileSystemSynchronizedGroups key from PBXNativeTarget when the list is empty --- lib/xcodeproj/project/object/native_target.rb | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/xcodeproj/project/object/native_target.rb b/lib/xcodeproj/project/object/native_target.rb index b8b36baa..42b008c9 100644 --- a/lib/xcodeproj/project/object/native_target.rb +++ b/lib/xcodeproj/project/object/native_target.rb @@ -689,19 +689,28 @@ def sort(_options = nil) def to_hash_as(method = :to_hash) hash_as = super - if !hash_as['packageProductDependencies'].nil? && hash_as['packageProductDependencies'].empty? - hash_as.delete('packageProductDependencies') + excluded_keys_for_serialization_when_empty.each do |key| + if !hash_as[key].nil? && hash_as[key].empty? + hash_as.delete(key) + end end hash_as end def to_ascii_plist plist = super - if !plist.value['packageProductDependencies'].nil? && plist.value['packageProductDependencies'].empty? - plist.value.delete('packageProductDependencies') + excluded_keys_for_serialization_when_empty.each do |key| + if !plist.value[key].nil? && plist.value[key].empty? + plist.value.delete(key) + end end plist end + + # @return [Array] array of keys to exclude from serialization when the value is empty + def excluded_keys_for_serialization_when_empty + %w(packageProductDependencies fileSystemSynchronizedGroups) + end end #-----------------------------------------------------------------------# From 7381f3f6ae0b85b526b7c6cc9ab5fd7ad8ac7680 Mon Sep 17 00:00:00 2001 From: Eric Amorde Date: Sat, 26 Oct 2024 13:34:36 -0700 Subject: [PATCH 12/14] Fix rubocop style errors --- lib/xcodeproj/project/object/build_configuration.rb | 6 +++--- .../object/file_system_synchronized_exception_set.rb | 6 +----- .../project/object/file_system_synchronized_root_group.rb | 3 +-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/xcodeproj/project/object/build_configuration.rb b/lib/xcodeproj/project/object/build_configuration.rb index 8e8b94fc..624e8c8b 100644 --- a/lib/xcodeproj/project/object/build_configuration.rb +++ b/lib/xcodeproj/project/object/build_configuration.rb @@ -27,16 +27,16 @@ class XCBuildConfiguration < AbstractObject # has_one :base_configuration_reference, PBXFileReference - # @return [PBXFileSystemSynchronizedRootGroup] an optional reference to a group + # @return [PBXFileSystemSynchronizedRootGroup] an optional reference to a group # synchronized with the file system that contains a configuration file (`.xcconfig`). - # + # # @note the configuration file relative path must be provided in `base_configuration_reference_relative_path` # has_one :base_configuration_reference_anchor, PBXFileSystemSynchronizedRootGroup # @return [String] the relative path of a configuration file (`.xcconfig`) # inside a group synchronized with the file system. - # + # # @note the configuration file group must be provided in `base_configuration_reference_anchor` # attribute :base_configuration_reference_relative_path, String diff --git a/lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb b/lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb index 702569c7..b23dca01 100644 --- a/lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb +++ b/lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb @@ -4,10 +4,8 @@ module Xcodeproj class Project module Object - # This class represents a file system synchronized build file exception set. class PBXFileSystemSynchronizedBuildFileExceptionSet < AbstractObject - # @return [AbstractTarget] The target to which this exception set applies. # has_one :target, AbstractTarget @@ -31,7 +29,7 @@ class PBXFileSystemSynchronizedBuildFileExceptionSet < AbstractObject # @return [Hash] The files with specific attributes. # attribute :attributes_by_relative_path, Hash - + # @return [Hash] The files with a platform filter. # attribute :platform_filters_by_relative_path, Hash @@ -43,7 +41,6 @@ def display_name # This class represents a file system synchronized group build phase membership exception set. class PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet < AbstractObject - # @return [PBXSourcesBuildPhase] The build phase to which this exception set applies. # has_one :build_phase, PBXSourcesBuildPhase @@ -60,7 +57,6 @@ def display_name "Exceptions for \"#{GroupableHelper.parent(self).display_name}\" folder in \"#{build_phase.name}\" build phase" end end - end end end diff --git a/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb b/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb index 891908a6..4a26bc6a 100644 --- a/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb +++ b/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb @@ -5,7 +5,6 @@ class Project module Object # This class represents a file system synchronized root group. class PBXFileSystemSynchronizedRootGroup < AbstractObject - # @return [String] the directory to which the path is relative. # # @note The accepted values are: @@ -52,7 +51,7 @@ class PBXFileSystemSynchronizedRootGroup < AbstractObject # attribute :wraps_lines, String - # @return [Array] + # @return [Array] # The list of exceptions applying to this group. # has_many :exceptions, [PBXFileSystemSynchronizedBuildFileExceptionSet, PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet] From 115ec1a5b2dd651926419f1823d5cbec8e8cd167 Mon Sep 17 00:00:00 2001 From: Eric Amorde Date: Sat, 26 Oct 2024 13:36:30 -0700 Subject: [PATCH 13/14] Downgrade object version to Xcode 16.0 version --- lib/xcodeproj/constants.rb | 4 ++-- lib/xcodeproj/project/object/root_object.rb | 2 +- spec/project/object/root_object_spec.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/xcodeproj/constants.rb b/lib/xcodeproj/constants.rb index 8935b6bd..f613f3af 100644 --- a/lib/xcodeproj/constants.rb +++ b/lib/xcodeproj/constants.rb @@ -36,7 +36,7 @@ module Constants # @return [String] The last known object version to Xcodeproj. # - LAST_KNOWN_OBJECT_VERSION = 77 + LAST_KNOWN_OBJECT_VERSION = 70 # @return [String] The last known Xcode version to Xcodeproj. # @@ -132,7 +132,7 @@ module Constants # @return [Hash] The compatibility version string for different object versions. # COMPATIBILITY_VERSION_BY_OBJECT_VERSION = { - 77 => 'Xcode 16.0', + 70 => 'Xcode 16.0', 63 => 'Xcode 15.3', 60 => 'Xcode 15.0', 56 => 'Xcode 14.0', diff --git a/lib/xcodeproj/project/object/root_object.rb b/lib/xcodeproj/project/object/root_object.rb index 1cd5e71d..3c48f903 100644 --- a/lib/xcodeproj/project/object/root_object.rb +++ b/lib/xcodeproj/project/object/root_object.rb @@ -55,7 +55,7 @@ class PBXProject < AbstractObject # @return [String] preferred project object version # - attribute :preferred_project_object_version, String, '77' + attribute :preferred_project_object_version, String, '70' # @return [PBXGroup] the group containing the references to products of # the project. diff --git a/spec/project/object/root_object_spec.rb b/spec/project/object/root_object_spec.rb index f23f6ca4..ec2e01ad 100644 --- a/spec/project/object/root_object_spec.rb +++ b/spec/project/object/root_object_spec.rb @@ -44,7 +44,7 @@ module ProjectSpecs end it 'returns the preferred project object version' do - @root_object.preferred_project_object_version.should == '77' + @root_object.preferred_project_object_version.should == '70' end it 'returns the products group' do From b75ec85956d308afa1af6d27c8793d0aff7fc991 Mon Sep 17 00:00:00 2001 From: Eric Amorde Date: Sat, 26 Oct 2024 13:41:40 -0700 Subject: [PATCH 14/14] Add CHANGELOG entry --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a3f6d10..4d479814 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,9 @@ ##### Enhancements -* None. +* Add support for file system synchronized groups introduced in Xcode 16. + [Brett-Best](https://github.com/Brett-Best), [gui17aume](https://github.com/gui17aume) + [#985](https://github.com/CocoaPods/Xcodeproj/pull/985) ##### Bug Fixes