保存NSLog()成文件然后发送邮件给开发人员:SuperLogger
jopen
9年前
保存NSLog()成文件然后发送邮件给开发人员。
安装
最好的安装方式是通过CocoaPods,只需要添加
pod 'SuperLogger'
然后运行pod 安装。这将安装最新版本的SuperLogger。
用法
Import the framework header on AppDelegate.m:
#import "SuperLogger.h"
Init and set email info:
SuperLogger *logger = [SuperLogger sharedInstance]; // Start NSLogToDocument [logger redirectNSLogToDocumentFolder]; // Set Email info logger.mailTitle = @"SuperLoggerDemo Logfile"; logger.mailContect = @"This is the SuperLoggerDemo Logfile"; logger.mailRecipients = @[@"yourtion@gmail.com"];
That's it! Have fun with SuperLogger!
Show the Loglist by presentViewController "[[SuperLogger sharedInstance] getListView]"
[self presentViewController:[[SuperLogger sharedInstance] getListView] animated:YES completion:nil];