iOS Launch images

While the application is starting up, iOS shows a launch image that is visible until all the initial setup code is ready (i.e. your first line of AS3 code is being executed).

For each iOS resolution you are supporting, you need a PNG with a specific name and size. The following small Ruby script can be used to generate empty images with the correct size and filename. (You need to have the ImageMagick tool convert installed.)

#!/usr/bin/env ruby
 
launch_sizes = {
  "Default~iphone" => "320x480",                         # iPhone 3GS
  "Default@2x~iphone" => "640x960",                      # iPhone 4
  "Default-320w-568h@2x~iphone" => "640x1136",           # iPhone 5
  "Default-375w-667h@2x~iphone" => "750x1334",           # iPhone 6
  "Default-414w-736h@3x~iphone" => "1242x2208",          # iPhone 6+
  "Default-Portrait~ipad" => "768x1024",                 # iPad
  "Default-Portrait@2x~ipad" => "1536x2048",             # iPad Air
  "Default-Portrait-834w-1112h@2x~ipad"  => "1668x2224", # iPad Pro 10.5"
  "Default-Portrait-1024w-1366h@2x~ipad" => "2048x2732", # iPad Pro 12" (1)
  "Default-Landscape-1024w-1366h@2x~ipad" => "2732x2048" # iPad Pro 12" (2)
}
 
launch_sizes.each do |name, size|
  `convert -size #{size} xc:#FBF139 #{name}.png`
end
Note that the iPad Pro needs both “Portrait” and “Landscape” versions of the file, even if the app only supports one orientation. I couldn't get it to recognize the correct resolution if I used just one of the two.
Since iOS 11, it seems that you need to specify both width and height in the launch image. Older SDKs often accepted a version specifying just the height.
Edit the “xc:…” part to use a custom color.

More information can be found in this Adobe document. However, it does not cover all the new devices.

  manual/ios_launch_images.txt · Last modified: 2017/10/25 16:03 by daniel
 
Powered by DokuWiki