bugly使用
导入:
1.Bugly.framework
2.Security.framework
3.SystemConfiguration.framework
4.libc++.1.dylib
5.libz.1.dylib
AppDelegate.m 设置如下:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self setupBugly];
return YES;
}
- (void)setupBugly {
// Get the default config
BuglyConfig * config = [[BuglyConfig alloc] init];
// Open the debug mode to print the sdk log message.
// Default value is NO, please DISABLE it in your RELEASE version.
#if DEBUG
config.debugMode = YES;
#endif
// Open the customized log record and report, BuglyLogLevelWarn will report Warn, Error log message.
// Default value is BuglyLogLevelSilent that means DISABLE it.
// You could change the value according to you need.
config.reportLogLevel = BuglyLogLevelWarn;
// Open the STUCK scene data in MAIN thread record and report.
// Default value is NO
config.blockMonitorEnable = YES;
// Set the STUCK THRESHOLD time, when STUCK time > THRESHOLD it will record an event and report data when the app launched next time.
// Default value is 3.5 second.
config.blockMonitorTimeout = 1.5;
// Set the app channel to deployment
config.channel = @"Bugly";
config.delegate = self;
// NOTE:Required
// Start the Bugly sdk with APP_ID and your config
[Bugly startWithAppId:BUGLY_APP_ID
#if DEBUG
developmentDevice:YES
#endif
config:config];
// Set the customizd tag thats config in your APP registerd on the bugly.qq.com
// [Bugly setTag:1799];
[Bugly setUserIdentifier:[NSString stringWithFormat:@"User: %@", [UIDevice currentDevice].name]];
[Bugly setUserValue:[NSProcessInfo processInfo].processName forKey:@"Process"];
// NOTE: This is only TEST code for BuglyLog , please UNCOMMENT it in your code.
//[self performSelectorInBackground:@selector(testLogOnBackground) withObject:nil];
}
/**
* @brief TEST method for BuglyLog
*/
- (void)testLogOnBackground {
int cnt = 0;
while (1) {
cnt++;
switch (cnt % 5) {
case 0:
BLYLogError(@"Test Log Print %d", cnt);
break;
case 4:
BLYLogWarn(@"Test Log Print %d", cnt);
break;
case 3:
BLYLogInfo(@"Test Log Print %d", cnt);
BLYLogv(BuglyLogLevelWarn, @"BLLogv: Test", NULL);
break;
case 2:
BLYLogDebug(@"Test Log Print %d", cnt);
BLYLog(BuglyLogLevelError, @"BLLog : %@", @"Test BLLog");
break;
case 1:
default:
BLYLogVerbose(@"Test Log Print %d", cnt);
break;
}
// print log interval 1 sec.
sleep(1);
}
}
#pragma mark - BuglyDelegate
- (NSString *)attachmentForException:(NSException *)exception {
NSLog(@"(%@:%d) %s %@",[[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, __PRETTY_FUNCTION__,exception);
return @"This is an attachment";
}
bugly使用的更多相关文章
- 【腾讯bugly干货分享】HTML 5 视频直播一站式扫盲
本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://bugly.qq.com/bbs/forum.php?mod=viewthread&tid=1277 视频直 ...
- 【腾讯Bugly干货分享】Android Linker 与 SO 加壳技术
本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/57e3a3bc42eb88da6d4be143 作者:王赛 1. 前言 Andr ...
- 【腾讯Bugly干货分享】Android性能优化典范——第6季
本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/580d91208d80e49771f0a07c 导语 这里是Android性能优 ...
- 【腾讯Bugly经验分享】程序员的成长离不开哪些软技能?
本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/57ce8068d4d44a246f72baf2 Dev Club 是一个交流移动 ...
- 【腾讯Bugly干货分享】基于 Webpack & Vue & Vue-Router 的 SPA 初体验
本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/57d13a57132ff21c38110186 导语 最近这几年的前端圈子,由于 ...
- 【腾讯Bugly干货分享】WebVR如此近-three.js的WebVR示例解析
本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/57c7ff1689a6c9121b1adb16 作者:苏晏烨 关于WebVR 最 ...
- 【腾讯Bugly干货分享】Android动态布局入门及NinePatchChunk解密
本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/57c7ff5d53bbcffd68c64411 作者:黄进——QQ音乐团队 摆脱 ...
- 【腾讯Bugly干货分享】基于RxJava的一种MVP实现
本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/57bfef673c1174283d60bac0 Dev Club 是一个交流移动 ...
- 【腾讯Bugly干货分享】动态链接库加载原理及HotFix方案介绍
本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/57bec216d81f2415515d3e9c 作者:陈昱全 引言 随着项目中动 ...
- 【腾讯Bugly干货分享】微信iOS SQLite源码优化实践
本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/57b58022433221be01499480 作者:张三华 前言 随着微信iO ...
随机推荐
- 谈谈Java利用原始HttpURLConnection发送POST数据
这篇文章主要给大家介绍java利用原始httpUrlConnection发送post数据,设计到httpUrlConnection类的相关知识,感兴趣的朋友跟着小编一起学习吧 URLConnectio ...
- [ActionScript 3.0] 喷泉效果
pall为水珠影片剪辑 var count:int = 500; var zl:Number = 0.5; var balls:Array; balls = new Array(); for (var ...
- Objective-C语法之KVO的使用
简介: 上篇我们讲到了KVC,这篇我们学习KVO,全名为:Key Value Observing,直译为:基于键值的观察者. 那它有什么用呢?KVO主要用于视图交互方面,比如界面的某些数据变化了,界面 ...
- 升级正版win10及保持yosemite双操
因为有同事升级了正版的win10,心头长草了,本来x230的win7就是正版,现在win10可以免费升级,为何不做? 为此跑了2趟lenovo的维修站,诸多限制,最终决定自己搞定.据说,需要恢复到原厂 ...
- 关于Listview布局的一点经验
1.尽量是给item一个固定高度,最外层不要设高度,里面套一层设置一个固定高度:如果用wrap_content的话,之后用alignTop等会出奇怪的问题. 2.如果要使用alignTop align ...
- sencha touch 入门系列 (二)sencha touch 开发准备
这是本人第一次写博客教程,没什么经验,文笔也不是很好,写这教程一方面为了巩固自己这段时间的学习成果,一方面帮助大家解决问题,欢迎大家多提建议,指出问题.接下来我们就开始我们的sencha touch开 ...
- Jmeter组件2. Timer 定时器
关于定时器,首先明确几个概念 定时器在每个Sampler执行之前执行 定时器有作用域,同一个作用域内的定时器会在域内Sampler执行之前都执行掉 如果要让某定时器只作用于一个Sampler,将定时器 ...
- js实现判断浏览器版本
//判断浏览器版本是否过低 var ua = navigator.userAgent.toLowerCase(); if (window.ActiveXObject) var IEversion = ...
- Ms sql 2000互转2005
BCP导入导出数据.非常的方便.速度很快.--还原部分,指定强制还原(使用WITH MOVE指定文件还原,RELPACE由于版本不一样,所以要指定REPLACE,如果不指定REPLACE参数,会提示版 ...
- NHibernate系列文章十五:NHibernate组件
摘要 前面文章介绍了NHibernate对简单.net数据类型的映射对照表.NHibernate也可以映射复杂数据类型,这里介绍通过组件映射NHibernate值对象. 1. NHibernate引用 ...