Gems

Gems は再利用可能なコンポーネントです。RubyMotion コミュニティーによって、とてもたくさんの gem が開発されてきました。ここでは、そのうちのいくつかを掲載しています。Motion Toolbox で余す所ないリストがあります。

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

 

Motion Toolbox でより多くの gem を確認してみてください。