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
58
59
60
|
# File 'lib/confetti/templates/ios_info.rb', line 58
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
54
55
56
|
# File 'lib/confetti/templates/ios_info.rb', line 47
def devices
nibs = ["NSMainNibFile"]
@config.preference_set.each do |preference|
next unless preference.name
nibs << "NSMainNibFile~ipad" if preference.name.match /^universal$/
end
nibs
end
|
#exit_on_suspend? ⇒ Boolean
62
63
64
|
# File 'lib/confetti/templates/ios_info.rb', line 62
def exit_on_suspend?
@config.preference("exit-on-suspend") == :true
end
|
#fullscreen? ⇒ Boolean
66
67
68
|
# File 'lib/confetti/templates/ios_info.rb', line 66
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
84
85
86
|
# File 'lib/confetti/templates/ios_info.rb', line 84
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
88
89
90
91
92
93
|
# File 'lib/confetti/templates/ios_info.rb', line 88
def statusbar_style
pref = @config.preference("ios-statusbarstyle")
if pref
STATUS_BARS[pref]
end
end
|
#url_schemes ⇒ Object
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# File 'lib/confetti/templates/ios_info.rb', line 70
def url_schemes
result = []
@config.url_scheme_set.each { |url_scheme|
result << {
:name => url_scheme.name || @config.package,
:role => %w{Editor Viewer Shell None}.find{|u| u == url_scheme.role} || "None",
:schemes => url_scheme.schemes
}
}
result
end
|