From 76c8f844f976c6bf9a0c45d5d6612fe84cd673b1 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Tue, 14 Feb 2023 16:21:11 +0200 Subject: [PATCH] Fix iOS programmatically orientation crash on OS below 16 (#7112) --- ios/Mattermost/Modules/SplitViewModule.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/Mattermost/Modules/SplitViewModule.swift b/ios/Mattermost/Modules/SplitViewModule.swift index 4edf3ae29b..ebf5adb26b 100644 --- a/ios/Mattermost/Modules/SplitViewModule.swift +++ b/ios/Mattermost/Modules/SplitViewModule.swift @@ -59,7 +59,7 @@ class SplitViewModule: RCTEventEmitter { DispatchQueue.main.async { let appDelegate = UIApplication.shared.delegate as! AppDelegate appDelegate.allowRotation = true - UIDevice.current.setValue(UIInterfaceOrientation.unknown, forKey: "orientation") + UIDevice.current.setValue(UIInterfaceOrientation.unknown.rawValue, forKey: "orientation") } } @@ -68,8 +68,8 @@ class SplitViewModule: RCTEventEmitter { DispatchQueue.main.async { let appDelegate = UIApplication.shared.delegate as! AppDelegate appDelegate.allowRotation = false - UIDevice.current.setValue(UIInterfaceOrientation.unknown, forKey: "orientation") - UIDevice.current.setValue(UIInterfaceOrientation.portrait, forKey: "orientation") + UIDevice.current.setValue(UIInterfaceOrientation.unknown.rawValue, forKey: "orientation") + UIDevice.current.setValue(UIInterfaceOrientation.portrait.rawValue, forKey: "orientation") } } }