README.md 6.0 KB
Newer Older
EyreFree's avatar
EyreFree 已提交
1 2
<div align="center">    
 <img src="https://javer.oss-cn-shanghai.aliyuncs.com/doraemon/github/DoraemonKit_github.png" width = "150" height = "150" alt="DoraemonKit" align=left />
糕冷羊's avatar
糕冷羊 已提交
3
 <img src="https://img.shields.io/github/license/didi/DoraemonKit.svg" align=left />
4
 <img src="https://img.shields.io/badge/Android-3.1.3-blue.svg" align=left />
J
modify:  
jackjintai 已提交
5
 <img src="https://img.shields.io/badge/iOS-3.0.0-yellow.svg" align=left />
糕冷羊's avatar
糕冷羊 已提交
6
 <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" align=left />
Y
yixiang 已提交
7 8 9 10 11 12 13
</div>

<br/>
<br/>
<br/>
<br/>
<br/>
Y
yixiang 已提交
14 15
<br/>
<br/>
Y
yixiang 已提交
16

Y
yixiangboy 已提交
17
A full-featured App (iOS & Android) development assistant. You deserve it.
EyreFree's avatar
EyreFree 已提交
18

Y
yixiangboy 已提交
19
> [中文文档](README_CN.md)
Y
yixiang 已提交
20

Y
yixiangboy 已提交
21
## Introduction
Y
yixiang 已提交
22

Y
yixiangboy 已提交
23 24
In the development stage of the App, in order to improve the efficiency of the developer and tester, we have developed a collection of tools with full-featured functions. I can use it to simulate the positioning of the App; preview the content of the sandbox file; view the information and logs of the App; test the performance of the App and view the detailed information of the view, etc. Each tool solves every problem in our app development. 
And our UI interface is simple and beautiful, and the user experience is good.
EyreFree's avatar
EyreFree 已提交
25

Y
yixiangboy 已提交
26
At present, we provide a total of more than 30+ built-in tools, including 2 platform tools; 10 common tools; 12 performance tools; and 5 ui tools. At the same time, you can also add your own tools in our DoKit panel for unified management.
Y
yixiang 已提交
27

Y
yixiangboy 已提交
28
DoKit is rich in functions, easy to access, and easy to expand. Everyone is welcome to try and feedback.
Y
yixiang 已提交
29

Y
readme  
yixiang 已提交
30

Y
yixiangboy 已提交
31
## SDK Show
Y
yixiangboy 已提交
32
<div align="center">    
Y
yixiangboy 已提交
33
 <img src="https://javer.oss-cn-shanghai.aliyuncs.com/2020/dokit/dokiten1.png" width = "250" alt="Demonstration" align=center />
Y
yixiangboy 已提交
34 35
</div>

Y
yixiangboy 已提交
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
## Feature List
### Common Tools
* App Settings: quickly open the setting page of the specific app
* App Info:view mobile phone information, device information, permission information of the current App
* Sanbox:support sandbox files for viewing, previewing, deleting, sharing and other operations
* Mock GPS:You can uniformly modify the latitude and longitude callbacks inside the App
* Browser:quickly enter the html address to view the effect of the page, and support scan code;
* Clear Sanbox: delete all data in the sandbox
* Log:print all logs to the UI interface for easy viewing
* UserDefaults(iOS): add, delete, and modify the NSUserDefaults file
* DBView:perform more detailed operations on the DB file on the web


### Performance Tools
* FPS:view the real-time fps of the app through floating window 
* CPU:view the real-time cpu of the app through floating window 
* Memory:view the real-time memory of the app through floating window 
* Network:view the real-time network of the app through floating window,and analysis of all network data
* Crash:convenient to print out the code stack where Crash appears
* Sub Thread UI:quickly locate UI operations in some sub-threads
* ANR:when the app appears anr, print out the corresponding code call stack
* BigImg:Through network monitoring, find out all the images with oversized size, to avoid the waste of network caused by downloading large images and the CPU consumption caused by rendering large images
* Weak Network:view the running status of the App when the network is not good
* Launch Time:show app launch time
* UI Hierrachy:find the deepest element in each page
* Time Profiler:analyze app performance bottlenecks at the function level
* Memory Leak:quickly locate App memory leaks
J
modify:  
jackjintai 已提交
63
* Load(iOS):check out all "+load" functions in iOS, and time-consuming statistics
Y
yixiangboy 已提交
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84


### UI Tools

* Color Picker:capture the color value of every point in the app in real time
* View Check:you can touch any view and view their detailed information, including view name, view position, background color, font color, font size
* Align Ruler:ability to capture screen coordinates in real time and see if views are aligned
* View Border:draw the border of each view

### Platform Tools

* Mock Data: App network mock solution, provides a set of network mock solutions based on App network interception, and can complete the mock for network data without modifying the code
* Health Check: integration of multiple DoKit tools, data visualization, quick and accurate positioning of problems, let you know the performance of the app

**tip:** Platform tools need to be used in conjunction with [http://www.dokit.cn/](http://www.dokit.cn/)

## Installation

### iOS
#### Cocoapods
```
Y
yixiangboy 已提交
85 86 87
    pod 'DoraemonKit/Core', '~> 3.0.0', :configurations => ['Debug'] #Required
    pod 'DoraemonKit/WithGPS', '~> 3.0.0', :configurations => ['Debug'] #Optional
    pod 'DoraemonKit/WithLoad', '~> 3.0.0', :configurations => ['Debug'] #Optional
Y
yixiangboy 已提交
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
```
#### Example Usage

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

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    #ifdef DEBUG
    [[DoraemonManager shareInstance] install];
    #endif
}

```

### Android
J
modify:  
jackjintai 已提交
105 106
#### 1、Download
To use DoKit , add the plugin to your buildscript:
Y
yixiangboy 已提交
107 108 109 110 111 112 113 114
```
buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.1'
115
        classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.1.3'
Y
yixiangboy 已提交
116 117 118 119
    }
}

```
J
modify:  
jackjintai 已提交
120
and then apply it in your app module
Y
yixiangboy 已提交
121 122 123 124 125

```
apply plugin: 'com.didi.dokit'
```

J
modify:  
jackjintai 已提交
126
and then implementation DoKit SDK
Y
yixiangboy 已提交
127
```
128 129
debugImplementation "com.didichuxing.doraemonkit:doraemonkit:3.1.3"
releaseImplementation "com.didichuxing.doraemonkit:doraemonkit-no-op:3.1.3"
Y
yixiangboy 已提交
130 131
```

J
modify:  
jackjintai 已提交
132
#### 2、SDK Init
Y
yixiangboy 已提交
133 134 135 136 137 138 139 140 141
```
public class App extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        DoraemonKit.install(this);
    }
}
```
J
modify:  
jackjintai 已提交
142

Y
yixiangboy 已提交
143
##  Product Manual
J
modify:  
jackjintai 已提交
144

Y
yixiangboy 已提交
145 146
If you want to know more details about DoKit, please visit 
**[https://www.dokit.cn/](https://www.dokit.cn/)**.
J
modify:  
jackjintai 已提交
147

Y
yixiang 已提交
148

Y
yixiang 已提交
149

Y
yixiangboy 已提交
150
## License
Y
yixiangboy 已提交
151

Y
yixiangboy 已提交
152
<img alt="Apache-2.0 license" src="https://www.apache.org/img/ASF20thAnniversary.jpg" width="128">
Y
yixiangboy 已提交
153

Y
yixiangboy 已提交
154
DoraemonKit is available under the Apache-2.0 license. See the [LICENSE](LICENSE) file for more info.