Become an iOS Developer in 2021: The Ultimate Guide

The mobile market is exploding, and iOS developers are in high demand.

The talent shortage keeps driving salaries higher and higher, even for entry-level positions. Software development is also one of the lucky jobs that you can do remotely. It’s understandable then that more and more people want to become iOS developers.

Money and freedom are great, of course, but they are not everything. Many of us make iOS apps to create something we are proud of and make a difference in many people’s lives.

Becoming an iOS developer takes some effort, though. So it’s crucial to focus on the right things and not waste time on useless activities. That’s why I wrote this detailed, step-by-step guide.

Continue reading

Network Requests and REST APIs in iOS with Swift (Protocol-Oriented Approach)

Network requests and REST APIs in iOS with Swift a Protocol Oriented Approach

Networking is a requirement for most modern iOS apps.

Networked apps usually interface with a remote web service that provides data. And often, such a web service is a REST API that returns data in JSON format.

Writing the networking layer of an iOS app, though, is not a simple task. When making asynchronous network calls, you need to combine several features of Swift, SwiftUI, and the Foundation framework. Moreover, many parts of your app’s architecture need to interact, making the task more complicated than it might seem at first.

Continue reading

MVVM in iOS with SwiftUI (Detailed Example + Pitfalls)

MVVM in iOS with SwiftUI (Detailed Example + Pitfalls)

Since the introduction of SwiftUI, the MVVM pattern has seen a new renaissance. Many developers believe that this particular pattern fits well with the SwiftUI data flow.

MVVM certainly has some good ideas, but it also brings along problems because of the various discording interpretations of the pattern and its rigidity.

In this article, we will see how MVVM fits in iOS apps written in SwiftUI, how to take advantage of its benefits, and how to avoid its problems.

Continue reading

JSON Decoding in Swift with Codable: A Practical Guide

 JSON Decoding in Swift with Codable: A Practical Guide

Encoding and decoding data is a fundamental part of iOS apps.

That is especially true for the JSON data we get from REST APIs.

In the past, decoding JSON in iOS apps required a lot of boilerplate code and sometimes fancy techniques.

But thanks to the Codable protocols introduced of Swift 4, today we have a native and idiomatic way to encode and decode data.

The Codable protocols allow for simple JSON decoding that can sometimes take only a couple of lines of code. But they also allow for more sophisticated techniques when you have special needs.

We will explore all that in this article.

Continue reading

Master Swift Generics: A practical guide to code reuse

Master Swift Generics: A practical guide to code reuse

Generics are a great feature of Swift that allow you to generalize and reuse code in ways that would not be possible otherwise.

They are also a quite advanced feature and become a roadblock for many developers. The iOS SDK uses generic extensively, something that is especially true in SwiftUI.

In this article, I will show why generics exist and how to use them in your apps.

Continue reading