Sha256: 8ffc1c028dfbbc416ad98b5dda824c3cf9a8f186ff3da94c4be53c805836e9ba
Contents?: true
Size: 1.41 KB
Versions: 3
Compression:
Stored size: 1.41 KB
Contents
require 'fastimage' module FastlaneCore 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) # Remove alpha channel Helper.log.info "Removing alpha channel from provided App Icon (iTunes Connect requirement)".green `sips -s format bmp '#{path}' &> /dev/null ` # &> /dev/null since there is warning because of the extension `sips -s format png '#{path}'` 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
3 entries across 3 versions & 1 rubygems