599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
|
# File 'spaceship/lib/spaceship/client.rb', line 599
def itc_service_key
return @service_key if @service_key
itc_service_key_path = "/tmp/spaceship_itc_service_key.txt"
return File.read(itc_service_key_path) if File.exist?(itc_service_key_path)
response = request(:get, "https://appstoreconnect.apple.com/olympus/v1/app/config?hostname=itunesconnect.apple.com")
@service_key = response.body["authServiceKey"].to_s
raise "Service key is empty" if @service_key.length == 0
File.write(itc_service_key_path, @service_key)
return @service_key
rescue => ex
puts(ex.to_s)
raise AppleTimeoutError.new, "Could not receive latest API key from App Store Connect, this might be a server issue."
end
|