• Home
  • Insight
  • Blog
  • Business
  • Entertainment
  • Health
  • Politics
  • Shop
    • Gift Shop
    • Value Shop
    • Store
    • Bargain Shop
    • Discount
  • Sports
  • Tech
  • Travel
  • USA
  • Video
  • World
    • Asia
    • Africa
    • South America
    • North America
    • Europe
    • Oceania
Thursday, July 30, 2026
No Result
View All Result
Subscribe Now
  • Home
  • Insight
  • Blog
  • Business
  • Entertainment
  • Health
  • Politics
  • Shop
    • Gift Shop
    • Value Shop
    • Store
    • Bargain Shop
    • Discount
  • Sports
  • Tech
  • Travel
  • USA
    TX Rep. Brandon Gill Mocks James Talarico Over Fauci Action Figure Post

    TX Rep. Brandon Gill Mocks James Talarico Over Fauci Action Figure Post

    NBA players are ‘being taught’ to flop

    NBA players are ‘being taught’ to flop

    Industry was warned for years about chemical ‘runaway’ dangers. Then came near-catastrophe in O.C.

    Industry was warned for years about chemical ‘runaway’ dangers. Then came near-catastrophe in O.C.

    Trump administration seeks government-wide NDAs to stop leaks : NPR

    Trump administration seeks government-wide NDAs to stop leaks : NPR

    Dog discharges shotgun inside truck, striking woman at Nebraska traffic light

    Dog discharges shotgun inside truck, striking woman at Nebraska traffic light

    Toshifumi Suzuki, Japan’s ‘God’ of Convenience Stores, Dies at 93

    Toshifumi Suzuki, Japan’s ‘God’ of Convenience Stores, Dies at 93

     Judge Sanctioned CoreCivic for Destroying Video in ICE Death Suit

     Judge Sanctioned CoreCivic for Destroying Video in ICE Death Suit

    Suspect dead after opening fire near White House security checkpoint, Secret Service says

    Suspect dead after opening fire near White House security checkpoint, Secret Service says

    Trump trashes Colbert’s high-rated finale as “no ratings”

    Trump trashes Colbert’s high-rated finale as “no ratings”

  • Video
  • World
    • Asia
    • Africa
    • South America
    • North America
    • Europe
    • Oceania
The Insight Post
  • Home
  • Insight
  • Blog
  • Business
  • Entertainment
  • Health
  • Politics
  • Shop
    • Gift Shop
    • Value Shop
    • Store
    • Bargain Shop
    • Discount
  • Sports
  • Tech
  • Travel
  • USA
    TX Rep. Brandon Gill Mocks James Talarico Over Fauci Action Figure Post

    TX Rep. Brandon Gill Mocks James Talarico Over Fauci Action Figure Post

    NBA players are ‘being taught’ to flop

    NBA players are ‘being taught’ to flop

    Industry was warned for years about chemical ‘runaway’ dangers. Then came near-catastrophe in O.C.

    Industry was warned for years about chemical ‘runaway’ dangers. Then came near-catastrophe in O.C.

    Trump administration seeks government-wide NDAs to stop leaks : NPR

    Trump administration seeks government-wide NDAs to stop leaks : NPR

    Dog discharges shotgun inside truck, striking woman at Nebraska traffic light

    Dog discharges shotgun inside truck, striking woman at Nebraska traffic light

    Toshifumi Suzuki, Japan’s ‘God’ of Convenience Stores, Dies at 93

    Toshifumi Suzuki, Japan’s ‘God’ of Convenience Stores, Dies at 93

     Judge Sanctioned CoreCivic for Destroying Video in ICE Death Suit

     Judge Sanctioned CoreCivic for Destroying Video in ICE Death Suit

    Suspect dead after opening fire near White House security checkpoint, Secret Service says

    Suspect dead after opening fire near White House security checkpoint, Secret Service says

    Trump trashes Colbert’s high-rated finale as “no ratings”

    Trump trashes Colbert’s high-rated finale as “no ratings”

  • Video
  • World
    • Asia
    • Africa
    • South America
    • North America
    • Europe
    • Oceania
No Result
View All Result
No Result
View All Result
Home Mobile

Build and Publish iOS Apps with Codemagic CLI Tools

by Theinsightpost
August 6, 2022
in Mobile
0 0
0
Build and Publish iOS Apps with Codemagic CLI Tools


