I am doing the Swift Landmarks app tutorial on Xcode 13.2.1 on my 2019 Macbook Pro. I am up to the Working with UI Controls section. Every time I add the following lines of code to ProfileSummary.swift:
@EnvironmentObject var modelData: ModelData
.
.
.
Divider()
VStack(alignment: .leading)
{
Text("Recent Hikes")
.font(.headline)
HikeView(hike: modelData.hikes[0])
}
and I then try to view the preview I repeatedly get a crash report and everything stops working. When I remove those lines of code everything goes back to working fine.
The crash report is in this attachment:
^ That is the translated report. If you guys would like the full report I will post it. I am stuck and don't know what to do any help will be appreciated!