I am able to listen for existing orientation changes by using UIDevice.orientationDidChangeNotification. However I want to lock SwiftUI views to a particular orientation based on a requirement.
Is there a way to do it without introducing AppDelegate?