Snippets

Quick bits and pieces that could save you a lifetime!

Playing music using AVPlayer

February 17, 2019

A common task in a typical iOS Application is the ability to play a particular sound. In order to do so, you will need to leverage and in order to download a song/sound from the internet and play…

URL Escaped String (Swift)

February 16, 2019

When performing networking operations in iOS, it is useful to be able to url escape and convert strings into objects. Below is a helpful extension to achieve that functionality: Usage:

How to add Certificate Pinning in iOS (Swift)

February 15, 2019

If you really want to secure your app, you can use a concept called which essentially you store your networking Certificates on the client side. By doing so, your app won't depend on the system…

Extending objects in Kotlin

February 14, 2019

In the old days, in order to add new functionality to a class you would need to create a Utility class or even subclass the object. In kotlin, there are things called that allow you to extend…

Allowing Internet Permission (Android)

February 13, 2019

Whenever you start a new Android project, you may notice that it wont make any network calls. This is because you must include in your the permission to use the Internet. Copy below and put it at…

How to get UIColor from Hex String in Swift

February 12, 2019

Many times designers will give colors in hex values and currently does not have an easy way to get the UIColor value of the hex string. A handy website to use is UIColor.xyz in order to obtain the…

Data classes with Default Constructors in Kotlin

February 12, 2019

While doing Java you will notice that there are a lot of classes that are just holding data, they don't have any methods other than and . This is why Kotlin has introduced a concept called Data…

Search by