Updated for Xcode 14.0 beta 1
This is a really common error, and happens because you tried to use a string where SwiftUI expects to have a Text
view. As a simple example, it means creating an alert like this:
Alert(title: "Meh")
There are many places where SwiftUI wants to have a Text
view rather than a plain string, so just wrap your strings in text like this:
Alert(title: Text("Meh"))
SPONSORED In-app subscriptions are a pain. The code can be hard to write, hard to test, and full of edge cases. RevenueCat makes it straightforward and reliable so you can get back to building your app.
Sponsor Hacking with Swift and reach the world's largest Swift community!
Link copied to your pasteboard.