I created a new project in xCode 15 on MacOS 14. This project only has a View with a Table that has two columns. When I call the view I get the following error several times:
Metal failed to load render pipeline: pipeline=PL008BsovXmw_TprcA3Xhf sdk=23A322 Failed to find reflection in binary archives
Here is the code:
struct Freunde: Identifiable {
var id: UUID = UUID()
var firstName: String = ""
var lastName: String = ""
init(firstName: String, lastName: String) {
self.firstName = firstName
self.lastName = lastName
}
}
struct ContentView: View {
@State var sortOrder = [KeyPathComparator(\Freunde.firstName)]
@State public var selectedItems: Set<UUID> = []
@State var myList: [Freunde] = [
Freunde(firstName: "Klaus", lastName: "Kirchhoff"),
Freunde(firstName: "Patrik", lastName: "Grot"),
Freunde(firstName: "Johannes", lastName: "Gottfried"),
Freunde(firstName: "Daniel", lastName: "Schaedla")
]
var body: some View {
VStack {
Table(myList, selection: $selectedItems, sortOrder: $sortOrder) {
TableColumn("Vorname", value: \.firstName)
TableColumn("Nachname", value: \.lastName)
}
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
}
.padding()
}
}
#Preview {
ContentView()
}