-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Xcode 16 and synchronized groups #985
Merged
amorde
merged 14 commits into
CocoaPods:master
from
gui17aume:feature/xcode16-synchronized-groups
Oct 26, 2024
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b1f0e09
Updated `constants.rb` to include Xcode 16.0 object version
Brett-Best 14cc373
Added root object attribute for `preferredProjectObjectVersion`
Brett-Best 9118380
Updated object versions for Xcode 16.0b6
Brett-Best a3b6357
Added support for `PBXFileSystemSynchronizedRootGroup`s
Brett-Best c8fe120
Added support for `PBXFileSystemSynchronizedBuildFileExceptionSet`s
Brett-Best fdec342
Move `file_system_synchronized_groups` from AbstractTarget to PBXNati…
d748690
Add missing fields and some doc to PBXFileSystemSynchronizedRootGroup
f28e3d4
Add missing fields and some doc to PBXFileSystemSynchronizedBuildFile…
e3eed93
Add PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet
6473e92
Add `base_configuration_reference_` fields to XCBuildConfiguration
d6d937a
Exclude fileSystemSynchronizedGroups key from PBXNativeTarget when th…
amorde 7381f3f
Fix rubocop style errors
amorde 115ec1a
Downgrade object version to Xcode 16.0 version
amorde b75ec85
Add CHANGELOG entry
amorde File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
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<String>] The list of files in the group that are excluded from the target. | ||
# | ||
attribute :membership_exceptions, Array | ||
|
||
# @return [Array<String>] The list of public headers. | ||
# | ||
attribute :public_headers, Array | ||
|
||
# @return [Array<String>] 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 | ||
|
||
# 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<String>] 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 |
74 changes: 74 additions & 0 deletions
74
lib/xcodeproj/project/object/file_system_synchronized_root_group.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
require 'xcodeproj/project/object/file_system_synchronized_exception_set' | ||
|
||
module Xcodeproj | ||
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: | ||
# - `<absolute>` for absolute paths | ||
# - `<group>` 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, '<group>' | ||
|
||
# @return [String] the path to a folder in the file system. | ||
# | ||
attribute :path, String | ||
|
||
# @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<PBXFileSystemSynchronizedBuildFileExceptionSet, PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet>] | ||
# 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 | ||
super | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason you have this explicit string here vs what Xcode itself generates here:
PBXFileSystemSynchronizedBuildFileExceptionSet
Xcode replaces this string with that when editing the project file, so we're seeing a back-and-forth diff of this comment being edited by both parties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked in Xcode 16.2RC and this string format is what is used on my projects still.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1000
oh I'm on 16.1, let me try 16.2 real quick to verify
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm Xcode 16.2 RC still reverts this comment:
increment_version_number_in_xcodeproj
, which just doesproject = Xcodeproj::Project.open
, edits a build setting, then doesproject.save
PBXFileSystemSynchronizedBuildFileExceptionSet