< How to fix “Referencing initializer 'init(wrappedValue:)' on 'ObservedObject' requires that ‘SomeType’ conform to 'ObservableObject'" | How to fix “Missing argument for parameter 'content' in call” > |
Updated for Xcode 14.2
This rather confusing error message usually happens because you created a container but forgot to include some content inside it – you were probably just experimenting, and wrote code like this:
VStack {
}
If you just want a placeholder while you’re working on something else, use an EmptyView
to keep the compiler happy, like this:
VStack {
EmptyView()
}
SAVE 50% To celebrate WWDC23, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
Link copied to your pasteboard.