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.
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 —
iOS Apps need to handle launch of different features in below scenarios -
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 -
Localization is present in most of the iOS apps now a days. In this story, I am going to cover specific scenario where —
We will be using Swizzling for this.
Lets start with LocaleHelper class first.
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.
While setting up projects, we do most of repeatitive steps like —
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.
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 -
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/**
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 —
Let’s start with first thing first.
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-
In this story I am going to explain how to achieve this for GitLab code repositories
Lets start with basic terminology…
I design modular development & templates for better coding practices, robustness, scaling & reusability for development inline with automation.