Categories:
Loading... Search articles

Search for articles

Sorry, but we couldn't find any matches...

But perhaps we can interest you in one of our more popular articles?
9 reasons to use Codemagic CI/CD tool for React Native apps in 2021

9 reasons to use Codemagic CI/CD tool for React Native apps in 2021

Mar 27, 2021

Sneh Pandya wrote down the reasons why he is using the Codemagic mobile CI/CD tool for building, testing and publishing React Native mobile apps.

Since its very beginning, React Native’s motto has been “learn once, write anywhere.” Originally developed for Facebook, React Native is a JavaScript-based mobile application framework capable of building fully functional apps on both the Android and iOS platforms in much less time and using a single codebase. This has led React Native to gain popularity among developers over the years.

Codemagic is a popular CI/CD platform that focuses on building and deploying mobile apps with speed and reliability. Codemagic natively supports CI/CD for widely accepted mobile application frameworks, such as Flutter, React Native, Native Android, Native iOS, Ionic and Cordova. Let’s talk about why you should choose Codemagic for building your React Native mobile apps.

1. Manual build process vs automated CI/CD build pipelines

When building mobile apps, the time taken for app development and deployment is a crucial factor. CI/CD enables development teams to deliver app updates more frequently and reliably. CI stands for Continuous Integration, and CD refers to Continuous Delivery or Continuous Deployment, depending on how the team chooses to push code changes to production.

CI runs automated steps to build and test, ensuring reliable code changes are pushed to the code repository. CD provides a quick and seamless method of delivering the code to end users. Codemagic provides industry-leading CI/CD solutions for various mobile application frameworks, including native and cross-platform mobile applications. React Native apps take time to build production artifacts, sometimes even more than 30 minutes, due to the fact that the framework is built on JavaScript, which then communicates with the native layer components via the bridge. Codemagic solves this issue by providing multiple supportive features, such as:

Some of the benefits of CI/CD are as follows:

  • CI/CD provides fast and reliable releases.

  • It results in better visibility across development processes.

  • Bugs can be detected at the early stages of the build process.

  • Feedback loops provide robust and powerful insights.

2. Improved React Native builds

With tailored CI/CD pipelines in place, Codemagic is constantly improving build times for cross-platform mobile apps, such as React Native apps. This is made possible with up-to-date framework updates from the Codemagic team, periodic version and stability updates, compatible integrations and powerful build machines.

Individual iOS and Android workflows specify the steps to be performed, including variants, testing and publishing. Together, the workflows, steps for automated deployment to Google Play Store and App Store Connect, and powerful build machines help you deploy React Native apps 20% faster. Here’s an interesting article on how Mac Pro machines are saving 50% of mobile app build time.

Moreover, Codemagic provides detailed feedback on all the tests and builds performed. The webhooks, such as Slack, are notified if any issues are detected. This allows you to get instant updates and take action whenever necessary. Get started with Codemagic to build your React Native apps.

Bonus: Another huge win is that with Codemagic, you can develop and distribute iOS apps via React Native even if you don’t have access to a Mac! All you need is access to a Linux machine and to set up React Native app building on Codemagic. Here’s a comprehensive guide on how to do this.

3. Plethora of integrations

Codemagic is one of the fastest CI/CD tools out there with completely customizable workflows. Moreover, Codemagic also supports a huge list of external integrations that can be connected and utilized. These integration categories vary from the development frameworks to testing and distribution.

Codemagic integrates with many of the services you already use but can easily be extended and customized to meet the exact needs of your workflow. This can be helpful, especially when you want to achieve a specific workflow action for your React Native apps, such as releasing Android and iOS release artifacts on Google Play Store and App Store, respectively, and also sending a notification in the Slack channel about the release.

With more than 50 integrations and growing, Codemagic provides some of the most widely accepted integrations to speed up development time for React Native apps. Some of these integrations include:

  • App Store Connect and Google Play Distribution: to securely connect with CI/CD workflows and release your apps.

  • Code repository integrations, like Bitbucket, GitHub and GitLab: to access source code and post updates relevant to CI/CD pipelines.

  • Android SDK, iOS SDK and development tools: to seamlessly provide support for building your apps.

  • Development tools, like Docker, Gradle, Xcode, etc.

  • Frameworks, like Xamarin, React Native, Unity, Node.js, Ionic, Flutter (mobile, web, desktop), Cordova, CocoaPods and more.

  • Testing automation frameworks, like Appium, AWS Device Farm, BrowserStack, Detox, Espresso, Selenoid, etc.

  • Static code analysis tools, like SonarQube, Codecov, Coveralls, etc.

  • Notifications and updates via Jira, Slack, Microsoft Teams, Trello, Zapier, email, IFTTT, etc.

