import UIKit final class AppDelegate: NSObject, UIApplicationDelegate { static var orientationLock: UIInterfaceOrientationMask = .portrait func application( _ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow? ) -> UIInterfaceOrientationMask { AppDelegate.orientationLock } }