My project was working fine, with no build errors and we were able to upload to App Store Connect.
When reopening the project I get the following errors for List
.
Extra arguments at positions #1, #2 in call
List modifier errors
Cannot infer contextual base in reference to member ‘sidebar’
Cannot infer contextual base in reference to member ‘hidden’
Code:
var sidebar: some View {
List(selection: $selection) {. <-- Extra arguments at positions #1, #2 in call
NavigationLink(destination:
HomeView(), tag: NavigationItem.home, selection: $selection) {
Label("Home", systemImage: "house")
}
.tag(NavigationItem.home)
Section("Messages") {
ForEach(cvm.chats.indices, id: .self) { index in
ChatRow(index: index)
}
}
}
.listStyle(.sidebar). <-- Cannot infer contextual base in reference to member 'sidebar'
.scrollContentBackground(.hidden) <-- Cannot infer contextual base in reference to member 'hidden'
}
Elsewhere in the project we get the following errors
Trailing closure passed to parameter of type ‘Decoder’ that does not
accept a closure
Code:
Section {
List { <-- Trailing closure passed to parameter of type 'Decoder' that does not accept a closure
Section {
NavigationLink(destination:Detail() ) {
Row(menu: menu, item: menu.items[0])
}
.buttonStyle(PlainButtonStyle())
}
.listRowBackground(Color.clear)
}
.listRowSpacing(12) <-- Value of type 'List' has no member 'listRowSpacing'
.scrollContentBackground(.hidden) <-- Cannot infer contextual base in reference to member 'hidden'
.listRowBackground(Color.clear)
.frame(maxHeight: .infinity) <-- Cannot infer contextual base in reference to member 'infinity'
.frame(maxWidth: .infinity) <-- Cannot infer contextual base in reference to member 'infinity'