GemfileとRakefileにそれぞれ以下のように設定して、rake
を叩くだけで使えるようになる(一緒にコンパイルしてくれる)。
Gemfile
source :rubygems
gem 'motion-cocoapods'
Rakefile
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
require 'motion-cocoapods'
require 'rubygems'
require 'bundler'
Bundler.require
Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
app.name = 'hogehoge'
app.pods do
pod 'STLOAuth'
end
end
cocoapodsを追加する場合は、まず/vendor/Pods
ディレクトリを削除してから、再度rake
コマンドを走らせる必要がある。