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 = {