Thank you Claude for your help
There should have been the following code in line 35 which somehow I must have accidentally deleted in this post.
TextField("...", text: $pName[playerEnterCount])
This would've been the text field that allowed players to change the empty entries to their actual names. This is also what makes the simulator crash. So I know that this is the problem that I don't know an answer to yet...
All this is part of the first view of an app that lets people enter their names to play a "truth or dare" game in the next view.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: