• 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
Saturday, September 19, 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

    MS NOW, CNN, Politico reporters barred from White House after Trump announces ban

    Trump and GOP Will Face a ‘Reckoning’ this November

    Bo Bichette’s willingness to change positions could reshape Mets’ infield

    Heavy snow is crucial to recharge state’s groundwater, study finds

    This Arizona medical examiner is tracking heat-related deaths : NPR

    South Florida woman accused of drugging man at club to steal Rolex

    Trump Approves $2.8 Billion Arms Sale to Israel, Including 40,000 One-Ton Bombs

    Tech CEOs’ Doomsaying Is a Distraction from Real, Existing Harms of AI

    J.D. Vance warns that Big Tech’s plea for federal regulation may be a ‘Trojan horse’

  • 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

    MS NOW, CNN, Politico reporters barred from White House after Trump announces ban

    Trump and GOP Will Face a ‘Reckoning’ this November

    Bo Bichette’s willingness to change positions could reshape Mets’ infield

    Heavy snow is crucial to recharge state’s groundwater, study finds

    This Arizona medical examiner is tracking heat-related deaths : NPR

    South Florida woman accused of drugging man at club to steal Rolex

    Trump Approves $2.8 Billion Arms Sale to Israel, Including 40,000 One-Ton Bombs

    Tech CEOs’ Doomsaying Is a Distraction from Real, Existing Harms of AI

    J.D. Vance warns that Big Tech’s plea for federal regulation may be a ‘Trojan horse’

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

Continuous Integration and Delivery (CI/CD) for Ionic apps

by Theinsightpost
August 9, 2022
in Mobile
0 0
0
Continuous Integration and Delivery (CI/CD) for Ionic apps


This is a getting started guide to build Ionic apps with Codemagic CI/CD tool. Written by Sneh Pandya (updated June 2021)

According to the developer survey conducted in 2020 by the official Ionic team, a striking 86% of developers in the cross-platform mobile development space continued using Ionic to develop their apps. Even more surprisingly, over 75% of all these developers are web developers. The bigger takeaway is that business executives and developers have responded that mobile frameworks like Ionic can, in fact, provide stellar app experiences across platforms.

With this, it becomes even more important to have seamless integration to automate your apps. In this article, we will set up the building, testing and distribution of Ionic apps with Codemagic.

It is recommended to go through the article for a better understanding, but if you already have experience with using the codemagic.yaml file, you can get the YAML templates for the Ionic project here.

Continuous integration and delivery for Ionic AppsGet started

Getting started: Continuous Integration and Delivery for Ionic apps

This article is written specific to Ionic CLI version 6.14.1 stable release and Ionic Core version 5.6.6 stable release.

To start, you will need to have your current Ionic project hosted on a code repository platform, like GitHub, GitLab or Bitbucket, using a version control system. Then, proceed with the steps below to set up and download the codemagic.yaml file for your project.

  1. Log in or sign up to Codemagic using your preferred method, either via email or via a version control platform where your project is hosted as a repository.

Sign up

  1. Once on the Codemagic dashboard, you need to connect the repository which you want to set up CI/CD for. Click on Add application to connect your repository with Codemagic.

  2. You will be prompted to choose your preferred version control system. Click on Next: Authorize integration to provide Codemagic CI/CD with authorized access to your version control system.

  1. Once the authorization is completed successfully, go to Codemagic dashboard and you will find the project that you chose to set up CI/CD has been added successfully. Now, click on Set up build.

  2. Select Ionic App as the app starter workflow.

  1. Download the YAML template for the Ionic project by clicking the download button.

  1. Now, open the codemagic.yaml file using your preferred code editor. The file contents will look like this:
# Check out https://docs.codemagic.io/getting-started/building-an-ionic-app/ for more information
# Please review and update values in curly braces
# Remove or comment out the workflows you don't require

