Commit 1014c973 authored by Samuel Giddins's avatar Samuel Giddins

[TargetInstaller] Install umbrella headers as Project for library targets

parent 23ff0e9c
...@@ -204,10 +204,10 @@ module Pod ...@@ -204,10 +204,10 @@ module Pod
file_ref = add_file_to_support_group(path) file_ref = add_file_to_support_group(path)
native_target.add_file_references([file_ref]) native_target.add_file_references([file_ref])
# Make the umbrella header public acl = target.requires_frameworks? ? 'Public' : 'Project'
build_file = native_target.headers_build_phase.build_file(file_ref) build_file = native_target.headers_build_phase.build_file(file_ref)
build_file.settings ||= {} build_file.settings ||= {}
build_file.settings['ATTRIBUTES'] = ['Public'] build_file.settings['ATTRIBUTES'] = [acl]
end end
end end
......
Subproject commit 94fd69236ef1f5c92eca020bd7eb4bd5b34138ce Subproject commit 6ea6db143cff938564b90b63769bcb40a9aaac8b
...@@ -255,6 +255,28 @@ module Pod ...@@ -255,6 +255,28 @@ module Pod
script = support_files_dir + 'Pods-SampleProject-frameworks.sh' script = support_files_dir + 'Pods-SampleProject-frameworks.sh'
File.exist?(script).should == false File.exist?(script).should == false
end end
it 'installs umbrella headers for swift static libraries' do
@pod_target.stubs(:uses_swift? => true)
@target.stubs(:uses_swift? => true)
@installer.install!
build_files = @installer.target.native_target.headers_build_phase.files
build_file = build_files.find { |bf| bf.file_ref.path.include?('Pods-SampleProject-umbrella.h') }
build_file.should.not.be.nil
build_file.settings.should == { 'ATTRIBUTES' => ['Project'] }
end
it 'installs umbrella headers for frameworks' do
@pod_target.stubs(:requires_frameworks? => true)
@target.stubs(:requires_frameworks? => true)
@installer.install!
build_files = @installer.target.native_target.headers_build_phase.files
build_file = build_files.find { |bf| bf.file_ref.path.include?('Pods-SampleProject-umbrella.h') }
build_file.should.not.be.nil
build_file.settings.should == { 'ATTRIBUTES' => ['Public'] }
end
end end
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment