<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dhritiman Saha on Medium]]></title>
        <description><![CDATA[Stories by Dhritiman Saha on Medium]]></description>
        <link>https://medium.com/@dhritimancorp?source=rss-49acc1951bb5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nM3zh7hgZNMMxwiVdF3VwA@2x.jpeg</url>
            <title>Stories by Dhritiman Saha on Medium</title>
            <link>https://medium.com/@dhritimancorp?source=rss-49acc1951bb5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 17:00:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dhritimancorp/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Setup for iOS Continuous Integration with CircleCI]]></title>
            <link>https://medium.com/@dhritimancorp/setup-for-ios-continuous-integration-with-circleci-83ff5d25db48?source=rss-49acc1951bb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/83ff5d25db48</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[circleci]]></category>
            <dc:creator><![CDATA[Dhritiman Saha]]></dc:creator>
            <pubDate>Sat, 18 Mar 2023 02:22:36 GMT</pubDate>
            <atom:updated>2023-03-18T02:22:36.907Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Isf9oyOsVDoqob0zdT0zQA.jpeg" /></figure><p>Hello everyone !!! Hope you are doing fantastic.</p><p>This is my first blog. Feeling excited.</p><p>So I thought, it will be great if I share my experience of setting up the CircleCI for automating iOS projects. So let’s start.</p><h3>What is CircleCI?</h3><p>CircleCI is a CI/CD tool with various benefits used by a huge number of developers in many companies.</p><p>The latest version of CircleCI is version <a href="https://circleci.com/server/changelog/">3.4.5</a>.</p><p>So I think it’s a good time to try it now together with Swift 5.1 and Xcode 14.2.</p><p>Before diving into the topic, let’s recall some of the important key factors related to this topic.</p><p><strong>1 . Continuous Integration:</strong> CI is a practice in which we integrate our codes to a specific branch of a shared repository on daily basis with all other developers, instead of integrating the changes at the end of the development phase.</p><p>Every commit triggers automated tests and builds. Others can review our code and if there is any issue, we can fix it quickly and commit again.</p><p><strong>2 . Continuous Delivery:</strong> Continuous delivery is a process that delivers a reliable release to the chosen environment like staging, production, etc.</p><h3>Let’s link the project to CircleCI</h3><p>Step 1 — First create a project using Xcode named “CICD_DEMO” and check the unit test case option at the beginning.</p><p>Add a simple test case because we are going to check the test case execution by CircleCI shortly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ttRr4yXM1C8eZVFmeFuMUw.png" /></figure><p>Now tap on the edit scheme option and make sure the scheme is set as below. For more information check out the <a href="https://circleci.com/docs/testing-ios/">link</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*viI66FRIVSZ_SjyuWYvbdw.png" /></figure><p>Create a remote repository from the control navigator, which will create a GitHub repository named “CICD_DEMO”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*pfGsS1ldS4a-vRS4LxN_8A.png" /></figure><p>Step 2— Now go to the <a href="https://circleci.com/">CircleCI</a> home page and complete the sign-up process. You can start with the option called “<strong>Start Building for Free</strong>”. Later you can upgrade your plan as per your requirement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H2Efnm3ZJFENMGvbYc2d4g.png" /></figure><p>Step 3— Sign up with your GitHub account. Actually, it is good to link your Github account with CircleCI because by doing this CircleCI get access to your Github repositories, although you can control whether CircleCi can access both public and private repository or only your public ones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iq6Gg089ss-mzeM29k5VAQ.png" /></figure><p>Step 4— After successfully linking CircleCI and GitHub accounts, you will see the list of repositories.</p><p>Step 5— No you have to set up the project which you want to link with CircleCI. Here I have selected the “CICD_DEMO” repo and tapped on the setup project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iJjqPF7Y1eteVHyfAKd_yw.png" /></figure><p>Step 6— You will get a below pop-up and you have to select the last option i.e. “<strong>Fast : Take me to a config.yml template that I can edit</strong>”. It will take you to the config.yml template page with some sample content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*fhoQFMJnShubfzw9s6TyTA.png" /></figure><p>Step 7— Remove all existing content and paste the below one. After that commit and run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*Djgcskcv832k3orfpjTKxQ.png" /></figure><p>Now you will notice that the triggered pipeline is failed. And the reason is Fastlane. Because to automate the process in CircleCI, we have to configure Fastlane first.</p><p>Step 8— Here we will install the fastlane using Gemfile in our local repository. for that open your terminal and type,</p><p>“bundle init” , which will create a Gemfile inside your project directory.</p><p>now execute the “open Gemfile” command and write the following content and save it,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nZU06ZVvawSu9Imd17qJoQ.png" /></figure><p>then execute “bundle update” command, which will create Gemfile.lock file which we have to commit and push to our branch. But before pushing invoke fastlane using the command “bundle exec fastlane”.</p><p>And after successful commit, you will see that a build got triggered automatically in CircleCI and the pipeline has been successfully executed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*Mdq8gH3EUNdb_iVRfpHNGQ.gif" /></figure><h3>Check test case failure in CircleCI</h3><p>To check whether the CircleCI executing the test cases, just do the following changes in your project and push your changes to remote.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o6HFgQm84idVlkXxlWiNVg.png" /></figure><p>Now in CircleCI, you will see that your build got failed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_4kyQQTMd1wYfoTB9fEf0w.png" /></figure><h3>CircleCI with Cocoapods</h3><p>Now, there are many ways to add a dependency to our project, but if we will use cocoa pods, then how will it work in the CircleCI?</p><p>Come !!! let’s see.</p><p>Here we will add SwiftLint using pod installation. For that, we have to create Podfile, add the following pod into Podfile and install pod.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CU3_YjudtLhshng0dijR4A.png" /></figure><p>Also add pod-related commands in the “.circleci.yml” file like below,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qT3d_25TmHpl4N4RJ1oHNg.png" /></figure><p>and push all changes to the remote.</p><p>Now if you see the status of the newly triggered build in CircleCI, you will notice that the build got failed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*C6zdTcNjNOEtu7159dj1Vg.gif" /></figure><p>The reason is, when you will run pod install locally, that means you have CocoaPods installed in your system. But in CircleCI, there is no such case. So for that, we have to provide a way to install CocoaPods on the CircleCI end so that, CircleCI can execute all pod-related commands mentioned in “.circleci.yml” file. For that, we have to add <strong>gem ‘cocoapods’, ‘= 1.12.0’</strong> at the end of Gemfile and push the changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*2MtxU_1hhGtLVywGe7dnUg.png" /></figure><p>Finally, now if you see the status in CircleCI, you will notice that the build got a success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FLIIvs_bbAK-xg6uQ9Stjw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*tF5qzo_OCmgZzulsC1a6-Q.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83ff5d25db48" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>