Method: AppInfo::HAP#icons

Defined in:
lib/app_info/hap.rb

#iconsArray<Hash{Symbol => String, Array<Integer>}>

Full icons metadata

Examples:

ipa.icons
# => [
#   {
#     name: 'icon.png',
#     file: '/path/to/icon.png',
#     uncrushed_file: '/path/to/uncrushed_icon.png',
#     dimensions: [64, 64]
#   },
#   {
#     name: 'icon1.png',
#     file: '/path/to/icon1.png',
#     uncrushed_file: '/path/to/uncrushed_icon1.png',
#     dimensions: [120, 120]
#   }
# ]

Returns:

  • (Array<Hash{Symbol => String, Array<Integer>}>)

    icons paths of icons



24
25
26
27
28
29
30
31
32
33
# File 'lib/app_info/hap.rb', line 24

def icons
  @icons ||= icons_path.each_with_object([]) do |file, obj|
    obj << {
      name: ::File.basename(file),
      file: file,
      uncrushed_file: file,
      dimensions: ImageSize.path(file).size
    }
  end
end