Class: Confetti::Template::IosInfo
- Inherits:
-
Base
- Object
- Mustache
- Base
- Confetti::Template::IosInfo
show all
- Defined in:
- lib/confetti/templates/ios_info.rb
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
Instance Method Details
#app_orientations ⇒ Object
55
56
57
|
# File 'lib/confetti/templates/ios_info.rb', line 55
def app_orientations
ORIENTATIONS_MAP[@config.orientation]
end
|
#bundle_identifier ⇒ Object
31
32
33
|
# File 'lib/confetti/templates/ios_info.rb', line 31
def bundle_identifier
@config.package
end
|
#bundle_version ⇒ Object
35
36
37
|
# File 'lib/confetti/templates/ios_info.rb', line 35
def bundle_version
@config.version_string
end
|
#devices ⇒ Object
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
59
60
61
|
# File 'lib/confetti/templates/ios_info.rb', line 59
def fullscreen?
@config.preference(:fullscreen) == :true
end
|
#icons ⇒ Object
27
28
29
|
# File 'lib/confetti/templates/ios_info.rb', line 27
def icons
@config.plist_icon_set
end
|
#output_filename ⇒ Object
43
44
45
|
# File 'lib/confetti/templates/ios_info.rb', line 43
def output_filename
"Info.plist"
end
|
#prerendered_icon? ⇒ Boolean
63
64
65
|
# File 'lib/confetti/templates/ios_info.rb', line 63
def prerendered_icon?
@config.preference("prerendered-icon") == :true
end
|
#product_name ⇒ Object
39
40
41
|
# File 'lib/confetti/templates/ios_info.rb', line 39
def product_name
@config.name.name
end
|
#statusbar_style ⇒ Object
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
|