Boost iOS Debugging Efficiency with Woodpecker: An Open‑Source Mobile Development Tool
Woodpecker is an open‑source iOS debugging platform that integrates UI inspection, object viewing, method monitoring, PO commands, and JSON capture into a plugin‑based architecture, enabling developers, testers, designers, and product teams to locate and resolve issues directly on the device without a computer.
Background
iOS developers often face inefficiencies such as manual UI inspection, difficulty locating UI classes and layouts, and time‑consuming bug debugging that relies on computer‑based LLDB sessions.
Woodpecker Overview
Woodpecker is an iOS efficiency tool platform developed by Youku that integrates various debugging utilities directly on the device, eliminating the need for computer‑based debugging and improving development and testing efficiency.
Architecture
Woodpecker uses a plugin architecture where each tool is a plugin attached to the core service. Plugins are independent and support external registration and customization. Common modules include:
Share Panel : wraps system sharing for exporting text and images.
Preview : full‑screen view of text and images.
Screen Chart : visual data display for performance plugins.
Screen Log : in‑app log display with adjustable size, search, and regex filtering.
Main Tools
1. UI Inspection Tool
Provides a view picker that recursively traverses the view hierarchy to show the frontmost UI component’s class, frame, font, image URL, etc., and a ruler tool for measuring distances and sizes on the screen.
2. In‑App‑Debug Tools
Leverages Objective‑C runtime features to offer:
Object Viewer : displays an object's properties and ivars, supports key‑path queries and PO commands.
Method Monitor : hooks any Objective‑C method to log parameters and return values, useful for bug tracing and network capture.
PO Command : parses input strings to dynamically invoke methods and show results.
JSON Capture : intercepts NSJSONSerialization to capture JSON data without causing UI lag.
Commands follow a simple format, e.g., L ClassName methodName, k keyPath, k callStack. Configuration can be supplied via a JSON file.
Additional Features
System Info: device name, OS version, screen size, user‑agent, etc.
Sandbox Explorer: view and export files.
User Defaults: view, add, delete.
Data Clearing: wipe sandbox data.
UI Comparison: import design drafts for overlay comparison.
Resource Viewer: inspect images and bundles.
Crash Viewer: local crash logs.
Touch Display: show finger touches for screen recordings.
Performance Plugin: CPU, memory, FPS, network traffic.
Custom Business Plugins: environment switching, analytics, experiments, etc.
Extension Development
New plugins can be added by implementing a plugin protocol, allowing customization of group, display position, name, icon, and more. Existing plugins like view picker and system info can be extended via system notifications.
Quick Integration
pod 'YKWoodpecker' #import "YKWoodpecker.h"
[[YKWoodpeckerManager sharedInstance] show];Woodpecker is open‑source, part of the AIOSO project, supports iOS 8.0+, and can be added with the above pod command.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Alibaba Cloud Developer
Alibaba's official tech channel, featuring all of its technology innovations.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
