From c29898f4350b50fd95a3b0e09c671aa63100fca9 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 15 Feb 2018 10:33:46 -0500 Subject: [PATCH] Refine the SAE lifecycle. --- SignalShareExtension/ShareViewController.swift | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SignalShareExtension/ShareViewController.swift b/SignalShareExtension/ShareViewController.swift index 33699284f..034fb894b 100644 --- a/SignalShareExtension/ShareViewController.swift +++ b/SignalShareExtension/ShareViewController.swift @@ -139,7 +139,7 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed // Share extensions reside in a process that may be reused between usages. // That isn't safe; the codebase is full of statics (e.g. singletons) which - // can't easily clean up. + // we can't easily clean up. ExitShareExtension() } @@ -400,6 +400,11 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed super.viewDidDisappear(animated) Logger.flush() + + // Share extensions reside in a process that may be reused between usages. + // That isn't safe; the codebase is full of statics (e.g. singletons) which + // we can't easily clean up. + ExitShareExtension() } @objc @@ -475,8 +480,6 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed Logger.debug("\(self.logTag) modal already presented. swapping modal content for: \(viewController)") assert(self.presentedViewController == shareViewNavigationController) } - Logger.debug("\(self.logTag) self.view.frame: \(self.view.frame)") - Logger.debug("\(self.logTag) shareViewNavigationController.view.frame: \(shareViewNavigationController.view.frame)") } private func presentConversationPicker() {