Created
September 2, 2014 08:45
-
-
Save KrauseFx/db0ea9c884465e507602 to your computer and use it in GitHub Desktop.
iTunesConnect: Receive the app identifier of the next app to be uploaded (Waiting for Upload status), since you can not specify which app you want to deploy next (http://stackoverflow.com/questions/7568420/how-to-perform-ios-app-validation-from-the-command-line#comment23525642_7569194)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require 'pty' | |
require 'pry' | |
command = "xcrun -sdk iphoneos Validation -online -upload -verbose notHere.ipa" | |
# upload it now: http://stackoverflow.com/questions/7568420/how-to-perform-ios-app-validation-from-the-command-line | |
output = '' | |
begin | |
PTY.spawn(command) do |stdin, stdout, pid| | |
begin | |
stdin.each do |line| | |
output += line | |
if line.include?"ExistingBundleIdentifier" or line.include?"ReservedBundleIdentifier" | |
identifier = line.split('"')[1] | |
puts identifier | |
exit | |
end | |
if line.include?"warning: Can't connect to iTunesConnect" | |
puts output | |
raise "Some error when trying to fetch the app identifier" | |
end | |
end | |
rescue Errno::EIO | |
binding.pry | |
puts "Errno:EIO error, but this probably just means " + | |
"that the process has finished giving output" | |
end | |
end | |
rescue PTY::ChildExited | |
puts "The child process exited!" | |
binding.pry | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment