Module: Iphone
- Included in:
- PhoneGap
- Defined in:
- lib/devices/iphone.rb
Instance Method Summary collapse
-
#build_iphone(path_to_build) ⇒ Object
builds the iphone using xcode, FIXME should use open toolchain.
-
#iphone_supported? ⇒ Boolean
TODO need to verify version is 3.0.
Instance Method Details
#build_iphone(path_to_build) ⇒ Object
builds the iphone using xcode, FIXME should use open toolchain
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/devices/iphone.rb', line 8 def build_iphone(path_to_build) if iphone_supported? FileUtils.mkdir_p(path_to_build) www_local = File.join(path_to_build,'www') www_build = File.join(install_path,'iphone') puts '\building for iphone...\n' puts "copying #{www_local} to #{www_build}...#{`cp -r #{www_local} #{www_build}`}\n" # Debug, Release conf = {'Release'=>'iphoneos3.0','Debug'=>'iphonesimulator3.0'} puts `cd #{www_build}; /usr/bin/xcodebuild -alltargets -configuration Debug -sdk #{conf['Debug']}` else puts 'skipping iphone build: iphone sdk not installed' end end |
#iphone_supported? ⇒ Boolean
TODO need to verify version is 3.0
3 4 5 |
# File 'lib/devices/iphone.rb', line 3 def iphone_supported? return File.exists?("/usr/bin/xcodebuild") end |