New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

capacitor-cloudkit-api

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capacitor-cloudkit-api

Plugin for using CloudKit Key-Value API in Capacitor Apps

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
0
Weekly downloads
 
Created
Source

capacitor-cloudkit-api

Plugin for using Apple CloudKit Key-Value API in your Capacitor Apps.

Install

npm install capacitor-cloudkit-api
npx cap sync

Preparation

Add capability in Signing & Capabilities in Xcode project settings called iCloud:

Next, enable Key-value storage and CloudKit settings, and create any container by clicking on + button:

Usage

import {CapacitorCloudkitAPI} from 'capacitor-cloudkit-api';

const saveData = async (key: string, value: string): Promise<{
    key: string;
    value: string;
}> => {
    const result = await CapacitorCloudkitAPI.saveKeyValue({
        key,
        value,
    });
    
    return result
}

const getData = async (key: string): Promise<{
    key: string;
    value: string;
}> => {
    const result = await CapacitorCloudkitAPI.getKeyValue({
        key
    });

    return result
}

API

saveKeyValue(...)

saveKeyValue(options: { key: string; value: string; }) => Promise<{ key: string; value: string; }>
ParamType
options{ key: string; value: string; }

Returns: Promise<{ key: string; value: string; }>

getKeyValue(...)

getKeyValue(options: { key: string; }) => Promise<{ key: string; value: string; }>
ParamType
options{ key: string; }

Returns: Promise<{ key: string; value: string; }>

Keywords

capacitor

FAQs

Package last updated on 20 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts