Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
DoraemonKit
提交
bea5a8f1
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,发现更多精彩内容 >>
未验证
提交
bea5a8f1
编写于
2月 11, 2019
作者:
Y
yixiangboy
提交者:
GitHub
2月 11, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into master
上级
596e7ed6
a0f970fe
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
54 addition
and
13 deletion
+54
-13
Doc/android_cn_guide.md
Doc/android_cn_guide.md
+2
-2
Doc/android_en_guide.md
Doc/android_en_guide.md
+2
-2
iOS/DoraemonKit/Framework/DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze
...amework/DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze
+0
-0
iOS/DoraemonKit/Framework/DoraemonLoadAnalyze.framework/Info.plist
...monKit/Framework/DoraemonLoadAnalyze.framework/Info.plist
+0
-0
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.h
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.h
+4
-0
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.m
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.m
+34
-1
iOS/DoraemonKitDemo/DoraemonKitDemo.xcodeproj/project.pbxproj
...DoraemonKitDemo/DoraemonKitDemo.xcodeproj/project.pbxproj
+2
-2
iOS/DoraemonKitDemo/DoraemonKitDemo/AppDelegate.m
iOS/DoraemonKitDemo/DoraemonKitDemo/AppDelegate.m
+6
-2
iOS/DoraemonLoadAnalyzeDemo/DoraemonLoadAnalyzeDemo.xcodeproj/project.pbxproj
...yzeDemo/DoraemonLoadAnalyzeDemo.xcodeproj/project.pbxproj
+4
-4
未找到文件。
Doc/android_cn_guide.md
浏览文件 @
bea5a8f1
...
...
@@ -23,7 +23,7 @@ dependencies {
@Override
public void onCreate() {
...
DoraemonKit.install(application
)
DoraemonKit.install(application
)
// H5任意门功能需要,非必须
DoraemonKit.setWebDoorCallback(new WebDoorManager.WebDoorCallback() {
...
...
@@ -109,4 +109,4 @@ public void onCreate() {
DoraemonKit.install(application, kits);
...
}
```
\ No newline at end of file
```
Doc/android_en_guide.md
浏览文件 @
bea5a8f1
...
...
@@ -11,7 +11,7 @@ dependencies {
}
```
Please use
[
the la
s
test release
](
android-ReleaseNotes.md
)
。
Please use
[
the latest release
](
android-ReleaseNotes.md
)
。
...
...
@@ -109,4 +109,4 @@ public void onCreate() {
DoraemonKit.install(application, kits);
...
}
```
\ No newline at end of file
```
iOS/DoraemonKit/Framework/DoraemonLoadAnalyze.framework/DoraemonLoadAnalyze
浏览文件 @
bea5a8f1
无法预览此类型文件
iOS/DoraemonKit/Framework/DoraemonLoadAnalyze.framework/Info.plist
浏览文件 @
bea5a8f1
无法预览此类型文件
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.h
浏览文件 @
bea5a8f1
...
...
@@ -15,12 +15,16 @@ typedef void (^DoraemonH5DoorBlock)(NSString *);
-
(
void
)
install
;
-
(
void
)
installWithCustomBlock
:(
void
(
^
)())
customBlock
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
dataArray
;
@property
(
nonatomic
,
copy
)
DoraemonH5DoorBlock
h5DoorBlock
;
-
(
void
)
addPluginWithTitle
:(
NSString
*
)
title
icon
:(
NSString
*
)
iconName
desc
:(
NSString
*
)
desc
pluginName
:(
NSString
*
)
entryName
atModule
:(
NSString
*
)
moduleName
;
-
(
void
)
removePluginWithPluginName
:(
NSString
*
)
pluginName
atModule
:(
NSString
*
)
moduleName
;
-
(
void
)
addStartPlugin
:(
NSString
*
)
pluginName
;
-
(
void
)
addH5DoorBlock
:(
void
(
^
)(
NSString
*
h5Url
))
block
;
...
...
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.m
浏览文件 @
bea5a8f1
...
...
@@ -55,6 +55,12 @@ typedef void (^DoraemonPerformanceBlock)(NSDictionary *);
}
-
(
void
)
install
{
[
self
installWithCustomBlock
:
^
{
//什么也没发生
}];
}
-
(
void
)
installWithCustomBlock
:(
void
(
^
)())
customBlock
{
for
(
int
i
=
0
;
i
<
_startPlugins
.
count
;
i
++
)
{
NSString
*
pluginName
=
_startPlugins
[
i
];
Class
pluginClass
=
NSClassFromString
(
pluginName
);
...
...
@@ -63,8 +69,10 @@ typedef void (^DoraemonPerformanceBlock)(NSDictionary *);
[
plugin
pluginDidLoad
];
}
}
[
self
initData
];
customBlock
();
[
self
initEntry
];
//根据开关判断是否收集Crash日志
...
...
@@ -192,6 +200,10 @@ typedef void (^DoraemonPerformanceBlock)(NSDictionary *);
}
}
-
(
void
)
removePluginWithPluginName
:(
NSString
*
)
pluginName
atModule
:(
NSString
*
)
moduleName
{
[
self
unregisterPlugin
:
pluginName
withModule
:
moduleName
];
}
-
(
void
)
registerPluginArray
:(
NSMutableArray
*
)
array
withModule
:(
NSString
*
)
moduleName
{
if
(
!
_dataArray
){
_dataArray
=
[[
NSMutableArray
alloc
]
init
];
...
...
@@ -202,6 +214,27 @@ typedef void (^DoraemonPerformanceBlock)(NSDictionary *);
[
_dataArray
addObject
:
dic
];
}
-
(
void
)
unregisterPlugin
:(
NSString
*
)
pluginName
withModule
:(
NSString
*
)
moduleName
{
if
(
!
_dataArray
){
return
;
}
id
object
;
for
(
object
in
_dataArray
)
{
NSString
*
tempModuleName
=
[((
NSMutableDictionary
*
)
object
)
valueForKey
:
@"moduleName"
];
if
([
tempModuleName
isEqualToString
:
moduleName
])
{
NSMutableArray
*
tempPluginArray
=
[((
NSMutableDictionary
*
)
object
)
valueForKey
:
@"pluginArray"
];
id
pluginObject
;
for
(
pluginObject
in
tempPluginArray
)
{
NSString
*
tempPluginName
=
[((
NSMutableDictionary
*
)
pluginObject
)
valueForKey
:
@"pluginName"
];
if
([
tempPluginName
isEqualToString
:
pluginName
])
{
[
tempPluginArray
removeObject
:
pluginObject
];
return
;
}
}
}
}
}
-
(
void
)
hiddenDoraemon
{
_entryView
.
hidden
=
YES
;
}
...
...
iOS/DoraemonKitDemo/DoraemonKitDemo.xcodeproj/project.pbxproj
浏览文件 @
bea5a8f1
...
...
@@ -568,7 +568,7 @@
GCC_PREFIX_HEADER
=
"DoraemonKitDemo/DoraemonKitDemo-PrefixHeader.pch"
;
INFOPLIST_FILE
=
DoraemonKitDemo/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
yixiang.DoraemonKitDemo
C
;
PRODUCT_BUNDLE_IDENTIFIER
=
yixiang.DoraemonKitDemo
XXX
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
};
...
...
@@ -586,7 +586,7 @@
GCC_PREFIX_HEADER
=
"DoraemonKitDemo/DoraemonKitDemo-PrefixHeader.pch"
;
INFOPLIST_FILE
=
DoraemonKitDemo/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
yixiang.DoraemonKitDemo
C
;
PRODUCT_BUNDLE_IDENTIFIER
=
yixiang.DoraemonKitDemo
XXX
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
};
...
...
iOS/DoraemonKitDemo/DoraemonKitDemo/AppDelegate.m
浏览文件 @
bea5a8f1
...
...
@@ -27,11 +27,15 @@
}
[[
DoraemonManager
shareInstance
]
addPluginWithTitle
:
@"测试插件"
icon
:
@"doraemon_default"
desc
:
@"测试插件"
pluginName
:
@"TestPlugin"
atModule
:
@"业务工具"
];
[[
DoraemonManager
shareInstance
]
addStartPlugin
:
@"StartPlugin"
];
[[
DoraemonManager
shareInstance
]
install
];
// [[DoraemonManager shareInstance] addH5DoorBlock:^(NSString *h5Url) {
// NSLog(@"使用自带容器打开H5链接: %@",h5Url);
// }];
[[
DoraemonManager
shareInstance
]
install
];
// 例子:移除 GPS Mock
// [[DoraemonManager shareInstance] installWithCustomBlock:^{
// [[DoraemonManager shareInstance] removePluginWithPluginName:@"DoraemonGPSPlugin" atModule:@"常用工具"];
// }];
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
// DDLogInfo(@"点击添加埋点22222");
}
...
...
iOS/DoraemonLoadAnalyzeDemo/DoraemonLoadAnalyzeDemo.xcodeproj/project.pbxproj
浏览文件 @
bea5a8f1
...
...
@@ -430,7 +430,7 @@
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_STYLE
=
Automatic
;
DEVELOPMENT_TEAM
=
2M632FEG3H
;
DEVELOPMENT_TEAM
=
RSV7DQ57L7
;
INFOPLIST_FILE
=
DoraemonLoadAnalyzeDemo/Info.plist
;
IPHONEOS_DEPLOYMENT_TARGET
=
8.0
;
LD_RUNPATH_SEARCH_PATHS
=
(
...
...
@@ -438,7 +438,7 @@
"@executable_path/Frameworks"
,
);
OTHER_LDFLAGS
=
"-ObjC"
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.javer.yi.DoraemonLoadAnalyzeDemo
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.javer.yi.DoraemonLoadAnalyzeDemo
XXXX
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
};
...
...
@@ -449,7 +449,7 @@
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_STYLE
=
Automatic
;
DEVELOPMENT_TEAM
=
2M632FEG3H
;
DEVELOPMENT_TEAM
=
RSV7DQ57L7
;
INFOPLIST_FILE
=
DoraemonLoadAnalyzeDemo/Info.plist
;
IPHONEOS_DEPLOYMENT_TARGET
=
8.0
;
LD_RUNPATH_SEARCH_PATHS
=
(
...
...
@@ -457,7 +457,7 @@
"@executable_path/Frameworks"
,
);
OTHER_LDFLAGS
=
"-ObjC"
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.javer.yi.DoraemonLoadAnalyzeDemo
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.javer.yi.DoraemonLoadAnalyzeDemo
XXXX
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录