workflows:
    # Ionic Capacitor workflows
    ionic-capacitor-ios-app:
        name: Ionic App
        environment:
            vars:
                XCODE_WORKSPACE: "ios/App/IonicApp.xcworkspace" # <- 'IonicApp' is the default workspace name for Capacitor projects
                XCODE_SCHEME: "IonicApp" # <- 'IonicApp' is the default Scheme name for Capacitor projects
            node: latest
        scripts:
            - npm install     
            - npx cap sync
            - |
                # build iOS
                cd platforms/ios
                pod install
                xcodebuild build -workspace "$XCODE_WORKSPACE" -scheme "$XCODE_SCHEME" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO                
        artifacts:
            - $HOME/Library/Developer/Xcode/DerivedData/**/Build/**/*.app
            - $HOME/Library/Developer/Xcode/DerivedData/**/Build/**/*.dSYM
    ionic-capacitor-android-app:
        name: Ionic App
        environment:
            node: latest
        scripts:
            - npm install     
            - npx cap sync
            - |
                # build Android
                cd android
                ./gradlew assembleDebug                
        artifacts:
            - android/app/build/outputs/**/*.apk
    # Ionic Cordova workflows
    ionic-cordova-ios-app:
        name: Ionic Cordova iOS App
        environment:
            vars:
                XCODE_WORKSPACE: "{{ ADD WORKSPACE NAME HERE }}"
                XCODE_SCHEME: "{{ ADD SCHEME NAME HERE }}"
            node: latest
        scripts: 
            - |
                # install dependencies and update to Cordova version 9
                npm install
                cvm install 9.0.0
                cvm use 9.0.0                
            - |
                # Setup Cordova iOS platform
                ionic cordova platform remove ios --nosave
                ionic cordova platform add ios --confirm --no-interactive --noresources                
            - |
                # build iOS
                cd platforms/ios
                pod install
                xcodebuild build -workspace "$XCODE_WORKSPACE" -scheme "$XCODE_SCHEME" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO                
        artifacts:
            - $HOME/Library/Developer/Xcode/DerivedData/**/Build/**/*.app
            - $HOME/Library/Developer/Xcode/DerivedData/**/Build/**/*.dSYM
    ionic-cordova-android-app:
        name: Ionic Cordova Android App
        environment:
            node: latest
        scripts: 
            - |
                # install dependencies and update to Cordova version 9
                npm install
                cvm install 9.0.0
                cvm use 9.0.0                
            - |
                # Setup Cordova Android platform
                ionic cordova platform remove android --nosave
                ionic cordova platform add android --confirm --no-interactive --noresources                
            - |
                # Build Android Cordova App
                script: ionic cordova build android --debug --no-interactive --device                
        artifacts:
            - platforms/android/app/build/outputs/**/*.apk
  1. Click on Webhooks section to set up webhook for your application. A webhook is required for automatic build triggering.

  1. Click on Update webhook and then copy the URL. You need to declare the copied URL as payload URL in your application.

  2. Once the webhook URL is copied, follow the steps according to the version control system you’ve connected with Codemagic and follow the steps as specified in the Codemagic documentation for setting up webhooks.

  3. Once the webhook is successfully configured, you will be able to trigger automated builds when the code is pushed to your version control system.

Default YAML configuration

There are two types of workflows specified for Ionic in the YAML configuration file: Capacitor and Cordova. The iOS Cordova workflow specified in the YAML file will require an Xcode workspace name and an Xcode scheme. You will need to specify them in the YAML file under environment variables.

In order to generate the .ipa file for iOS, you will need to set up code signing. Android does not require any specific setup steps to generate apk builds.

How to code sign Ionic apps for iOS

To set up code signing for iOS, you will need two different configuration files:

  • Certificate

  • iOS provisioning profile

To publish your app on App Store Connect, you will need an iOS Distribution Certificate. If you only want to generate the ipa build file for iOS, then an iOS Development Certificate also works.

To download the required configuration files, follow the steps below:

  1. Open Xcode.

  2. Go to Xcode → Preferences from the top navigation bar.

  3. From the top of the window, navigate to the Accounts section.

  4. Now, select the Team under your Apple ID for which you want to download the certificate.

  5. Click on Manage Certificates.

  6. Right-click the Development Certificate and select Export Certificate. Enter your credentials and save the certificate.

  7. To generate the provisioning profile, click Download Manual Profiles. This will save the provisioning profile in the directory ~/Library/MobileDevice/Provisioning Profiles/.

Now you are ready to upload the files on Codemagic and proceed to the next steps.

Understanding YAML for Ionic apps

Let’s talk about codemagic.yaml for Ionic projects. The default YAML script consists of two different workflows: Capacitor workflow and Cordova workflow. Both of the workflows include configurations for both Android and iOS. You should remove or comment out the workflow that you don’t require.

Adding environment variables

We need to add the credentials in encrypted form in the environment variables section of the codemagic.yaml file. These environment variables will be used to generate Android and iOS builds.

Android environment variables for release APK generation and Google Play Store automated publishing:

  • CM_KEYSTORE: keystore file in encrypted format

  • CM_KEYSTORE_PASSWORD: keystore password in encrypted format

  • CM_KEY_PASSWORD: keystore alias password in encrypted format

  • CM_KEY_ALIAS: keystore alias username in encrypted format

  • credentials: JSON key file for Google Play service account in encrypted format

