Skip to content

Commit

Permalink
load the configuration from existing Pods.xcconfig file
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Sep 6, 2012
1 parent 1f664fb commit 61674c2
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions lib/motion/project/cocoapods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
raise "This file must be required within a RubyMotion project Rakefile."
end

require 'xcodeproj'
require 'cocoapods'
require 'yaml'

Expand Down Expand Up @@ -92,14 +93,7 @@ def install!(podfile_changed)
installed_pods_before = installed_pods
end

if podfile_changed
pods_installer.install!
else
pods_installer.target_installers.each do |target_installer|
pods_for_target = pods_installer.pods_by_target[target_installer.target_definition]
target_installer.install!(pods_for_target, pods_installer.sandbox)
end
end
pods_installer.install! if podfile_changed

# Let RubyMotion re-generate the BridgeSupport file whenever the list of
# installed pods changes.
Expand Down Expand Up @@ -130,9 +124,8 @@ def bridgesupport_file
end

def pods_xcconfig
pods_installer.target_installers.find do |target_installer|
target_installer.target_definition.name == :default
end.xcconfig
path = Pathname.new(@config.project_dir) + PODS_ROOT + 'Pods.xcconfig'
Xcodeproj::Config.new(path)
end

def inspect
Expand Down

0 comments on commit 61674c2

Please sign in to comment.