From f071002cc38b54abb733c023e873445268643520 Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Tue, 29 Jul 2025 18:12:58 +0800 Subject: [PATCH] fix --- dimensionhub/dimensionhubApp.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dimensionhub/dimensionhubApp.swift b/dimensionhub/dimensionhubApp.swift index 6991fcc..aa38585 100644 --- a/dimensionhub/dimensionhubApp.swift +++ b/dimensionhub/dimensionhubApp.swift @@ -103,7 +103,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { BGTaskScheduler.shared.register(forTaskWithIdentifier: taskId, using: nil) { task in - self.handleAppRefresh(task: task as! BGAppRefreshTask) + self.handleAppRefresh(task: task) } Task.detached { @@ -132,7 +132,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD return true } - private func handleAppRefresh(task: BGAppRefreshTask) { + private func handleAppRefresh(task: BGTask) { self.scheduleAppRefresh() task.expirationHandler = {