iOS environment variables for automatic code signing and App Store Connect publishing:

  • APP_STORE_CONNECT_ISSUER_ID: App Store Connect Issuer ID

  • APP_STORE_CONNECT_KEY_IDENTIFIER: App Store Connect key identifier

  • APP_STORE_CONNECT_PRIVATE_KEY: App Store Connect private key

  • CERTIFICATE_PRIVATE_KEY: Certificate private key

  • password: App Store Connect app-specific password in encrypted format

You can find more information on this here and here.

You can generate the encrypted versions of these files/variables by following these steps:

  1. Go to the project settings.

  2. You will find the notebook icon, click on the icon. It will open a list of links to useful guides for project setup.

  1. Click on lock icon which will open Encrypt environment variables.

  2. Upload the files or enter the variables to generate the encrypted versions of each.

Testing Ionic apps

To run the tests for your Android and iOS builds, you need to modify your script accordingly, as shown below. The code for testing an Ionic project also goes under the scripts section:

- name: iOS test
    script: |
    xcode-project run-tests 
        --workspace "$XCODE_WORKSPACE" 
        --scheme "$XCODE_SCHEME" 
        --device "iPhone 11"
    test_report: build/ios/test/*.xml    

- name: Android test
  script: ./gradlew test
  test_report: app/build/test-results/**/*.xml

Collecting artifacts

All generated artifacts are stored on the path specified in the script. All of these artifacts can be published to external services. The currently available integrations are email, Slack and Google Play. It is also possible to publish elsewhere with custom scripts (e.g., Firebase App Distribution). More examples for publishing scripts can be found here.

Publishing

All Android applications need to be signed before release. To learn about Gradle code signing configuration for Ionic Capacitor apps, refer to the Android code signing documentation. If you are building Ionic Cordova Android apps, the configuration is included in the workflow itself.

Likewise, all iOS applications need to be signed before release. To learn about iOS code signing configuration, refer to the iOS code signing documentation.

Building Ionic apps on Codemagic

Before starting a build on Codemagic, make sure that you have the codemagic.yaml file committed in the same project at the root level via the version control system.

To start the build, follow the steps below:

  1. In the application settings for your Ionic project, click Check for configuration file.

  2. Click Start your first build to start building your Android and iOS apps from the Ionic project.

  1. Select the workflow from the codemagic.yaml file, and click Start new build.

This will start a new build for your project and take you to the build processing page.

Once the build is completed, you can download artifacts as well as get your app published if you have configured automated publishing in codemagic.yaml file.

Conclusion

With the combination of a cross-platform mobile application development framework and a continuous integration and delivery solution like Codemagic, it is seamless to build, test and deploy apps using Ionic framework. Also, using codemagic.yaml removes the hassle of repeatedly performing tedious steps. You can manage your own workflows and trigger builds whenever you wish to, including new pushes on the version control system.

Do you like building Ionic apps with Codemagic CI/CD tool? Was this getting started guide helpful? Let us know HERE.

Useful links and references


​
Sneh is a Senior Product Manager based in Baroda. He is a community organizer at Google Developers Group and co-host of NinjaTalks podcast. His passion for building meaningful products inspires him to write blogs, speak at conferences and mentor different talents.
You can reach out to him over Twitter (@SnehPandya18) or via email (sneh.pandya1@gmail.com).





Source link

ShareTweetSend
Previous Post

Kenya’s new vehicle exports rise 55 percent in half-year

Next Post

Zelenskyy says ‘we will return’ to Crimea after blasts rock Russian base – POLITICO

Related News

Mobile

Fingers crossed: two cool new Google Photos features may soon be yours

September 19, 2026
Mobile

I might downgrade from my AirPods Pro 2 to the AirPods 4

September 18, 2026
Mobile

For China, a Mock A.I. Attack on WeChat Signals a Dangerous New Era

September 18, 2026
Mobile

Leverage Android skills and Gemma 4 in Android Studio Quail 4

September 17, 2026
Next Post
Zelenskyy says ‘we will return’ to Crimea after blasts rock Russian base – POLITICO

Zelenskyy says ‘we will return’ to Crimea after blasts rock Russian base – POLITICO

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

      RayNeo’s latest smart glasses cut the price and deliver substantial upgrades

      September 19, 2026

      ‘My total balance should be $20 million’: I invested $1.1 million in a crypto platform. Have I lost it all?

      September 19, 2026

      harnessing German industry for NATO defence

      September 19, 2026

      Zillow issues WAKE-UP CALL. (it’s the most severe debt crisis in 19 years)

      September 19, 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