Written by Chris Raastad

Any iOS developer can tell you that code signing and publishing are one of the toughest parts of their job. Flutter can make writing iOS apps a lot easier, but still can’t ease the pain of deployment. It seems like every time you open Xcode and hit build archive something goes wrong, whether it’s a certificate not on the right keychain or some provisioning profile out of place. What if I showed you a way to build, package, and distribute your app to TestFlight without opening XCode?

Meet Codemagic CLI Tools, the magic powering mobile app builds at Codemagic CI/CD. In this article I’ll show you how to build, code sign, and publish a Flutter app to App Store Connect without opening Xcode. You can even use these commands on another CI/CD provider to automate your deployments.

If you’re not using Codemagic yet, then sign up now:

Sign up

Preparations

  • Of course, you’ll need a Flutter application. If you need to create one, follow the getting started guide to install Flutter. Then you can create a new Flutter project by running in a terminal:
flutter create --org COM.YOUR.ORG my_flutter_app
  • It’s really important you have a unique org and app name so that you can create a matching bundle ID and application in App Store Connect.
  • You will need to enroll in the Apple Developer Program to build and publish iOS applications.

  • You will need to create an App ID identifier for an App with a Bundle ID matching the new Flutter project. For org com.craastad and the example above, the Bundle ID would be com.craastad.myFlutterApp.

  • You will need to create a new App Store Connect App for the platform iOS, with the Bundle ID of the last step, and with the Bundle ID as the SKU.

  • You will need App Store Connect API Key. You can follow the steps in Creating an API Key for Codemagic to create a key with App Manager access. You will need the Issuer ID, Key ID, and the downloaded .p8 file.

  • You need to export or create an iOS Distribution certificate to code sign and package a build archive. If you have an existing certificate, you can export the private keys by executing:

openssl pkcs12 -in <certificate_name>.p12 -nodes -nocerts | openssl rsa -out cert_key
  • Or you can create a new private key by executing:
ssh-keygen -t rsa -b 2048 -m PEM -f cert_key -q -N ""
  • Later, you can have CLI tools automatically create a new iOS Distribution certificate from the private key.
  • You’ll need to install Python 3 on the machine, this is as simple as brew install python and checking that python3 --version executes successfully.

  • And finally, install the Codemagic CLI Tools by executing:

pip3 install codemagic-cli-tools -U

Code signing and deployment

This step covers creating a build archive and uploading your build to App Store Connect using Flutter build commands and Codemagic CLI Tools executed in a terminal in the Flutter project directory. This allows you to create a build archive with full control of distribution certificates in a temporary keychain isolated from your login keychain.

  • To make CLI tools commands more precise, export the following variables:
export APP_STORE_CONNECT_ISSUER_ID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
export APP_STORE_CONNECT_KEY_IDENTIFIER=ABC1234567
export APP_STORE_CONNECT_PRIVATE_KEY=@file:/path/to/api/key/AuthKey_XXXYYYZZZ.p8
  • Set up a new temporary keychain to be used for code signing:

WARNING: Restore Login Keychain!

After running keychain initialize you must execute:

This sets your login keychain back to the default to avoid potential authentication issues with apps on your machine.

  • Fetch the code signing files from App Store Connect:
app-store-connect fetch-signing-files YOUR.APP.BUNDLE_ID 
    --type IOS_APP_STORE 
    --certificate-key=@file:/path/to/cert_key 
    --create
  • Where cert_key is either your exported iOS Distribution certificate private key or a new private key which automatically generates a new certificate. The certificate will be created from the private key if it doesn’t exist in App Store Connect.
  • Now add the fetched certificates to your keychain:
keychain add-certificates
  • Update the Xcode project settings to use fetched code signing profiles:
xcode-project use-profiles
  • Install Flutter dependencies:
  • Install CocoaPods dependencies:
find . -name "Podfile" -execdir pod install ;
  • Build the Flutter iOS project:
flutter build ipa --release 
    --export-options-plist=/Users/USERNAME/export_options.plist
  • Note that export_options.plist is the output of the xcode-project use-profiles command.
  • Publish the app to App Store Connect:
APP_FILE=$(find $(pwd) -name "*.ipa")
app-store-connect publish 
    --path "$APP_FILE"

As mentioned earlier, don’t forget to set your login keychain as the default to avoid authentication issues with apps on your machine:

