Parsing JSON into Swift Objects directly

Parsing JSON data in into swift objects have become super easy with Swift 4 JSONDecoder.Given below is a simple example which hits a Api and parses the JSON data directly to student object.We are assuming that we have a JSON response which has same keys as names of properties. import UIKit struct Student:Decodable{// property name should be … Read more

App Transport Security basics

App Transport Security (ATS)  is a network security feature on Apple platforms and is enabled by default. It ensures that applications implement industry standard security without known weaknesses and ensures data integrity and privacy. The purpose of App Transport Security is to improve sense of security in end users by ensuring that no accidental network … Read more

Swift Interview Questions and Answers

This article is meant to be a guide. Target is to evolve it to a exhaustive list of swift questions and answers with your support. Given below are few of the most common questions asked in swift interview straight from swift docs, which according to me is a must read for any one trying to develop some skills in swift.Questions are added on last page.

Important swift questions you should know

Question 1.  How to declare constant in swift?

Answer: Constant are declared using let keyword and once set, attempting to change a constant value results in compile time error

let welcome = "Welcome Buddy!!!"

Question 2. Can we use Swift reserve keywords as variable or constant name? How?

Answer 2. Yes we can, we need to surround the reserve keyword in “`” (backticks)

var `protocol`:String = "Protocol is reserved"

Question 3. What are Type Aliases ? Why they are used?

Answer 3. Type Aliases are used to give alternative name for an existing type.They come in handy when we want to give a existing type a name which is more clear in applications context.

typealias PriorityLevel = UInt16

let a = PriorityLevel.min  // which is same as UInt16.min

Rename Xcode project completely with Pods and Bridging header

Renaming a project in Xcode can be a trouble if you don’t know what you are doing. In this tutorial you will learn about steps and checks necessary for changing project name. This guide is divided into 2 section

  1. Renaming a basic Xcode project
  2. Renaming a Xcode project with Pods and Bridging Header

Read more

Meltdown and Spectre Flaws affect all iOS and Mac devices

For the very first time mac and iPhone users have found themselves in a very unfamiliar territory, threat of a flaw|malware.Its very scary and unfamiliar experience for us.Apple has announced that all of today’s Apple devices are affected by Meltdown and Spectre, only exception being apple watch. But no need to lose sleep over it … Read more

WKWebView NSCoding support was broken in previous versions

WebKit was introduced in iOS 8 but was released with an error which resulted in a runtime crash if the configuration was done using Interface Builder. So in Xcode 9 if your project configuration has minimum OS support less than 11.0 and you try to add WebKit using interface builder Xcode shows an error. This … Read more

Add Custom Font in iOS Application Xcode 9

Adding custom font of your choice or of your business theme, in your iOS app is quite important. Custom fonts can enrich your app and transform it from just and app to an awesome app. Adding custom font in iOS application is a step by step process. In this article we have listed all the steps and in order, we have provided enough images so that you do not lose the track

A demo project has been created in which we will add a custom font. We assume that you have the basic knowledge of creating projects creating outlets and you have a custom font file. To begin with the demo app is a simple app with a UILabel and default font.

Read more