Commit b262b873 authored by Fabio Pelosin's avatar Fabio Pelosin

[Installer|TargetInstaller] Improve handling of frameworks in Pods project.

parent 1a34157e
...@@ -9,7 +9,7 @@ GIT ...@@ -9,7 +9,7 @@ GIT
GIT GIT
remote: git://github.com/CocoaPods/Xcodeproj.git remote: git://github.com/CocoaPods/Xcodeproj.git
revision: d2bd1824f39ca1f2742e1e7af352db36251a267d revision: 72b587172e84cfd38aa9ce70c5f6075aca19973c
specs: specs:
xcodeproj (0.4.0) xcodeproj (0.4.0)
activesupport (~> 3.2.6) activesupport (~> 3.2.6)
......
...@@ -220,7 +220,7 @@ module Pod ...@@ -220,7 +220,7 @@ module Pod
def generate_names_of_pods_to_install def generate_names_of_pods_to_install
changed_pods_names = [] changed_pods_names = []
if update_mode if update_mode
changed_pods_names += pods.select do |pods| changed_pods_names += pods.select do |pod|
pod.top_specification.version.head? || pod.top_specification.version.head? ||
resolver.pods_from_external_sources.include?(pod.name) resolver.pods_from_external_sources.include?(pod.name)
end end
...@@ -334,9 +334,6 @@ module Pod ...@@ -334,9 +334,6 @@ module Pod
local_pods.each do |pod| local_pods.each do |pod|
pod.add_file_references_to_project(pods_project) pod.add_file_references_to_project(pods_project)
pod.link_headers pod.link_headers
pod.frameworks.each do |framework|
file_ref= pods_project.add_system_framework(framework, pod.platform.name)
end
unless pod.resources.empty? unless pod.resources.empty?
resources_group = pods_project.new_group(pod.name, "Resources") resources_group = pods_project.new_group(pod.name, "Resources")
...@@ -406,6 +403,7 @@ module Pod ...@@ -406,6 +403,7 @@ module Pod
# #
def write_pod_project def write_pod_project
UI.message "- Writing Xcode project file to #{UI.path sandbox.project_path}" do UI.message "- Writing Xcode project file to #{UI.path sandbox.project_path}" do
pods_project['Frameworks'].sort_by_type!
pods_project.main_group.sort_by_type! pods_project.main_group.sort_by_type!
pods_project.save_as(sandbox.project_path) pods_project.save_as(sandbox.project_path)
end end
......
...@@ -22,7 +22,7 @@ module Pod ...@@ -22,7 +22,7 @@ module Pod
def install! def install!
add_file_reference_for_support_files add_file_reference_for_support_files
add_target add_target
add_build_files_to_target add_pod_references
create_xcconfig_file create_xcconfig_file
create_prefix_header create_prefix_header
...@@ -129,12 +129,22 @@ module Pod ...@@ -129,12 +129,22 @@ module Pod
library.target = @target library.target = @target
end end
# Adds the build files of the pods to the target. # Adds the build files of the pods to the target and adds a refence to
# the frameworks of the Pods.
#
# @note The Frameworks are used only for presentation purporses as the
# xcconfig is the authoritative source about their information.
# #
# @return [void] # @return [void]
# #
def add_build_files_to_target def add_pod_references
pods.each { |p| p.add_build_files_to_target(target) } pods.each do |pod|
pod.add_build_files_to_target(target)
pod.frameworks.each do |framework|
framework_ref = project.add_system_framework(framework, target)
end
end
end end
# Generates the contents of the xcconfig file and saves it to disk. # Generates the contents of the xcconfig file and saves it to disk.
......
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