That’s it! You should receive an email within 30 minutes notifying you that your build has been validated and is available to release to testers on TestFlight. At this point you can choose whether to release to testers on TestFlight or to the App Store. These steps can be repeated with any CI/CD provider that can run builds on a macOS build machine.

For a seamless experience building and deploying Flutter apps, check out Codemagic, the fastest platform for building mobile apps.



Source link

ShareTweetSend
Previous Post

Kenya Election | National News

Next Post

Unacceptably high inflation led to 50 bps rate hike; expect measured policy moves from now: Das

Related News

Announcing Codemagic Patch: an open-source CodePush rebuild for React Native
Mobile

Announcing Codemagic Patch: an open-source CodePush rebuild for React Native

July 30, 2026
React Native OTA Updates: What You Can (and Can’t) Deploy Over the Air
Mobile

React Native OTA Updates: What You Can (and Can’t) Deploy Over the Air

May 28, 2026
Your phone drawer hides an app designed to “exploit developing brains”
Mobile

Your phone drawer hides an app designed to “exploit developing brains”

May 27, 2026
iPhone 16 has a secret charging upgrade Apple didn’t even mention
Mobile

iPhone 16 has a secret charging upgrade Apple didn’t even mention

May 26, 2026
Next Post
Unacceptably high inflation led to 50 bps rate hike; expect measured policy moves from now: Das

Unacceptably high inflation led to 50 bps rate hike; expect measured policy moves from now: Das

Discussion about this post

Subscribe To Our Newsletters

    Customer Support


    1251 Wilcrest Drive
    Houston, Texas
    77042 USA
    Call-832.795.1420
    e-mail – news@theinsightpost.com

    Subscribe To Our Newsletters

      Categories

      • Africa
      • Africa-East
      • African Sports
      • American Sports
      • Arts
      • Asia
      • Australia
      • Business
      • Business Asia
      • Business- Africa
      • Canada
      • Defense
      • Education
      • Egypt
      • Energy
      • Entertainment
      • Europe
      • European Soccer
      • Finance
      • Germany
      • Ghana
      • Health
      • Insight
      • International
      • Investing
      • Japan
      • Latest Headlines
      • Life & Living
      • Markets
      • Mobile
      • Movies
      • New Zealand
      • Nigeria
      • Politics
      • Scholarships
      • Science
      • South Africa
      • South America
      • Sports
      • Tech
      • Travel
      • UK
      • USA
      • Weather
      • World
      No Result
      View All Result

      Recent News

      US Navy to overhaul torpedo stockpile under new two-war strategy

      US Navy to overhaul torpedo stockpile under new two-war strategy

      July 30, 2026
      Free Cloud Computing Course | AWS Re/Start Program 

      Free Cloud Computing Course | AWS Re/Start Program 

      July 30, 2026
      Thirty Years Later

      Thirty Years Later

      July 30, 2026
      Announcing Codemagic Patch: an open-source CodePush rebuild for React Native

      Announcing Codemagic Patch: an open-source CodePush rebuild for React Native

      July 30, 2026
      • Home
      • Advertise With Us
      • About Us
      • Corporate
      • Consumer Rewards
      • Forum
      • Privacy Policy
      • Social Trends

      Theinsightpost ©2026 | All Rights Reserved. Theinsightpost is an Elnegy LLC company, registered in Texas, USA

      Welcome Back!

      Login to your account below

      Forgotten Password?

      Retrieve your password

      Please enter your username or email address to reset your password.

      Log In

      Add New Playlist

      We are using cookies to give you the best experience on our website.

      You can find out more about which cookies we are using or switch them off in .

      No Result
      View All Result
      • Home
      • Insight
      • Blog
      • Business
      • Entertainment
      • Health
      • Politics
      • Shop
        • Gift Shop
        • Value Shop
        • Store
        • Bargain Shop
        • Discount
      • Sports
      • Tech
      • Travel
      • USA
      • Video
      • World
        • Asia
        • Africa
        • South America
        • North America
        • Europe
        • Oceania

      Theinsightpost ©2026 | All Rights Reserved. Theinsightpost is an Elnegy LLC company, registered in Texas, USA

      The Insight Post
      Powered by  GDPR Cookie Compliance
      Privacy Overview

      This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

      Strictly Necessary Cookies

      Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

      Cookie Policy

      More information about our Cookie Policy