This article is written by Rudrank Riyam
Uploading your app on App Store Connect takes you to
Waiting for Review after many clicks. And for many white-label apps, this becomes a repetitive and cumbersome process.
Now, there’s an easier way to distribute your app to users via the App Store! We’re excited to release a new feature that allows you to publish to App Store Connect. All you need to do is add a few lines to your
codemagic.yaml file. This helps you automate your iOS releases from start to finish and push the CI-verified builds straight to the App Store.
So, let’s get started with updating the
Updating your codemagic.yaml file
codemagic.yaml workflow configuration, add the following under the publishing section:
copyright: 2021 Nevercode Ltd
You can get the values for the first three variables from App Store Connect and encrypt them. Find out more about iOS code signing here.
APP_STORE_CONNECT_KEY_IDENTIFIER: In App Store Connect > Users and Access > Keys. This is the Key ID of the key.
APP_STORE_CONNECT_ISSUER_ID: In App Store Connect > Users and Access > Keys. The Issuer ID is displayed above the table of active keys.
APP_STORE_CONNECT_PRIVATE_KEY: This is the private API key downloaded from App Store Connect.
If you’ve already configured the
codemagic.yaml file to submit to TestFlight, you would have configured the above environment variables.
Submitting to App Store Connect
There’s a new boolean value
submit_to_app_store that has a default value of
false. It determines whether or not the uploaded build should be submitted to App Store review.
Note: This action is performed during post-processing. It doesn’t count in your build minutes.
Release type for App Store Connect
You can also configure the release type, with the default value being MANUAL. The release types include:
- SCHEDULED — schedule the release after app review
- MANUAL — you manually release this version
- AFTER_APPROVAL — the version is released automatically after approval
Set scheduled release date
release_type is SCHEDULED, you can set the earliest date to schedule the release. It consists of the time-zone-aware ISO8601 timestamp with hour precision. The release date cannot be set to the past.
For example, if you provide the value 2021-12-29T14:37:00+02:00, this means you’re scheduling the release on December 29, 2021, at 2:37 PM in Eastern European Time.
Finally, you can add the name of the person or entity that owns the exclusive rights to your app, preceded by the year when they obtained the rights.
By adding just a few more lines to your workflow configuration, you can easily release your app to App Store Connect!
Submit to App Store review
After updating the configuration, all you need to do is run a build and send it to App Store Connect for Apple to review:
When the main workflow has been successfully completed on Codemagic and the app artifact has been successfully published to App Store Connect, the workflow proceeds to the App Store distribution steps. Actions like
beta_groups, and uploading release notes occur asynchronously in the post-processing step. We call these Magic Actions.
Note: This avoids having to use the macOS build machine while we wait for Apple to finish processing the build, and it becomes available for further actions.
After the post-processing step is finished, head over to App Store Connect and go to your app. You should see that your app is waiting for review:
Additional configuration options
The new feature also allows you to use a few more optional configurations, like updating the What’s New description. This lets you set up a release notes file and add it to your project working directory, either the repository root directory or the working_directory specified in the root of your workflow configuration. There are three ways to do this:
- creating a
- creating a
release_notes_<language_localization_code>.txtfile for every language used
- creating a
What’s new in this version
When updating your app, you can describe what’s new in this version, such as new features, improvements, and bug fixes. You can add the value under the
There are a few other arguments that you can specify in the configuration:
version_string: The version of the build published to the App Store that identifies an iteration of the bundle.
keywords: Include one or more keywords that describe your app. You can separate keywords with an English comma, a Chinese comma, or a mix of both.
marketing_url: A URL with marketing information about your app. This URL will be visible on the App Store.
promotional_text: Promotional text that lets you inform your App Store visitors of any current app features without requiring an updated submission.
support_url: A URL with support information for your app. This URL will be visible on the App Store.
Here’s an example
release_notes.json file to refer to:
"text": "British English release notes/what's new text",
"description": "Updated app description", // Optional for App Store review submission
"keywords": "keyword, other keyword", // Optional for App Store review submission
"promotional_text": "Promotional text", // Optional for App Store review submission
"marketing_url": "https://example.com", // Optional for App Store review submission
"support_url": "https://example.com" // Optional for App Store review submission
Codemagic now provides a quick and seamless way to publish your iOS app to App Store Connect. You can now easily automate iOS releases from start to finish. Automating a tedious task saves you the hassle of manually performing it, especially in the case of white-label apps.
Our team is eager to hear about your experience publishing on App Store Connect using Codemagic. If you have any suggestions or feedback, join our Slack community, or mention @codemagicio on Twitter! Also, if you are having some trouble with publishing to App Store Connect with Codemagic, we are always here to help: We try to answer every single question on Slack, and for those on Professional or Enterprise plans, our experts are always available in the in-app chat.