SwiftUIでアプリを作っているのですがこのようなエラーが出てきてしまいました....
どのように解決すればいいでしょうか....?
MissingEnvironmentObjectError: Missing EnvironmentObject
MatchingSwiftUI crashed due to missing environment of type: CardViewModel. To resolve this add .environmentObject(CardViewModel(...))
to the appropriate preview.
==================================
| RemoteHumanReadableError: Failed to update preview.
|
| The preview process appears to have crashed.
|
| Error encountered when sending 'render' message to agent.
|
| ==================================
|
| | RemoteHumanReadableError: The operation couldn’t be completed. (BSServiceConnectionErrorDomain error 3.)
| |
| | BSServiceConnectionErrorDomain (3):
| | ==BSErrorCodeDescription: OperationFailed