Skip to content

Instantly share code, notes, and snippets.

@nonstriater
Created June 14, 2015 08:23
Show Gist options
  • Save nonstriater/7940116363de85699722 to your computer and use it in GitHub Desktop.
Save nonstriater/7940116363de85699722 to your computer and use it in GitHub Desktop.
Mobclick 统计越狱/未越狱情况下 Apple Store/盗版市场的统计情况
- (void)umengTrack {
NSString *channelId;
if ([MobClick isJailbroken]) {
if ([MobClick isPirated]) {
// 已破解(越狱)
channelId = @"盗版市场(越狱)";
}else{
// 未破解(越狱)
channelId = @"AppStore(越狱)";
}
}else{
if ([MobClick isPirated]) {
// 已破解(未越狱)
channelId = @"盗版市场(未越狱)";
}else{
// 未破解(未越狱)
channelId = @"AppStore(未越狱)";
}
}
[MobClick startWithAppkey:kUmengKey reportPolicy:(ReportPolicy)REALTIME channelId:channelId];
[MobClick updateOnlineConfig];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(onlineConfigCallBack:)
name:UMOnlineConfigDidFinishedNotification object:nil];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment