How To Use the Facebook iOS SDK In Your RubyMotion project

Here's a quick how-to to set up the Facebook iOS SDK in a RubyMotion project.

  1. Install Bundler if you haven't already.
    run bundle init from the terminal
    Add require 'bundler' to your Rakefile under require 'motion/project'
    Add Bundler.require under that.

  2. Install Cocoapods if you haven't already.
    Add gem 'motion-cocoapods' to your Gemfile

  3. Then add the following to your Rakefile...

    app.frameworks += %w{ AdSupport Accounts Social }
    app.weak_frameworks += %w{ AdSupport Accounts Social }
    app.pods do
      pod 'Facebook-iOS-SDK', '~> 3.1.1'

    app.info_plist['FacebookAppID'] = '<your app id>'
    app.info_plist['URL types'] = { 'URL Schemes' => 'fb<your app id>'} # note the "fb" prefix


I've uploaded an example application to Github: Bodacious/FacbookConnectWithRubyMotion

comments powered by Disqus