Codemagic offers a set of utilities known as Codemagic CLI tools for facilitating the building and code signing of iOS apps built with native tooling, React Native or Flutter. The CLI tools are used for building and code signing during Codemagic builds but can be just as easily used on a local Mac or in other remote machines.
To use Codemagic CLI tools for code signing and creating an
.ipa archive, follow these steps.
pip3 install codemagic-cli-tools
app-store-connect fetch-signing-files <"bundle_id">
The bundle ID will be used to download the matching code signing files. Instead of the bundle ID, you can also use
"\$(xcode-project detect-bundle-id)" to detect the bundle ID from Xcode configuration. Use the
--create flag to create the signing files if they’re missing. Read more about the app-store-connect utility.
Read more about the xcode-project utility.
.ipaarchive by specifying your project and scheme.
xcode-project build-ipa --project "MyXcodeProject.xcodeproj" --scheme "MyScheme"
--workspace "MyXcodeWorkspace.xcworkspace" to specify a workspace instead. Read more about the build-ipa action.
The end result will be a code-signed
.ipa archive that you can distribute to testers or publish to App Store Connect.