Cobub Razor
Cobub Toaster
Other Links
Cobub Razor
Cobub Toaster
Other Links
這是本文檔舊的修訂版!
The goal of this document is to explain usage rules of Cobub Razor iOS SDK for facilitating developers
This document is for iOS SDK developers, which uses the Open Source Mobile Analytics – Cobub Razor
First please set up the Web Server of Cobub Razor (instruction), then register App onweb server and fill App info after login. Once App is created successfully, you could obtain AppKey.
Download the latest release of SDK and Unzip it. Once unzipped, you could see two files, UMSAgent.h and libUMSAgent.a.
Select Add→Existing files in project directory and select the two unzipped files above, or drag two files to project directory directly. Select Copy Items into destination group’s folder(if needed).
Add #import “UMSAgent.h” into AppDelegate.h. Add following method into didFinishLaunchingWithOptions method of AppDelegate.m:
[UMSAgent startWithAppKey:@"14aaa92e098df46cb63ed5196e0c331c" ReportPolicy:BATCH ServerURL:@ "YOUR SDK SERVICE URL"]; -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *) launchOptions { [UMSAgent startWith]AppKey:@"UMSAgentKey" ReportPolicy:BATCH]; }
UMSAgentKey is the AgentKey obtained from registering App in UMS.
ServiceURL is Service interface url of Server SDK.
BATCH model means that uploading data once when system starts next time
Please modify BATCH to REALTIME if you want to use real-time model.
BATCH model is recommended. It can reduce interaction between App and network, save traffic and improve user experience
Usage Duration Analytics
UMS platform defines intervals between entering front and entering background of App every time as a lifecycle process. UMS makes lifecycle as data and submits it to UMS background. It provides corresponding data statistics reports for developers.