Duc Ninja

Convert Between UTC and Device Timezone in Swift 4

In this article we are going to convert UTC Date format to Current device date format. UTC is the time standard commonly used across the world. The world’s timing centers have agreed to keep their time scales closely synchronized - or coordinated - therefore the name Coordinated Universal Time. UTC to Local: Use the following method for conve...
Read more ...

Measuring Swift compile times in Xcode 9

Using -Xfrontend Swift compiler flags The Swift type-checker remains a performance bottleneck for compile times, though it has improvedtremendously over the past two years. You could even say the type-checker has gone from being drunk to sober. To help users debug these issues, awhile back Jordan Rose added a frontend Swift compiler flag that w...
Read more ...

Generics in Swift 4

As one of the most powerful features in Swift, Generics can be tricky. A lot of people have trouble understanding and using them, especially application developers. Generics are most suitable for libraries, frameworks, and SDKs. In this post, I’ll try something different than other tutorials. We’ll open a restaurant and get a permission from S...
Read more ...

macOS High Sierra Final Version for Your Mac

Is Your Mac Compatible with High Sierra? This is vital information. But if your Mac can run macOS Sierra then it will be able to run macOS High Sierra just fine. But just in case, here is the list of compatible Mac computers with macOS High Sierra. iMac – 2009 or later. MacBook – 2009 or later. Mac Pro – 2010 or later. Mac mini – 2010 or lat...
Read more ...

Annotating Swift with MARKs, TODO's and FIXME's

When Swift debuted, we said goodbye to using #pragma pre-processor definitions to organize our code. Don’t worry, Xcode still has our backs. We can use a few different “special” comments in our code and Xcode will pick up on them and display them in its jump bar: The extra dash character in the name of our MARK gets us those sweet separators ...
Read more ...