|< How to fix “Cannot convert value of type 'String' to expected argument type 'Binding
||How to fix “Referencing initializer 'init(wrappedValue:)' on 'ObservedObject' requires that ‘SomeType’ conform to 'ObservableObject'" >|
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:
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:
SPONSORED In-app subscriptions are a pain to implement, hard to test, and full of edge cases. RevenueCat makes it straightforward and reliable so you can get back to building your app. Oh, and it's free if your app makes less than $10k/mo.
Link copied to your pasteboard.