Skip to content

Instantly share code, notes, and snippets.

@phoet
Last active December 24, 2015 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phoet/6762679 to your computer and use it in GitHub Desktop.
Save phoet/6762679 to your computer and use it in GitHub Desktop.
i am stupid and lazy, RubyMotion to the rescue!

responding to this conversation on twitter: https://twitter.com/phoet/status/383552370015485952

it would be awesome if the RubyMotion toolchain would help me fail fast when submitting stuff to apple.

i have had several issue when doing this in the past:

  • i used an ad_hoc profile for distrubition (don't know if it's possible to know from the certificate)
  • info_plist entries were empty
  • CFBundleShortVersionString was not set properly
  • Icons and LaunchImages were missing, had a bad format (not PNG) or the wrong resolution
    • Icon-*.png
    • Default-*.png

i think that there should be a rake task that verifies that all the apple requirements for submitting an app are met.

it would be awesome if there were task that automatically generate all necessary icons. i am currently running imagemagic convert commands for this like

desc 'Create icons'
task :create_icons do
  input = 'Icon-1024.png'
  output_dir_path = 'Images/'

  [
    { name: 'Icon-72.png',        size: 72  },
    { name: 'Icon-72@2x.png',     size: 144 },
    { name: 'Icon-76.png',        size: 76  },
    { name: 'Icon-72@2x.png',     size: 152 },
    { name: 'Icon.png',           size: 57  },
    { name: 'Icon@2x.png',        size: 114 },
  ].each do |v|
    output = output_dir_path + v[:name]
    command = "convert -resize #{v[:size]} #{input} #{output}"
    puts command
    system command
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment