spaceship/README.md
fastlane
spaceship exposes both the Apple Developer Center and the App Store Connect API. It’s super fast, well tested and supports all of the operations you can do via the browser. It powers parts of fastlane, and can be leveraged for more advanced fastlane features. Scripting your Developer Center workflow has never been easier!
Get in contact with the creators on Twitter: @FastlaneTools
spaceship uses a combination of 5 different API endpoints, used by the Apple Developer Portal and Xcode. As no API offers everything we need, spaceship combines all APIs for you. More details about the APIs.
More details about why spaceship is useful on spaceship.airforce.
No matter how many apps or certificates you have, spaceship can handle your scale.
Spaceship.login
# Create a new app
app = Spaceship.app.create!(bundle_id: "com.krausefx.app", name: "Spaceship App")
# Use an existing certificate
cert = Spaceship.certificate.production.all.first
# Create a new provisioning profile
profile = Spaceship.provisioning_profile.app_store.create!(bundle_id: app.bundle_id,
certificate: cert)
# Print the name and download the new profile
puts("Created Profile " + profile.name)
profile.download
Before spaceship, the fastlane tools used web scraping to interact with Apple's web services. With spaceship it is possible to directly access the underlying APIs using a simple HTTP client only.
Using spaceship, the execution time of sigh was reduced from over 1 minute to less than 5 seconds.
spaceship is part of fastlane:
gem install fastlane
To try spaceship, just run fastlane spaceship. It will automatically start the spaceship playground. It makes it super easy to try spaceship :rocket:
This requires you to install pry using gem install pry. pry is not installed by default, as most fastlane users won't need the spaceship playground. You can add the pry dependency to your Gemfile.
Open DeveloperPortal.md for code samples
Open AppStoreConnect.md for code samples
When your Apple account has 2 factor verification enabled, you'll automatically be asked to verify your identity. If you have a trusted device configured for your account, then a code will appear on the device. If you don't have any devices configured, but have trusted a phone number, then a code will be sent to your phone. The resulting session will be stored in ~/.fastlane/spaceship/[email]/cookie. The session should be valid for about one month, however there is no way to test this without actually waiting for over a month.
All fastlane tools that communicate with Apple's web services in some way, use spaceship to do so.
Overview of the used API endpoints
https://idmsa.apple.com:
https://developerservices2.apple.com:
https://developer.apple.com:
https://appstoreconnect.apple.com:
https://du-itc.appstoreconnect.apple.com:
https://is[1-9]-ssl.mzstatic.com:
spaceship uses all those API points to offer this seamless experience.
spaceship does a lot of magic to get everything working so neatly:
JSON, XML, txt, plist and sometimes even HTML responses and requests.Help us keep fastlane open and inclusive. Please read and follow our Code of Conduct.
This project is licensed under the terms of the MIT license. See the LICENSE file.
This project and all fastlane tools are in no way affiliated with Apple Inc. This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs. All fastlane tools run on your own computer or server, so your credentials or other sensitive information will never leave your own computer. You are responsible for how you use fastlane tools.