Using the Parse iOS SDK with RubyMotion

RubyMotion provides these instructions for selling third-party code: http://www.rubymotion.com/developer-center/guides/project-management/#_files_dependencies

I am trying to add the Parse.com iOS SDK. These are instructions for adding it to your Xcode project: https://parse.com/apps/quickstart#ios/existing . However, I am not using Xcode since I am working with RubyMotion.

I registered my attempt here: https://github.com/adelevie/RubyMotionSamples/commit/603bf4428995bb203cce7e7e8e6989d6e86bda3b

And here are the errors I get: https://gist.github.com/2595284

+7
source share
3 answers

I believe that we are really dealing with a static library here, so I believe that you should specify: static instead of: Xcode as the second option.

Using the following code in your Rakefile, the application 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 get the following error when 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. 
+8
source

The related documentation says: "In order to sell a third-party library in a RubyMotion project, the source code must be available somewhere in the file system." Therefore, I do not think dropping the .framework file there will work.

You can try downloading ParseStartProject called "Blank Xcode w / SDK" from parse.com/docs. If you sell this project folder, RubyMotion will be able to find the xcode project it is looking for. You will want to remove the .m and .h files from the xcode project, of course, since you want the project to include Parse.framework.

I have not really tried this. Please tell us if you earn it.

+2
source

Well copied this from the answer in the RubyMotion group. The stub error message seems to be fixed:

Now, to make this work, I changed /Library/RubyMotion/lib/motion/project/vendor.rb and changed Dir.glob on line 38:

 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

+1
source

All Articles