// In a view controller, get the window scene.
guard let windowScene = view.window?.windowScene else { return }
// Request the window scene to rotate to any landscape orientation.
windowScene.requestGeometryUpdate(.iOS(interfaceOrientations: .landscape)) { error in
// Handle denial of request.
}
in my appDelegate I support all orientations.
The code above works on iPhone iOS 16.
NOT WORK on iPadOS 16 beta. NO Error in callback closure.
Anyone has any clues? Thanks.