Skip to content

feat: possibility to get child group using path #959

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ToMark1881
Copy link

Short description 📝

Introduced a utility method to safely retrieve a subgroup from a given PBXGroup by matching its path.

Solution 📦

When working with nested group structures in Xcode projects, it's often necessary to look up a child group by path. This helper method encapsulates that logic in a clean and reusable way.
Alternative solutions could involve manual iteration and casting outside of the group context, but encapsulating it as a method improves readability and encourages reuse.

Implementation 👩‍💻👨‍💻

  • Added group(with:) method to locate a PBXGroup by path among the group's children
  • Filtered childrenReferences and safely casted matching items to PBXGroup
  • Added documentation comment describing the purpose and usage of the method

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 17, 2025
@ToMark1881 ToMark1881 changed the title Added feature to get child group using path feat: possibility to get child group using path Jul 17, 2025
@fortmarek
Copy link
Member

Sorry for the belated review here.

I'm aligned with adding this convenience method, once the CI passes, we can merge this one 🤝

Copy link
Member

@fortmarek fortmarek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually ... what do you think about adding some basic unit tests for this new method?

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 25, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jul 25, 2025
@ToMark1881
Copy link
Author

Actually ... what do you think about adding some basic unit tests for this new method?

Done sir!

@ToMark1881 ToMark1881 requested a review from fortmarek July 31, 2025 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants