Commit 409f44d4 authored by Eloy Duran's avatar Eloy Duran

Add headers to the PBXCopyFilesBuildPhase instead of the PBXHeadersBuildPhase to…

Add headers to the PBXCopyFilesBuildPhase instead of the PBXHeadersBuildPhase to work around an Xcode bug. Closes #13.
parent 7251d03f
...@@ -55,7 +55,10 @@ module Pod ...@@ -55,7 +55,10 @@ module Pod
add_file_to_group(file_ref_uuid, 'Pods') add_file_to_group(file_ref_uuid, 'Pods')
if file.extname == '.h' if file.extname == '.h'
build_file_uuid = add_build_file(file_ref_uuid, "settings" => { "ATTRIBUTES" => ["Public"] }) build_file_uuid = add_build_file(file_ref_uuid, "settings" => { "ATTRIBUTES" => ["Public"] })
add_file_to_list('PBXHeadersBuildPhase', build_file_uuid) # Working around a bug in Xcode 4.2 betas, remove this once the Xcode bug is fixed:
# https://github.com/alloy/cocoapods/issues/13
#add_file_to_list('PBXHeadersBuildPhase', build_file_uuid)
add_file_to_list('PBXCopyFilesBuildPhase', build_file_uuid)
else else
extra = compiler_flags ? {"settings" => { "COMPILER_FLAGS" => compiler_flags }} : {} extra = compiler_flags ? {"settings" => { "COMPILER_FLAGS" => compiler_flags }} : {}
build_file_uuid = add_build_file(file_ref_uuid, extra) build_file_uuid = add_build_file(file_ref_uuid, extra)
......
...@@ -65,7 +65,8 @@ describe "Pod::Xcode::Project" do ...@@ -65,7 +65,8 @@ describe "Pod::Xcode::Project" do
'fileRef' => file_ref_uuid 'fileRef' => file_ref_uuid
}) })
_, object = @project.find_object('isa' => 'PBXHeadersBuildPhase') #_, object = @project.find_object('isa' => 'PBXHeadersBuildPhase')
_, object = @project.find_object('isa' => 'PBXCopyFilesBuildPhase')
object['files'].should == [build_file_uuid] object['files'].should == [build_file_uuid]
_, object = @project.find_object('isa' => 'PBXSourcesBuildPhase') _, object = @project.find_object('isa' => 'PBXSourcesBuildPhase')
......
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