Danger + Swift + Realm

Using SwiftLint and Danger for Swift Best Practices

Apple’s Swift is becoming more and more popular amongst the developer community. Most of us already started adapting our projects to this folk. While adopting, we may not be as careful as we should be as Swift is a very flexible language and it’s really easy to misuse it. Especially coming from an Objective-C culture, applying best practices becomes really important.

After reading Swifty Tips from Göksel, I realized a couple of his tips can be checked automatically with SwiftLint. Also, we’re lazy people and we tend to forget to check our code before merging to master. Just in here, Danger comes to the stage with shiny clothes and points out we’re doing something dangerous. Continue reading →


Unit Tests in Server-Side Swift API

I’ve shared my first experiences about backend development in Swift in my previous blog post. This is the follow-up post. I’ll talk about Unit Tests in Swift.


  • Swift accepts only one executable file for the app. We need to split app and library to make it testable. Because testing requires the separate executable file.
  • main.swift file is the main executable for app. LinuxMain.swift file is the main executable for tests.
  • To split them, we’ll create two targets. One target is the library which will consist of all our code. The other one is the app which will be dependent on the library.
  • Do not forget to add ~Tests suffix for your test folders and test files.
  • LinuxMain.swift file must be under the Tests directory.
  • Create a static variable inside test classes and use it as a parameter while calling testCase() method in LinuxMain.swift file.

Continue reading →

HTTP methods & Database Operations in Server-Side Swift API

dotswift-2017-35After deciding to join more conferences this year, the very first one was dotSwift. It was held in a great old theater in Paris. It was a half day conference but it was better than I guessed. There were good talks about backend development in Swift. After hearing a lot about that and great performance of Swift, I decided to give it a try. And here comes my first experiences step by step. Continue reading →

Using Firebase Cloud Messaging for Remote Notifications in iOS

Let’s talk about Firebase a little bit first.

In Firebase website, it says “Firebase gives you the tools and infrastructure you need to build better apps and grow successful businesses.”. It provides several features divided into three groups develop, grow and earn and all of them connected to Analytics. It doesn’t matter which feature you are using, you’ll get Analytics free. Features inside Grow and Earn groups are completely free. Continue reading →

iOS Uygulama Geliştirme Öğrenme Rehberi — Başlangıç Seviyesi

Rehber olarak hazırladığım bu yazıda Objective-C ile iOS uygulama geliştirmeyi öğrenmek için internette var olan eğitici blog yazılarını hangi sıralamayla takip etmeniz gerektiğini göstermek istedim. Malum, internette tonlarca eğitim var ve insan genelde nereden başlayacağını bilemez. Continue reading →