diff --git a/lib/motion/project/template/osx/config.rb b/lib/motion/project/template/osx/config.rb index 0ed319b5..33ac788c 100644 --- a/lib/motion/project/template/osx/config.rb +++ b/lib/motion/project/template/osx/config.rb @@ -41,8 +41,6 @@ module Motion; module Project; @copyright = "Copyright © #{Time.now.year} #{`whoami`.strip}. All rights reserved." @category = 'utilities' @frameworks = ['AppKit', 'Foundation', 'CoreGraphics', 'CoreServices'] - @embedded_frameworks = [] - @external_frameworks = [] @codesign_for_development = false @codesign_for_release = true @eval_support = false @@ -54,13 +52,6 @@ module Motion; module Project; def device_family; 'mac'; end def validate - %w{ embedded_frameworks external_frameworks }.each do |attr| - value = send(attr) - if !(value.is_a?(Array) and value.all? { |x| File.exist?(x) and File.extname(x) == '.framework' }) - App.fail "app.#{attr} should be an array of framework paths" - end - end - super end diff --git a/lib/motion/project/xcode_config.rb b/lib/motion/project/xcode_config.rb index 4d2f3c09..fa6f31f3 100644 --- a/lib/motion/project/xcode_config.rb +++ b/lib/motion/project/xcode_config.rb @@ -29,8 +29,8 @@ require 'motion/util/code_sign' module Motion; module Project; class XcodeConfig < Config variable :xcode_dir, :sdk_version, :deployment_target, :frameworks, - :weak_frameworks, :framework_search_paths, :libs, :identifier, - :codesign_certificate, :short_version, :entitlements, :delegate_class, + :weak_frameworks, :embedded_frameworks, :external_frameworks, :framework_search_paths, + :libs, :identifier, :codesign_certificate, :short_version, :entitlements, :delegate_class, :version def initialize(project_dir, build_mode) @@ -39,6 +39,8 @@ module Motion; module Project; @dependencies = {} @frameworks = [] @weak_frameworks = [] + @embedded_frameworks = [] + @external_frameworks = [] @framework_search_paths = [] @libs = [] @bundle_signature = '????' @@ -119,6 +121,14 @@ EOS App.fail "iOS deployment target #{deployment_target} is not supported by this version of RubyMotion" end + # embedded_frameworks + %w{ embedded_frameworks external_frameworks }.each do |attr| + value = send(attr) + if !(value.is_a?(Array) and value.all? { |x| File.exist?(x) and File.extname(x) == '.framework' }) + App.fail "app.#{attr} should be an array of framework paths" + end + end + super end