To be able to do anything interesting, a Swift program needs to take decisions based on whether some condition is true or not. This is done through conditionals.
Swift has several conditionals. The most common one is the if statement, which we will cover in this article.
Most modern iOS apps need to run code asynchronously.
Asynchronous code can be suspended and resumed later, allowing your app to keep its UI responsive while working on long tasks, like performing network requests to a REST API.
You often run asynchronous code in parallel to make the best use of resources like the cores on your device’s CPU or internet bandwidth.
In this article, we will see how to run asynchronous functions in Swift and iOS apps using async/await.
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.
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.