From a38a5ec52d272d9d3bfce8e225641624c0ff40c2 Mon Sep 17 00:00:00 2001 From: Todd Anderson Date: Thu, 12 May 2022 13:39:30 -0400 Subject: [PATCH] Switching from willEnterForegroundNotification to didBecomeActiveNotification for resume notification. --- .../Tests/PublishBackground/PublishBackgroundTest.swift | 2 +- .../Tests/SubscribeBackground/SubscribeBackgroundTest.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R5ProTestbed/Tests/PublishBackground/PublishBackgroundTest.swift b/R5ProTestbed/Tests/PublishBackground/PublishBackgroundTest.swift index 1b2ba54..b701fb6 100644 --- a/R5ProTestbed/Tests/PublishBackground/PublishBackgroundTest.swift +++ b/R5ProTestbed/Tests/PublishBackground/PublishBackgroundTest.swift @@ -41,7 +41,7 @@ class PublishBackgroundTest: PublishTest { shouldClose = false; NotificationCenter.default.addObserver(self, selector: #selector(willResignActive), name: UIApplication.willResignActiveNotification, object: nil) - NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground), name: UIApplication.willEnterForegroundNotification, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground), name: UIApplication.didBecomeActiveNotification, object: nil) } @objc func willResignActive(_ notification: Notification) { diff --git a/R5ProTestbed/Tests/SubscribeBackground/SubscribeBackgroundTest.swift b/R5ProTestbed/Tests/SubscribeBackground/SubscribeBackgroundTest.swift index 656f0e7..bad41f4 100644 --- a/R5ProTestbed/Tests/SubscribeBackground/SubscribeBackgroundTest.swift +++ b/R5ProTestbed/Tests/SubscribeBackground/SubscribeBackgroundTest.swift @@ -41,7 +41,7 @@ class SubscribeBackgroundTest: SubscribeTest { shouldClose = false; NotificationCenter.default.addObserver(self, selector: #selector(willResignActive), name: UIApplication.willResignActiveNotification, object: nil) - NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground), name: UIApplication.willEnterForegroundNotification, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground), name: UIApplication.didBecomeActiveNotification, object: nil) } @objc func willResignActive(_ notification: Notification) {