Module: HighFive::IosHelper
- Included in:
- Thor::Tasks::Distribution, Thor::Tasks::IosTasks
- Defined in:
- lib/high_five/ios_helper.rb
Instance Method Summary collapse
- #info_plist_path(target = nil) ⇒ Object
- #ios_icon_sizes ⇒ Object
- #ios_path ⇒ Object
- #xcodeproj_path ⇒ Object
Instance Method Details
#info_plist_path(target = nil) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/high_five/ios_helper.rb', line 30 def info_plist_path(target=nil) root_dir = ios_path target = "*" if target.nil? info = Dir["#{root_dir}/**/#{target}-Info.plist"].first raise "Couldn't find infoplist" if info.nil? return info end |
#ios_icon_sizes ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/high_five/ios_helper.rb', line 50 def ios_icon_sizes { old_iphone: 57, old_iphone_retina: 114, iphone_retina: 120, old_ipad: 72, old_ipad_retina: 177, ipad: 76, ipad_retina: 152, old_spotlight: 29, old_spotlight_retina: 58, spotlight: 40, spotlight_retina: 80, spotlight_ipad: 50, spotlight_ipad_retina: 100 } end |
#ios_path ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/high_five/ios_helper.rb', line 16 def ios_path if [:platform_path] ios_path = [:platform_path] else ios_path = File.dirname xcodeproj_path end if !ios_path raise "Couldn't find the path of the xcodeproj." end ios_path end |
#xcodeproj_path ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/high_five/ios_helper.rb', line 38 def xcodeproj_path platform_config = base_config.build_platform_config(:ios) destination_dir = platform_config.destination root_dir = destination_dir while true glob = Dir[File.join(root_dir, "*.xcodeproj")] return glob.first if (glob.length > 0) root_dir = File.("..", root_dir) raise "Couldn't find xcodeproj near #{destination_dir}" if root_dir == '/' end end |