Mobile Development 14 min read

DoKit 3.0 Unveiled: Mobile Debugging, Mock APIs, and Performance Health Checks

DoKit 3.0, the open‑source client development assistant from Didi, introduces a revamped architecture, extensive Android and iOS enhancements, new tools such as interface mock and health testing, a web platform for product management, and detailed integration guides for both platforms.

Didi Tech
Didi Tech
Didi Tech
DoKit 3.0 Unveiled: Mobile Debugging, Mock APIs, and Performance Health Checks

Overview

DoKit 3.0 is the latest release of Didi’s open‑source client development assistant for iOS and Android. It is positioned as a general‑purpose development platform that supports a wide range of front‑end, testing, and design scenarios.

Key Improvements

Resolved more than 70 GitHub issues and merged over 30 pull requests, improving stability and performance.

Internal architecture was upgraded, resulting in faster execution and more robust core components.

Various UI/UX refinements were applied across the toolset.

Android Enhancements

Unified network interception for okhttp and URLConnection.

New floating‑window mode that no longer requires system overlay permission.

Location mocking now supports Baidu, Tencent, AMap, and native system providers.

AOP implementation switched from AspectJ to ASM, providing better compatibility and lower overhead.

iOS Enhancements

Hot‑toggle for NSLog monitoring, UI thread detection, and CocoaLumberjack logs without restarting the app.

Multiple pod repository mirrors (GitHub, Gitee, GitLab) to accelerate pod install.

Fixed window interference with UIMenuController on certain devices.

Reduced global hook impact and added a global Chinese/English language switch.

New Tools

Data Mock : Network‑interception based mock solution that works without any code changes.

Health Test : One‑click performance data collection (network, CPU, FPS, memory, etc.) with visualized results and automated reporting.

DBView : Browser‑based interface for inspecting and editing local databases, bridging on‑device storage with developer tools.

Function Timing : Android uses ASM‑based bytecode instrumentation; iOS hooks objc_msgSend to display a tree‑structured timing view.

Additional utilities such as quick app‑settings navigation, NSUserDefaults editor, UI hierarchy checker, launch‑time monitor, and dynamic UI property editor for iOS.

Integration Guide

iOS (CocoaPods)

pod 'DoraemonKit/Core', :git => "https://github.com/didi/DoraemonKit.git", :tag => '3.0.0', :configurations => ['Debug']   // required
pod 'DoraemonKit/WithLogger', :git => "https://github.com/didi/DoraemonKit.git", :tag => '3.0.0', :configurations => ['Debug']   // optional
pod 'DoraemonKit/WithGPS', :git => "https://github.com/didi/DoraemonKit.git", :tag => '3.0.0', :configurations => ['Debug']   // optional
pod 'DoraemonKit/WithLoad', :git => "https://github.com/didi/DoraemonKit.git", :tag => '3.0.0', :configurations => ['Debug']   // optional
pod 'DoraemonKit/WithDatabase', :git => "https://github.com/didi/DoraemonKit.git", :tag => '3.0.0', :configurations => ['Debug']   // optional
pod 'DoraemonKit/WithMLeaksFinder', :git => "https://github.com/didi/DoraemonKit.git", :tag => '3.0.0', :configurations => ['Debug']   // optional
pod 'DoraemonKit/WithWeex', :git => "https://github.com/didi/DoraemonKit.git", :tag => '3.0.0', :configurations => ['Debug']   // optional

Initialize the SDK in AppDelegate:

#ifdef DEBUG
#import <DoraemonKit/DoraemonManager.h>
#endif

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    #ifdef DEBUG
    [[DoraemonManager shareInstance] installWithPid:@"productId"]; // productId obtained from the DoKit platform
    #endif
    return YES;
}

Android (Gradle)

# Add repositories
buildscript {
    apply from: "config.gradle"
    repositories {
        google()
        jcenter()
        maven { url 'https://www.jitpack.io' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.1'
        classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.0.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

Apply the DoKit plugin in the app module: apply plugin: 'com.didi.dokit' Add SDK dependencies:

debugImplementation "com.didichuxing.doraemonkit:doraemonkit:3.0.0"
releaseImplementation "com.didichuxing.doraemonkit:doraemonkit-no-op:3.0.0"

Initialize the SDK in the Application class:

public class App extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        DoraemonKit.install(this, null, "productId"); // productId obtained from the DoKit platform
    }
}

Repository

GitHub: https://github.com/didi/DoraemonKit

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

iOSAndroidPerformance Testingopen sourcemobile debuggingDoKitInterface Mock
Didi Tech
Written by

Didi Tech

Official Didi technology account

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.