Skip to content

Instantly share code, notes, and snippets.

@wprater
Created August 22, 2012 14:08
Show Gist options
  • Save wprater/3425963 to your computer and use it in GitHub Desktop.
Save wprater/3425963 to your computer and use it in GitHub Desktop.
Setup file for RubyMotion to build Cordova apps.
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
app.name = 'MyJavaScriptApp'
app.version = '1.0'
# My setup is a bit different, as Im building for many environements and the
# main app is written in JavaScript.
app.files = Dir.glob('./app/ios/**/*.rb')
app.device_family = [:iphone, :ipad]
# I've copied the CordovaLib directory from ~/Documents/CordovaLib into the
# local vendor dir to keep packaging more consistent.
app.vendor_project('vendor/CordovaLib', :xcode,
# You should specify the xcodeproj file, as there may be several
xcodeproj: 'CordovaLib.xcodeproj',
headers_dir: 'Classes'
)
# All the frameworks needed for the Cordova Framework APIs
# You'll need to include all the frameworks that are references in the Xcode project
# in the Cordova lib dir
app.frameworks += %w[
AddressBook
AddressBookUI
AudioToolbox
AVFoundation
CoreLocation
CoreMedia
MobileCoreServices
SystemConfiguration
]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment