Skip to content
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

Create separate group for subproject targets #728

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
[wade0317](https://github.com/wade0317)
[#723](https://github.com/CocoaPods/Xcodeproj/pull/723)

* Create separate group for subproject targets
[maniramezan](https://github.com/maniramezan)
[#678](https://github.com/CocoaPods/Xcodeproj/issues/678)

## 1.13.0 (2019-10-16)

##### Enhancements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ def new_subproject(group, path, source_tree)
ref = new_file_reference(group, path, source_tree)
ref.include_in_index = nil

product_group_ref = find_products_group_ref(group, true)
product_group_ref = group.project.new(Xcodeproj::Project::PBXGroup)
product_group_ref.name = 'Products'

subproj = Project.open(path)
subproj.products_group.files.each do |product_reference|
Expand Down
4 changes: 2 additions & 2 deletions spec/project/object/helpers/file_references_factory_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ module ProjectSpecs
container_proxy.remote_global_id_string.should == 'E5FBB2E51635ED34009E96B0'
end

it "doesn't create duplicate 'Products' groups" do
it "create duplicate 'Products' groups" do
subproject_path = fixture_path('Sample Project/ReferencedProject/ReferencedProject.xcodeproj')
@subproject = Xcodeproj::Project.open(subproject_path)
@project.main_group.new_reference(@subproject.path)
@project.objects.select { |o| o.display_name == 'Products' }.count.should == 1
@project.objects.select { |o| o.display_name == 'Products' }.count.should == 3
@subproject.objects.select { |o| o.display_name == 'Products' }.count.should == 1
end
end
Expand Down