Cocoadebug - Ios Debugging Tool


 iOS Debugging Tool
  • Shake to cover or present the dark bubble. (support both device together with simulator)
  • Long press the dark bubble to present UIDebuggingInformationOverlay. (Apple's Private API, back upwards iOS 10/11/12)
  • Application memory usage together with FPS.
  • List all print() together with NSLog() messages which convey been written past times developer inward Xcode. (optional)
  • List of all the network requests sent past times the application. (optional)
  • List crash errors. (optional)
  • Share network details via electronic mail or re-create to clipboard when you lot are inward the Network Details page.
  • Copy logs. (long press the text, hence pick out all or pick out copy)
  • Search logs past times keyword.
  • List application together with device informations, including: version, build, bundle name, bundle id, screen resolution, device, iOS version
  • List all sandbox folders together with files, supporting to preview together with edit.
  • List HTML logs, including console.log(),console.debug(),console.warn(),console.error(),console. info(). (support both WKWebView together with UIWebView). (optional)
  • Support JSON together with Google's Protocol buffers

Installation

CocoaPods
platform :ios, '8.0' use_frameworks!  target 'YourTargetName' create     pod 'CocoaDebug', :configurations => ['Debug'] end

Carthage
github "CocoaDebug/CocoaDebug"  
WARNING: Don't submit .ipa to AppStore which has been linked alongside the CocoaDebug.framework. This Integration Guide outline a agency to usage create configurations to isolate linking the framework to Debug builds only.

Usage

Swift
//Step 1. (AppDelegate.swift) #if DEBUG     import CocoaDebug #endif  //Step 2. (AppDelegate.swift) #if DEBUG     CocoaDebug.enable() #endif  //Step 3. (AppDelegate.swift) world func print(file: String = #file, function: String = #function, line: Int = #line, _ message: T, color: UIColor = .white) {     #if DEBUG         swiftLog(file, function, line, message, color, false)     #endif }

Objective-C
//Step 1. (AppDelegate.m) #ifdef DEBUG     @import CocoaDebug; #endif  //Step 2. (AppDelegate.m) #ifdef DEBUG     [CocoaDebug enable]; #endif  //Step 3. (PrefixHeader.pch) #ifdef DEBUG     #import "_ObjcLog.h"     //#import  //if usage framework #endif  //Step 4. (PrefixHeader.pch) #ifdef DEBUG     #define NSLog(fmt, ...) [_ObjcLog logWithFile:__FILE__ function:__FUNCTION__ line:__LINE__ color:[UIColor whiteColor] unicodeToChinese:NO message:(fmt), ##__VA_ARGS__] #else     #define NSLog(fmt, ...) null #endif

Parameters

When you lot initialize CocoaDebug, you lot tin customize the next parameter values earlier CocoaDebug.enable().
  • serverURL - If the crawled URLs comprise server URL ,set these URLs bold font to live on marked. non grade when this value is nil. default value is nil.
  • ignoredURLs - Set the URLs which should non crawled, ignoring case, crawl all URLs when the value is nil. default value is nil.
  • onlyURLs - Set the URLs which are solely crawled, ignoring case, crawl all URLs when the value is nil. default value is nil.
  • tabBarControllers - Set controllers to live on added every bit tiddler controllers of UITabBarController. default value is nil.
  • logMaxCount - The maximum count of logs which CocoaDebug display. default value is 1000.
  • emailToRecipients - Set the initial recipients to include inward the email’s “To” champaign when portion via email. default value is nil.
  • emailCcRecipients - Set the initial recipients to include inward the email’s “Cc” champaign when portion via email. default value is nil.
  • mainColor - Set the primary color alongside hexadecimal format. default value is #42d459.