Unverified Commit 44c6a591 authored by Dimitris Koutsogiorgas's avatar Dimitris Koutsogiorgas Committed by GitHub

Merge pull request #7611 from dnkoutso/info_plist_names

Properly namespace Info.plist names during target installation
parents 1ea280a7 cf8c7b22
......@@ -16,6 +16,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
* Properly namespace Info.plist names during target installation
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7611](https://github.com/CocoaPods/CocoaPods/pull/7611)
* Fix modular header access to header_dir's.
[Paul Beusterien](https://github.com/paulb777)
[#7597](https://github.com/CocoaPods/CocoaPods/issues/7597)
......
......@@ -229,7 +229,8 @@ module Pod
#
def add_test_app_host_targets
target.test_specs.each do |test_spec|
next unless test_spec.consumer(target.platform).requires_app_host?
spec_consumer = test_spec.consumer(target.platform)
next unless spec_consumer.requires_app_host?
name = target.app_host_label(test_spec.test_type)
platform_name = target.platform.name
app_host_target = project.targets.find { |t| t.name == name }
......@@ -242,7 +243,7 @@ module Pod
configuration.build_settings['CODE_SIGN_IDENTITY'] = '' if target.platform == :osx
end
Pod::Generator::AppTargetHelper.add_app_host_main_file(project, app_host_target, platform_name, name)
app_host_info_plist_path = project.path.dirname.+("#{name}/Info.plist")
app_host_info_plist_path = target.app_host_info_plist_path_for_test_type(spec_consumer.test_type)
create_info_plist_file(app_host_info_plist_path, app_host_target, '1.0.0', target.platform, :appl)
end
# Wire all test native targets with the app host.
......
......@@ -207,7 +207,7 @@ module Pod
# @return [Pathname] the absolute path of the Info.plist file.
#
def info_plist_path
support_files_dir + 'Info.plist'
support_files_dir + "#{label}-Info.plist"
end
# @return [Pathname] the path of the dummy source generated by CocoaPods
......
......@@ -407,6 +407,15 @@ module Pod
"AppHost-#{Platform.string_name(platform.symbolic_name)}-#{test_type.capitalize}-Tests"
end
# @param [Symbol] test_type
# The test type this Info.plist path is for.
#
# @return [Pathname] The absolute path of the Info.plist to use for an app host.
#
def app_host_info_plist_path_for_test_type(test_type)
support_files_dir + "#{app_host_label(test_type)}-Info.plist"
end
# @param [Symbol] test_type
# The test type this embed frameworks script path is for.
#
......
Subproject commit e0ba219ce2b04a7799c55543e008498b414b34be
Subproject commit 85c698852186908ce780ae9c0d5eaced0566990a
......@@ -602,7 +602,7 @@ module Pod
it 'sets the correct Info.plist file path' do
@bundle_target.build_configurations.each do |bc|
bc.build_settings['INFOPLIST_FILE'].should == 'Target Support Files/BananaLib-Pods-SampleProject/ResourceBundle-banana_bundle-Info.plist'
bc.build_settings['INFOPLIST_FILE'].should == 'Target Support Files/BananaLib-Pods-SampleProject/ResourceBundle-banana_bundle-BananaLib-Pods-SampleProject-Info.plist'
end
end
......
......@@ -193,10 +193,10 @@ module Pod
it 'returns the absolute path of the info plist file' do
@pod_target.info_plist_path.to_s.should.include?(
'Pods/Target Support Files/BananaLib/Info.plist',
'Pods/Target Support Files/BananaLib/BananaLib-Info.plist',
)
@pod_target.scoped.first.info_plist_path.to_s.should.include?(
'Pods/Target Support Files/BananaLib-Pods/Info.plist',
'Pods/Target Support Files/BananaLib-Pods/BananaLib-Pods-Info.plist',
)
end
......@@ -564,6 +564,10 @@ module Pod
exception.message.should.include 'Unknown product type `weird_product_type`'
end
it 'returns correct app host info plist path for test type' do
@test_pod_target.app_host_info_plist_path_for_test_type(:unit).to_s.should.include 'Pods/Target Support Files/CoconutLib/AppHost-iOS-Unit-Tests-Info.plist'
end
it 'returns correct copy resources script path for test unit test type' do
@test_pod_target.copy_resources_script_path_for_test_type(:unit).to_s.should.include 'Pods/Target Support Files/CoconutLib/CoconutLib-Unit-Tests-resources.sh'
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