{"id":27129668,"url":"https://github.com/tutorialwork/cloud_kit","last_synced_at":"2025-08-07T20:21:38.288Z","repository":{"id":56827099,"uuid":"353991520","full_name":"Tutorialwork/cloud_kit","owner":"Tutorialwork","description":"Flutter plugin to use CloudKit in your iOS app","archived":false,"fork":false,"pushed_at":"2024-09-14T12:27:28.000Z","size":2292,"stargazers_count":14,"open_issues_count":6,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-14T22:23:31.969Z","etag":null,"topics":["apple","cloudkit","dart","flutter","flutter-package","flutter-plugin","ios","swift"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/cloud_kit","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tutorialwork.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2021-04-02T10:55:16.000Z","updated_at":"2024-09-14T12:35:50.000Z","dependencies_parsed_at":"2024-01-09T18:38:34.955Z","dependency_job_id":null,"html_url":"https://github.com/Tutorialwork/cloud_kit","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":0.06666666666666665,"last_synced_commit":"6950c5fee2271f21918578607763af3fdbe55911"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tutorialwork%2Fcloud_kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tutorialwork%2Fcloud_kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tutorialwork%2Fcloud_kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tutorialwork%2Fcloud_kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tutorialwork","download_url":"https://codeload.github.com/Tutorialwork/cloud_kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247721903,"owners_count":20985084,"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":["apple","cloudkit","dart","flutter","flutter-package","flutter-plugin","ios","swift"],"created_at":"2025-04-07T19:56:57.049Z","updated_at":"2025-04-07T19:56:57.534Z","avatar_url":"https://github.com/Tutorialwork.png","language":"Swift","readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/Tutorialwork/cloud_kit/main/images/logo.png\" height=\"200\"\u003e\n\u003c/div\u003e\n\n# CloudKit\n\nCloudKit is a simple Flutter package to access on iOS devices the iCloud using the Apple CloudKit Api.\nYou can save with the package key value pairs in the private database of the users iCloud.\n\n# 📝 Usage\n\nSimply create a new instance of the CloudKit class with the container id of the CloudKit container you created.\nAnd then, if the user is signed in to their iCloud account, you can store and delete key-value pairs.\n\nFirst, instantiate a CloudKit instance to use the plugin.\nTo do this, you will need to pass your container id, which you will need to create in order to use CloudKit.\nMore information about creating a container can be found in the [Setup section](#-setup) of this page.\n\n```dart\nCloudKit cloudKit = CloudKit('iCloud.dev.tutorialwork.cloudkitExample'); // Enter your container id\n```\n\nBefore start using CloudKit you need to check if the user is logged in, otherwise the process of saving and getting value will fail.\n\n```dart\nCloudKitAccountStatus accountStatus = await cloudKit.getAccountStatus()\nif (accountStatus == CloudKitAccountStatus.available) {\n  // User is logged in to iCloud, you can start using the plugin\n}\n```\n\nOnce the instance has been created, you can access it to retrieve, save and delete entries.\n\n```dart\ncloudKit.save('key', 'value'); // both must be strings, if you want to save objects use the JSON format\ncloudKit.get('key'); // returns a string with the value or null if the key was not found or you are not on iOS\ncloudKit.delete('key'); // returns a boolean if it was successful\n```\n\nYou can also delete the entire user database with a single command.\n\n```dart\ncloudKit.clearDatabase(); // also returns a boolean if successful\n```\n\nAnd if you want to check what's in the database, you can also get all entries.\n\n```dart\ncloudKit.getAll(); // return a map with all key-value pairs -\u003e {key: value, secondKey: secondValue}\n```\n\n# 💻 Setup\n\n- Add the iCloud capability to your XCode project and tick all the three options and create with the plus icon a new CloudKit container and select it.\n\n\u003cdiv\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/Tutorialwork/cloud_kit/main/images/step1.png\" height=\"300\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/Tutorialwork/cloud_kit/main/images/step2.png\" height=\"300\"\u003e\n\u003c/div\u003e\n\n- Then it's important for the next step that you are creating your first entry. You can do this with the [example app](https://github.com/Tutorialwork/cloud_kit/tree/main/example) in this repository or with your own app by saving your first key value pair.\n\n\u003cimg src=\"https://raw.githubusercontent.com/Tutorialwork/cloud_kit/main/images/step3.png\" height=\"300\"\u003e\n\n- After that please open the [CloudKit Dashboard](https://icloud.developer.apple.com) and select your created CloudKit container and then open the \"**Indexes**\" page.\nAnd select on these page the \"**StorageItem**\"\n\n\u003cimg src=\"https://raw.githubusercontent.com/Tutorialwork/cloud_kit/main/images/step4.png\" height=\"300\"\u003e\n\n- Click on \"**Add Basic Index**\" and select \"**recordName**\" and \"**Queryable**\" and then make sure you don't forgot to save your changes.\n\n\u003cimg src=\"https://raw.githubusercontent.com/Tutorialwork/cloud_kit/main/images/step5.png\" height=\"300\"\u003e\n\n- Make sure before you are deploying your app, you need to deploy the database schema using the \"**Deploy Schema Changes…**\" button.\n\n\u003cimg src=\"https://raw.githubusercontent.com/Tutorialwork/cloud_kit/main/images/step6.png\" height=\"300\"\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftutorialwork%2Fcloud_kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftutorialwork%2Fcloud_kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftutorialwork%2Fcloud_kit/lists"}