I am trying to automate the process of the app submissions to the iTunes Connect. I can use iTMSTransporter to update metadata and screenshots just fine, but I still cannot figure if I can somehow the process of automatically replacing the app icon with a new version.I know that the Transporter can send the app icon over, but at the moment, all I can do is to login using selenium script, navigate to the app's page, click on the negative sign on the app and insert a new one. Is there really no better way? No API or anything? Any pointers in the right direction would be helpful.
Edit: It looks like there is a nifty set of tools called fastlane, which I may need to try eventually, but since my project is in its entirety in Ruby 1.9.3, there could be unexpected behavior if I decide to upgrade Ruby.
If anyone encounters this issue and needs to resolve, I did it with watir.
require 'watir-webdriver'
@browser = Watir::Browser.new :chrome
I login and navigate to the iTunes Connect record. Then I use the following if-statement:
if @browser.divs(:class => /(file-drop-zone.* appversionicon)/)[1].link.present?
app_icon = @browser.label(:text => /App Icon/).parent.file_field
app_icon.set(PATH_TO_ICON_FILE)
else
@browser.divs(:class => 'hideOverflow ios7-style-icon').last.click if @browser.divs(:class => 'hideOverflow ios7-style-icon').last.present?
@browser.divs(:class => 'deleteButton').last.click
app_icon = @browser.label(:text => /App Icon/).parent.file_field
app_icon.set($PROPS.high_res_icon)
end
The way it works is, it first checks if the upload field is available. If it is, then just use the set the icon to the absolute path to the icon file. If it is not, remove the existing icon and then replace it with a new one. It may be necessary to set a sleep method somewhere in between, but it is up to the individual to implement that.