Skip to content

Instantly share code, notes, and snippets.

@armadsen
Last active January 28, 2016 17:35
Show Gist options
  • Save armadsen/bbe808e04abee872c926 to your computer and use it in GitHub Desktop.
Save armadsen/bbe808e04abee872c926 to your computer and use it in GitHub Desktop.
Ruby script using spaceship to delete all existing screenshots for an iOS app on iTunes Connect
#!/usr/bin/env ruby
require "spaceship"
Spaceship.login('yourusername', 'yourpassword')
Spaceship::Tunes.login('yourusername', 'yourpassword')
du = Spaceship::Tunes.client.du_client
app = Spaceship::Tunes::Application.find "app.bundle.id"
appv = app.edit_version
appv.screenshots.each do |language, screenshots|
screenshots.each do |sc|
appv.upload_screenshot!(nil, sc.sort_order, sc.language, sc.device_type)
end
end
appv.save!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment