Issues with TabView and NavigationView on tvOS

Apologies if this isn't the right place for this kind of question, I tried reaching out on Stack Overflow and the Apple Developer Forums but haven't gotten a response and just wanted to see if anyone here had encountered this. Thanks so much to anyone who can provide any help or info!

Hi all,

I am trying to make a simple tvOS app. I was testing some basic SwiftUI code shown here:

struct ContentView: View {  
    var body: some View {
        TabView {
            NavigationView {
                NavigationLink(destination: Text("Subview")) {
                    Text("Subview")
                }
            }
            .tabItem {
                Text("Main")
            }

            NavigationView {
                Text("Settings")
            }
            .tabItem {
                Text("Settings")
            }
        }
    }
}

ContentView() is called directly from the entry point:

@main
struct MyApp: App {
	var body: some Scene {
		WindowGroup {
			ContentView()
		}
	}
}

When testing this code on my Apple TV (Apple TV 4K, running tvOS 15.0), the app launches successfully. I can switch between tabs and click on the NavigationLink to go to the subview. However, when pressing the back/menu button on the Apple TV Remote, the app closes with the following error:

[Common] Error response from snapshot request action of type 1 gave Error Domain=BSActionErrorDomain Code=1 "(null)"

I was just wondering if anyone else had encountered this? Is this intended behavior? Looking at the resources and documentation online it appears like NavigationViews nested inside TabViews should work as expected. Any feedback about what the error is trying to explain would be helpful too!

Thanks so much!

Terms of Service

Privacy Policy

Cookie Policy