Skip to content

platacard/blimp

Repository files navigation

blimp_icon_dark Blimp

All Contributors

Finally, a Swift deployment automation for Apple platforms.

Heavily inspired by fastlane.

Blimp refers to a non-rigid flying ship (like a zeppelin). Rarely used nowadays, it might be slow and clumsy, but still beautiful and gets the job done.

Disclaimer

This project is still a work in progress but aims to be a native Swift fastlane replacement in the future. However, the implementation is already stable enough for Plata to ship our apps with it. If you have questions or issues, just open an issue/discussion and we'll try to help. If you want to contribute, feel free to open a pull request. Although it's better to align with our roadmap.


Installation

As package dependency:

dependencies: [
    .package(url: "https://github.com/platacard/blimp.git", from: "1.0.0")
]

Features overview

What's working

  • Archiving and exporting the iOS app
  • Authenticating with the App Store Connect API
  • Uploading iOS apps to App Store Connect via the modern build upload API and waiting for processing
  • Assigning beta groups and sending builds for review
  • Inviting developers and beta testers to TestFlight

What's yet to be implemented

  • Managing provisioning profiles and certificates. For now, we use an isolated match part of fastlane.
  • Testing support for watchOS, macOS, and other less-used platforms

Getting started

Blimp is meant to be a building block in your pipeline, not a final, opinionated solution. It is best used in combination with other packages:

  • cronista — A simple logger
  • corredor — A shell wrapper
  • gito — A git wrapper
  • slackito — A Slack API client using result builders
  • dotcontext — An environment variables manager that extends .env file functionality

These packages provide a modular way to build your deploy pipeline. But the best part is that they are not required to use blimp. Tweak everything to your liking.

You can try things out by calling the blimp CLI via swift run blimp {command}, or you can compile the project and use the binary artifact directly.

❗️ Moreover, blimp CLI provides an example of how you can use BlimpKit in your CLI. We recommend trying out the swift-argument-parser package, it works great for us.

Authenticating

Environment expects 3 variables:

  • APPSTORE_CONNECT_API_ISSUER_ID
  • APPSTORE_CONNECT_API_KEY_ID
  • APPSTORE_CONNECT_API_PRIVATE_KEY

To get the private key, go to https://appstoreconnect.apple.com/access/integrations/api and create your own key. This is also the page to find your private key ID and the issuer ID.

After downloading your private key, you can open the .p8 file containing the private key in any text editor:

-----BEGIN PRIVATE KEY-----
FDFDGgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdw...
49AgEGCCqG\...
...
-----END PRIVATE KEY-----

Copy the contents and remove all the whitespacesa and newlines, -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY-----.

Use export APPSTORE_CONNECT_API_PRIVATE_KEY={bare_key_without_newlines} && ... locally or create environment variables for your CI provider. JWT token for API client will be created (and recreated on expiration) authomatically if needed variables are in place.

Running

Using binary artifact:

swift build -c release

Then, you can use the binary artifact directly:

./build/release/blimp {command}

Available commands

Use -h with each command to see all available parameters and their default values.

  1. blimp takeoff {params} - Archive the project
  2. blimp approach {params} - Upload the archive to App Store Connect
  3. blimp land {params} - Assign the build's beta groups and send it to external review
  4. blimp hangar {subcommand} {params} - A set of commands to interact with provisioning profiles, see app size, etc.

Architecture overview

blimp aims to keep its dependencies to a minimum. It uses Apple's OpenAPI generator to create App Store Connect API clients. Swift Crypto is used for JWT signing. Swift Argument Parser is used for the command line interface implementation. Finally, our own cronista and corredor are used for logging and calling CLI tools.

  • Archiving and exporting are done via xcodebuild.
  • Uploading is done via the App Store Connect build upload API (with an optional legacy altool fallback).
  • Processing is done via the App Store Connect API.

Attributions

JWT signing was borrowed from AvdLee under MIT License.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Konstantin Iurichev
Konstantin Iurichev

💻
tigati
tigati

💻
Ilya Kharabet
Ilya Kharabet

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Finally, a Swift deploy automation for Apple platforms.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages