Gems

Gems are reusable components that can be included in projects. The RubyMotion community has been developing a significant amount of gems. Here are just a few of them. Visit Motion Toolbox for an exhaustive list.

motion-cocoapods

Integrate 3rd-party libraries in RubyMotion for iOS / OS X projects via CocoaPods

Motion::Project::App.setup do |app|
 # ...
 app.pods do
   pod 'AFNetworking'
 end
end

Learn more

 

motion-gradle

Integrate 3rd-party Java dependencies in RubyMotion for Android projects using Gradle

Motion::Project::App.setup do |app|
  # ...
  app.gradle do
    dependency 'net.sf.ehcache:ehcache:2.9.0'
    dependency 'com.joanzapata.pdfview:android-pdfview:1.0.+@aar'
    dependency 'com.danikula:videocache:2.3.1' do
      exclude module: 'android', group: 'com.google.android'
    end
  end
end

Learn more

 

motion-provisioning

Simplified provisioning for RubyMotion iOS, tvOS and macOS apps.

Motion::Project::App.setup do |app|
  app.name = 'My App'
  app.identifier = 'com.example.myapp'

  app.development do
    app.codesign_certificate = MotionProvisioning.certificate(
      type: :development,
      platform: :ios)

    app.provisioning_profile = MotionProvisioning.profile(
      bundle_identifier: app.identifier,
      app_name: app.name,
      platform: :ios,
      type: :development)
  end
end

Learn more