Aller au contenu principal

CONFIGURATION GUIDE

Configuring Codemagic

Let's set up Codemagic - your automated build and deployment platform. Codemagic connects directly to your GitHub repository and handles your app's entire build pipeline using their cloud-based build machines.

Why Codemagic? 🎯

We've chosen Codemagic as our CI/CD platform for several key reasons:

  1. Isolated Build Environment

    • Your builds run in a clean, isolated environment
    • This ensures your project is properly configured and can run on any machine
    • No more "it works on my machine" problems!
  2. Automated App Store Deployment

    • Push your code to a GitHub branch
    • Codemagic automatically builds and deploys to both app stores
    • No manual build process or store uploads needed
  3. Shorebird Integration

    • Seamlessly integrates with Shorebird for automatic patch deployment
    • Push a fix, and your users get it instantly

While Codemagic does have associated costs, it's an invaluable investment if you're serious about app development. The time saved on manual builds and deployments, combined with the reliability of isolated builds, makes it the clear choice for professional app development.

It manages everything from testing to app store deployment, and Codika automates the entire configuration process in minutes, eliminating the usual complexity of CI/CD setup.

Getting Your Codemagic API Key

Full Video

First, we'll need to give Codika the ability to communicate with your Codemagic account. Here's how to set that up:

  1. Navigate to the Teams tab in your Personal Account on Codemagic
  2. Find the Integrations section
  3. Scroll down to locate the Codemagic API at the bottom
  4. Click Show and copy your API key
  5. Let's tell Codika about this key using the command:
codika configure -s CODEMAGIC_API_KEY -v YOUR_API_KEY

Info

For your security, this API key will be stored encrypted in your local machine's .codika/config/secrets.yaml file. We never store or transmit your API keys - they remain solely on your device, encrypted for maximum security.

Creating Your Codemagic Team

Full Video

While you could use your personal account, we recommend setting up a dedicated team for better organization. Here's how:

  1. Head to the Teams section in Codemagic
  2. Click the Create Team button
  3. Name your team and click Next
  4. Tell Codika about your team name:
codika configure -s CODEMAGIC_TEAM_NAME -v "YOUR_TEAM_NAME"

Stick to one team name

Throughout this guide, you'll need to use this team name multiple times. Make sure to copy it exactly as you typed it - no typos or changes allowed! This is important because Codika will use this exact team name when it sets up your Flutter projects in Codemagic automatically.

Free Codemagic account

If you prefer not to add payment info right now, you can stick with your personal account. In that case, just use Personal Account as your team name.

What's Next?

Great! With Codemagic configured, we're ready to move on to setting up your Apple Developer account credentials. This will enable us to deploy your apps to the App Store seamlessly.