CD is becoming part of mandate for iOS Apps Release process. Here I am going to explain — How to setup Jenkins Job for uploading iOS Apps on App Store.

Pre-Requiste

Add one plist file at root of your project folder — ExportOptions.plist — This file is required for AppStore Connect Details of project.
Generate App Specific Password for your App Store Account — for Application Loader
Distribution Certificates & Provisioning profiles are already installed on Jenkins Runner Machine.

Jenkins Job SetUp —

Aborting Job in case error occurs at any stage of job — add below line as first line of your…


Every iOS app communicates with some back end server to sync data.Swift itself has very well defined set of classes for this purpose — URLSession. There has been several other tools too available which are being used frequently and provide additional wrappers, like Alamofire.

In this story, I am mainly going to discuss- such a Network Client which can have any tool (URL Session, Alamofire etc) for API call and provides additional support for frequent challanges developers face in consumption of those and they have to write up extra code for that —

  • Interceptors — Interceptors are a powerful mechanism…

iOS Apps need to handle launch of different features in below scenarios -

  1. In App Routing — Routing based on various events in App
  2. Universal URLs / URL Schemes — WebPages / SMS (Messages) / Browser / Notes etc
  3. Push Notifications
  4. Shortcuts / Quick Actions
  5. Maintaining User Auth Flow, if user has not logged in

Universal Links / URL Schemes -

App should be launched from any url, which is adhered by app, and open up required feature screen to perform quick actions.

URLs can be from SMS, Email, Chat Messages, Safari browser etc. — when user tap on any link — then app will be launched

There are two ways to support this -

  • URL Schemes -
  • These are specific to OS viz iOS or Android.
  • If…


Localization is present in most of the iOS apps now a days. In this story, I am going to cover specific scenario where —

  • App has “Localization” option in itself
  • And App Content should be updated instantly without asking user to Re-Launch manually
  • If you are developing a framework and want to allow app developers to override strings used in framework

We will be using Swizzling for this.

Lets start with LocaleHelper class first.

Download LocaleHelper from GitHub

Add this class into your project and move to AppDelegate class. Add below code in “func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey…


XCode 11 & above

In this story, we’ll cover up Project Templates. For basics & File Templates please go through last story XCode Templates — Part 1.

Refer Sample Templates in my Git Repo — xcode-templates

While setting up projects, we do most of repeatitive steps like —

  • Project without StoryBoards
  • Localization SetUp
  • Multi Schemes — DEV, UAT, PROD
  • Crashlytics SetUp
  • Git Ignore SetUp
  • CI SetUp
  • CocoaPod SetUp
  • Unit & UI Tests SetUp
  • Theme SetUp
  • Configurations

All this above can be put inside a Project Template and next time when you will create New Project, all will be ready to…


XCode 11 & above

We, as a developer, should follow defined practices while developing features in a project or create a new project. Every dev team has their own defined coding guidelines and utility classes / methods. There is always some common steps / code, which keeps on getting repeated across different features / projects. Additionally, its must to remember all those to comply with development guidelines.

XCode Templates comes as a rescue for us and help us in automating guidelines at the time of setup.

Refer Sample Templates in my Git Repo — xcode-templates

Templates are very useful in…


XCode 11 & above

Static Code Analysis tool — SONAR — is being used by Organisations for tracking Code Reliability, Security, Maintainability & Technical Debt. We have Code Coverage synced on SONAr as well.

For iOS Projects, we can have this sync working by following below steps -

  • Download SONAR SCANNER at machine
  • Create sonar-project.properties file and place that at project root
  • Add below key-values in properties file -
sonar.host.url= 
sonar.links.ci=
sonar.links.scm=
sonar.projectVersion=1.0.0
sonar.sources=Pretups
sonar.cfamily.build-wrapper-output.bypass=true
sonar.projectName=
sonar.projectKey=
sonar.exclusions=Pods/**,**/Assets/**
  • Open Terminal & change directory to your project
  • Execute below command
bash $HOME/Documents/Sonar/sonar*/bin/sonar-scanner

You are DONE!! you can now check your SONAR…


We have covered SetUp of CI in gitlab along with Build & Test jobs in my medium story “Continuous Integration — GitLab — iOS — Part 1”. Go through this for all preliminary details.

In this story we’ll cover up Lint & SONAR (Static Code Analysis) integration in CI pipelines.

Its always best practices to lint code before taking up Merge Requests. Linting can also be automated via GitLab Pipeline and Reviewer / Developer both are always sure that code pushed is not having any lint issues.

In general, we use SwiftLint in iOS Projects for linting. SwiftLint YML file…


We all talk to follow Swift Style & Conventions, and we have an impactful tool available for us — SwiftLint. I’ll not talk about more here on how to setup and use this tool in our project. For all these details you can go through their GitHub Page and refer.

I’ll focus here mainly on —

  • Enforce that all default set of SwiftLint rules are marked as errors
  • Adding own custom rules to streamline best practices as per defined organisation level structure
  • Integration to CI

Let’s start with first thing first.

SwiftLint has added various rules, as default, in their…


CI — Continuous Integration — is a must have now a days for the teams working on Shared Code Repositories viz GitHub / GitLab. Its time consuming for developers to validate all flows after each change. Here comes the CI to help us.

CI is a process which automates the process of build and test against each git push (defined steps). We can use CI to validate below-

  • Build
  • Unit Tests
  • UI Tests
  • Lint
  • Static Code Analysis (eg SONAR)

In this story I am going to explain how to achieve this for GitLab code repositories

Lets start with basic terminology…

Rakesh Chander

I design modular development & templates for better coding practices, robustness, scaling & reusability for development inline with automation.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store