Latest 0.1.2
Homepage https://github.com/long0133/ApexDataCollectSDK
License MIT
Platforms ios 8.0
Dependencies ApexDataCollectUtil_iOS, ApexDataCollectMoniterSDK
Authors

CI Status
Version
License
Platform

Example

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

Requirements

Installation

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

pod 'ApexDataCollectSDK'

then run ‘pod update’

Usage

Prepare

In BuildSettings – Other Linker Flags, add ”-ObjC”

ApexDataCollectSDK

Initialize

import in your project

All configration must be set after SDK initialized, and apiKey can be nil for now.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    //开启日志输出
    [[PEXLogger sharedInstance] setLogLevel:LoggerLevelVerbose];
    //初始化
    [[APEXDataCollectSDK shareCollector] startCollectorWithServersUrl:@"Url" uuid:@"xxx"];
    return YES;
}

Configration

You can set which kind of event you’d like to track with the following api.(All event type listed in ApexDataCollectSDK.h)

[[APEXDataCollectSDK shareCollector] configAutoTrackEventType:ApexAnalyticEventType_Click | ApexAnalyticEventType_ViewController | ApexAnalyticEventType_AppLaunch | ApexAnalyticEventType_ViewExposureRate];

You can also set event upload time interval, and event max count. when the number of event in queue reach the max count. The queue will automatically trigger event uploading.

Defult upload time interval and max counts are set to 60 seconds and 100 items, respectively.

[[APEXDataCollectSDK shareCollector] configUploadTrigerTimeInterval:60]; 
[[APEXDataCollectSDK shareCollector] configUploadTrigerQueneMaxCount:100];

SignIn/SignOut

If your App is based on Account System, You can use these api to set user’s SignIn Status or SignOut Status

/**
 登入with用户id
 */
- (void)signInWithUID:(NSString*)UID;

/**
 登出时调用
 */
- (void)signOut;

Author

ApexDataCollectSDK long0133, [email protected]

License

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

Latest podspec

{
    "name": "ApexDataCollectSDK",
    "version": "0.1.2",
    "summary": "A short description of ApexDataCollectSDK.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/long0133/ApexDataCollectSDK",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "long0133": "[email protected]"
    },
    "source": {
        "git": "https://github.com/long0133/ApexDataCollectSDK.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "vendored_frameworks": "ApexDataCollectSDK/Classes/ApexDataCollect.framework",
    "dependencies": {
        "ApexDataCollectUtil_iOS": [],
        "ApexDataCollectMoniterSDK": []
    }
}

Pin It on Pinterest

Share This