From 7f8cc2f57ba08ad62352001b62aff95a44e987a5 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Wed, 2 Dec 2020 16:46:12 +1100 Subject: [PATCH] Fix PN extension setup --- .../NotificationServiceExtension.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SessionPushNotificationExtension/NotificationServiceExtension.swift b/SessionPushNotificationExtension/NotificationServiceExtension.swift index ad2e9f25e..eed427f2b 100644 --- a/SessionPushNotificationExtension/NotificationServiceExtension.swift +++ b/SessionPushNotificationExtension/NotificationServiceExtension.swift @@ -84,8 +84,6 @@ final class NotificationServiceExtension : UNNotificationServiceExtension { // This should be the first thing we do. SetCurrentAppContext(NotificationServiceExtensionContext()) - SignalUtilitiesKit.Configuration.performMainSetup() - DebugLogger.shared().enableTTYLogging() if _isDebugAssertConfiguration() { DebugLogger.shared().enableFileLogging() @@ -153,6 +151,8 @@ final class NotificationServiceExtension : UNNotificationServiceExtension { // App isn't ready until storage is ready AND all version migrations are complete. guard OWSStorage.isStorageReady() && areVersionMigrationsComplete else { return } + SignalUtilitiesKit.Configuration.performMainSetup() + // Note that this does much more than set a flag; it will also run all deferred blocks. AppReadiness.setAppIsReady() }