'App Store Connect: automate releasing/updating app after submit for review with "Manually release this version"

This may sound paradoxical. My goal is to find a tool which automates the process of logging in to App Store Connect, and click the Make App Available button. This is because my team has an internal process of releasing changes to our products. There are a lot of things to do but we also have tools to automate all of those. So I'm looking for something to append to our release automation tools so the whole release process is completely automated.

Problem statement

Because we need to have full control over the release time. Sometimes, in a company environment, after all the testing is done, we want to release the app, and start monitoring usage on that day. On Google Play, this is not a problem. We can expect an app we submit for release to go live shortly after the submission. But on App Store Connect, with the current submit for review process, we have no control over the review time.

Using Fastlane, setting the automatic_release flag to true, it would mean the app could go live at weekends. If a problem occurred with that new version, no ones would be on hand to quickly fix the issue.

Or the other option, setting the auto_release date, we could still run into the same problem if the review process took longer than the defined release date.

Is there a way to submit for review with the "Manually release this version" option, then, after the approval, have some tools/apis that would log in to App Store Connect and press the Make App Available for us?



Solution 1:[1]

You can list all available Fastlane actions on GitHub.

If you can't find a predefined action for your need, it's worth to check Fastlane Spaceship module for low level API calls:

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.

While searching in the Spaceship source code I found that app releasing is already added:

  • for phased release use: release
  • for immediate release to all user, use: release_to_all_users

I don't have a chance to test this, but the following snippet might help to start if you're not familiar with Spaceship. Put this in Fastfile then call it from where you need:

lane :release_app do
    require "spaceship"
    Spaceship::Tunes.login('[email protected]')

    app = Spaceship::Application.find('com.example.app')
    app.release_to_all_users
end

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1