How to Get the Top-Most View Controller in iPad with Multiple Scenes (UIScene) in Swift?
I have an existing method to get the top-most view controller in iOS applications without multiple scenes, which works perfectly for single window applications on both iPhone and iPad: