There's still some notable gaps in SwiftUI. Especially on tvOS.

It's currently impossible to create a tvOS in pure SwiftUI with streaming video that supports all the picture-in-picture functionality—which is kind of the feature users expect to be "free"
1236628
This is because PIP functionality (activate, restore, swap) is based on presenting the AVPlayer view modally… from a view controller. So you have to drop down to UIKit to make it happen and employ a hack to get the UIHostingViewController for a given scene
1236629
And now I'm thinking it might be worth wrapping this as a ViewModifier and hide the UIKit ugliness from SwiftUI
1236632
@neil SFSafariViewController is similarly not-fully bridged on iOS. A Representable wrapper causes double navigation toolbars when using .sheet() and NavigationStack. You need to dip down to the active scene’s root controller to present it using UIKit.
1236637
@neil that sounds very typical of a SwiftUI API, but bizarre considering the tvOS platform
1236634
@shawn it gets even weirder with PIP: it’s enabled by default in AVPlayerViewContoller… but only if you have the correct entitlement and have configured the AVAudioSession to allow playback in the background.

So not really enabled by default 🤦🏻‍♂️😂
1236638
@neil defaults… hmm. My first assumption is it’s not documented?
1236640
@shawn and yes it’s bizarre that standard functionality is not yet fully supported in SwiftUI. It’s not exactly new anymore
1236639
@neil but still new enough that the iOS 17 version is the first I’ve felt comfortable making a product with, don’t even get me started on TextEditor or ShareLink. Both are so broken/hobbled it feels like a the SwiftUI team is trolling everyone.
1236643
@neil it’s a love/hate relationship at this point hahaha
1236646
@shawn It's documented in that there's a sample project from WWDC20, but that's all UIKit and not SwiftUI. Also, 90% of SwiftUI blog posts are for iOS. Try to do anything SwiftUI on macOS or tvOS and it quickly because a lesson in dealing with frustration
1236648