RubyMotion provides these instructions for vendoring 3rd party code: http://www.rubymotion.com/developer-center/guides/project-management/#_files_dependencies
I'm trying to add Parse.com's iOS SDK. These are the instructions for adding it to an XCode project: https://parse.com/apps/quickstart#ios/existing. However, I'm not using XCode since I'm working with RubyMotion.
I documented my attempt here: https://github.com/adelevie/RubyMotionSamples/commit/603bf4428995bb203cce7e7e8e6989d6e86bda3b
And here are the errors I'm getting: https://gist.github.com/2595284
I believe we're actually dealing with a static library here, so I believe you should specify :static instead of :Xcode as the second option.
With the following code in your Rakefile, the app compiles:
app.libs << '/usr/lib/libz.1.1.3.dylib'
app.frameworks += [
'AudioToolbox',
'CFNetwork',
'SystemConfiguration',
'MobileCoreServices',
'Security',
'QuartzCore']
app.vendor_project('vendor/Parse.framework', :static,
:products => ['Parse'],
:headers_dir => 'Heiders')
However, I'm getting the following error running the Parse setApplicationId method:
(main)>> Objective-C stub for message `setApplicationId:clientKey:' type `v@:@@' not precompiled. Make sure you properly link with the framework or library that defines this message.
The documentation linked says, "To vendor a 3rd-party library in a RubyMotion project, the source code must be available somewhere on the filesystem." So I don't think dropping a .framework file in there will work.
You could try downloading the ParseStartProject, called "Blank Xcode w/ SDK" from parse.com/docs. If you vendor that project folder, RubyMotion will be able to find an xcode project like it's looking for. You'll want to delete the .m and .h files from the xcode project, of course, since you only want the project to include Parse.framework.
I haven't actually tried this. Please let us know if you get it working.
Okay copied this from an answer in the RubyMotion group. It seems to fix the stub error message:
Now, to make this work, I've modified /Library/RubyMotion/lib/motion/project/vendor.rb and changed the Dir.glob on line 38 from:
source_files = (opts.delete(:source_files) or Dir.glob('*.
{c,m,cpp,cxx,mm,h}'))
to:
source_files = (opts.delete(:source_files) or Dir.glob('**/*.
{c,m,cpp,cxx,mm,h}'))
http://groups.google.com/group/rubymotion/msg/0efa74214523d0f5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With