Open peterseddon opened 10 years ago
Same issue here. It works fine with RubyMotion 2.20.
I filled a ticket to RubyMotion team.
@CurveBeryl Could it be that you have manually fixed the bridgesupport files that you include in the repo? (vendor/**/*.bridgesupport
)
To all, what happens is that RubyMotion tries to generate BridgeSupport metadata files in the new build dir location. Before 2.21, this used to be the root of the vendor_project
lib dir (e.g. vendor/MyLib
), but this would lead to problems when building an app for multiple platforms. Now these are generated in, for instance, vendor/MyLib/build-iPhoneSimulator
.
Joybox includes its own metadata files which are different from what the gen_bridge_metadata
tool would generate, but these are no longer being used, because RM expects the BridgeSupport file to be in the platform-specific build dir.
We are going to apply a change in RM 2.23 that will pick-up BridgeSupport files in the root of a vendor_project
dir or, if non exists, fall back to generating a BridgeSupport file of its own.
For now, what you could do is to patch /Library/RubyMotion/lib/motion/project/vendor.rb
:
diff --git a/lib/motion/project/vendor.rb b/lib/motion/project/vendor.rb
index a4416ef..bc9efa9 100644
--- a/lib/motion/project/vendor.rb
+++ b/lib/motion/project/vendor.rb
@@ -131,7 +131,7 @@ EOS
headers = source_files.select { |p| File.extname(p) == '.h' }
bs_files = []
unless headers.empty?
- bs_file = File.join(build_dir, File.basename(@path) + '.bridgesupport')
+ bs_file = File.basename(@path) + '.bridgesupport'
if !File.exist?(bs_file) or headers.any? { |h| File.mtime(h) > File.mtime(bs_file) }
FileUtils.mkdir_p File.dirname(bs_file)
bs_cflags = (opts.delete(:bridgesupport_cflags) or cflags)
@@ -207,7 +207,7 @@ EOS
end
# Generate the bridgesupport file if we need to.
- bs_file = File.join(build_dir, File.basename(@path) + '.bridgesupport')
+ bs_file = File.basename(@path) + '.bridgesupport'
headers_dir = opts.delete(:headers_dir)
if headers_dir
project_dir = File.expand_path(@config.project_dir)
Fixed with RubyMotion 2.23
I'm having the above issue with Joybox when I run rake on a blank template (or any template) I am using rubymotion 2.22. I have tried the following:
gem uninstall joybox -a gem install joybox rm .repl_history rake clean rake