ios-ruby-embedded icon indicating copy to clipboard operation
ios-ruby-embedded copied to clipboard

Getting Started

Open nixterrimus opened this issue 9 years ago • 0 comments

Thank you for making getting started with mruby on iOS easy!

I spent this afternoon getting this code integrated into a project and I ran into a couple of problems.

Bitcode

This library doesn't build as long as bitcode is enabled, it's pretty easy to turn it off (Build settings -> Build Options -> Enabled Bitcode)

Framework location

I was surprised to learn that if you don't copy the framework into your project you also need to set the "Frameworks Search Path" option in Build settings. It's probably better to copy the framework into the same folder as the project but it might be worth noting.

Example Code doesn't build

The example code doesn't appear to work anymore.

I was able to get going by using some sample code from the mruby project:

  mrb_state *mrb = mrb_open();
  if (!mrb) { /* handle error */ }
  // mrb_load_nstring() for strings without null terminator or with known length
  mrb_load_string(mrb, "puts 'hello world'");
  mrb_close(mrb);

This was just enough to get stared.

nixterrimus avatar Feb 14 '16 23:02 nixterrimus