In my AppDelegate I am using a function to rotate my device and lock the orientation.
iPhone shall be portrait only, and iPad landscape only.
It works on iPhones, but the following function does never get called on iPads:
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
print("Test")
return AppDelegate.orientationLock
}
I think it was working on iPads before I switched to "SwiftUI Life Cicle" but I am not absolutely sure if this was the point of time, where it stopped working:
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
The info.plist is also set to "Landscape only" for iPads, but the app starts in portrait mode anyway, which is strange too:


