{"id":13995614,"url":"https://github.com/insidegui/CloudKitCodable","last_synced_at":"2025-07-22T22:31:26.559Z","repository":{"id":41374204,"uuid":"134169416","full_name":"insidegui/CloudKitCodable","owner":"insidegui","description":"An encoder and decoder for CKRecord","archived":false,"fork":false,"pushed_at":"2024-04-16T17:12:57.000Z","size":77,"stargazers_count":369,"open_issues_count":3,"forks_count":26,"subscribers_count":18,"default_branch":"main","last_synced_at":"2024-05-01T23:56:05.545Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/insidegui.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"insidegui"}},"created_at":"2018-05-20T16:56:48.000Z","updated_at":"2024-08-09T14:27:05.960Z","dependencies_parsed_at":"2024-01-20T18:05:03.247Z","dependency_job_id":"d3d55930-89a8-4821-832d-472dcbcfd0fa","html_url":"https://github.com/insidegui/CloudKitCodable","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insidegui%2FCloudKitCodable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insidegui%2FCloudKitCodable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insidegui%2FCloudKitCodable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insidegui%2FCloudKitCodable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/insidegui","download_url":"https://codeload.github.com/insidegui/CloudKitCodable/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227190255,"owners_count":17745235,"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":[],"created_at":"2024-08-09T14:03:30.573Z","updated_at":"2024-11-29T18:30:44.705Z","avatar_url":"https://github.com/insidegui.png","language":"Swift","readme":"# CloudKit + Codable = ❤️\n\n[![Badge showing the current build status](https://github.com/insidegui/CloudKitCodable/actions/workflows/swift-package.yml/badge.svg)](https://github.com/insidegui/CloudKitCodable/actions/workflows/swift-package.yml)\n\nThis project implements `CloudKitRecordEncoder` and `CloudKitRecordDecoder`, allowing for custom data types to be converted to/from `CKRecord` automatically.\n\n## Usage\n\nFor details on how to use CloudKitCodable, please check the included documentation.\n\n### Example\n\nDeclaring a model that can be encoded as a `CKRecord`:\n\n```swift\nstruct Person: CustomCloudKitCodable {\n    var cloudKitSystemFields: Data?\n    let name: String\n    let age: Int\n    let website: URL\n    let avatar: URL\n    let isDeveloper: Bool\n}\n```\n\nCreating a `CKRecord` from a `CustomCloudKitCodable` type:\n\n```swift\nlet rambo = Person(...)\n\ndo {\n   let record = try CloudKitRecordEncoder().encode(rambo)\n   // record is now a CKRecord you can upload to CloudKit\n} catch {\n   // something went wrong\n}\n```\n\nDecoding a `CustomCloudKitCodable` type from a `CKRecord`:\n\n```swift\nlet record = // record obtained from CloudKit\ndo {\n   let person = try CloudKitRecordDecoder().decode(Person.self, from: record)\n} catch {\n   // something went wrong\n}\n```\n\n## Minimum Deployment Targets\n\n- iOS 14\n- tvOS 14\n- watchOS 5\n- macOS 11\n- Xcode 15 (recommended)\n\n## Installation\n\n### Swift Package Manager\n\nAdd CloudKitCodable to your `Package.swift`:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/insidegui/CloudKitCodable.git\", from: \"0.3.0\")\n]\n```\n\n### Manually\n\nIf you prefer not to use Swift Package Manager, you can integrate CloudKitCodable into your project manually by copying the files in.\n","funding_links":["https://github.com/sponsors/insidegui"],"categories":["Swift"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsidegui%2FCloudKitCodable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finsidegui%2FCloudKitCodable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsidegui%2FCloudKitCodable/lists"}