Class: Confetti::Template::IosInfo

Inherits:
Base
  • Object
show all
Defined in:
lib/confetti/templates/ios_info.rb

Direct Known Subclasses

IosRemotePlist

Constant Summary collapse

ORIENTATIONS_MAP =
{
  :landscape => [
    "UIInterfaceOrientationLandscapeLeft",
    "UIInterfaceOrientationLandscapeRight"
  ],
  :portrait => [
    "UIInterfaceOrientationPortrait",
    "UIInterfaceOrientationPortraitUpsideDown"
  ],
  :default => [
    "UIInterfaceOrientationPortrait",
    "UIInterfaceOrientationPortraitUpsideDown",
    "UIInterfaceOrientationLandscapeLeft",
    "UIInterfaceOrientationLandscapeRight"
  ]
}
STATUS_BARS =
{
  :default              => "UIStatusBarStyleDefault",
  :"black-translucent"  => "UIStatusBarStyleBlackTranslucent",
  :"black-opaque"       => "UIStatusBarStyleBlackOpaque"
}

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Confetti::Template::Base

Instance Method Details

#app_orientationsObject



55
56
57
# File 'lib/confetti/templates/ios_info.rb', line 55

def app_orientations
  ORIENTATIONS_MAP[@config.orientation]
end

#bundle_identifierObject



31
32
33
# File 'lib/confetti/templates/ios_info.rb', line 31

def bundle_identifier
  @config.package
end

#bundle_versionObject



35
36
37
# File 'lib/confetti/templates/ios_info.rb', line 35

def bundle_version
  @config.version_string
end

#devicesObject



47
48
49
50
51
52
53
# File 'lib/confetti/templates/ios_info.rb', line 47

def devices 
  nibs = ["NSMainNibFile"]
  @config.preference_set.each do |preference|
    nibs << "NSMainNibFile~ipad"  if preference.name.match /^universal$/
  end
  nibs
end

#fullscreen?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/confetti/templates/ios_info.rb', line 59

def fullscreen?
  @config.preference(:fullscreen) == :true
end

#iconsObject



27
28
29
# File 'lib/confetti/templates/ios_info.rb', line 27

def icons
  @config.plist_icon_set
end

#output_filenameObject



43
44
45
# File 'lib/confetti/templates/ios_info.rb', line 43

def output_filename
  "Info.plist"
end

#prerendered_icon?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/confetti/templates/ios_info.rb', line 63

def prerendered_icon?
  @config.preference("prerendered-icon") == :true
end

#product_nameObject



39
40
41
# File 'lib/confetti/templates/ios_info.rb', line 39

def product_name
  @config.name.name
end

#statusbar_styleObject



67
68
69
70
71
72
# File 'lib/confetti/templates/ios_info.rb', line 67

def statusbar_style
  pref = @config.preference("ios-statusbarstyle")
  if pref
    STATUS_BARS[pref]
  end
end