I had the same problem. This worked for me.
struct ContentView: View {
var body: some View {
TabView {
VehicleTab()
.tabItem({ Label("Vehicles", systemImage: "car.fill")})
TransactionsTab()
.tabItem { Label("Transactions", systemImage: "dollarsign") }
}
.modelContainer(for: [Vehicle.self, Transaction.self])
}
}
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: