Did you copy the exact code:struct LandmarkList: View { var body: some View { NavigationView { List(landmarkData) { landmark in NavigationLink(destination: LandmarkDetail(landmark: landmark)) { LandmarkRow(landmark: landmark) } } .navigationBarTitle(Text(Landmarks)) } } }struct LandmarkList_Previews: PreviewProvider { static var previews: some View { ForEach([iPhone SE, iPhone XS Max], id: .self) { deviceName in LandmarkList() .previewDevice(PreviewDevice(rawValue: deviceName)) } }If yes, did you try removing the id argument ?SwiftUI is evolving between each version of XCode and doc may not be updated.Does autocompletion propose you some signature for ForEach ?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: