diff --git a/lib/xcodeproj/constants.rb b/lib/xcodeproj/constants.rb index 543a7b2f..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 = 63 + LAST_KNOWN_OBJECT_VERSION = 77 # @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 = { + 77 => 'Xcode 16.0', 63 => 'Xcode 15.3', 60 => 'Xcode 15.0', 56 => 'Xcode 14.0', diff --git a/lib/xcodeproj/project/object.rb b/lib/xcodeproj/project/object.rb index 8d2ecf0e..bdfaa214 100644 --- a/lib/xcodeproj/project/object.rb +++ b/lib/xcodeproj/project/object.rb @@ -533,3 +533,5 @@ 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' +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 new file mode 100644 index 00000000..5832ba97 --- /dev/null +++ b/lib/xcodeproj/project/object/file_system_synchronized_root_group.rb @@ -0,0 +1,19 @@ +require 'xcodeproj/project/object/file_system_synchronized_build_file_exception_set' + +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' + has_many :exceptions, PBXFileSystemSynchronizedBuildFileExceptionSet + + 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 diff --git a/lib/xcodeproj/project/object/root_object.rb b/lib/xcodeproj/project/object/root_object.rb index 8737400f..1cd5e71d 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, '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 45493fda..f23f6ca4 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 == '77' + end + it 'returns the products group' do @root_object.product_ref_group.class.should == PBXGroup end