Cloudike files SDK has been developed to ensure the smooth workflow between Cloudike remote file system and iOS applications.
- Xcode 10.3 or later
- CocoaPods 1.4.0 or later
- Target of iOS 10 or later
- Swift 4+
Before You Begin
This SDK is stored in the private pod repo and developed for use with the Cloudike Backend. If you need access, please "Contacts Us".
TODO @Anna виджет Contacts Us
Add SDK to Your App
CloudikeFiles SDK is available through CocoaPods or XCFramework static library. To install it, simply add the following lines to your Podfile:
Auth + Setup
Cloudike files library requires a two-stage initialization. First, you have to initialize the CloudikeFilesManager instance, usually in AppDelegate.didFinishLaunchWithOptions The following example shows typical first stage initialization flow:
Cloudike files library uses Realm DB under the hood, so it must be initialized too. You pass application context to the Cloudike files library initializer. During the first initialization stage, all components are created but not configured for network operations.
We recommend that you keep strong reference to CloudikeFilesManager instance to avoid being removed by ARC.
Before SDK functions could be used, the second initialization stage have to be done when the user has authenticated with the app. Here you can find information how to complete auth flow with Cloudike backend.
auth-tokencould be found in response to user-auth method
backend-url- API url, for example "https://api.cloudike.com"
user-agent- Consist of platform, OS version, App version, model of the smartphone and other meaningful information. See code below as an example of getting user-agent.
unique-device-id- Uniquely identifies device in the cloud. See example below.
Once initialization is completed, you can call other methods. When the user has logged out, the app must call
First of all, you need to get access to Cloudike Pod repo. You can use this bitbucket account:
Here instructions how to add your ssh-key to account settings.
The following dependency must be added to your app's podfile: