From f8244eeefef5d5b2170fe045bfd2ebe46c16eeea Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Tue, 26 Mar 2019 11:40:38 -0600 Subject: [PATCH] Fix SAE crash for iOS9 --- SignalMessaging/ViewControllers/OWSNavigationController.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SignalMessaging/ViewControllers/OWSNavigationController.m b/SignalMessaging/ViewControllers/OWSNavigationController.m index b2e40a3a5..2237bf7cb 100644 --- a/SignalMessaging/ViewControllers/OWSNavigationController.m +++ b/SignalMessaging/ViewControllers/OWSNavigationController.m @@ -208,6 +208,14 @@ NS_ASSUME_NONNULL_BEGIN - (UIInterfaceOrientationMask)supportedInterfaceOrientations { if (self.visibleViewController) { + if (@available(iOS 10, *)) { + // do nothing + } else { + // Avoid crash in SAE on iOS9 + if (!CurrentAppContext().isMainApp) { + return UIInterfaceOrientationMaskAllButUpsideDown; + } + } return self.visibleViewController.supportedInterfaceOrientations; } else { return UIInterfaceOrientationMaskAllButUpsideDown;