Commit 63af680f authored by Eloy Duran's avatar Eloy Duran

Now that headers are symlinked at install time, we no longer need to shuffle build phases.

parent 65594c69
......@@ -90,12 +90,6 @@ module Pod
end
xcconfig.merge!('HEADER_SEARCH_PATHS' => header_search_paths.sort.uniq.join(" "))
# Now that we have added all the source files and copy header phases,
# move the compile build phase to the end, so that headers are copied
# to the build products dir first, and thus Pod source files can enjoy
# the same namespacing of headers as the app would.
@target.move_compile_phase_to_end!
# Add all the target related support files to the group, even the copy
# resources script although the project doesn't actually use them.
support_files_group = @project.groups.find do |group|
......
......@@ -21,19 +21,6 @@ module Xcodeproj
build_configurations.find { |c| c.name == name }
end
class PBXNativeTarget
def move_compile_phase_to_end!
reflection = self.class.reflection(:buildPhases)
uuids = send(reflection.uuids_getter)
phase = buildPhases.find { |phase| phase.is_a?(PBXSourcesBuildPhase) }
uuids.delete(phase.uuid)
uuids << phase.uuid
phase = buildPhases.find { |phase| phase.is_a?(PBXFrameworksBuildPhase) }
uuids.delete(phase.uuid)
uuids << phase.uuid
end
end
class PBXCopyFilesBuildPhase
def self.new_pod_dir(project, pod_name, path)
new(project, nil, {
......
......@@ -6,7 +6,7 @@ ROOT = Pathname.new(File.expand_path('../../', __FILE__))
$:.unshift File.expand_path('../../external/xcodeproj/ext', __FILE__)
$:.unshift File.expand_path('../../external/xcodeproj/lib', __FILE__)
$:.unshift (ROOT + 'lib').to_s
$:.unshift((ROOT + 'lib').to_s)
require 'cocoapods'
$:.unshift((ROOT + 'spec').to_s)
......
......@@ -58,18 +58,4 @@ describe "Pod::Installer" do
installer = Pod::Installer.new(podfile)
installer.target_installers.map(&:definition).map(&:name).should == [:not_empty]
end
# TODO remove this functionality? We create the header structure at `pod install`
# time nowadays, so that *is* before anything else already.
it "moves the compile and link phases to the end of the build phases list, so Pod headers are copied first and sources can use the same header dir structure" do
podfile = Pod::Podfile.new do
platform :osx
dependency 'ASIHTTPRequest'
end
config.rootspec = podfile
installer = Pod::Installer.new(podfile)
installer.target_installers.first.install!
phases = installer.project.targets.first.buildPhases
phases.to_a.last(2).map(&:class).should == [Xcodeproj::Project::PBXSourcesBuildPhase, Xcodeproj::Project::PBXFrameworksBuildPhase]
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