Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
DoraemonKit
提交
1cbd55d9
D
DoraemonKit
项目概览
DiDi
/
DoraemonKit
12 个月 前同步成功
通知
166
Star
19623
Fork
3062
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DoraemonKit
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1cbd55d9
编写于
4月 17, 2020
作者:
Y
yixiangboy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sdk en optimization
上级
a137dfb1
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
36 addition
and
41 deletion
+36
-41
iOS/DoraemonKit/Resource/en.lproj/Doraemon.strings
iOS/DoraemonKit/Resource/en.lproj/Doraemon.strings
+6
-0
iOS/DoraemonKit/Resource/zh-Hans.lproj/Doraemon.strings
iOS/DoraemonKit/Resource/zh-Hans.lproj/Doraemon.strings
+6
-0
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.m
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.m
+3
-3
iOS/DoraemonKit/Src/Core/Plugin/Common/AppInfo/DoraemonAppInfoViewController.m
...ore/Plugin/Common/AppInfo/DoraemonAppInfoViewController.m
+1
-1
iOS/DoraemonKit/Src/Core/Plugin/Common/H5/DoraemonH5ViewController.m
...nKit/Src/Core/Plugin/Common/H5/DoraemonH5ViewController.m
+1
-1
iOS/DoraemonKit/Src/Core/Plugin/Common/H5/DoraemonQRCodeViewController.m
.../Src/Core/Plugin/Common/H5/DoraemonQRCodeViewController.m
+1
-1
iOS/DoraemonKit/Src/Core/Plugin/Common/H5/QRCode/DoraemonQRScanView.m
...Kit/Src/Core/Plugin/Common/H5/QRCode/DoraemonQRScanView.m
+3
-3
iOS/DoraemonKit/Src/Core/Plugin/Performance/ANR/Detail/DoraemonANRDetailViewController.m
.../Performance/ANR/Detail/DoraemonANRDetailViewController.m
+1
-1
iOS/DoraemonKit/Src/Core/Plugin/Performance/VCProfiler/UIViewController+DoraemonVCProfiler.m
...formance/VCProfiler/UIViewController+DoraemonVCProfiler.m
+1
-18
iOS/DoraemonKit/Src/Core/Plugin/Platform/Health/Function/DoraemonHealthManager.m
...e/Plugin/Platform/Health/Function/DoraemonHealthManager.m
+4
-4
iOS/DoraemonKit/Src/Core/Plugin/Platform/Mock/Function/DoraemonMockManager.m
.../Core/Plugin/Platform/Mock/Function/DoraemonMockManager.m
+4
-4
iOS/DoraemonKit/Src/Core/Util/DoraemonUtil.m
iOS/DoraemonKit/Src/Core/Util/DoraemonUtil.m
+4
-4
iOS/DoraemonKit/Src/MLeaksFinder/Detail/DoraemonMLeaksFinderDetailViewController.m
...sFinder/Detail/DoraemonMLeaksFinderDetailViewController.m
+1
-1
未找到文件。
iOS/DoraemonKit/Resource/en.lproj/Doraemon.strings
浏览文件 @
1cbd55d9
...
...
@@ -50,6 +50,8 @@
"提交" = "Submit";
"取消" = "Cancel";
"丢弃" = "Discard";
"数据上传成功" = "data upload successfully";
"数据上传失败" = "data upload failed";
//应用设置
"应用设置" = "App Settings";
...
...
@@ -105,6 +107,9 @@
"点击跳转" = "Click to jump";
"Doraemon内置浏览器" = "Doraemon Built-in browser";
"链接不能为空" = "url can not be nil";
"设备无相机——设备无相机功能,无法进行扫描" = "Device without camera";
"设备相机错误——无法启用相机,请检查" = "Device camera error";
"相机权限未开启,请到「设置-隐私-相机」中允许DoKit访问您的相机" = "Camera permission is not open";
//清除本地数据
"清理缓存" = "Clear Sanbox";
...
...
@@ -249,6 +254,7 @@
"内存泄漏检测开关" = "Memory Leak Switch";
"内存泄漏检测弹框提醒" = "Memory Leak Alert Warning";
"内存泄漏检测结果" = "Memory Leak Result";
"内存泄漏详情" = "Memory Leak Detail";
//取色器
"取色器" = "Color Picker";
...
...
iOS/DoraemonKit/Resource/zh-Hans.lproj/Doraemon.strings
浏览文件 @
1cbd55d9
...
...
@@ -50,6 +50,8 @@
"提交" = "提交";
"取消" = "取消";
"丢弃" = "丢弃";
"数据上传成功" = "数据上传成功";
"数据上传失败" = "数据上传失败";
//应用设置
"应用设置" = "应用设置";
...
...
@@ -105,6 +107,9 @@
"点击跳转" = "点击跳转";
"Doraemon内置浏览器" = "Doraemon内置浏览器";
"链接不能为空" = "链接不能为空";
"设备无相机——设备无相机功能,无法进行扫描" = "设备无相机——设备无相机功能,无法进行扫描";
"设备相机错误——无法启用相机,请检查" = "设备相机错误——无法启用相机,请检查";
"相机权限未开启,请到「设置-隐私-相机」中允许DoKit访问您的相机" = "相机权限未开启,请到「设置-隐私-相机」中允许DoKit访问您的相机";
//清除本地数据
"清理缓存" = "清理缓存";
...
...
@@ -247,6 +252,7 @@
"内存泄漏检测开关" = "内存泄漏检测开关";
"内存泄漏检测弹框提醒" = "内存泄漏检测弹框提醒";
"内存泄漏检测结果" = "内存泄漏检测结果";
"内存泄漏详情" = "内存泄漏详情";
//取色器
"取色器" = "取色器";
...
...
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.m
浏览文件 @
1cbd55d9
...
...
@@ -415,7 +415,7 @@ typedef void (^DoraemonPerformanceBlock)(NSDictionary *);
NSArray
*
dataArray
=
@{
@
(
DoraemonManagerPluginType_DoraemonWeexLogPlugin
)
:
@[
@{
kTitle
:
DoraemonLocalizedString
(
@"日志"
)},
@{
kDesc
:
@"Weex
日志显示
"
},
@{
kDesc
:
@"Weex
log
"
},
@{
kIcon
:
@"doraemon_log"
},
@{
kPluginName
:
@"DoraemonWeexLogPlugin"
},
@{
kAtModule
:
@"Weex"
},
...
...
@@ -423,7 +423,7 @@ typedef void (^DoraemonPerformanceBlock)(NSDictionary *);
],
@
(
DoraemonManagerPluginType_DoraemonWeexStoragePlugin
)
:
@[
@{
kTitle
:
DoraemonLocalizedString
(
@"缓存"
)},
@{
kDesc
:
@"weex storage
查看
"
},
@{
kDesc
:
@"weex storage"
},
@{
kIcon
:
@"doraemon_file"
},
@{
kPluginName
:
@"DoraemonWeexStoragePlugin"
},
@{
kAtModule
:
@"Weex"
},
...
...
@@ -431,7 +431,7 @@ typedef void (^DoraemonPerformanceBlock)(NSDictionary *);
],
@
(
DoraemonManagerPluginType_DoraemonWeexInfoPlugin
)
:
@[
@{
kTitle
:
DoraemonLocalizedString
(
@"信息"
)},
@{
kDesc
:
@"weex
信息查看
"
},
@{
kDesc
:
@"weex
info
"
},
@{
kIcon
:
@"doraemon_app_info"
},
@{
kPluginName
:
@"DoraemonWeexInfoPlugin"
},
@{
kAtModule
:
@"Weex"
},
...
...
iOS/DoraemonKit/Src/Core/Plugin/Common/AppInfo/DoraemonAppInfoViewController.m
浏览文件 @
1cbd55d9
...
...
@@ -298,7 +298,7 @@
-
(
NSArray
<
UITableViewRowAction
*>
*
)
tableView
:(
UITableView
*
)
tableView
editActionsForRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
__weak
typeof
(
self
)
weakSelf
=
self
;
UITableViewRowAction
*
action0
=
[
UITableViewRowAction
rowActionWithStyle
:
UITableViewRowActionStyleDefault
title
:
@"复制"
handler
:^
(
UITableViewRowAction
*
_Nonnull
action
,
NSIndexPath
*
_Nonnull
indexPath
)
{
UITableViewRowAction
*
action0
=
[
UITableViewRowAction
rowActionWithStyle
:
UITableViewRowActionStyleDefault
title
:
DoraemonLocalizedString
(
@"复制"
)
handler
:^
(
UITableViewRowAction
*
_Nonnull
action
,
NSIndexPath
*
_Nonnull
indexPath
)
{
NSString
*
value
=
weakSelf
.
dataArray
[
indexPath
.
section
][
@"array"
][
indexPath
.
row
][
@"value"
];
UIPasteboard
*
pboard
=
[
UIPasteboard
generalPasteboard
];
pboard
.
string
=
value
;
...
...
iOS/DoraemonKit/Src/Core/Plugin/Common/H5/DoraemonH5ViewController.m
浏览文件 @
1cbd55d9
...
...
@@ -172,7 +172,7 @@
if
(
self
.
dataSource
.
count
>
indexPath
.
row
)
{
cell
.
textLabel
.
text
=
self
.
dataSource
[
indexPath
.
row
];
}
else
{
cell
.
textLabel
.
text
=
@"
默认值
"
;
cell
.
textLabel
.
text
=
@"
default value
"
;
}
cell
.
textLabel
.
textColor
=
[
UIColor
doraemon_colorWithHex
:
0x333333
andAlpha
:
1
];
cell
.
textLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750_Landscape
(
30
)];
...
...
iOS/DoraemonKit/Src/Core/Plugin/Common/H5/DoraemonQRCodeViewController.m
浏览文件 @
1cbd55d9
...
...
@@ -33,7 +33,7 @@
#if defined(__IPHONE_13_0) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0)
}
#endif
self
.
title
=
@"
二维码扫描
"
;
self
.
title
=
@"
QR Scanning
"
;
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/Common/H5/QRCode/DoraemonQRScanView.m
浏览文件 @
1cbd55d9
...
...
@@ -135,21 +135,21 @@ static NSString *const scanLineAnimationName = @"scanLineAnimation";
-
(
BOOL
)
statusCheck
{
if
(
!
[
DoraemonQRScanView
isCameraAvailable
]){
[
DoraemonAlertUtil
handleAlertActionWithVC
:[
self
viewController
]
text
:
@"设备无相机——设备无相机功能,无法进行扫描"
okBlock
:^
{
[
DoraemonAlertUtil
handleAlertActionWithVC
:[
self
viewController
]
text
:
DoraemonLocalizedString
(
@"设备无相机——设备无相机功能,无法进行扫描"
)
okBlock
:^
{
}];
return
NO
;
}
if
(
!
[
DoraemonQRScanView
isRearCameraAvailable
]
&&
!
[
DoraemonQRScanView
isFrontCameraAvailable
])
{
[
DoraemonAlertUtil
handleAlertActionWithVC
:[
self
viewController
]
text
:
@"设备相机错误——无法启用相机,请检查"
okBlock
:^
{
[
DoraemonAlertUtil
handleAlertActionWithVC
:[
self
viewController
]
text
:
DoraemonLocalizedString
(
@"设备相机错误——无法启用相机,请检查"
)
okBlock
:^
{
}];
return
NO
;
}
if
(
!
[
self
isCameraAuthStatusCorrect
])
{
[
DoraemonAlertUtil
handleAlertActionWithVC
:[
self
viewController
]
text
:
@"相机权限未开启,请到「设置-隐私-相机」中允许滴滴访问您的相机"
okBlock
:^
{
[
DoraemonAlertUtil
handleAlertActionWithVC
:[
self
viewController
]
text
:
DoraemonLocalizedString
(
@"相机权限未开启,请到「设置-隐私-相机」中允许DoKit访问您的相机"
)
okBlock
:^
{
[
DoraemonUtil
openAppSetting
];
}
cancleBlock
:^
{
if
(
self
.
unopenCameraAuth
){
...
...
iOS/DoraemonKit/Src/Core/Plugin/Performance/ANR/Detail/DoraemonANRDetailViewController.m
浏览文件 @
1cbd55d9
...
...
@@ -39,7 +39,7 @@
_anrTimeLabel
=
[[
UILabel
alloc
]
init
];
_anrTimeLabel
.
textColor
=
[
UIColor
doraemon_black_1
];
_anrTimeLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750_Landscape
(
16
)];
_anrTimeLabel
.
text
=
[
NSString
stringWithFormat
:
@"
卡顿耗时
: %@ms"
,
_anrInfo
[
@"duration"
]];
_anrTimeLabel
.
text
=
[
NSString
stringWithFormat
:
@"
anr time
: %@ms"
,
_anrInfo
[
@"duration"
]];
[
_anrTimeLabel
sizeToFit
];
_anrTimeLabel
.
frame
=
CGRectMake
(
20
,
_contentLabel
.
doraemon_bottom
+
20
,
_anrTimeLabel
.
doraemon_width
,
_anrTimeLabel
.
doraemon_height
);
[
self
.
view
addSubview
:
_anrTimeLabel
];
...
...
iOS/DoraemonKit/Src/Core/Plugin/Performance/VCProfiler/UIViewController+DoraemonVCProfiler.m
浏览文件 @
1cbd55d9
...
...
@@ -35,11 +35,7 @@ static void doraemon_vc_profiler_viewDidLoad(UIViewController *kvo_self, SEL _se
[[
DoraemonHealthManager
sharedInstance
]
startEnterPage
:
origin_cls
];
void
(
*
func
)(
UIViewController
*
,
SEL
)
=
(
void
(
*
)(
UIViewController
*
,
SEL
))
origin_imp
;
//DoKitLog(@"VC: %p -viewDidLoad \t\tbegin at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
//DoKitLog(@"yixiang class = %@ viewDidLoad",origin_cls);
func
(
kvo_self
,
_sel
);
//DoKitLog(@"VC: %p -viewDidLoad \t\tfinish at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
}
static
void
doraemon_vc_profiler_viewWillAppear
(
UIViewController
*
kvo_self
,
SEL
_sel
,
BOOL
animated
)
{
...
...
@@ -50,11 +46,7 @@ static void doraemon_vc_profiler_viewWillAppear(UIViewController *kvo_self, SEL
assert
(
origin_imp
!=
NULL
);
void
(
*
func
)(
UIViewController
*
,
SEL
,
BOOL
)
=
(
void
(
*
)(
UIViewController
*
,
SEL
,
BOOL
))
origin_imp
;
//DoKitLog(@"yixiang class = %@ viewWillAppear",origin_cls);
//DoKitLog(@"VC: %p -viewWillAppear \tbegin at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
func
(
kvo_self
,
_sel
,
animated
);
//DoKitLog(@"VC: %p -viewWillAppear \tfinish at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
}
static
void
doraemon_vc_profiler_viewDidAppear
(
UIViewController
*
kvo_self
,
SEL
_sel
,
BOOL
animated
)
{
...
...
@@ -64,11 +56,8 @@ static void doraemon_vc_profiler_viewDidAppear(UIViewController *kvo_self, SEL _
assert
(
origin_imp
!=
NULL
);
void
(
*
func
)(
UIViewController
*
,
SEL
,
BOOL
)
=
(
void
(
*
)(
UIViewController
*
,
SEL
,
BOOL
))
origin_imp
;
//DoKitLog(@"yixiang class = %@ viewDidAppear",origin_cls);
//DoKitLog(@"VC: %p -viewDidAppear \tbegin at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
func
(
kvo_self
,
_sel
,
animated
);
//DoKitLog(@"VC: %p -viewDidAppear \tfinish at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
[[
DoraemonHealthManager
sharedInstance
]
enterPage
:
origin_cls
];
}
...
...
@@ -80,10 +69,7 @@ static void doraemon_vc_profiler_viewWillDisAppear(UIViewController *kvo_self, S
void
(
*
func
)(
UIViewController
*
,
SEL
,
BOOL
)
=
(
void
(
*
)(
UIViewController
*
,
SEL
,
BOOL
))
origin_imp
;
//DoKitLog(@"yixiang class = %@ viewWillDisAppear",origin_cls);
//DoKitLog(@"VC: %p -viewDidAppear \tbegin at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
func
(
kvo_self
,
_sel
,
animated
);
//DoKitLog(@"VC: %p -viewDidAppear \tfinish at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
}
static
void
doraemon_vc_profiler_viewDidDisappear
(
UIViewController
*
kvo_self
,
SEL
_sel
,
BOOL
animated
)
{
...
...
@@ -94,10 +80,7 @@ static void doraemon_vc_profiler_viewDidDisappear(UIViewController *kvo_self, SE
void
(
*
func
)(
UIViewController
*
,
SEL
,
BOOL
)
=
(
void
(
*
)(
UIViewController
*
,
SEL
,
BOOL
))
origin_imp
;
//DoKitLog(@"yixiang class = %@ viewDidDisappear",origin_cls);
//DoKitLog(@"VC: %p -viewDidAppear \tbegin at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
func
(
kvo_self
,
_sel
,
animated
);
//DoKitLog(@"VC: %p -viewDidAppear \tfinish at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
[[
DoraemonHealthManager
sharedInstance
]
leavePage
:
origin_cls
];
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/Platform/Health/Function/DoraemonHealthManager.m
浏览文件 @
1cbd55d9
...
...
@@ -249,16 +249,16 @@
}
};
DoKitLog
(
@"
上传信息
== %@"
,
dic
);
DoKitLog
(
@"
upload info
== %@"
,
dic
);
if
(
!
[
DoraemonManager
shareInstance
].
pId
)
{
DoKitLog
(
@"dokik pId
为空
"
);
DoKitLog
(
@"dokik pId
empty
"
);
}
[
DoraemonNetworkUtil
postWithUrlString
:
@"https://www.dokit.cn/healthCheck/addCheckData"
params
:
dic
success
:^
(
NSDictionary
*
_Nonnull
result
)
{
NSInteger
code
=
[
result
[
@"code"
]
integerValue
];
if
(
code
==
200
)
{
[
DoraemonToastUtil
showToastBlack
:
@"数据上传成功"
inView
:[
UIViewController
rootViewControllerForDoraemonHomeWindow
].
view
];
[
DoraemonToastUtil
showToastBlack
:
DoraemonLocalizedString
(
@"数据上传成功"
)
inView
:[
UIViewController
rootViewControllerForDoraemonHomeWindow
].
view
];
}
else
{
NSString
*
msg
=
result
[
@"msg"
];
if
(
msg
)
{
...
...
@@ -267,7 +267,7 @@
}
}
error
:^
(
NSError
*
_Nonnull
error
)
{
[
DoraemonToastUtil
showToastBlack
:
@"数据上传失败"
inView
:[
UIViewController
rootViewControllerForDoraemonHomeWindow
].
view
];
[
DoraemonToastUtil
showToastBlack
:
DoraemonLocalizedString
(
@"数据上传失败"
)
inView
:[
UIViewController
rootViewControllerForDoraemonHomeWindow
].
view
];
}];
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/Platform/Mock/Function/DoraemonMockManager.m
浏览文件 @
1cbd55d9
...
...
@@ -125,7 +125,7 @@
block
(
2
);
}];
}
else
{
DoKitLog
(
@"
请求接口列表必须保证pId不为空
"
);
DoKitLog
(
@"
Request interface list must ensure that pId is not empty
"
);
block
(
3
);
}
...
...
@@ -342,13 +342,13 @@
};
[
DoraemonNetworkUtil
patchWithUrlString
:
@"https://mock.dokit.cn/api/app/interface"
params
:
params
success
:^
(
NSDictionary
*
_Nonnull
result
)
{
[
self
showToast
:
@"上传成功"
atView
:
view
];
[
self
showToast
:
DoraemonLocalizedString
(
@"上传成功"
)
atView
:
view
];
}
error
:^
(
NSError
*
_Nonnull
error
)
{
DoKitLog
(
@"error == %@"
,
error
);
[
self
showToast
:
@"上传失败"
atView
:
view
];
[
self
showToast
:
DoraemonLocalizedString
(
@"上传失败"
)
atView
:
view
];
}];
}
else
{
DoKitLog
(
@"
上传模版接口必须要传
pid"
);
DoKitLog
(
@"
Upload template must has
pid"
);
}
}
...
...
iOS/DoraemonKit/Src/Core/Util/DoraemonUtil.m
浏览文件 @
1cbd55d9
...
...
@@ -82,7 +82,7 @@
NSString
*
text
=
data
;
BOOL
writeSuccess
=
[
text
writeToFile
:
path
atomically
:
YES
encoding
:
NSUTF8StringEncoding
error
:
nil
];
if
(
writeSuccess
)
{
DoKitLog
(
@"
写入成功
"
);
DoKitLog
(
@"
write success
"
);
}
}
...
...
@@ -97,7 +97,7 @@
options:
NSJSONReadingMutableContainers
error:
&
err
];
if
(
err
)
{
DoKitLog
(
@"json
解析失败
:%@"
,
err
);
DoKitLog
(
@"json
read error
:%@"
,
err
);
return
nil
;
}
return
dic
;
...
...
@@ -114,7 +114,7 @@
options:
NSJSONReadingMutableContainers
error:
&
err
];
if
(
err
)
{
DoKitLog
(
@"json
解析失败
:%@"
,
err
);
DoKitLog
(
@"json
read error
:%@"
,
err
);
return
nil
;
}
return
array
;
...
...
@@ -200,7 +200,7 @@
}
}
else
{
//不存在该文件path
DoKitLog
(
@"
不存在该文件
"
);
DoKitLog
(
@"
file not exist
"
);
}
return
nil
;
...
...
iOS/DoraemonKit/Src/MLeaksFinder/Detail/DoraemonMLeaksFinderDetailViewController.m
浏览文件 @
1cbd55d9
...
...
@@ -18,7 +18,7 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"内存泄漏详情"
;
self
.
title
=
DoraemonLocalizedString
(
@"内存泄漏详情"
)
;
_contentLabel
=
[[
UILabel
alloc
]
init
];
_contentLabel
.
textColor
=
[
UIColor
doraemon_black_2
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录