From 19858a6a3c1b3cc0b2ba2da7015894be525431c2 Mon Sep 17 00:00:00 2001 From: Laurent Date: Thu, 13 Apr 2023 11:12:46 +0200 Subject: [PATCH] Adds more log and stops cancelling audioplayer when audio finishes --- LeCountdown/AppDelegate.swift | 8 ++++++++ LeCountdown/Sound/DelaySoundPlayer.swift | 2 +- LeCountdown/Utils/Date+Extensions.swift | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/LeCountdown/AppDelegate.swift b/LeCountdown/AppDelegate.swift index 514fdca..15c4fbc 100644 --- a/LeCountdown/AppDelegate.swift +++ b/LeCountdown/AppDelegate.swift @@ -40,6 +40,14 @@ class AppDelegate : NSObject, UIApplicationDelegate { return true } + func applicationWillTerminate(_ application: UIApplication) { + FileLogger.log("applicationWillTerminate") + } + + func applicationDidReceiveMemoryWarning(_ application: UIApplication) { + FileLogger.log("applicationDidReceiveMemoryWarning") + } + fileprivate func _initSchemaIfNeeded() { if !Preferences.cloudKitSchemaInitialized { do { diff --git a/LeCountdown/Sound/DelaySoundPlayer.swift b/LeCountdown/Sound/DelaySoundPlayer.swift index 7efdf66..f02edff 100644 --- a/LeCountdown/Sound/DelaySoundPlayer.swift +++ b/LeCountdown/Sound/DelaySoundPlayer.swift @@ -61,7 +61,7 @@ import AVFoundation FileLogger.log("audioPlayerDidFinishPlaying: successfully = \(flag)") Logger.log("audioPlayerDidFinishPlaying: successfully = \(flag)") - Conductor.maestro.cancelSoundPlayer(id: self._timerID) +// Conductor.maestro.cancelSoundPlayer(id: self._timerID) Conductor.maestro.cleanupLiveActivities() } diff --git a/LeCountdown/Utils/Date+Extensions.swift b/LeCountdown/Utils/Date+Extensions.swift index c7f8616..3af0751 100644 --- a/LeCountdown/Utils/Date+Extensions.swift +++ b/LeCountdown/Utils/Date+Extensions.swift @@ -31,7 +31,7 @@ extension Date { static let dateTimeFormatter = { let df = DateFormatter() df.dateStyle = .short - df.timeStyle = .short + df.timeStyle = .medium return df }()