Image for post
Image for post


In the current world, we have developed many things for securing our stuff. Now, AppLock becomes a common feature in every application.

The simplest solution we can provide for user security is to give the App Lock functionality.

In this post, we are going to learn how to implement the App Lock with Bio-metric (Face ID / Touch ID) feature in SwiftUI 2.0

I’ve listed out the steps to develop the app lock feature,

  1. Adding NSFaceIDUsageDescription key in info.plist file
  2. View Model Implementation
  3. EnvironmentObject injection in App struct
  4. Views implementation — Lock View & Home View

Let’s start 🏁

Image for post
Image for post

Greetings. 🙏

In today’s app development, we do a lot of stuff with APIs AKA Network calls in the application. We normally do the network calls with Apple’s `URLSessions` or other third party libraries like `Alamofire`. In this post, we are going to see how we can abstract the networking layer by creating a generic API manager with the help of Apple’s Combine Framework.

Pre-requisites: Basic understanding of Combine. Knowledge on Publishers, Subscribers, Operators. Refer this

Let’s get started…🏁

For this article, I’m going to fetch user details using API. This is a simple project which just does a…

Image for post
Image for post
Typical Home Screen Quick Actions

Home Screen Quick Actions are introduced in iOS 12. A shortcut buttons which navigates the user to a specific place in the application. Nowadays many apps are coming with this Quick Actions. In this post, we are going to learn how can we implement the “Home Screen Quick Actions” in SwiftUI App Life Cycle (2020).

Let’s Start

  1. Static
  2. Dynamic

Static quick actions are defined on the build time. Static actions are never changing actions. It is defined in the project’s Info.plist file.

Right-click on Info.plist file → Open As → Source Code. Then, add below lines.


As you can…

Image for post
Image for post

New iPadOS 14 has this beautiful layout. In this structure, we can split the iPad screen into three Views.

  1. SidebarView
  2. PrimaryView
  3. DetailView

Previously, we are having the Master and Detail View concept. But in this article, we are going to learn how to develop a three-sectioned iPad layout design in SwiftUI 2.0.

This complete project was developed in Xcode-12.0.1. Make sure you are using Xcode 12 or above.

I have listed down some Movies and some TV shows to demonstrate the layout. The first view will contain the main menus of the Application.

In my case, I have Movies and…

Today's life mobile cameras are playing a very important role in almost every application. Some examples are Updating profile Pics, Sending Photos, Scanning PDFs, etc. So, for an iOS developer, it is very basic to know how to integrate the camera with an iOS app.

Let’s learn how to integrate Camera in an iOS app.

As there is no native SwiftUI method to open Camera, we are going to use UIKit’s UIImagePickerController and wraps it in UIViewControllerRepresentable struct. Then we can use that struct as SwiftUI view.

Note: Camera only works on a real iOS device.

The process has 4…

Image for post
Image for post

We know that every element in SwiftUI is a View. A modifier is used to change the behaviour of the View. Let’s see this with an example,

Button(action: {
print("Submit clicked")
.padding(.horizontal, 30)
.shadow(color: .red, radius: 10, x: 0, y: 5)

We have created a button view and it looks like below,

Tip 1:

Always apply .background() after setting .padding()

Here is an example,

.padding(.horizontal, 40)
.padding(.vertical, 20)

For the above snippet, I’ll get something like below

Image for post
Image for post

Same thing if we apply the tip,

.padding(.horizontal, 40)
.padding(.vertical, 20)

we will get,

Image for post
Image for post
share sheet — iOS

On many scenarios, We have used this share sheets in iPhone. Mostly,

  1. Airdrop something to a nearby person.
  2. Send something via iMessage, Whatsapp or Mail.

How to achieve this in SwiftUI? Let’s learn this 👨‍💻

To create a Share sheet we have to do 3 simple steps,

  1. Get the data you want to share
  2. Create a UIActivityViewController object and attach the data with this
  3. Present the UIActivityViewController

guard let data = URL(string: “") else { return }

Here, we have created an URL. This is the data we are going to share using the share sheet.

let av = UIActivityViewController(activityItems…

QR codes -> Quick Response codes are used to store a text in an image. Normally we have seen this kinda codes in shopping malls, online stores, and many more places. Nowadays, we are scanning some weird square box shape in mobile camera for UPI transactions in many places. Those box shapes are nothing but this QR codes only.

Let’s look at how we can create our own QR codes in iOS, SwiftUI.

In order to create QR code, we need to follow below steps,

  1. Get the Text(String) which you want to create as a QR code
  2. Convert the Text

We all have the Take screenshot on Test failure in our framework. But sometimes the screenshot will not help us. We are like OMG why this test is failing state.

For those, this post will really helpful. We can record the whole test execution as a video with low resolution.

Prerequisite: Please install ffmpeg (brew install FFmpeg)

Start Recording the video


the above command will simply start the recording with default record options. We can add video quality, fps, time limit, video type, etc.,

Below is the sample code for adding medium video quality for iOS

driver.startRecordingScreen(new IOSStartScreenRecordingOptions().withVideoQuality(IOSStartScreenRecordingOptions.VideoQuality.MEDIUM));
driver.startRecordingScreen(new AndroidStartScreenRecordingOptions()....);

Stop Recording the video


Jeeva Tamilselvan

Automation QA Engineer by profession. Learning iOS Development.

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