Last active
August 29, 2015 14:01
-
-
Save wprater/1d2235dc95a3200fe95d to your computer and use it in GitHub Desktop.
Build RubyMotion for an adhoc environment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyApp | |
class << self | |
def app_store? | |
RUBYMOTION_ENV == 'release' | |
end | |
def development? | |
RUBYMOTION_ENV == 'development' | |
end | |
def release? | |
!development? | |
end | |
# Set ENV to ADHOC when building | |
# ADHOC=1 rake | |
def adhoc? | |
NSBundle.mainBundle.objectForInfoDictionaryKey('ADHOC') | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
$:.unshift('/Library/RubyMotion/lib') | |
require 'motion/project/template/ios' | |
begin | |
require 'bundler' | |
Bundler.require | |
rescue LoadError | |
end | |
Motion::Project::App.setup do |app| | |
unless ENV['ADHOC'].nil? | |
is_adhoc = ENV['ADHOC'] == '1' || (ENV['ADHOC'] =~ /true/i) == 0 | |
app.info_plist['ADHOC'] = is_adhoc | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment