{"id":"dd44aa8d-1a0c-40e6-adbb-30328fd72957","shortId":"ygpCF6","kind":"skill","title":"Background Processing","tagline":"Swift Ios Skills skill by Dpearson2699","description":"# Background Processing\n\nRegister, schedule, and execute background work on iOS using the BackgroundTasks\nframework, background URLSession, and background push notifications.\n\n## Contents\n\n- [Info.plist Configuration](#infoplist-configuration)\n- [BGTaskScheduler Registration](#bgtaskscheduler-registration)\n- [BGAppRefreshTask Patterns](#bgapprefreshtask-patterns)\n- [BGProcessingTask Patterns](#bgprocessingtask-patterns)\n- [BGContinuedProcessingTask (iOS 26+)](#bgcontinuedprocessingtask-ios-26)\n- [Background URLSession Downloads](#background-urlsession-downloads)\n- [Background Push Triggers](#background-push-triggers)\n- [Common Mistakes](#common-mistakes)\n- [Review Checklist](#review-checklist)\n- [References](#references)\n\n## Info.plist Configuration\n\nEvery task identifier **must** be declared in `Info.plist` under\n`BGTaskSchedulerPermittedIdentifiers`, or `submit(_:)` throws\n`BGTaskScheduler.Error.Code.notPermitted`.\n\n```xml\n<key>BGTaskSchedulerPermittedIdentifiers</key>\n<array>\n    <string>com.example.app.refresh</string>\n    <string>com.example.app.db-cleanup</string>\n    <string>com.example.app.export</string>\n</array>\n```\n\nAlso enable the required `UIBackgroundModes`:\n\n```xml\n<key>UIBackgroundModes</key>\n<array>\n    <string>fetch</string>       <!-- Required for BGAppRefreshTask -->\n    <string>processing</string>  <!-- Required for BGProcessingTask -->\n</array>\n```\n\nIn Xcode: target > Signing & Capabilities > Background Modes > enable\n\"Background fetch\" and \"Background processing\".\n\n## BGTaskScheduler Registration\n\nRegister handlers **before** app launch completes. In UIKit, register in\n`application(_:didFinishLaunchingWithOptions:)`. In SwiftUI, register in the\n`App` initializer.\n\n### UIKit Registration\n\n```swift\nimport BackgroundTasks\n\n@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n    func application(\n        _ application: UIApplication,\n        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?\n    ) -> Bool {\n        BGTaskScheduler.shared.register(\n            forTaskWithIdentifier: \"com.example.app.refresh\",\n            using: nil  // nil = default background queue\n        ) { task in\n            self.handleAppRefresh(task: task as! BGAppRefreshTask)\n        }\n\n        BGTaskScheduler.shared.register(\n            forTaskWithIdentifier: \"com.example.app.db-cleanup\",\n            using: nil\n        ) { task in\n            self.handleDatabaseCleanup(task: task as! BGProcessingTask)\n        }\n\n        return true\n    }\n}\n```\n\n### SwiftUI Registration\n\n```swift\nimport SwiftUI\nimport BackgroundTasks\n\n@main\nstruct MyApp: App {\n    init() {\n        BGTaskScheduler.shared.register(\n            forTaskWithIdentifier: \"com.example.app.refresh\",\n            using: nil\n        ) { task in\n            BackgroundTaskManager.shared.handleAppRefresh(\n                task: task as! BGAppRefreshTask\n            )\n        }\n    }\n\n    var body: some Scene {\n        WindowGroup { ContentView() }\n    }\n}\n```\n\n## BGAppRefreshTask Patterns\n\nShort-lived tasks (~30 seconds) for fetching small data updates. The system\ndecides when to launch based on usage patterns.\n\n```swift\nfunc scheduleAppRefresh() {\n    let request = BGAppRefreshTaskRequest(\n        identifier: \"com.example.app.refresh\"\n    )\n    request.earliestBeginDate = Date(timeIntervalSinceNow: 15 * 60)\n\n    do {\n        try BGTaskScheduler.shared.submit(request)\n    } catch {\n        print(\"Could not schedule app refresh: \\(error)\")\n    }\n}\n\nfunc handleAppRefresh(task: BGAppRefreshTask) {\n    // Schedule the next refresh before doing work\n    scheduleAppRefresh()\n\n    let fetchTask = Task {\n        do {\n            let data = try await APIClient.shared.fetchLatestFeed()\n            await FeedStore.shared.update(with: data)\n            task.setTaskCompleted(success: true)\n        } catch {\n            task.setTaskCompleted(success: false)\n        }\n    }\n\n    // CRITICAL: Handle expiration -- system can revoke time at any moment\n    task.expirationHandler = {\n        fetchTask.cancel()\n        task.setTaskCompleted(success: false)\n    }\n}\n```\n\n## BGProcessingTask Patterns\n\nLong-running tasks (minutes) for maintenance, data processing, or cleanup.\nRuns only when device is idle and (optionally) charging.\n\n```swift\nfunc scheduleProcessingTask() {\n    let request = BGProcessingTaskRequest(\n        identifier: \"com.example.app.db-cleanup\"\n    )\n    request.requiresNetworkConnectivity = false\n    request.requiresExternalPower = true\n    request.earliestBeginDate = Date(timeIntervalSinceNow: 60 * 60)\n\n    do {\n        try BGTaskScheduler.shared.submit(request)\n    } catch {\n        print(\"Could not schedule processing task: \\(error)\")\n    }\n}\n\nfunc handleDatabaseCleanup(task: BGProcessingTask) {\n    scheduleProcessingTask()\n\n    let cleanupTask = Task {\n        do {\n            try await DatabaseManager.shared.purgeExpiredRecords()\n            try await DatabaseManager.shared.rebuildIndexes()\n            task.setTaskCompleted(success: true)\n        } catch {\n            task.setTaskCompleted(success: false)\n        }\n    }\n\n    task.expirationHandler = {\n        cleanupTask.cancel()\n        task.setTaskCompleted(success: false)\n    }\n}\n```\n\n## BGContinuedProcessingTask (iOS 26+)\n\nA task initiated in the foreground by a user action that continues running in the\nbackground. The system displays progress via a Live Activity. Conforms to\n`ProgressReporting`.\n\n**Availability:** iOS 26.0+, iPadOS 26.0+\n\nUnlike `BGAppRefreshTask` and `BGProcessingTask`, this task starts immediately\nfrom the foreground. The system can terminate it under resource pressure,\nprioritizing tasks that report minimal progress first.\n\n```swift\nimport BackgroundTasks\n\nfunc startExport() {\n    // Register the task handler at app launch, not here.\n    // BGTaskScheduler requires registration before app launch completes.\n    let request = BGContinuedProcessingTaskRequest(\n        identifier: \"com.example.app.export\",\n        title: \"Exporting Photos\",\n        subtitle: \"Processing 247 items\"\n    )\n    // .queue: begin as soon as possible if can't run immediately\n    // .fail: fail submission if can't run immediately\n    request.strategy = .queue\n\n    do {\n        try BGTaskScheduler.shared.submit(request)\n    } catch {\n        print(\"Could not submit continued processing task: \\(error)\")\n    }\n}\n\nfunc performExport(task: BGContinuedProcessingTask) async {\n    let items = await PhotoLibrary.shared.itemsToExport()\n    let progress = task.progress\n    progress.totalUnitCount = Int64(items.count)\n\n    for (index, item) in items.enumerated() {\n        if Task.isCancelled { break }\n\n        await PhotoExporter.shared.export(item)\n        progress.completedUnitCount = Int64(index + 1)\n\n        // Update the user-facing title/subtitle\n        task.updateTitle(\n            \"Exporting Photos\",\n            subtitle: \"\\(index + 1) of \\(items.count) complete\"\n        )\n    }\n\n    task.setTaskCompleted(success: !Task.isCancelled)\n}\n```\n\nCheck whether the system supports the resources your task needs:\n\n```swift\nlet supported = BGTaskScheduler.supportedResources\nif supported.contains(.gpu) {\n    request.requiredResources = .gpu\n}\n```\n\n## Background URLSession Downloads\n\nUse `URLSessionConfiguration.background` for downloads that continue even after\nthe app is suspended or terminated. The system handles the transfer out of\nprocess.\n\n```swift\nclass DownloadManager: NSObject, URLSessionDownloadDelegate {\n    static let shared = DownloadManager()\n\n    private lazy var session: URLSession = {\n        let config = URLSessionConfiguration.background(\n            withIdentifier: \"com.example.app.background-download\"\n        )\n        config.isDiscretionary = true\n        config.sessionSendsLaunchEvents = true\n        return URLSession(configuration: config, delegate: self, delegateQueue: nil)\n    }()\n\n    func startDownload(from url: URL) {\n        let task = session.downloadTask(with: url)\n        task.earliestBeginDate = Date(timeIntervalSinceNow: 60)\n        task.resume()\n    }\n\n    func urlSession(\n        _ session: URLSession,\n        downloadTask: URLSessionDownloadTask,\n        didFinishDownloadingTo location: URL\n    ) {\n        // Move file from tmp before this method returns\n        let dest = FileManager.default.urls(\n            for: .documentDirectory, in: .userDomainMask\n        )[0].appendingPathComponent(\"download.dat\")\n        try? FileManager.default.moveItem(at: location, to: dest)\n    }\n\n    func urlSession(\n        _ session: URLSession,\n        task: URLSessionTask,\n        didCompleteWithError error: (any Error)?\n    ) {\n        if let error { print(\"Download failed: \\(error)\") }\n    }\n}\n```\n\nHandle app relaunch — store and invoke the system completion handler:\n\n```swift\n// In AppDelegate:\nfunc application(\n    _ application: UIApplication,\n    handleEventsForBackgroundURLSession identifier: String,\n    completionHandler: @escaping () -> Void\n) {\n    backgroundSessionCompletionHandler = completionHandler\n}\n\n// In URLSessionDelegate — call stored handler when events finish:\nfunc urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) {\n    Task { @MainActor in\n        self.backgroundSessionCompletionHandler?()\n        self.backgroundSessionCompletionHandler = nil\n    }\n}\n```\n\n## Background Push Triggers\n\nSilent push notifications wake your app briefly to fetch new content. Set\n`content-available: 1` in the push payload.\n\n```json\n{ \"aps\": { \"content-available\": 1 }, \"custom-data\": \"new-messages\" }\n```\n\nHandle in AppDelegate:\n\n```swift\nfunc application(\n    _ application: UIApplication,\n    didReceiveRemoteNotification userInfo: [AnyHashable: Any],\n    fetchCompletionHandler completionHandler:\n        @escaping (UIBackgroundFetchResult) -> Void\n) {\n    Task {\n        do {\n            let hasNew = try await MessageStore.shared.fetchNewMessages()\n            completionHandler(hasNew ? .newData : .noData)\n        } catch {\n            completionHandler(.failed)\n        }\n    }\n}\n```\n\nEnable \"Remote notifications\" in Background Modes and register:\n\n```swift\nUIApplication.shared.registerForRemoteNotifications()\n```\n\n## Common Mistakes\n\n### 1. Missing Info.plist identifiers\n\n```swift\n// DON'T: Submit a task whose identifier isn't in BGTaskSchedulerPermittedIdentifiers\nlet request = BGAppRefreshTaskRequest(identifier: \"com.example.app.refresh\")\ntry BGTaskScheduler.shared.submit(request)  // Throws .notPermitted\n\n// DO: Add every identifier to Info.plist BGTaskSchedulerPermittedIdentifiers\n// <string>com.example.app.refresh</string>\n```\n\n### 2. Not calling setTaskCompleted(success:)\n\n```swift\n// DON'T: Return without marking completion -- system penalizes future scheduling\nfunc handleRefresh(task: BGAppRefreshTask) {\n    Task {\n        let data = try await fetchData()\n        await store.update(data)\n        // Missing: task.setTaskCompleted(success:)\n    }\n}\n\n// DO: Always call setTaskCompleted on every code path\nfunc handleRefresh(task: BGAppRefreshTask) {\n    let work = Task {\n        do {\n            let data = try await fetchData()\n            await store.update(data)\n            task.setTaskCompleted(success: true)\n        } catch {\n            task.setTaskCompleted(success: false)\n        }\n    }\n    task.expirationHandler = {\n        work.cancel()\n        task.setTaskCompleted(success: false)\n    }\n}\n```\n\n### 3. Ignoring the expiration handler\n\n```swift\n// DON'T: Assume your task will run to completion\nfunc handleCleanup(task: BGProcessingTask) {\n    Task { await heavyWork() }\n    // No expirationHandler -- system terminates ungracefully\n}\n\n// DO: Set expirationHandler to cancel work and mark completed\nfunc handleCleanup(task: BGProcessingTask) {\n    let work = Task { await heavyWork() }\n    task.expirationHandler = {\n        work.cancel()\n        task.setTaskCompleted(success: false)\n    }\n}\n```\n\n### 4. Scheduling too frequently\n\n```swift\n// DON'T: Request refresh every minute -- system throttles aggressively\nrequest.earliestBeginDate = Date(timeIntervalSinceNow: 60)\n\n// DO: Use reasonable intervals (15+ minutes for refresh)\nrequest.earliestBeginDate = Date(timeIntervalSinceNow: 15 * 60)\n// earliestBeginDate is a hint -- the system chooses actual launch time\n```\n\n### 5. Over-relying on background time\n\n```swift\n// DON'T: Start a 10-minute operation assuming it will finish\nfunc handleRefresh(task: BGAppRefreshTask) {\n    Task { await tenMinuteSync() }\n}\n\n// DO: Design work to be incremental and cancellable\nfunc handleRefresh(task: BGAppRefreshTask) {\n    let work = Task {\n        for batch in batches {\n            try Task.checkCancellation()\n            await processBatch(batch)\n            await saveBatchProgress(batch)\n        }\n        task.setTaskCompleted(success: true)\n    }\n    task.expirationHandler = {\n        work.cancel()\n        task.setTaskCompleted(success: false)\n    }\n}\n```\n\n## Review Checklist\n\n- [ ] All task identifiers listed in `BGTaskSchedulerPermittedIdentifiers`\n- [ ] Required `UIBackgroundModes` enabled (`fetch`, `processing`)\n- [ ] Tasks registered before app launch completes\n- [ ] `setTaskCompleted(success:)` called on every code path\n- [ ] `expirationHandler` set and cancels in-flight work\n- [ ] Next task scheduled inside the handler (re-schedule pattern)\n- [ ] `earliestBeginDate` uses reasonable intervals (15+ min for refresh)\n- [ ] Background URLSession uses delegate (not async/closures)\n- [ ] Background URLSession file moved in `didFinishDownloadingTo` before return\n- [ ] `handleEventsForBackgroundURLSession` stores and calls completion handler\n- [ ] Background push payload includes `content-available: 1`\n- [ ] `fetchCompletionHandler` called promptly with correct result\n- [ ] BGContinuedProcessingTask reports progress via `ProgressReporting`\n- [ ] Work is incremental and cancellation-safe (`Task.checkCancellation()`)\n- [ ] No blocking synchronous work in task handlers\n\n## References\n\n- See [references/background-task-patterns.md](references/background-task-patterns.md) for extended patterns, background\n  URLSession edge cases, debugging with simulated launches, and background push\n  best practices.\n- [BGTaskScheduler](https://sosumi.ai/documentation/backgroundtasks/bgtaskscheduler)\n- [BGAppRefreshTask](https://sosumi.ai/documentation/backgroundtasks/bgapprefreshtask)\n- [BGProcessingTask](https://sosumi.ai/documentation/backgroundtasks/bgprocessingtask)\n- [BGContinuedProcessingTask](https://sosumi.ai/documentation/backgroundtasks/bgcontinuedprocessingtask) (iOS 26+)\n- [BGContinuedProcessingTaskRequest](https://sosumi.ai/documentation/backgroundtasks/bgcontinuedprocessingtaskrequest) (iOS 26+)\n- [Using background tasks to update your app](https://sosumi.ai/documentation/uikit/using-background-tasks-to-update-your-app)\n- [Performing long-running tasks on iOS and iPadOS](https://sosumi.ai/documentation/backgroundtasks/performing-long-running-tasks-on-ios-and-ipados)","tags":["background","processing","swift","ios","skills","dpearson2699"],"capabilities":["skill","source-dpearson2699","category-swift-ios-skills"],"categories":["swift-ios-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/dpearson2699/swift-ios-skills/background-processing","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"install_from":"skills.sh"}},"qualityScore":"0.300","qualityRationale":"deterministic score 0.30 from registry signals: · indexed on skills.sh · published under dpearson2699/swift-ios-skills","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T05:40:40.126Z","embedding":null,"createdAt":"2026-04-18T20:34:15.138Z","updatedAt":"2026-04-22T05:40:40.126Z","lastSeenAt":"2026-04-22T05:40:40.126Z","tsv":"'/documentation/backgroundtasks/bgapprefreshtask)':1228 '/documentation/backgroundtasks/bgcontinuedprocessingtask)':1236 '/documentation/backgroundtasks/bgcontinuedprocessingtaskrequest)':1242 '/documentation/backgroundtasks/bgprocessingtask)':1232 '/documentation/backgroundtasks/bgtaskscheduler)':1224 '/documentation/backgroundtasks/performing-long-running-tasks-on-ios-and-ipados)':1266 '/documentation/uikit/using-background-tasks-to-update-your-app)':1254 '0':693 '1':559,571,781,791,841,1174 '10':1046 '15':262,1015,1022,1143 '2':875 '247':494 '26':52,56,404,1238,1244 '26.0':434,436 '3':943 '30':234 '4':993 '5':1034 '60':263,361,362,667,1010,1023 'action':414 'activ':428 'actual':1031 'add':868 'aggress':1006 'also':105 'alway':908 'anyhash':808 'ap':787 'apiclient.shared.fetchlatestfeed':296 'app':132,146,208,273,473,481,609,720,771,1111,1251 'appdeleg':155,731,800 'appendingpathcompon':694 'applic':139,159,160,733,734,803,804 'assum':951,1049 'async':534 'async/closures':1152 'avail':432,780,790,1173 'await':295,297,385,388,537,553,820,899,901,926,928,963,986,1058,1081,1084 'background':1,9,15,23,26,57,61,64,68,119,122,125,174,420,597,763,833,1039,1147,1153,1167,1208,1217,1246 'background-push-trigg':67 'background-urlsession-download':60 'backgroundsessioncompletionhandl':742 'backgroundtask':21,152,204,465 'backgroundtaskmanager.shared.handleapprefresh':217 'base':247 'batch':1076,1078,1083,1086 'begin':497 'best':1219 'bgapprefreshtask':40,43,182,221,228,279,438,894,918,1056,1071,1225 'bgapprefreshtask-pattern':42 'bgapprefreshtaskrequest':256,859 'bgcontinuedprocessingtask':50,54,402,533,1181,1233 'bgcontinuedprocessingtask-io':53 'bgcontinuedprocessingtaskrequest':486,1239 'bgprocessingtask':45,48,195,323,378,440,961,982,1229 'bgprocessingtask-pattern':47 'bgprocessingtaskrequest':350 'bgtaskschedul':35,38,127,477,1221 'bgtaskscheduler-registr':37 'bgtaskscheduler.error.code.notpermitted':98 'bgtaskscheduler.shared.register':167,183,210 'bgtaskscheduler.shared.submit':266,365,519,863 'bgtaskscheduler.supportedresources':591 'bgtaskschedulerpermittedidentifi':94,100,856,873,1102 'block':1195 'bodi':223 'bool':166 'break':552 'briefli':772 'call':746,877,909,1116,1164,1176 'cancel':974,1067,1124,1191 'cancellation-saf':1190 'capabl':118 'case':1211 'catch':268,304,367,393,521,826,934 'category-swift-ios-skills' 'charg':344 'check':578 'checklist':77,80,1096 'choos':1030 'class':154,623 'cleanup':103,186,335,353 'cleanuptask':381 'cleanuptask.cancel':398 'code':913,1119 'com.example.app.background':640 'com.example.app.db':102,185,352 'com.example.app.export':104,488 'com.example.app.refresh':101,169,212,258,861,874 'common':71,74,839 'common-mistak':73 'complet':134,483,574,727,886,957,978,1113,1165 'completionhandl':739,743,811,822,827 'config':637,649 'config.isdiscretionary':642 'config.sessionsendslaunchevents':644 'configur':31,34,84,648 'conform':429 'content':29,776,779,789,1172 'content-avail':778,788,1171 'contentview':227 'continu':416,526,605 'correct':1179 'could':270,369,523 'critic':308 'custom':793 'custom-data':792 'data':239,293,300,332,794,897,903,924,930 'databasemanager.shared.purgeexpiredrecords':386 'databasemanager.shared.rebuildindexes':389 'date':260,359,665,1008,1020 'debug':1212 'decid':243 'declar':90 'default':173 'deleg':650,1150 'delegatequeu':652 'design':1061 'dest':687,701 'devic':339 'didcompletewitherror':708 'didfinishdownloadingto':675,1158 'didfinishlaunchingwithopt':140,162 'didreceiveremotenotif':806 'display':423 'documentdirectori':690 'download':59,63,599,603,641,716 'download.dat':695 'downloadmanag':624,630 'downloadtask':673 'dpearson2699':8 'earliestbegind':1024,1139 'edg':1210 'enabl':106,121,829,1105 'error':275,374,529,709,711,714,718 'escap':740,812 'even':606 'event':750 'everi':85,869,912,1002,1118 'execut':14 'expir':310,946 'expirationhandl':966,972,1121 'export':490,567 'extend':1206 'face':564 'fail':507,508,717,828 'fals':307,322,355,396,401,937,942,992,1094 'feedstore.shared.update':298 'fetch':112,123,237,774,1106 'fetchcompletionhandl':810,1175 'fetchdata':900,927 'fetchtask':289 'fetchtask.cancel':319 'file':679,1155 'filemanager.default.moveitem':697 'filemanager.default.urls':688 'finish':751,1052 'first':462 'flight':1127 'forbackgroundurlsess':754 'foreground':410,447 'fortaskwithidentifi':168,184,211 'framework':22 'frequent':996 'func':158,252,276,346,375,466,530,654,669,702,732,752,802,891,915,958,979,1053,1068 'futur':889 'gpu':594,596 'handl':309,616,719,798 'handleapprefresh':277 'handlecleanup':959,980 'handledatabasecleanup':376 'handleeventsforbackgroundurlsess':736,1161 'handler':130,471,728,748,947,1134,1166,1200 'handlerefresh':892,916,1054,1069 'hasnew':818,823 'heavywork':964,987 'hint':1027 'identifi':87,257,351,487,737,844,852,860,870,1099 'idl':341 'ignor':944 'immedi':444,506,514 'import':151,201,203,464 'in-flight':1125 'includ':1170 'increment':1065,1188 'index':546,558,570 'info.plist':30,83,92,843,872 'infoplist':33 'infoplist-configur':32 'init':209 'initi':147,407 'insid':1132 'int64':543,557 'interv':1014,1142 'invok':724 'io':4,18,51,55,403,433,1237,1243,1261 'ipado':435,1263 'isn':853 'item':495,536,547,555 'items.count':544,573 'items.enumerated':549 'json':786 'launch':133,246,474,482,1032,1112,1215 'launchopt':163 'lazi':632 'let':254,288,292,348,380,484,535,539,589,628,636,659,686,713,817,857,896,919,923,983,1072 'list':1100 'live':232,427 'locat':676,699 'long':326,1257 'long-run':325,1256 'main':153,205 'mainactor':758 'mainten':331 'mark':885,977 'messag':797 'messagestore.shared.fetchnewmessages':821 'method':684 'min':1144 'minim':460 'minut':329,1003,1016,1047 'miss':842,904 'mistak':72,75,840 'mode':120,834 'moment':317 'move':678,1156 'must':88 'myapp':207 'need':587 'new':775,796 'new-messag':795 'newdata':824 'next':282,1129 'nil':171,172,188,214,653,762 'nodata':825 'notif':28,768,831 'notpermit':866 'nsobject':625 'oper':1048 'option':343 'over-r':1035 'path':914,1120 'pattern':41,44,46,49,229,250,324,1138,1207 'payload':785,1169 'penal':888 'perform':1255 'performexport':531 'photo':491,568 'photoexporter.shared.export':554 'photolibrary.shared.itemstoexport':538 'possibl':501 'practic':1220 'pressur':455 'print':269,368,522,715 'priorit':456 'privat':631 'process':2,10,113,126,333,372,493,527,621,1107 'processbatch':1082 'progress':424,461,540,1183 'progress.completedunitcount':556 'progress.totalunitcount':542 'progressreport':431,1185 'prompt':1177 'push':27,65,69,764,767,784,1168,1218 'queue':175,496,516 're':1136 're-schedul':1135 'reason':1013,1141 'refer':81,82,1201 'references/background-task-patterns.md':1203,1204 'refresh':274,283,1001,1018,1146 'regist':11,129,137,143,468,836,1109 'registr':36,39,128,149,199,479 'relaunch':721 'reli':1037 'remot':830 'report':459,1182 'request':255,267,349,366,485,520,858,864,1000 'request.earliestbegindate':259,358,1007,1019 'request.requiredresources':595 'request.requiresexternalpower':356 'request.requiresnetworkconnectivity':354 'request.strategy':515 'requir':108,478,1103 'resourc':454,584 'result':1180 'return':196,646,685,883,1160 'review':76,79,1095 'review-checklist':78 'revok':313 'run':327,336,417,505,513,955,1258 'safe':1192 'savebatchprogress':1085 'scene':225 'schedul':12,272,280,371,890,994,1131,1137 'scheduleapprefresh':253,287 'scheduleprocessingtask':347,379 'second':235 'see':1202 'self':651 'self.backgroundsessioncompletionhandler':760,761 'self.handleapprefresh':178 'self.handledatabasecleanup':191 'session':634,671,704,755 'session.downloadtask':661 'set':777,971,1122 'settaskcomplet':878,910,1114 'share':629 'short':231 'short-liv':230 'sign':117 'silent':766 'simul':1214 'skill':5,6 'small':238 'soon':499 'sosumi.ai':1223,1227,1231,1235,1241,1253,1265 'sosumi.ai/documentation/backgroundtasks/bgapprefreshtask)':1226 'sosumi.ai/documentation/backgroundtasks/bgcontinuedprocessingtask)':1234 'sosumi.ai/documentation/backgroundtasks/bgcontinuedprocessingtaskrequest)':1240 'sosumi.ai/documentation/backgroundtasks/bgprocessingtask)':1230 'sosumi.ai/documentation/backgroundtasks/bgtaskscheduler)':1222 'sosumi.ai/documentation/backgroundtasks/performing-long-running-tasks-on-ios-and-ipados)':1264 'sosumi.ai/documentation/uikit/using-background-tasks-to-update-your-app)':1252 'source-dpearson2699' 'start':443,1044 'startdownload':655 'startexport':467 'static':627 'store':722,747,1162 'store.update':902,929 'string':738 'struct':206 'submiss':509 'submit':96,525,848 'subtitl':492,569 'success':302,306,321,391,395,400,576,879,906,932,936,941,991,1088,1093,1115 'support':582,590 'supported.contains':593 'suspend':611 'swift':3,150,200,251,345,463,588,622,729,801,837,845,880,948,997,1041 'swiftui':142,198,202 'synchron':1196 'system':242,311,422,449,581,615,726,887,967,1004,1029 'target':116 'task':86,176,179,180,189,192,193,215,218,219,233,278,290,328,373,377,382,406,442,457,470,528,532,586,660,706,757,815,850,893,895,917,921,953,960,962,981,985,1055,1057,1070,1074,1098,1108,1130,1199,1247,1259 'task.checkcancellation':1080,1193 'task.earliestbegindate':664 'task.expirationhandler':318,397,938,988,1090 'task.iscancelled':551,577 'task.progress':541 'task.resume':668 'task.settaskcompleted':301,305,320,390,394,399,575,905,931,935,940,990,1087,1092 'task.updatetitle':566 'tenminutesync':1059 'termin':451,613,968 'throttl':1005 'throw':97,865 'time':314,1033,1040 'timeintervalsincenow':261,360,666,1009,1021 'titl':489 'title/subtitle':565 'tmp':681 'transfer':618 'tri':265,294,364,384,387,518,696,819,862,898,925,1079 'trigger':66,70,765 'true':197,303,357,392,643,645,933,1089 'uiapplic':161,735,805 'uiapplication.launchoptionskey':164 'uiapplication.shared.registerforremotenotifications':838 'uiapplicationdeleg':157 'uibackgroundfetchresult':813 'uibackgroundmod':109,111,1104 'uikit':136,148 'uirespond':156 'ungrac':969 'unlik':437 'updat':240,560,1249 'url':657,658,663,677 'urlsess':24,58,62,598,635,647,670,672,703,705,756,1148,1154,1209 'urlsessionconfiguration.background':601,638 'urlsessiondeleg':745 'urlsessiondidfinishev':753 'urlsessiondownloaddeleg':626 'urlsessiondownloadtask':674 'urlsessiontask':707 'usag':249 'use':19,170,187,213,600,1012,1140,1149,1245 'user':413,563 'user-fac':562 'userdomainmask':692 'userinfo':807 'var':222,633 'via':425,1184 'void':741,814 'wake':769 'whether':579 'whose':851 'windowgroup':226 'withidentifi':639 'without':884 'work':16,286,920,975,984,1062,1073,1128,1186,1197 'work.cancel':939,989,1091 'xcode':115 'xml':99,110","prices":[{"id":"f14377c8-1d94-44f7-b43a-4326eef03064","listingId":"dd44aa8d-1a0c-40e6-adbb-30328fd72957","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"dpearson2699","category":"swift-ios-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T20:34:15.138Z"}],"sources":[{"listingId":"dd44aa8d-1a0c-40e6-adbb-30328fd72957","source":"github","sourceId":"dpearson2699/swift-ios-skills/background-processing","sourceUrl":"https://github.com/dpearson2699/swift-ios-skills/tree/main/skills/background-processing","isPrimary":false,"firstSeenAt":"2026-04-18T22:00:47.116Z","lastSeenAt":"2026-04-22T00:53:41.753Z"},{"listingId":"dd44aa8d-1a0c-40e6-adbb-30328fd72957","source":"skills_sh","sourceId":"dpearson2699/swift-ios-skills/background-processing","sourceUrl":"https://skills.sh/dpearson2699/swift-ios-skills/background-processing","isPrimary":true,"firstSeenAt":"2026-04-18T20:34:15.138Z","lastSeenAt":"2026-04-22T05:40:40.126Z"}],"details":{"listingId":"dd44aa8d-1a0c-40e6-adbb-30328fd72957","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"dpearson2699","slug":"background-processing","source":"skills_sh","category":"swift-ios-skills","skills_sh_url":"https://skills.sh/dpearson2699/swift-ios-skills/background-processing"},"updatedAt":"2026-04-22T05:40:40.126Z"}}