Commit 18808944 authored by Samuel Giddins's avatar Samuel Giddins

[XCConfigIntegrator] Fix detection of fixable other base config

parent 2cd8016b
......@@ -85,7 +85,7 @@ module Pod
end
if existing && existing != file_ref
if existing.real_path.to_path.start_with?(pod_bundle.support_files_dir.to_path)
if existing.real_path.to_path.start_with?(pod_bundle.sandbox.root.to_path << '/')
set_base_configuration_reference.call
elsif !xcconfig_includes_target_xcconfig?(config.base_configuration_reference, path)
UI.warn 'CocoaPods did not set the base configuration of your ' \
......@@ -93,7 +93,7 @@ module Pod
'config set. In order for CocoaPods integration to work at ' \
'all, please either set the base configurations of the target ' \
"`#{target.name}` to `#{path}` or include the `#{path}` in your " \
'build configuration.'
"build configuration (#{UI.path(existing.real_path)})."
end
elsif config.base_configuration_reference.nil? || file_ref.nil?
set_base_configuration_reference.call
......
......@@ -107,6 +107,18 @@ module Pod
it 'handles when xcconfig is set to another sandbox xcconfig' do
group = @project.new_group('Pods')
old_config = group.new_file('../Pods/Target Support Files/Pods-Foo/SampleConfig.xcconfig')
@target.build_configurations.each do |config|
config.base_configuration_reference = old_config
end
XCConfigIntegrator.integrate(@pod_bundle, [@target])
@target.build_configurations.each do |config|
config.base_configuration_reference.should.not == old_config
config.base_configuration_reference.path.should == @pod_bundle.xcconfig_relative_path(config.name)
end
@pod_bundle.stubs(:label).returns('Pods-Foo')
old_config = group.new_file('../Pods/Target Support Files/Pods/SampleConfig.xcconfig')
@target.build_configurations.each do |config|
config.base_configuration_reference = old_config
......
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