These integrations ensure complete coverage for app development, including development of React Native apps. The full list of integrations supported by Codemagic is available here. In case your business use case demands it, you can also submit a special request to Codemagic just by reaching out to them via their contact page.

4. Versatile infrastructure

Codemagic provides different types of Mac and Linux machines.

Codemagic natively uses two types of macOS machines for running builds: Mac mini (macOS standard VM, default) and Mac Pro (macOS premium VM). Specifications for these machines are available here.

Mac Pro machines are only available for teams and users that have billing enabled. See the pricing page for the per-minute rate.

Codemagic offers two types of Linux machines for running builds: Linux standard VM and Linux premium VM. Linux machines support nested virtualization, including Android emulator support with hardware acceleration.

Linux machines do not support macOS-specific software, such as brew and Xcode, and cannot be used to build iOS artifacts. Specifications for these machines are available here. Linux Standard and Premium machines are only available for teams and users that have enabled billing for builds configured with codemagic.yaml. See the pricing page for the per-minute rate.

Codemagic provides state-of-the-art auto-deployment setup for both Android and iOS apps to Google Play Store and App Store Connect. The only step required is one-time configuration and setup to connect the publishing platform with Codemagic. This enables developers to test and release the apps with speed and efficiency.

5. End-to-end security measures

Security is one of the topmost priorities for almost every organization. Any security breaches can result in huge losses to the business as well as to loyal customers. Moreover, they can lead to a loss of reputation and trust. Codemagic takes multiple steps to ensure the security of the systems, source code and all the sensitive information provided by users.

Codemagic has introduced multilayer security measures to protect against data and security breaches. This includes securing the underlying infrastructure responsible for Codemagic CI/CD builds. The infrastructure is entirely secured with SSH, TLS and HTTPS protocols at the networking layer. All data is fully encrypted, and the virtual machines are located in a private network.

To protect source code for apps, including React Native apps, Codemagic connects with version control systems like GitHub, GitLab or Bitbucket, which use OAuth, a security and authentication method that is accepted industry-wide. Once you grant access, the OAuth tokens are securely stored in Codemagic’s database. These tokens can only be used to check out the source code on virtual machines. The source code is not altered in any way unless you have explicitly specified so in the build scripts.

Codemagic allows automated app deployments on Google Play Store and App Store Connect, which involves the use of security measures such as data and credentials, private keys and certificates. This information is extremely sensitive, and Codemagic understands the importance of keeping the data safe. This is why Codemagic enables its users to encrypt sensitive information that is to be used in the configuration steps in the build environment. For security purposes, the credentials are encrypted before uploading and then decrypted at runtime only inside the specific virtual machine running the build.

At the end of each build, the virtual environment is destroyed and rebuilt whenever a new build is triggered using a snapshot, which does not have any references to the app’s source code or sensitive encrypted credentials. All the build data, including the source code for apps, credentials, build artifacts, test reports, etc., is cleared once the build finishes. The only build artifacts that are kept are the ones that are shown in build logs and that are available for download.

Codemagic also allows account creation via an email login that uses a one-time password (active for 10 minutes), OAuth via GitHub, Bitbucket, GitLab and the GitHub app. To add repositories, you can use SSH keys or basic authentication via HTTPS protocol.

More importantly, Codemagic is a service provider to both individuals and businesses and adheres to the EU’s General Data Protection Regulation. You can read their Privacy Policy for more details.

6. Robust documentation

With its suite of product features, popular integrations and bleeding-edge infrastructure, Codemagic also provides in-depth documentation that includes technical details. This includes step-by-step guides, configuration steps, platform-specific changes, getting-started guides, testing and code signing details, and more.

The Codemagic documentation covers steps and details that are helpful to everyone, whether they are just getting started with CI/CD or are already an expert. The documentation includes pre-configured steps and explanations, guides on how to customize build scripts and YAML files, guides on platform-specific testing scripts for all mobile platforms (including React Native), and code signing for the Android and iOS platforms. Moreover, the documentation covers the steps for configuring the workflow editor for cross-platform mobile app frameworks like Flutter.

