How to optimise localization in iOS Swift App?

It's never been as easy as it is now to launch into global markets via mobile apps. You must be wondering why I wrote this blog because we can easily support varying locales to understand and be usable by all users, right? Let's read why. Earlier, providing L10n (localization) was just possible natively by integrating .strings, .stringsdict and .plist files in Xcode. This approach had various drawbacks such as: App's language would be set to the device's language by default instead of choosing the preferred language. There was no out-of-the-box support for .json. However, JSON support could be accomplished natively

10 Xcode shortcuts every iOS Developer should know

Whether beginner, intermediate or advanced developer, we all want to achieve our task by developing workable code. We want to accommodate changes soon to ensure efficiency too. But what if we are not too familiar with the IDE? We land up doing things that take much more time & effort than required. Xcode has a wide variety of these shortcuts, so here are some of them which helped us achieve our tasks faster: Move Line Up Command(⌘) + Option(⌥) + [ shifts the selected piece of code upward, to rearrange the current code. Alternatively, we can also use the same shortcut via Editor

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

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

Custom UISlider using Swift Language

UISlider is a control used to select a single value from a continuous range of values. Default UISlider just provides track and thumb with default color having minimum value to maximum value. You can drag the thumb from the start point to the endpoint continuously in the range set. Default UISlider If you are using this control in your project, you need to customize the control to make your screen attractive(as per the design). Now let's customize the UISlider: You can customize color, thumb image, and track color easily. Basic customization can be done in two ways:- From

Presenting a UIPopoverPresentationController popup for iPhone

iOS 9 introduced a new way of creating Popovers on iPhone. Instead of using the UIPopoverController class we can now use the UIPopoverPresentationController. Presenting a Popover from a Bar Button Item We need a content View controller that's displayed inside the Popover and also need to set properties for contentSize, modalPresentationStyle and sourceView. Action for right BarButtonItem- @IBAction func addEntity(_ sender: UIBarButtonItem) { let vc: TableViewController = self.storyboard?.instantiateViewController(withIdentifier: "TableViewController") as! TableViewController // Preferred Size vc.preferredContentSize = CGSize(width: 200, height: 200) vc.modalPresentationStyle = .popover let popover: UIPopoverPresentationController = vc.popoverPresentationController! popover.delegate = self popover.sourceView = self.view // RightBarItem popover.