[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7063":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":38,"discoverSource":39},7063,"Tiercel","Danie1s\u002FTiercel","Danie1s","Pure Swift iOS download framework with background downloads, relaunch recovery, resumable transfers, and task management.","https:\u002F\u002Fgithub.com\u002FDanie1s\u002FTiercel\u002Fwiki",null,"Swift",2864,415,35,2,0,1,8,29.86,"MIT License",false,"master",true,[25,26,27,28,29,30,31,32,33,34],"background-download","cocoapods","download-manager","file-download","ios","network","resumable-download","swift","urlsession","xcode","2026-06-12 02:01:34","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"Images\u002Flogo.png\" alt=\"Tiercel logo\" width=\"600\" \u002F>\n\u003C\u002Fdiv>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>English\u003C\u002Fstrong> |\n  \u003Ca href=\"README.zh.md\">\u003Cstrong>简体中文\u003C\u002Fstrong>\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fcocoapods.org\u002Fpods\u002FTiercel\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fv\u002FTiercel.svg?style=flat\" alt=\"CocoaPods Version\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fdeveloper.apple.com\u002Fios\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FiOS-12.0%2B-0A84FF.svg?style=flat\" alt=\"iOS 12.0+\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fswift.org\u002Fpackage-manager\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSwiftPM-supported-FA7343.svg?style=flat\" alt=\"Swift Package Manager\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fswiftpackageindex.com\u002FDanie1s\u002FTiercel\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fendpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FDanie1s%2FTiercel%2Fbadge%3Ftype%3Dplatforms\" alt=\"Platforms\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fswiftpackageindex.com\u002FDanie1s\u002FTiercel\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fendpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FDanie1s%2FTiercel%2Fbadge%3Ftype%3Dswift-versions\" alt=\"Swift Versions\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"LICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fl\u002FTiercel.svg?style=flat\" alt=\"License\" \u002F>\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  Tiercel is a production-oriented iOS download framework in pure Swift for background downloads, relaunch recovery, resumable transfers, and \u003Ccode>URLSession\u003C\u002Fcode>-based task orchestration.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  Indexed on \u003Ca href=\"https:\u002F\u002Fswiftpackageindex.com\u002FDanie1s\u002FTiercel\">Swift Package Index\u003C\u002Fa> and featured in \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmatteocrippa\u002Fawesome-swift\">awesome-swift\u003C\u002Fa> and \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fvsouza\u002Fawesome-ios\">awesome-ios\u003C\u002Fa>.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  If Tiercel helps your team ship reliable downloads, consider starring the repository.\n\u003C\u002Fp>\n\n## Why Teams Pick Tiercel\n\n- Background downloads that stay close to native `URLSession` behavior.\n- Relaunch recovery through persisted task metadata and resume data.\n- Fine-grained control for start, suspend, cancel, remove, and batch operations.\n- Multiple `SessionManager` instances so different download domains stay isolated.\n- Network policy knobs for cellular, constrained, and expensive connections.\n- Built-in speed, remaining-time, and file-validation callbacks.\n- Thread-safe internal state designed for long-running download flows.\n\n## Choose Tiercel If\n\n- You need downloads to recover after the app relaunches.\n- You manage more than one download queue, domain, or product surface.\n- You want batch downloads and operational visibility instead of ad hoc tasks.\n- You prefer a higher-level API than raw `URLSessionDownloadTask`, while still using Apple's native stack underneath.\n- You need a download layer that can be evaluated quickly through a real demo app.\n\n## At A Glance\n\n| What you need | Raw `URLSession` only | Tiercel |\n| --- | --- | --- |\n| Background downloads | Base primitives | Higher-level manager and task model |\n| Relaunch recovery | App-specific persistence work | Built-in persisted task metadata and resume data |\n| Batch operations | Manual orchestration | Multi-download helpers and manager-level controls |\n| Download domain isolation | Custom architecture | Multiple isolated `SessionManager` instances |\n| Progress and validation hooks | Hand-rolled callbacks | Built-in progress, speed, ETA, and validation APIs |\n\n## Installation\n\n### CocoaPods\n\n```ruby\nplatform :ios, '12.0'\nuse_frameworks!\n\ntarget 'YourTargetName' do\n  pod 'Tiercel'\nend\n```\n\nThen run:\n\n```bash\npod install\n```\n\n### Swift Package Manager\n\nIn Xcode, choose `File > Add Package Dependencies...` and use:\n\n```text\nhttps:\u002F\u002Fgithub.com\u002FDanie1s\u002FTiercel.git\n```\n\n### Manual Integration\n\nDrag the `Sources` directory into your project and make sure the files are included in the desired target.\n\n## Quick Start\n\n```swift\nimport Tiercel\n\nvar configuration = SessionConfiguration()\nconfiguration.allowsCellularAccess = true\nconfiguration.maxConcurrentTasksLimit = 3\n\nlet manager = SessionManager(\"downloads\", configuration: configuration)\n\nlet task = manager.download(\"https:\u002F\u002Fexample.com\u002Fvideo.mp4\")\n\ntask?.progress(onMainQueue: true) { task in\n    print(\"progress:\", task.progress.fractionCompleted)\n}.success { task in\n    print(\"saved to:\", task.filePath)\n}.failure { _ in\n    print(\"download failed\")\n}\n```\n\nYou can control downloads by URL or by task instance:\n\n```swift\nlet url = \"https:\u002F\u002Fexample.com\u002Fvideo.mp4\"\n\nmanager.start(url)\nmanager.suspend(url)\nmanager.cancel(url)\nmanager.remove(url, completely: false)\n\nif let task = task {\n    manager.start(task)\n    manager.suspend(task)\n    manager.cancel(task)\n    manager.remove(task, completely: false)\n}\n```\n\nTiercel also supports batch creation and start:\n\n```swift\nlet urls = [\n    \"https:\u002F\u002Fexample.com\u002Fepisode-1.mp4\",\n    \"https:\u002F\u002Fexample.com\u002Fepisode-2.mp4\"\n]\n\nlet tasks = manager.multiDownload(urls)\nprint(tasks.count)\n```\n\n## Background Downloads And Relaunch Recovery\n\nTiercel persists task state and resume data to disk, so downloads can be restored after the app relaunches. If the user force-quits the app, iOS stops background execution until the next launch; once the app is opened again, Tiercel can recover eligible downloads and continue from stored state.\n\nTo support native background session callbacks, wire the completion handler from `AppDelegate` to the matching `SessionManager`:\n\n```swift\nlet downloadManagers = [managerA, managerB]\n\nfunc application(_ application: UIApplication,\n                 handleEventsForBackgroundURLSession identifier: String,\n                 completionHandler: @escaping () -> Void) {\n    for manager in downloadManagers where manager.identifier == identifier {\n        manager.completionHandler = completionHandler\n        break\n    }\n}\n```\n\n## Network Policy And File Validation\n\n`SessionConfiguration` lets you tune network behavior for different products or environments:\n\n```swift\nvar configuration = SessionConfiguration()\nconfiguration.maxConcurrentTasksLimit = 3\nconfiguration.allowsCellularAccess = true\nconfiguration.allowsConstrainedNetworkAccess = true\nconfiguration.allowsExpensiveNetworkAccess = true\n\nlet manager = SessionManager(\"downloads\", configuration: configuration)\n```\n\nYou can also validate downloaded files when integrity matters:\n\n```swift\ntask?.validateFile(code: \"9e2a3650530b563da297c9246acaad5c\",\n                   type: .md5,\n                   onMainQueue: true) { task in\n    if task.validation == .correct {\n        print(\"file is valid\")\n    } else {\n        print(\"file is invalid\")\n    }\n}\n```\n\n## Compatibility\n\n- Minimum platform: `iOS 12.0+`\n- Language baseline: `Swift 5.0+`\n- Distribution: CocoaPods, Swift Package Manager, and manual source integration\n\n## Demo\n\nOpen `Demo\u002FTiercel-Demo.xcodeproj` to explore:\n\n- Single-file downloads\n- Batch downloads\n- Multiple isolated download managers\n- Background session event handling\n- Validation and progress callbacks\n\n![Tiercel demo 1](Images\u002F1.gif)\n![Tiercel demo 2](Images\u002F2.gif)\n\n## Docs And Links\n\n- [Wiki](https:\u002F\u002Fgithub.com\u002FDanie1s\u002FTiercel\u002Fwiki)\n- [Tiercel 3.0 Migration Guide](https:\u002F\u002Fgithub.com\u002FDanie1s\u002FTiercel\u002Fwiki\u002FTiercel-3.0-%E8%BF%81%E7%A7%BB%E6%8C%87%E5%8D%97)\n- [Objective-C Bridge](https:\u002F\u002Fgithub.com\u002FDanie1s\u002FTiercelObjCBridge)\n- [Contributing Guide](CONTRIBUTING.md)\n- [Security Policy](SECURITY.md)\n\n## Repository Layout\n\n- `Sources\u002FGeneral`: core session, task, cache, and status-management logic\n- `Sources\u002FExtensions`: lightweight helpers used across the framework\n- `Sources\u002FUtility`: checksum and resume-data utilities\n- `Demo`: sample iOS app for evaluation and manual testing\n\n## License\n\nTiercel is available under the MIT license. See [LICENSE](LICENSE) for details.\n","Tiercel 是一个纯 Swift 编写的 iOS 下载框架，支持后台下载、重启恢复、断点续传和基于 `URLSession` 的任务管理。其核心功能包括持久化任务元数据以实现重启后恢复下载、细粒度的任务控制（如开始、暂停、取消、移除及批量操作）以及多 `SessionManager` 实例以隔离不同下载域。此外，它还提供了网络策略调整选项和内置的速度、剩余时间及文件验证回调。适用于需要在应用重启后恢复下载、管理多个下载队列或领域、希望对下载操作有更高可见性和控制力的场景。使用 Tiercel 可以快速通过示例应用评估其性能，并且它基于 Apple 原生技术栈构建，提供比直接使用 `URLSessionDownloadTask` 更高级别的 API。","2026-06-11 03:10:21","top_language"]