From 02b8f8a2f52b9690c2aaade8b7328af363442ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eloy=20Dur=C3=A1n?= Date: Wed, 10 Sep 2014 15:52:26 +0200 Subject: [PATCH] [Yosemite] Allow OS X apps targeting OS versions lower than current to build. Fixes http://hipbyte.myjetbrains.com/youtrack/issue/RM-592 --- lib/motion/project/template/osx/config.rb | 2 +- lib/motion/project/xcode_config.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/motion/project/template/osx/config.rb b/lib/motion/project/template/osx/config.rb index 33ac788c..4c128eea 100644 --- a/lib/motion/project/template/osx/config.rb +++ b/lib/motion/project/template/osx/config.rb @@ -173,7 +173,7 @@ module Motion; module Project; def supported_sdk_versions(versions) versions.reverse.find { |vers| - Util::Version.new(osx_version) <= Util::Version.new(vers) && File.exist?(datadir(vers)) + Util::Version.new(deployment_target) <= Util::Version.new(vers) && File.exist?(datadir(vers)) } end diff --git a/lib/motion/project/xcode_config.rb b/lib/motion/project/xcode_config.rb index 2219d118..a47c1ccc 100644 --- a/lib/motion/project/xcode_config.rb +++ b/lib/motion/project/xcode_config.rb @@ -152,7 +152,7 @@ EOS end supported_vers = supported_sdk_versions(versions) unless supported_vers - App.fail "RubyMotion doesn't support any of these SDK versions: #{versions.join(', ')}" + App.fail "The requested SDK (#{deployment_target}) is not available or supported by RubyMotion at this time. Supported and available SDKs are: #{versions.join(', ')}." end supported_vers end