In this section, we'll start by covering networking with SwiftUI. We touched on the basics of how we could implement this using the MVVN pattern back in Chapter 3, Building Layout and Structure, but now that we're building our app, let's look at making an actual networking call to retrieve some data that we can use in our recipe app.
Basic networking in SwiftUI
Creating our network helper
Let's start by taking a look at what data we are going to get back from our call. We'll use a publicly open API called https://source.unsplash.com/ that will generate a placeholder image for our recipe on the off chance we've not got a photo at hand.
This is a very simple API that is generated based on the structure...