You can learn how to encrypt sensitive data in the Codemagic environment, manage webhooks and schedule builds.

The knowledge base also describes how to perform some important tasks, such as generating and adding an SSH key, loading Firebase configuration with Codemagic, accessing Google Play APIs and more.

If you are facing any issues, you can check the troubleshooting documentation for common issues or the build-machine-specific details.

7. Pricing

Codemagic provides three pricing plans: Get started, Pay as you go and Business. Codemagic’s pricing is on par with that of its competitors. They also provide excellent features, including shared build machines across all plans and dedicated build machines in the Business plan.

The Get started plan is best suited for beginners and individuals, as it offers 500 build minutes and standard macOS virtual machines. Just sign up and get started – no credit card required! Features include Slack community support, access to all the integrations, automatic builds on pull requests, remote access to the build machines and more.

The Pay-as-you-go plan is the best fit for startups and smaller organizations, as it offers macOS premium virtual machines at just $0.095/minute and $10 per user per month. Of course, it also includes all the features that are part of the Get started plan. You can also define teams and user roles and get access to email and chat support in the Pay-as-you-go plan.

For larger teams and organizations, the Business plan unlocks the full power of the Codemagic platform with three concurrent builds, teams with unlimited users and unlimited macOS premium virtual machines. This plan also allows you to make use of custom Linux images, priority feature requests and OpenID Connect, OAuth2 or SAML for authentication. Unlike the Pay-as-you-go plan, this plan is available on request, and pricing varies based on the use cases, with additional concurrency at $100/month. You can contact the sales team to get a quote and customize your requests. The Business plan is available with a flat 20% discount when purchasing an annual subscription.

Bonus: You can receive $50 in free credits when you create a team and enable billing in the Codemagic dashboard.

Whether you are developing native mobile apps for Android/iOS or creating cross-platform apps with Flutter/React Native, Codemagic offers competitive and flexible pricing options to help you ship your mobile apps into production much faster.

8. Diverse content: Articles, podcasts, ebooks and more

Codemagic is a leading CI/CD provider in the mobile DevOps industry. It is evident that Codemagic provides way more than just the awesome features on their platform. They also offer a large pool of content in their own handwritten articles on various topics. Also, people from the Codemagic community constantly contribute in the form of articles, which are published on the Codemagic blog.

These articles include detailed walkthroughs for setting up various mobile app CI/CD pipelines on Codemagic, as well as how-to guides on topics such as mobile app testing frameworks, how to improve the performance of your mobile apps, comparisons between different cross-platform mobile frameworks and much more. Below are some examples of specific articles that cover various topics:

CI/CD:

React Native:

Flutter:

Native Android/iOS:

Testing:

Comparisons:

The Codemagic team also releases ebooks to share more awesome content throughout the mobile landscape and discuss various perspectives. You can find their latest ebooks on their website. Moreover, the Codemagic YouTube channel is filled with informative videos and hands-on guides on technical topics.

Bonus: The Codemagic team also releases podcast episodes. You can check them out here.

9. Strong global community support

Apart from its robust documentation and plethora of content, Codemagic has its own community on Slack, which is also full of knowledge! You can get almost instant replies and feedback, engage in discussions, ask for help and report any issues you may encounter. The Codemagic team usually responds promptly, and other community members offer quite useful insights too. Join the Codemagic Slack community now.

Conclusion

Codemagic was launched at Flutter Live 2018 in a partnership with Google to provide a first-class CI/CD solution for Flutter. Since then, Codemagic has gained a total of over five years of expertise building world-class CI/CD solutions and is trusted by customers like Toyota, Schneider Electric, Boston Consulting Group, Invoice Ninja, Criton, Qvik and many others.

Whether it be React Native or any other mobile application framework (such as Flutter, Android, iOS, Ionic or Cordova), Codemagic is making a breakthrough in the mobile DevOps space with ever-evolving features, outstanding support, rich content on various topics, robust documentation, an enthusiastic community and industry-accepted security measures. This makes Codemagic the ideal option to proceed with for any of your mobile-app-building requirements.


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).

How did you like this article?

Oops, your feedback wasn't sent

Latest articles

Show more posts