Adding the SDK to Your Web App
Kii Cloud SDK gives you the ability to manage your application users and data with only a few lines of client-side code.
Follow the steps below to add Kii Cloud SDK to your application project.
Download the Kii Cloud SDK ZIP file.
First, download the library. Login to the developer portal (https://developer.kii.com) and click the SDK link in the "Download" page to start downloading the library.
Uncompress the ZIP file for the Kii Cloud SDK.
Two files, KiiSDK.min.js and KiiSDK.js will be extracted when you uncompress the SDK file. Select one of them and publish it together with components such as HTML files for your mobile app.
The two files have the same functionality while KiiSDK.min.js doesn't contain unnecessary characters such as spaces in the source code. Use small KiiSDK.min.js for app release and readable KiiSDK.js for app development.
Load the Kii Cloud SDK in the HEAD tag.
Set to load the SDK JS file when the mobile app launches. Change the publishing directory of the SDK suitably. Please replace the Kii SDK file name and the directory as needed.
Add the following code where the page's onLoad handler is called.
Insert your application's AppID in the placeholder
___APPID___. You can put an arbitrary value in the placeholder
Also put your SiteID (
KiiSite.EU) that you've specified on the developer's portal.
You can safely embed the AppID in your application as long as you apply the correct access control. See Security for more information.
Starting from version 2.1.12, jQuery becomes optional. You can use KiiSDK with/without jQuery.
Also, note our SDK switch XMLHttpClient automatically in the following priority.
1. If jQuery is defined, SDK uses jQuery ajax.
2. If XMLHttpRequest is defined, SDK uses XMLHttpRequest.
3. If Titanium is defined (use KiiSDK in Titanium), SDK uses Titanium.Network.HTTPClient.