{"id":22416101,"url":"https://github.com/appunite/cedric","last_synced_at":"2025-08-01T01:30:55.416Z","repository":{"id":56905748,"uuid":"132359203","full_name":"appunite/Cedric","owner":"appunite","description":"Single / multiple files downloader written in pure Swift","archived":false,"fork":false,"pushed_at":"2024-05-04T16:51:11.000Z","size":3478,"stargazers_count":13,"open_issues_count":2,"forks_count":3,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-11-13T14:03:01.371Z","etag":null,"topics":["downloader","file","ios","parallel","serial","urlsession"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appunite.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-05-06T17:05:34.000Z","updated_at":"2024-08-09T09:11:15.000Z","dependencies_parsed_at":"2024-01-02T09:27:45.055Z","dependency_job_id":"2133e333-41ba-4c62-9d7a-d7d2f340f6de","html_url":"https://github.com/appunite/Cedric","commit_stats":{"total_commits":67,"total_committers":3,"mean_commits":"22.333333333333332","dds":0.04477611940298509,"last_synced_commit":"c55e45f3d7760d03605d04489860f5cd0e3a94c4"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appunite%2FCedric","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appunite%2FCedric/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appunite%2FCedric/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appunite%2FCedric/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appunite","download_url":"https://codeload.github.com/appunite/Cedric/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228321226,"owners_count":17901604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["downloader","file","ios","parallel","serial","urlsession"],"created_at":"2024-12-05T15:14:37.860Z","updated_at":"2024-12-05T15:14:38.519Z","avatar_url":"https://github.com/appunite.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Carthage compatible](https://img.shields.io/badge/Carthage-Compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Cocoapods](https://img.shields.io/cocoapods/v/Cedric.svg?style=flat)](https://cocoapods.org/pods/Cedric)\n[![Platform](https://img.shields.io/cocoapods/p/Cedric.svg?style=flat)](https://cocoapods.org/pods/Cedric)\n[![Build Status](https://travis-ci.org/appunite/Cedric.svg)](https://travis-ci.org/codecov/example-swift) \n[![codecov.io](https://codecov.io/gh/appunite/Cedric/branch/master/graphs/badge.svg)](https://codecov.io/gh/codecov/example-swift/branch/master)\n[![License](https://img.shields.io/cocoapods/l/Cedric.svg?style=flat)](https://cocoapods.org/pods/Cedric)\n\n# Cedric\n\n## Who am I? \n\nHey! My name is **Cedric**, I was born to help iOS / macOS developers with a quite difficult task that is downloading files. \n\n## What are my responsibilities? \n\nBehind just downloading files I'm able to perform operations like:\n- notify about updates via **MulticastDelegate**\n- perform operations in a **serial** or **parallel (with limit)** options\n- perform browser-like download with **always creating new files**\n- **reuse** already downloaded files for the same resource \n- notify that all resources from queue are downloaded \n- apply attributes to files specified in resource\n\n## Example usage \n\n```swift\nlet resource = DownloadResource(id: asset.id, source: asset.url, destinationName: asset.name + \".mp3\", mode: .notDownloadIfExists)\ntry cedric.enqueueDownload(forResource: resource) \n\nfunc cedric(_ cedric: Cedric, didFinishDownloadingResource resource: DownloadResource, toFile file: DownloadedFile) {\n   do { \n      let url = try file.url()\n      guard let image = UIImage(contentsOfFile: url.path) else { return }\t\n      fileImageView.image = image\n   } catch let error {\n      ...\n   }\n}\n```\n\n## Cedric Configuration Modes\n\nAs I've mentioned, I'm able to work in different modes with allowing for serial or parallel downloading. \n\nUsing serial mode (downloading files in the queue one by one):\n\n```swift\nlet configuration = CedricConfiguration(mode: .serial)\nreturn Cedric(configuration: configuration)\n```\n\n\u003cimg src=\"Resources/cedric-serial.gif\" width=\"300\" height=\"500\" /\u003e\n\nUsing parallel mode (with concurent 3 tasks): \n\n```swift\nlet configuration = CedricConfiguration(mode: .parallel(max: 3))\nreturn Cedric(configuration: configuration)\n```\n\n\u003cimg src=\"Resources/cedric-parallel.gif\" width=\"300\" height=\"500\" /\u003e\n\n**Important note**\nBy default all files are stored in \"Downloads\" directory, if you want to store them in different directory please pass it's name to `CedricConfiguration` object. The same configuration should be passed if you use `FileManager.cedricPath(...)`\n\n### Carthage\n\nAdd the following entry in your Cartfile:\n\n```\ngithub \"appunite/Cedric\"\n```\n\nThen run `carthage update`.\n\n### Cocoapods\n\nAdd the following entry in your Podfile\n\n```\npod 'Cedric'\n```\n\nThen run `pod install`.\n\n### Contribution\n\nProject is created and maintained by **Szymon Mrozek**.\n\nWe could use your help with reporting or fixing bugs. We would also like to hear from you about feature suggestions. If you have an idea how to make Cedric better you are welcome to send us a Pull Request.\n\n### License\n\nCedric is released under an MIT license. See [License.md](LICENSE.md) for more information.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappunite%2Fcedric","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappunite%2Fcedric","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappunite%2Fcedric/lists"}