From 3af2ba19ec888ff3359cc74eeab636df4fad2e08 Mon Sep 17 00:00:00 2001 From: mikes1991gh Date: Tue, 18 Aug 2026 16:18:21 +0200 Subject: [PATCH] feat: iOS dynamic background ids (#30574) 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 a7bbc31ce..0eee970e7 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() {