Swift Defer Statement explained

      No Comments on Swift Defer Statement explained

When you want to ensure that a code block is executed just before control exits the scope, Swift Defer Statement comes to your rescue. Sometimes a function is required to have multiple conditional exit point and covering those exit points without swift defer statement can lead to code duplication or it might… Read more »

Xcode SVN is scheduled for addition, but is missing Error

When a file is scheduled for commit according to svn records but is not present within the root directory, svn throws “is scheduled for addition, but is missing” error. There can be many causes for this error most common one is renaming the file from finder instead of refactoring and deleting… Read more »

Swift nonmutating setters. an Oxymoron?

      No Comments on Swift nonmutating setters. an Oxymoron?

While going through Xcode 10.1 release notes I stumbled upon a very unfamiliar term “nonmutating setters”. Inquisitiveness had the best of me and I spent time reading about it and implementing examples. Here is the jest for you nonmutable setters cannot be used within Classes or protocol bound classes nonmutable setters… Read more »

Realm implementing GROUP BY query equivalent in swift

Realm GROUP BY query equivalent can be achieved in swift very effectively. Going ahead in the post I will create an imaginary requirement and I will guide you through the necessary solution. Let us start with our realm data model import UIKit import RealmSwift @objcMembers final class Room:Object{ dynamic var… Read more »

Xcode 10 – iOS simulator is not launching

      No Comments on Xcode 10 – iOS simulator is not launching

After installing Xcode 10, especially when Xcode 9 is also installed, It has been observed that at times simulator fails to launch while running a project. Following steps can resolve the Issue Clear derived data Xcode -> Preferences -> Location -> Derived data Open edit schemes and make sure for… Read more »

Using PromiseKit and Alamofire For Clean API Layer

      No Comments on Using PromiseKit and Alamofire For Clean API Layer

Promise kit and Alamofire when used together create a very powerful and flexible API Layer Every App interacting with web services contains an API layer which separates API handling from the rest of the application logic. Usually, the API layer is implemented using delegates or escaping closures. Escaping closures and delegates are… Read more »