Sha256: cc749948a0087cd7bc522c49fb0e7d4c92bb4ed52edc5d3e38cb84e4edac8221
Contents?: true
Size: 1.12 KB
Versions: 10
Compression:
Stored size: 1.12 KB
Contents
require 'fastimage' module Deliver class ItunesConnect # Uploading a new full size app icon def upload_app_icon!(app, path) path = File.expand_path(path) raise "Could not find app icon at path '#{path}'".red unless File.exists?path size = FastImage.size(path) raise "App icon must have the resolution of 1024x1024px".red unless (size[0] == 1024 and size[1] == 1024) begin verify_app(app) open_app_page(app) Helper.log.info "Starting upload of new app icon".green evaluate_script("$('.appversionicon > .ios7-style-icon').prev().click()") # delete button evaluate_script("$('[style-class=\"appversionicon rounded\"] [itc-launch-filechooser] + input').attr('id', 'deliverFileUploadInput')") # set div evaluate_script("URL = webkitURL; URL.createObjectURL = function(){return 'blob:abc'}"); # shim URL page.attach_file("deliverFileUploadInput", path) # add file sleep 10 click_on "Save" Helper.log.info "Finished uploading the new app icon".green rescue => ex error_occured(ex) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems