From f29aa8a5dfec0a96611379fa95b0b8f28909d494 Mon Sep 17 00:00:00 2001 From: Brett-Best Date: Tue, 11 Jun 2024 08:48:06 +1000 Subject: [PATCH 1/5] 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 4151ddacd625512925f67c4adc0e31d2d8f7c5d5 Mon Sep 17 00:00:00 2001 From: Brett-Best Date: Tue, 11 Jun 2024 09:35:33 +1000 Subject: [PATCH 2/5] 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 013bba219ab3754fce53567abfae155a44a3976a Mon Sep 17 00:00:00 2001 From: Brett-Best Date: Wed, 21 Aug 2024 20:34:15 +1000 Subject: [PATCH 3/5] 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 a437b26a446e69ed5b2bff4da3f7a42b43353d4b Mon Sep 17 00:00:00 2001 From: Brett-Best Date: Mon, 2 Sep 2024 17:08:44 +1000 Subject: [PATCH 4/5] 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 2b87c2caaf2e142818c0d5a780bb94e4b20962e6 Mon Sep 17 00:00:00 2001 From: Brett-Best Date: Wed, 11 Sep 2024 22:22:16 +1000 Subject: [PATCH 5/5] 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