mobiruby / mobiruby-ios Goto Github PK
View Code? Open in Web Editor NEWiOS app development environment on mruby
Home Page: http://mobiruby.org
iOS app development environment on mruby
Home Page: http://mobiruby.org
Building From xcode throws confusing error message in file: cfunc_rb.c (Derived Sources)
/path/to/mobiruby-ios/bin/mrbc: Cannot open program file. (/path/to/mobiruby-ios/modules/mruby-cfunc/src/mrb/cfunc_rb.rb)
Usage: /path/to/mobiruby-ios/bin/mrbc [switches] programfile
switches:
-c check syntax only
-o place the output into
-v print version number, then trun on verbose mode
-B binary output in C language format
-C function output in C language format
--verbose run at verbose mode
--version print the version
--copyright print the copyright
Xcode`s error message: "Expected identifier or ("
I followed install instructions but don`t get it to work...
When I run project, I get this error:
/Users/alexopak/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- xcodeproj (LoadError)
I install gem xcodeproj, but error not done.
How I could use rvm to compile project?
When I run a build for sample app, I got an Error, "Initializer element is not a compile-time constant", in export_headers.m at:
static struct BridgeSupportEnumTable enums_table[] = {
I commented out the line below, then the app wouldn't got the error.
{.name="CGFLOAT_MAX", .value=3.4028235E+38},
I don't know how to fix, so just reported it.
I'm trying to build the project using 'rake' but I'm getting the following error;
https://gist.github.com/luisbebop/7432205
I have tested on a Mavericks fresh install + Xcode 5.0.1 and on a Mountain Lion 10.8.5 + Xcode 5.0.1.
In both cases I'm getting the same error log output.
Any idea?
Support define property in class.
class NewObj < Cocoa::NSObject
property :foo, Cocoa::NSString, [:retain]
end
$ rake
Click on Hello world
, then you'll see a white screen and then the home screen.
[DEBUG] 2013-03-30 20:06:22.564 mobiruby-ios[3066:c07] Application windows are expected to have a root view controller at the end of application launch
[DEBUG] 2013-03-30 20:06:24.726 mobiruby-ios[3066:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSMethodSignature getArgumentTypeAtIndex:]: index (7) out of bounds [0, 6]'
*** First throw call stack:
(0x1d2a012 0x1737e7e 0x1d41f2a 0x91ad6 0x5daaa 0x5bd5c 0x47218 0x5daaa 0x5bd5c 0x5bdc8 0x5b817 0x8774d 0x29a8a 0x29ce2 0x75f103 0x75f4df 0x75f704 0x7735c3 0x8fa309 0x8fa5e1 0x8fa650 0x6b9d66 0x6b9f04 0x3387d8 0x188c014 0x187c7d5 0x1cd0af5 0x1ccff44 0x1ccfe1b 0x29ee7e3 0x29ee668 0x67bffc 0x24e9 0x2035)
libc++abi.dylib: terminate called throwing an exception
rake aborted!
Command failed with status (1): [./bin/ios-sim launch "build/Debug-iphonesi...]
tasks/simulator.rake:9:in `block in <top (required)>'
Tasks: TOP => default => run
(See full trace by running task with --trace)
rake fails on expectations to specific cocoa revisions that don't exist:
Unable to checkout '0458b0373659f8d0176986a503dab2f9fee26e62' in submodule path 'submodules/mruby-cocoa'
fatal: reference is not a tree: 0458b0373659f8d0176986a503dab2f9fee26e62
Unable to checkout '0458b0373659f8d0176986a503dab2f9fee26e62' in submodule path 'submodules/mruby-cocoa'
fatal: reference is not a tree: 0458b0373659f8d0176986a503dab2f9fee26e62
Unable to checkout '0458b0373659f8d0176986a503dab2f9fee26e62' in submodule path 'submodules/mruby-cocoa'
fatal: reference is not a tree: 0458b0373659f8d0176986a503dab2f9fee26e62
Unable to checkout '0458b0373659f8d0176986a503dab2f9fee26e62' in submodule path 'submodules/mruby-cocoa'
fatal: reference is not a tree: 0458b0373659f8d0176986a503dab2f9fee26e62
Unable to checkout '0458b0373659f8d0176986a503dab2f9fee26e62' in submodule path 'submodules/mruby-cocoa'
How to reproduce:
git clone https://github.com/mobiruby/mobiruby-ios.git
cd mobiruby-ios/
rake
Currently, export_headers,m generated from *.framework.
We should added all source files in the project.
But I don't know how to make source files list in the project.
I'd love to see mobiruby support for Android and Windows Phone/RT!
When I compile game app it dosent work, show image mobyruby on then I see black screen.
2012-09-13 10:34:03.923 mobiruby-ios[16451:12003] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn: dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-09-13 10:34:03.929 mobiruby-ios[16451:12003] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn: dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-09-13 10:34:03.949 mobiruby-ios[16451:12003] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-09-13 10:34:03.954 mobiruby-ios[16451:12003] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-09-13 10:34:03.984 mobiruby-ios[16451:12003] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-09-13 10:34:03.988 mobiruby-ios[16451:12003] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-09-13 10:34:04.042 mobiruby-ios[16451:12003] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-09-13 10:34:04.068 mobiruby-ios[16451:12003] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
TypeError: Cannot convert to c value
mruby doesn't support multi thread.
MobiRuby implement multi thread supporting on multi VM feature.
My build_config.sh is this:
#
# Build configration for *.sh
#
PLATFORM_IOS=`xcode-select -print-path`"/Platforms/iPhoneOS.platform/"
PLATFORM_IOS_SIM=`xcode-select -print-path`"/Platforms/iPhoneSimulator.platform/"
SDK_IOS_VERSION=`ls "$PLATFORM_IOS/Developer/SDKs/" | ruby -e "p STDIN.read.split(/\s+/).map{|i| /[.\d]+/.match(i.gsub('.sdk', '')).to_a.first.to_f}.max"`
MIN_IOS_VERSION="5.0"
When I exec rake , errors are below:
Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 "“iOS 模拟器”未能安装此应用程序。" UserInfo=0x7fec79e044f0 {NSLocalizedDescription=“iOS 模拟器”未能安装此应用程序。, DTiPhoneSimulatorUnderlyingErrorCodeKey=-1}
rake aborted!
Command failed with status (1): [./bin/ios-sim launch "build/Debug-iphonesi...]
tasks/simulator.rake:9:in `block in <top (required)>'
/Users/cuizheng/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
/Users/cuizheng/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => default => run
(See full trace by running task with --trace)
The Chinese words mean "Can't install this App on iOS simulator."
default SDK_IOS_VERSION="6.1"
if anybody SDK_IOS_VERSION=6.0 this can't compile
need to modify build-config.sh
and in file build-libmruby.rb,have the same SDK_IOS_VERSION definition,this is likely to lead to ambiguity
GEM_HOME=/Library/Ruby/Gems/1.8 GEM_PATH=/Library/Ruby/Gems/1.8 sudo /usr/bin/gem install nokogiri -v=1.5.10
instead of
GEM_HOME=/Library/Ruby/Gems/1.8 GEM_PATH=/Library/Ruby/Gems/1.8 sudo /usr/bin/gem install nokogiri
Because version 1.5.10 is the latest version that supports Ruby1.8.7
Should add *.rb
to "Build Phase" -> "Compile Source" before call 'require' method.
*.c
and *.c
files automatically added to "Compile Source".
Does anyone know how to automatically add *.rb
files to "Compile Source"?
I am using ruby from homebrew, but during the task, it says there is no xcodeproj gem from system built ruby gem; however, I have prepand /usr/local/bin at the beginning of my PATH. Is there a way to use homebrew ruby from the correct path instead of the system ruby?
Hi,
I've got an error when I run the command "GEM_HOME=/Library/Ruby/Gems/1.8 GEM_PATH=/Library/Ruby/Gems/1.8 sudo /usr/bin/gem install nokogiri rake"
ERROR: Error installing nokogiri:
nokogiri requires Ruby version >= 1.9.2.
I'm trying to install mobiruby on Lion
need to support on mruby.
Hi,
At http://mobiruby.org, it's mentioned that you're planning to 'create a natural Ruby library for making iOS applications'. I presume this would be an effort similar in approach to HotCocoa or BubbleWrap.
I was wondering if someone could point me to where I could see this effort panning out, and possibly contribute.
Hi all... any body can give me how to write my custom delegate in ruby syntax.
For example in objective-c
// in AppDelegate.h
// -----------------------------------------
@protocol GeneralDelegate <NSObject>
@required
- (void) generalBackToHome:(UIViewController *)controller;
@end
How can I write with ruby syntax :D
Thank You,
Hi,
Neither of the sample sounds (bgm_00.aif
or tap_se_00.wav
) seem to be playing for me. The creation of AudioPlayer
is fine, and setting loops and volume is okay, but nothing plays.
Is this a known bug, or is it my setup?
_ivar = 1
Convert Objective-C exceptions to Ruby exception
I found this issue in sloved list, but I got it again.
fresh clone, setup.sh done, OSX 10.8.2, XCode4.5.2
mrbc have been complied, libffi.a also compiled
There is content in mruby-cfunc modules, but modules/mruby-cfunc/src/mrb/cfunc_rb.rb is not there.
=xcode build error=
/Users/jason/dev_opensource/mobiruby-ios/bin/mrbc: Cannot open program file. (/Users/jason/dev_opensource/mobiruby-ios/modules/mruby-cfunc/src/mrb/cfunc_rb.rb)
Usage: /Users/jason/dev_opensource/mobiruby-ios/bin/mrbc [switches] programfile
switches:
-c check syntax only
-o place the output into
-v print version number, then trun on verbose mode
-B binary output in C language format
-C function output in C language format
--verbose run at verbose mode
--version print the version
--copyright print the copyright
I am new to iPhone development, so apologies if this is obvious and easy to fix.
I have Mac Lion (11.4.0
according to uname -r
) with XCode 4.6.1. When I try to rake
, I see: MobiRuby required Mountain Lion / Xcode 4.6 or newer version.
This is from os_version.rake
. I edited it to change the OSX version check to OSX_VERSION < 11.4
.
I want to see how far it gets. What specifically from Lion do we need?
The application builds; I got some errors about autoreconf
not found, so I ran brew install automake
, did a clean and rake.
The build completes. I get an error on deployment:
[DEBUG] Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 "iOS Simulator failed to install the application." UserInfo=0x7ff728c4a7d0 {NSLocalizedDescription=iOS Simulator failed to install the application., DTiPhoneSimulatorUnderlyingErrorCodeKey=-1}
rake aborted!
Command failed with status (1): [./bin/ios-sim launch "build/Debug-iphonesi...]
tasks/simulator.rake:9:in `block in <top (required)>'
/Users/User/.rvm/gems/ruby-1.9.3-p392@global/bin/ruby_noexec_wrapper:14:in `eval'
/Users/User/.rvm/gems/ruby-1.9.3-p392@global/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => default => run
(See full trace by running task with --trace)
I see a blank, black iPhone emulator screen. Nothing else.
What am I doing wrong?
I'm getting an error when I try to deploy MobiRuby's Hello World to a device. Tried on 5.0.1 iPad 2 and 5.1.1 iPhone 4:
ScriptError: file 'mruby_data_mobiruby' not found.
mobiruby-ios why catch the exception but not putout the error message?
I define a method with error, the options
is not defined.
def show_transition(&blk)
# completion = Cocoa::Block.new(CFunc::Void, [CFunc::Int]) { |finished|
# # puts "in item_trasition blk and finished is : #{finished}"
# blk.call(finished) if blk
# }
puts "transition animation:#{options}"
duration = C::Double(2.5)
# raise @front_view[:superview]
begin
# puts "@front_view[:superview]:#{@front_view.ivar[:_superview]}"
rescue => e
puts "Exception:#{e}"
end
# if @front_view[:superview]
# options = Cocoa::Const::UIViewAnimationOptionTransitionFlipFromLeft
# Cocoa::UIView._transitionFromView @front_view, :toView, @back_view, :duration, duration, :options, options, :completion, completion
# else
# options = Cocoa::Const::UIViewAnimationOptionTransitionFlipFromRight
# Cocoa::UIView._transitionFromView @back_view, :toView, @front_view, :duration, duration, :options, options, :completion, completion
# end
end
I use the method show_transition
in cocoa function call, but the console with rake
doesn't output any tips or backtrace or messages.It cause hard to find out the bug!
define C::Void, :touchesBegan, Cocoa::Object, :withEvent, Cocoa::Object do |touches, event|
puts "Touch began!!!"
begin
show_transition{|f|
puts "Finished:#{f}"
}
rescue Exception => e
puts "Exception in touchBegan:#{e}"
end
end
So, I try to catche the mruby exception manual,and puts the exception to help debug.
define C::Void, :touchesBegan, Cocoa::Object, :withEvent, Cocoa::Object do |touches, event|
puts "Touch began!!!"
show_transition{|f|
puts "Finished:#{f}"
}
end
Now, I found the error with the message:
Touch began!!!
Exception in touchBegan:Unknown method options
How to debug the mruby code in mobiruby-ios?
Why not raise the error out?
I got this error when try to running mobiruby-ios
error messages:
ld: library not found for -lffi
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Hey
Is this project still active? Have you planned a roadmap?
- (void)dealloc { // [_window release]; [super dealloc]; }'
with comment this line app work, but with some bugs =)
If dont comment this line, app not compile!
need to support on mruby.
This is definitely on the next Sunday hackertoon Must Play list.
I think this code occur error:eval script._UTF8String.to_s
.
After click Run
button in Editor view, nothing will eval.But return to root table view, every table item is diabled for click.
I changed editor.rb file's runScript function:
define C::Void, :runScript, Cocoa::Object do |sender|
# script = @editor_view._text._UTF8String.to_s
# str = eval(script._UTF8String.to_s)
str = eval("1 + 1")
alert = Cocoa::UIAlertView._alloc._initWithTitle "Hello",
:message, (str || "I am MobiRuby"),
:delegate, nil,
:cancelButtonTitle, "I know!",
:otherButtonTitles, _S("What's?"), nil
alert._show
end
If delete the code eval line, app run ok in ios simulator 6.1,else table view will disabled after Editor's Run button is clicked.
class NewObj < Cocoa::NSObject
protocol :ProtocoTestDelegate
end
Adapt protocols to a class.
Define and use protocol
Cocoa::Protocol :ProtocolTest do
define C::Void, :foo, Cocoa::Object, :bar, C::Int
end
Could mobiruby be packaged into a one-step installer for ease of use? Perhaps a Ruby .gem, Mac .pkg, Homebrew recipe, a Makefile, or even just a bash .sh script?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.