Git Product home page Git Product logo

cloud_kit's Introduction

CloudKit

CloudKit is a simple Flutter package to access on iOS devices the iCloud using the Apple CloudKit Api. You can save with the package key value pairs in the private database of the users iCloud.

πŸ“ Usage

Just create a new instance of the CloudKit class with your container id of your created CloudKit container. And then you are able, if the user is signed in into his iCloud account, to save key value pairs and delete it.

  • Instantiate CloudKit instance to save and get a value.
CloudKit cloudKit = CloudKit('iCloud.dev.tutorialwork.cloudkitExample'); // Enter your container id
cloudKit.save('key', 'value');
cloudKit.get('key');
cloudKit.delete('key');
cloudKit.clearDatabase();
  • Check if the user is logged in, otherwise the process of saving and getting value can fail.
CloudKitAccountStatus accountStatus = await cloudKit.getAccountStatus();
if (accountStatus == CloudKitAccountStatus.available) {
  // User is logged in with iCloud
}

πŸ’» Setup

  • 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.
  • Then it's important for the next step that you are creating your first entry. You can do this with the example app in this repository or with your own app by saving your first key value pair.

  • After that please open the CloudKit Dashboard and select your created CloudKit container and then open the "Indexes" page. And select on these page the "StorageItem"

  • Click on "Add Basic Index" and select "recordName" and "Queryable" and then make sure you don't forgot to save your changes.

  • Make sure before you are deploying your app, you need to deploy the database schema using the "Deploy Schema Changes…" button.

cloud_kit's People

Contributors

tutorialwork avatar ivofernandes avatar blangel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.