Errors on app and simulator not starting, Xcode 12.2

This is the GitHub repository, and the file that I am editing is the RestaurantRows.swift file, and the simulator doesn’t work there only, it works on my other files.

None of that code shows where you are decoding the JSON. You have ParsingCode.swift, which shows the code that actually performs the decode, but nowhere do you show how it’s being called. The error lies at that spot and how you are calling it.

I can say, however, that this:

var restaurants:[Restaurants]

is almost certainly not what you want. Restaurants contains an array of data that should come from your JSON. There’s no need to turn it into an array itself.

So what value should I put at the bottom and the top? So how can I get the data there?

Hi Harri,

It seems to me that you are struggling with the concept of dealing with JSON.

Have a look at this project that I created using your json file (slightly modified and named meals.json), your structs for decoding the json (although slightly modified and named Meals.swift), your decoding code (again slightly modified so that it is wrapped in an extension on Bundle and named Bundle-Decodable.swift) and a ContentView.swift file to present the data on screen.

Download the project and double click on the file to unzip it. Open the folder RestaurantMeals and double click on the file RestaurantMeals.xcodeproj to open the project in Xcode.
Hope that helps.

Thanks! This helped, but I was following a tutorial for Xcode 11, and it has like a GUI. How am I supposed to something like that?

Link:
Tutorial

Hello, seems like you are finding it hard to understand Types and Values from what i see,

did you finish the Match App course at least?