you haven't shown code complete enough for anyone to reproduce your problem.
Try to reduce the problem to a minimum (maybe in a new project), then repost if need be. You'll probably find that you'll figure it out yourself by performing the reduction.
What does "showAlert" do?
What do you mean by "the issue is in the .onAppear modifier"? It doesn't compile, it is never executed, it behaves in some other way you don't expect - what?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: