Skip to main content

CloudikeCoreKit

The base Cloudike SDK — shared infrastructure that the other iOS SDKs depend on.

Applies to CloudikeCoreKit 3.1.8+

Installation

Cloudike SDKs for iOS are distributed through CocoaPods as prebuilt dynamic XCFrameworks from Cloudike's private pod repository.

1. Set up access (once per machine). Cloudike provides you with a username and a deploy token. Add them to ~/.netrc — both git (to fetch the pod specs over HTTPS) and curl (which CocoaPods uses to download the framework archives) read credentials from this file:

~/.netrc
machine git.cloudike.com login <username> password <token>

Make the file readable only by you:

chmod 600 ~/.netrc

2. Add the SDK to your Podfile. Declare the Cloudike pod repository as a source and add CloudikeCoreKit:

Podfile
source 'https://git.cloudike.com/cloudike-ios/pod_spec_binary.git'
source 'https://cdn.cocoapods.org/'

platform :ios, '13.0'
use_frameworks!

target 'YourApp' do
pod 'CloudikeCoreKit'
end
  • The https://cdn.cocoapods.org/ source is needed for the SDKs' third-party dependencies (for example, Kingfisher used by CloudikeDocumentWalletKit).
  • use_frameworks! is required — the SDKs are shipped as dynamic frameworks.
  • The minimum supported iOS version is 13.0.

3. Install the pods:

pod install

Initialization

import CloudikeCoreKit

let apiBaseUrl = URL(string: "https://your-api-endpoint.example.com")! // your Cloudike API endpoint
let core = CloudikeCore(apiBaseUrl: apiBaseUrl)

Creates a CloudikeCore session for your API endpoint. The instance isn't authenticated yet — call applyUser(apiToken:userId:deviceId:userAgent:) before using it, or any dependent SDK built from it, to make network requests. userAgent is optional.

First API Call

core.applyUser(apiToken: apiToken, userId: userId, deviceId: deviceId) // values from your sign-in flow
print("Signed in as:", core.user?.identifier ?? "unknown")

Authenticates the session as the given user and device. After this call, core.user is no longer nil — confirming the session is authenticated and ready for use by this SDK or any dependent one.