From 202ecc369a1cd6e8a95b5823a6cb4f0e5022aa6d Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Thu, 20 Jul 2023 12:07:00 +0100 Subject: [PATCH] 157: more logging --- apps/ios/Shared/AppDelegate.swift | 2 +- apps/ios/Shared/ContentView.swift | 6 +++--- apps/ios/Shared/Model/SuspendChat.swift | 6 ++++++ apps/ios/SimpleX NSE/NotificationService.swift | 4 ++-- apps/ios/SimpleX.xcodeproj/project.pbxproj | 12 ++++++------ 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/apps/ios/Shared/AppDelegate.swift b/apps/ios/Shared/AppDelegate.swift index 236784a39a..01afa18a15 100644 --- a/apps/ios/Shared/AppDelegate.swift +++ b/apps/ios/Shared/AppDelegate.swift @@ -95,7 +95,7 @@ class AppDelegate: NSObject, UIApplicationDelegate { } func applicationWillTerminate(_ application: UIApplication) { - logger.debug("AppDelegate: applicationWillTerminate") + logger.debug("DEBUGGING: AppDelegate: applicationWillTerminate") ChatModel.shared.filesToDelete.forEach { removeFile($0) } diff --git a/apps/ios/Shared/ContentView.swift b/apps/ios/Shared/ContentView.swift index 324df52e84..cd9d894231 100644 --- a/apps/ios/Shared/ContentView.swift +++ b/apps/ios/Shared/ContentView.swift @@ -179,13 +179,13 @@ struct ContentView: View { } private func runAuthenticate() { - logger.debug("runAuthenticate") + logger.debug("DEBUGGING: runAuthenticate") if !prefPerformLA { userAuthorized = true } else { - logger.debug("before dismissAllSheets") + logger.debug("DEBUGGING: before dismissAllSheets") dismissAllSheets(animated: false) { - logger.debug("in dismissAllSheets callback") + logger.debug("DEBUGGING: in dismissAllSheets callback") chatModel.chatId = nil justAuthenticate() } diff --git a/apps/ios/Shared/Model/SuspendChat.swift b/apps/ios/Shared/Model/SuspendChat.swift index 175b67195f..58ed46a05a 100644 --- a/apps/ios/Shared/Model/SuspendChat.swift +++ b/apps/ios/Shared/Model/SuspendChat.swift @@ -76,9 +76,11 @@ private func _chatSuspended() { } func activateChat(appState: AppState = .active) { + logger.debug("DEBUGGING: activateChat") suspendLockQueue.sync { appStateGroupDefault.set(appState) if ChatModel.ok { apiActivateChat() } + logger.debug("DEBUGGING: activateChat: after apiActivateChat") } } @@ -95,10 +97,14 @@ func initChatAndMigrate(refreshInvitations: Bool = true) { } func startChatAndActivate() { + logger.debug("DEBUGGING: startChatAndActivate") if ChatModel.shared.chatRunning == true { ChatReceiver.shared.start() + logger.debug("DEBUGGING: startChatAndActivate: after ChatReceiver.shared.start") } if .active != appStateGroupDefault.get() { + logger.debug("DEBUGGING: startChatAndActivate: before activateChat") activateChat() + logger.debug("DEBUGGING: startChatAndActivate: after activateChat") } } diff --git a/apps/ios/SimpleX NSE/NotificationService.swift b/apps/ios/SimpleX NSE/NotificationService.swift index 12e9d2517b..43ba3ab323 100644 --- a/apps/ios/SimpleX NSE/NotificationService.swift +++ b/apps/ios/SimpleX NSE/NotificationService.swift @@ -76,7 +76,7 @@ class NotificationService: UNNotificationServiceExtension { var badgeCount: Int = 0 override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { - logger.debug("NotificationService.didReceive") + logger.debug("DEBUGGING: NotificationService.didReceive") if let ntf = request.content.mutableCopy() as? UNMutableNotificationContent { setBestAttemptNtf(ntf) } @@ -149,7 +149,7 @@ class NotificationService: UNNotificationServiceExtension { } override func serviceExtensionTimeWillExpire() { - logger.debug("NotificationService.serviceExtensionTimeWillExpire") + logger.debug("DEBUGGING: NotificationService.serviceExtensionTimeWillExpire") deliverBestAttemptNtf() } diff --git a/apps/ios/SimpleX.xcodeproj/project.pbxproj b/apps/ios/SimpleX.xcodeproj/project.pbxproj index e27f902972..e4d972e267 100644 --- a/apps/ios/SimpleX.xcodeproj/project.pbxproj +++ b/apps/ios/SimpleX.xcodeproj/project.pbxproj @@ -1478,7 +1478,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "SimpleX (iOS).entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 156; + CURRENT_PROJECT_VERSION = 157; DEVELOPMENT_TEAM = 5NN7GUYB6T; ENABLE_BITCODE = NO; ENABLE_PREVIEWS = YES; @@ -1520,7 +1520,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "SimpleX (iOS).entitlements"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 156; + CURRENT_PROJECT_VERSION = 157; DEVELOPMENT_TEAM = 5NN7GUYB6T; ENABLE_BITCODE = NO; ENABLE_PREVIEWS = YES; @@ -1600,7 +1600,7 @@ CODE_SIGN_ENTITLEMENTS = "SimpleX NSE/SimpleX NSE.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 156; + CURRENT_PROJECT_VERSION = 157; DEVELOPMENT_TEAM = 5NN7GUYB6T; ENABLE_BITCODE = NO; GENERATE_INFOPLIST_FILE = YES; @@ -1632,7 +1632,7 @@ CODE_SIGN_ENTITLEMENTS = "SimpleX NSE/SimpleX NSE.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 156; + CURRENT_PROJECT_VERSION = 157; DEVELOPMENT_TEAM = 5NN7GUYB6T; ENABLE_BITCODE = NO; GENERATE_INFOPLIST_FILE = YES; @@ -1664,7 +1664,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 156; + CURRENT_PROJECT_VERSION = 157; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 5NN7GUYB6T; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1710,7 +1710,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 156; + CURRENT_PROJECT_VERSION = 157; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 5NN7GUYB6T; DYLIB_COMPATIBILITY_VERSION = 1;