Code Block import SwiftUI struct AddictionListView: View { @StateObject private var addictionListVM: AddictionListViewModel = AddictionListViewModel() init() { UINavigationBar.appearance().barTintColor = UIColor(named: "BackgroundMain") } var body: some View { NavigationView { ZStack { Color("BackgroundMain").ignoresSafeArea(.all) ScrollView { LazyVStack { ForEach(addictionListVM.addictions) { addiction in NavigationLink(destination: Text(addiction.name)) { AddictionCellView(addiction: addiction) }.buttonStyle(PlainButtonStyle()) } }.padding() } VStack { Spacer() HStack { Spacer() NavigationLink( destination: AddNewAddictionView(), label: { Image(systemName: "plus").foregroundColor(.white).font(.title) }) .frame(width: 50, height: 50, alignment: .center) .background(Color.green.opacity(0.8)) .clipShape(Circle()) .padding(25) } } } .navigationBarTitle("Habit tracker!", displayMode: .inline) } .onAppear(perform: addictionListVM.createExampleAddictions) } }
I also experienced the same issue using multiple NavigationLinks where on iPhone most times worked OK even though the error was displayed in the console but on iPad links would not work in most cases. I've solved it using tap gesture and a single navigation link. You can see the fix on Paul Hudson's site.
https://www.hackingwithswift.com/forums/swiftui/unable-to-present-please-file-a-bug/7901/8237