Skip to content

Instantly share code, notes, and snippets.

@riteshgurung
Forked from youngshook/AppleCertDisplay.ruby
Created November 17, 2017 08:40
Show Gist options
  • Save riteshgurung/23abf34f6ee15014d46ac41f3caf5d28 to your computer and use it in GitHub Desktop.
Save riteshgurung/23abf34f6ee15014d46ac41f3caf5d28 to your computer and use it in GitHub Desktop.
A Ruby Script Display Apple Cert
require 'spaceship'
Spaceship.login('AppleDevID')
Spaceship.select_team
Spaceship.certificate.all.each do |cert|
cert_type = Spaceship::Portal::Certificate::CERTIFICATE_TYPE_IDS[cert.type_display_id].to_s.split("::")[-1]
puts "Cert id: #{cert.id}, name: #{cert.name}, expires: #{cert.expires.strftime("%Y-%m-%d")}, type: #{cert_type}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment