Quick reference and cheatsheet for Swift developers learning Objective-C

Swift is a powerful programming language that was released at the WWDC 2014 as a replacement for Objective-C. But with many existing apps written in Objective-C still out there, knowing or at least having a basic understanding of Objective-C can be useful.

This post serves as a quick reference on Objective-C for Swift Developers who want to learn or look up Objective-C specifics.

Image for post
Image for post
Old buddies Obji and Swifty

Variables

For defining variables, Swift offers the let keyword for constants and the var keyword for variables. Swift offers type inference and optional data types.

 name = "Swifty" // declaring and assigning a constant age…


Check your knowledge on automated tests in Swift and iOS

I recently got into the position of leading the technical interviews when my client was searching for a new senior iOS developer.

It’s a challenging task to evaluate the skills and knowledge of another developer. In this post, I share my results of the most useful iOS and Swift questions and answers with you. I categorised the questions into different topics:

  1. Swift Programming Language (covered in part 1)
  2. Networking (covered in part 2)
  3. Persistence & Databases (covered in part 3)
  4. Concurrency (covered in part 4)
  5. Architecture & Design Patterns (covered in part 5)
  6. Testing (covered in this post)
  7. Continuous Integration…


Learn to use the power of bitwise operations and option sets in iOS.

Image for post
Image for post

Recently, I had to solve the following task at work.

The server sends an integer value between 0 and 127 that represents the state of a weekdays selection. When the server sends a 0, no checkbox should be selected. For a 127, all check boxes should be selected. The numbers in between represent all the other states. The task was to evaluate this value to be able to preselect the appropriate checkboxes.


Get started with Combine by reading this guide on basic Combine concepts and terms.

It was really exciting to hear about Apples new framework called Combine at WWDC 2019. Finally, we have a native way to write functional reactive code and to build apps in a declarative way.

This post provides an overview on the Combine concepts and terms to get you started.

Overview

The main components of Combine are Publisher, Subject, Subscriber and Operator. Here is a brief summary of what they do:

Publisher

  • exposes values of a certain type over time
  • can be completed or optionally fail with an error

Subject

  • a mutable publisher (has the ability to send new values after it’s…


Basic SwiftUI concepts and terms for view creation and state management

A macro shot of the Notes app icon on an iPhone
A macro shot of the Notes app icon on an iPhone
Photo by Brett Jordan on Unsplash

It was really exciting to hear about Apple’s new framework called SwiftUI at WWDC 2019. This article is a quick guide to get started with SwiftUI.

At first, we’ll take a look at how views in SwiftUI are created, laid out, and presented. Then, we’ll examine how the state is being managed with SwiftUI. And finally, we’ll take a look at how SwiftUI and UIKit play together.


Check your knowledge on architecture and design patterns in Swift iOS

I recently got into the position of leading the technical interviews when my client was searching for a new senior iOS developer.

It’s a challenging task to evaluate the skills and knowledge of another developer. In this post, I share my results of the most useful iOS and Swift questions and answers with you. I categorised the questions into different topics:

  1. Swift Programming Language (covered in part 1)
  2. Networking (covered in part 2)
  3. Persistence & Databases (covered in part 3)
  4. Concurrency (covered in part 4)
  5. Architecture & Design Patterns (covered in this post)
  6. Testing (covered in part 6)
  7. Continuous Integration…


Learn how to localize plurals for multiple languages in iOS by using the Localizable.stringsdict file

If you are already familiar with localizing plurals in iOS and you are just looking to remember the specifics, the cheat sheet below will help you out.

If you are new to this, skip the cheat sheet for now and read the basics below.

Cheat sheet

Image for post
Image for post

Basics

Every time you want to localize texts like My dog ate 2 carrots where the carrot count is dynamic, one localization string will not be enough. For example, localizing with My dog ate %i carrots would produce My dog ate 1 carrots when passing in 1.

The first solution that may come to your mind could…


Learn how to log events and errors in your iOS app with the new API introduced at WWDC 2020

At the WWDC 2020, Apple introduced the new Swift logging API for iOS 14. This post summarizes how to take advantage of this new API to debug behavior in your iOS apps.

Image for post
Image for post
I’m listening, tell me more about this new logging system!

Basics

When it comes to logging messages in iOS applications, the APIs that first come to your mind might be print or NSLog. Or maybe you are using a third party library like CocoaLumberjack , Willow or SwiftyBeaver.

However, already with iOS 10, Apple introduced a new iOS standard for logging with OSLog, providing an efficient way to log information.

At this year’s WWDC 2020, this API became —…


This post is part of my interview questions and answers series for iOS developers, this time it’s all about concurrency.

I recently got into the position of leading the technical interview when my client was searching for a new senior iOS developer.

It’s a challenging task to evaluate the skills and knowledge of another developer. So in this series, I want to share my results of the most useful iOS and Swift questions and answers with you. I categorised the questions into different topics:

  1. Swift Programming Language (covered in part 1)
  2. Networking (covered in part 2)
  3. Persistence & Databases (covered in part 3)
  4. Concurrency (covered in this post)
  5. Architecture & Design Patterns (covered in part 5)
  6. Testing (covered in part…


How to use GraphQL well as a mobile developer

Image for post
Image for post
Photo by Lewis Ngugi on Unsplash.

In a nutshell, GraphQL is an API design paradigm that describes how to ask for data. It is an alternative to the currently better-known REST approach. Originally, GraphQL was developed and open-sourced in 2015 by Facebook. Since then, it has been adopted by many companies. The reason why they are choosing GraphQL over REST is that GraphQL eliminates the inefficiencies of REST by giving clients the ability to define the exact data they need from the server.

This article will provide you with the essentials of GraphQL — especially what you need to know as an iOS developer.

First Impression of GraphQL

For the…

Natascha Fadeeva

Writing articles about iOS and Swift programming.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store