Custom charts that would otherwise take hundreds of lines of code to create can now be simplified to a few lines of code. For example, here is a chart that fetches the data from the Codemagic REST API and displays the build times using Swift Charts!
This guide will illustrate all of the necessary steps to successfully build and publish a Unity app with Codemagic. It will cover the basic steps such as build versioning, code signing and publishing.
In order to use codemagic.yaml for build configuration on Codemagic, it has to be committed to your repository. The name of the file must be codemagic.yaml and it must be located in the root directory of the repository. Detailed explanation can be found here.
TipYou can have more than one workflow in the same codemagic.yaml file. If you are building for both the Android and iOS, simply enter both workflows as:workflows: android-workflow-id: name: Android Sample Workflow # ....... # ....... # ....... ios-workflow-id: name: iOS Sample Workflow # ......
Scan for the codemagic.yaml file by selecting a branch to scan and clicking the Check for configuration file button at the top of the page. Note that you can have different configuration files in different branches.
Codemagic lets you upload code signing certificates as PKCS#12 archives containing both the certificate and the private key which is needed to use it. When uploading, Codemagic will ask you to provide the certificate password (if the certificate is password-protected) along with a unique Reference name, which can then be used in the codemagic.yaml configuration to fetch the specific file.
The profiles are displayed grouped by category: Development profiles, Ad Hoc profiles, App Store profiles, and Enterprise profiles. For each selected profile, it is necessary to provide a unique Reference name, which can be later used in codemagic.yaml to fetch the profile.
To fetch all uploaded signing files matching a specific distribution type and bundle identifier during the build, define the distribution_type and bundle_identifier fields in your codemagic.yaml configuration. Note that it is necessary to configure both of the fields.
Signing macOS apps requires a Signing certificate (App Store development or distribution certificate in .p12 format) and a Provisioning profile. In Manual code signing you save these files as Codemagic Environment variables and manually reference them in the appropriate build steps.
In Automatic code signing, Codemagic takes care of Certificate and Provisioning profile management for you. Based on the certificate private key that you provide, Codemagic will automatically fetch the correct certificate from the App Store or create a new one if necessary.
Run the following command on the App Store Connect API key file that you downloaded earlier (in our example saved as codemagic_api_key.p8) to copy its content to clipboard:cat codemagic_api_key.p8 | pbcopy
Environment variables have to be added to the workflow either individually or as a group. Modify your codemagic.yaml file by adding the following:workflows: macos-workflow: name: macOS Workflow environment: groups: - appstore_credentials
One very useful method of calculating the code version is to use Codemagic command line tools to get the latest build number from Google Play and increment it by one. You can then save this as the NEW_BUILD_NUMBER environment variable that is already expected by the /Assets/Editor/Build.cs build script.
Add the following scripts to your codemagic.yaml file in order to prepare the build environment and start the actual build process.In this step you can also define the build artifacts you are interested in. These files will be available for download when the build finishes. For more information about artifacts, see here.
Having followed all of the above steps, you now have a working codemagic.yaml file that allows you to build, code sign, automatically version and publish your project using Codemagic CI/CD.Save your work, commit the changes to the repository, open the app in the Codemagic UI and start the build to see it in action.
Documentation on using codemagic.yaml teaches you to configure additional options such as changing the instance type on which to build, or configuring builds to be automatically triggered on repository events.
A serial number and a redemption code both have 24 elements. However, a serial number has 24 digits, while a redemption code has 24 alphanumeric digits. If you are entering a redemption code instead of a serial number, you get the following error message:
You may be asked to enter a magic code, because the way the bot sample is implemented. This magic code is part of the RFC#7636 and is there to add an extra security element. By removing the magic code, there's an increased security risk. This can be mitigated using Direct Line with enhanced authentication enabled. For more information, see Bot Framework enhanced authentication.
Add the contents of the server SSH key, with ssh-serialport.googleapis.comprepended to the key. For example, if the server key contains the linessh-rsa AAAAB3NzaC1yc..., then ~/.ssh/known_hosts should have a linelike this:
By default, each time you connect to the serial console, you will receivea replay of the last 10 lines of data, regardless of whether the last 10 lineshave been seen by another SSH client. You can change this setting and controlhow many and which lines are returned by setting the following options:
With the Google Cloud CLI, append the following to yourconnect-to-serial-port command, where N is the specified number of lines(or bytes or absolute byte index, depending on which replay option you areselecting):