app.deployment_target not properly propagated to the pods xcodebuild #33

Closed
lrz opened this Issue Sep 25, 2012 · 4 comments

Comments

Projects
None yet
1 participant
Owner

lrz commented Sep 25, 2012

It seems that setting a value for app.deployment_target in the project's Rakefile does not have any impact on the pod dependencies build, as -mios-simulator-version-min=X is passed to the compiler where X is the SDK version.

This is an important problem that should be fixed as soon as possible since it impacts all RubyMotion developers using CocoaPods dependencies + Xcode 4.5 + targeting iOS releases below 6.0.

Owner

lrz commented Sep 25, 2012

Could be a bug in CocoaPods itself, as motion-cocoapods properly set the deployment target.

https://github.com/HipByte/motion-cocoapods/blob/master/lib/motion/project/cocoapods.rb#L60

Owner

lrz commented Sep 25, 2012

In the meantime, the following patch on /Library/RubyMotion/lib/motion/project/vendor.rb seems to work:

diff --git a/lib/motion/project/vendor.rb b/lib/motion/project/vendor.rb
index 1381816..829f5de 100644
--- a/lib/motion/project/vendor.rb
+++ b/lib/motion/project/vendor.rb
@@ -159,7 +159,7 @@ EOS
           xcopts = ''
           xcopts << "-target \"#{target}\" " if target
           xcopts << "-scheme \"#{scheme}\" " if scheme
-          sh "/usr/bin/xcodebuild -project \"#{xcodeproj}\" #{xcopts} -configuration \"#{configuration}\" -sdk #{platform.downcase}#{@config.sdk_version} #{@config.arch_flags(platform)} CONFIGURATION_BUILD_DIR=build build"
+          sh "/usr/bin/xcodebuild -project \"#{xcodeproj}\" #{xcopts} -configuration \"#{configuration}\" -sdk #{platform.downcase}#{@config.sdk_version} #{@config.arch_flags(platform)} CONFIGURATION_BUILD_DIR=build IPHONEOS_DEPLOYMENT_TARGET=#{@config.deployment_target} build"

           # Copy .a files into the platform build directory.
           prods = opts.delete(:products)
Owner

lrz commented Sep 25, 2012

Got confirmation that the fix works, so we will do a quick software update tomorrow.

Owner

lrz commented Sep 26, 2012

1.25 is released with the fix.

@lrz lrz closed this Sep 26, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment