MoodUp.team

1pod
debugg.it是一个简单而强大的工具,可以帮助您将错误报告直接发送到定义好的问题跟踪器。它是QA/客户的完美工具。
debugg.it可通过CocoaPods获取。要安装,将以下内容添加到您的Podfile中
ruby use_frameworks! 平台 ios, '9.0' pod 'DebuggIt'
别忘了在AppDelegate
中导入Pod
swift import DebuggIt
或Objective-C objc @import DebuggIt;
并将以下任一行(放置在方法开始处)添加到初始化debugg.it
Swift:
swift func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // 应用启动后的自定义覆盖点. DebuggIt.sharedInstance.initBitbucket(repoSlug: "repo-name", accountName: "repo-owner-username") // 或Github DebuggIt.sharedInstance.initGithub(repoSlug: "repo-name", accountName: "repo-owner-username") // 或JIRA DebuggIt.sharedInstance.initJira(host: "jira-host-url", projectKey: "project-key") return true }
Objective-C:
objc - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Bitbucket [[DebuggIt sharedInstance] initBitbucketWithRepoSlug: @"repo-name" accountName:@"repo-owner-username"]; // 或 Github [[DebuggIt sharedInstance] initGithubWithRepoSlug: @"repo-name" accountName:@"repo-owner-username"]; // 或 JIRA [[DebuggIt sharedInstance] initJiraWithHost:@"jira-host-url" projectKey:@"project-key" usesHttps:YES]; return YES; }
注意:如果您使用的是JIRA且您的宿主地址不使用SSL,在初始化方法中使用附加参数
swift DebuggIt.sharedInstance.initJira(host: "jira-host-url", projectKey: "project-key", usesHttps: false)
objc [[DebuggIt sharedInstance] initJiraWithHost:@"jira-host-url" projectKey:@"project-key" usesHttps:NO];
debugg.it允许记录音频笔记并添加到错误描述中。要启用此功能,只需在您的AppDelegate
文件中添加如下行
swift DebuggIt.sharedInstance.recordingEnabled = true
objc [DebuggIt sharedInstance].recordingEnabled = YES;
请确保您已在Info.plist
文件中添加了麦克风使用描述。例如:xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>NSMicrophoneUsageDescription</key> <string>debugg.it记录笔记</string> <!-- Info.plist文件的其他部分... --> </dict> </plist>
许可证: Apache-2.0