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"
  ]
}

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



49
50
51
# File 'lib/confetti/templates/ios_info.rb', line 49

def app_orientations
  ORIENTATIONS_MAP[@config.orientation]
end

#bundle_identifierObject



25
26
27
# File 'lib/confetti/templates/ios_info.rb', line 25

def bundle_identifier
  @config.package
end

#bundle_versionObject



29
30
31
# File 'lib/confetti/templates/ios_info.rb', line 29

def bundle_version
  @config.version_string
end

#devicesObject



41
42
43
44
45
46
47
# File 'lib/confetti/templates/ios_info.rb', line 41

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)


53
54
55
# File 'lib/confetti/templates/ios_info.rb', line 53

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

#iconsObject



21
22
23
# File 'lib/confetti/templates/ios_info.rb', line 21

def icons
  @config.plist_icon_set
end

#output_filenameObject



37
38
39
# File 'lib/confetti/templates/ios_info.rb', line 37

def output_filename
  "Info.plist"
end

#prerendered_icon?Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/confetti/templates/ios_info.rb', line 57

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

#product_nameObject



33
34
35
# File 'lib/confetti/templates/ios_info.rb', line 33

def product_name
  @config.name.name
end