Preferable Dependency Manager: Swift Package Manager(SPM) or CocoaPods

Recently, while using CocoaPods in my project, I realised the build time was taking longer. This led me to experiment with Swift Package Manager(SPM). So here I am sharing my findings with you based on these six criteria: 1.  Library Support: Even though both CocoaPods and SPM support Objective-C as well as Swift, CocoaPods has extensive support for varied types of libraries that help us in customising the project as per the user requirement. SPM is provided by lesser libraries resulting in fewer options to choose from. 2. Maturity: CocoaPods is a much stable and mature package manager than

Customize native alert view in iOS

Nearly every project/app needs an alert popup. It is an essential UI element to: Provide information/warning to the user before performing any actionHandle user interaction to perform any actionNotify the user on completion of an actionThe default alert popup is very simplistic. Nowadays, we see a unique style and attractive UI in popups rather than showing a classic native/default one. What do you show in a popup? Title, message, image, and action buttons. Isn't it? But if you want to make your custom alert popup, it requires a lot of effort as you need to manage UI

Integrate SwiftUI in the existing project(Storyboard)

In the current era, it is tough to remain stuck in the same way of doing things. Eventually, we all need to learn, transition and evolve. The same goes for technology as well. That doesn't mean we need to rewrite or redesign what we have developed in the past. Instead, we can start implementing new ways in conjunction with the current one, thus making it interoperable. SwiftUI has been a significant change that came in much after storyboards in Xcode. Ever since the announcement, everyone has been inquisitive about playing with SwiftUI. What is SwiftUI? According to the official Apple

Dynamic UIButton Font Size in Swift

In today's fast-paced world, everyone wants the comfort of preferences. With it comes the preference to personalize their devices too. This can be in the form of dark/light mode, wallpaper, ringtone. So do they get the flexibility of adjusting font size suitable to their eyes too? Yes, they get it! Dynamic font sizes make an app readable without much effort. We can implement dynamic font sizes using (Attributes Inspector → Font → Text Styles). Same illustrated below: a. Dynamic Font Setting for UILabel Note: Don't forget to select the Dynamic Type checkmark as shown in the last step above. Without it,

Setup React Native Web App with TypeScript and WebPack

In this tutorial we will setup react native web app locally and deploy on Render. Before we start with the react-native-web setup, I assume that you have installed Node.js, Yarn and react-native-cli on your machine. 1. Setup React Native App with TypescriptTo create react native app you need to run following command react-native init ReactNativeWebApp This command will create react native app and your app directory will look like as shown in the following image (image 1.1) image 1.1: Project rootTo add typescript to our app first we need to install react-native-typescript-transformer yarn add --dev react-native-typescript-transformer typescript

Environment setup to manage different app name, icon and endpoint using Xcode Configurations in iOS Swift Language

As a Developer, you have many challenges while you are working with many environments and endpoint in the same project. Without environment setup, you have to set the endpoint and certificate every time for a different environment. If we Configure Xcode for the different environment, It takes care of all endpoint, certificate and bundle ids. so the user can test all beta, dev and live app on the same device. So, let's start with creating Endpoint Endpoint Configuration The first thing that you have to do is prepare Xcode configurations for the environment you want to use. In this post,

Integrate Fastlane with iOS App for Build Automation

As we all know uploading the iOS App on the App Store is a very long procedure. Some developer gets stuck at the certain point and fails to upload the app. So let's make the procedure very short of uploading the app with Fastlane Tool. Fastlane provides the easiest way to build and release the mobile apps. It handles the time-consuming task for you, so you don't have to waste your development time. Through Fastlane you can automate the process of taking the screenshot of the mobile app screen, building the app for the different environment such as Adhoc, Development,

Use of Auto Layout in iOS

What is Auto Layout? Auto Layout is a constraint-based layout system. It was introduced with Xcode 6 Beta. It allows developer to create an adaptive UI for the apps that responds appropriately to changes in screen size and device orientation. Auto Layout dynamically calculates the dimensions and position of all the views in your view hierarchy, based on constraints placed on those views. Why Auto Layout? Today we have lots of variants available of iPhone and iPad in size in market. So, the user have different iPhone or iPad as per their choice. But according to the developer when he

Face ID Authentication in iOS11 Swift Language

Apple released most interesting feature Facial recognition with iPhone X. Face ID is a new revolution in recognition. It is a powerful and secure authentication system that’s more convenient, faster and easy than Touch ID. Face ID is biometric authentication. Biometrics technology is mainly used for identification and access control. Touch ID recognition is also biometric authentication. Face ID uses LocalAuthentication Framework for authentication and Touch ID uses the same framework for authentication. This framework provides facilities for requesting authentication from users. It provides the interface for evaluating authentication policies and access controls and managing credentials with LAContext. LAContext

Make Indicator always visible for UIScrollView in iOS Swift Language

Naturally, Indicator of ScrollView is visible when the content view of ScrollView is longer than ScrollView height and user drag on Screen. As we all know It is a default functionality, we can't make it always visible directly. Using flashScrollIndicators() method we can make it visible. Example override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(true) scrollView.flashScrollIndicators() } But indicator only appears for some time after viewDidAppear method call and disappear again. Indicator only to reappear when the user touches the screen. To show indicator continuously without touching screen you can add flashScrollIndicators() method in Timer. Timers work in continuously with