From 9c8e4db30648995660c42320b2c4b6ec638aec60 Mon Sep 17 00:00:00 2001 From: mikes1991gh Date: Wed, 5 Aug 2026 17:55:40 +0200 Subject: [PATCH] ios: dynamic background ids --- mobile/ios/Runner/Background/BackgroundWorkerApiImpl.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mobile/ios/Runner/Background/BackgroundWorkerApiImpl.swift b/mobile/ios/Runner/Background/BackgroundWorkerApiImpl.swift index a7bbc31ceb..0eee970e71 100644 --- a/mobile/ios/Runner/Background/BackgroundWorkerApiImpl.swift +++ b/mobile/ios/Runner/Background/BackgroundWorkerApiImpl.swift @@ -22,8 +22,9 @@ class BackgroundWorkerApiImpl: BackgroundWorkerFgHostApi { print("BackgroundWorkerApiImpl:disableUploadWorker Disabled background workers") } - private static let refreshTaskID = "app.alextran.immich.background.refreshUpload" - private static let processingTaskID = "app.alextran.immich.background.processingUpload" + private static let taskIDs = Bundle.main.object(forInfoDictionaryKey: "BGTaskSchedulerPermittedIdentifiers") as! [String] + private static let refreshTaskID = taskIDs.first { $0.hasSuffix(".refreshUpload") }! + private static let processingTaskID = taskIDs.first { $0.hasSuffix(".processingUpload") }! private static let taskSemaphore = DispatchSemaphore(value: 1) public static func registerBackgroundWorkers() {