Skip to content

2020Deception/D20CloudKitManager

Repository files navigation

D2CloudKitManager

[![CI Status](http://img.shields.io/travis/Brian Bowman/D2CloudKitManager.svg?style=flat)](https://travis-ci.org/Brian Bowman/D2CloudKitManager) Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

D2CloudKitManager is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "D2CloudKitManager"

Author

Brian Bowman, brian.bowman@carrotcreative.com

License

D2CloudKitManager is available under the MIT license. See the LICENSE file for more info.

Usage

First you'll want to enable CloudKit on the capabilities tab of your project and add it to your app ID.
To get started, place some code like this into your project:

    [[D20CloudKitManager sharedInstance] requestDiscoverabilityPermission:^(BOOL discoverable, NSError * _Nullable error) {
        if (discoverable) {
            [[D20CloudKitManager sharedInstance] discoverUserInfoWithRecordId:nil completionHandler:^(CKUserIdentity * _Nullable user, NSError * _Nullable error) {
                if (error) {
                    [[D20CloudKitManager sharedInstance] handleError:error serverFailureBlock:nil retryCallBlock:nil retryUploadBlock:nil partialFailureBlock:nil errorDisplayBlock:nil];
                }
                
                NSLog(@"%@ %@ %@", user.nameComponents.givenName, user.nameComponents.familyName, user.lookupInfo.emailAddress);
            }];
        }
    }];

About

A cocoapod CloudKit wrapper to make your interfacing needs a little easier

Resources

License

Stars

Watchers

Forks

Packages

No packages published