Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
DoraemonKit
提交
4a95d9e1
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,发现更多精彩内容 >>
提交
4a95d9e1
编写于
3月 02, 2020
作者:
Y
yixiangboy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
自定义日志系统
上级
760efccd
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
38 addition
and
59 deletion
+38
-59
iOS/DoraemonKit/Src/Core/Category/UIImage+Doraemon.m
iOS/DoraemonKit/Src/Core/Category/UIImage+Doraemon.m
+0
-4
iOS/DoraemonKit/Src/Core/CommonUI/Visual/DoraemonVisualMagnifierWindow.m
.../Src/Core/CommonUI/Visual/DoraemonVisualMagnifierWindow.m
+0
-6
iOS/DoraemonKit/Src/Core/Define/DoraemonDefine.h
iOS/DoraemonKit/Src/Core/Define/DoraemonDefine.h
+8
-0
iOS/DoraemonKit/Src/Core/Entry/View/DoraemonEntryView.m
iOS/DoraemonKit/Src/Core/Entry/View/DoraemonEntryView.m
+1
-0
iOS/DoraemonKit/Src/Core/Network/Interceptor/DoraemonNSURLProtocol.m
...nKit/Src/Core/Network/Interceptor/DoraemonNSURLProtocol.m
+2
-2
iOS/DoraemonKit/Src/Core/Plugin/Common/AppInfo/DoraemonAppInfoUtil.m
...nKit/Src/Core/Plugin/Common/AppInfo/DoraemonAppInfoUtil.m
+0
-2
iOS/DoraemonKit/Src/Core/Plugin/Common/H5/DoraemonQRCodeViewController.m
.../Src/Core/Plugin/Common/H5/DoraemonQRCodeViewController.m
+0
-3
iOS/DoraemonKit/Src/Core/Plugin/Common/H5/QRCode/DoraemonQRCodeTool.m
...Kit/Src/Core/Plugin/Common/H5/QRCode/DoraemonQRCodeTool.m
+0
-5
iOS/DoraemonKit/Src/Core/Plugin/Common/Sanbox/VC/DB/DoraemonDBTableViewController.m
...lugin/Common/Sanbox/VC/DB/DoraemonDBTableViewController.m
+0
-1
iOS/DoraemonKit/Src/Core/Plugin/Performance/FPS/Function/DoraemonFPSUtil.m
...rc/Core/Plugin/Performance/FPS/Function/DoraemonFPSUtil.m
+0
-4
iOS/DoraemonKit/Src/Core/Plugin/Performance/TimeProfiler/Function/DoraemonTimeProfiler.m
.../Performance/TimeProfiler/Function/DoraemonTimeProfiler.m
+2
-2
iOS/DoraemonKit/Src/Core/Plugin/Performance/VCProfiler/UIViewController+DoraemonVCProfiler.m
...formance/VCProfiler/UIViewController+DoraemonVCProfiler.m
+1
-1
iOS/DoraemonKit/Src/Core/Plugin/Platform/Health/DoraemonHealthViewController.m
...ore/Plugin/Platform/Health/DoraemonHealthViewController.m
+0
-1
iOS/DoraemonKit/Src/Core/Plugin/Platform/Health/Function/DoraemonHealthManager.m
...e/Plugin/Platform/Health/Function/DoraemonHealthManager.m
+5
-8
iOS/DoraemonKit/Src/Core/Plugin/Platform/Mock/Function/DoraemonMockManager.m
.../Core/Plugin/Platform/Mock/Function/DoraemonMockManager.m
+5
-4
iOS/DoraemonKit/Src/Core/Plugin/Platform/Mock/Function/DoraemonMockUtil.m
...Src/Core/Plugin/Platform/Mock/Function/DoraemonMockUtil.m
+2
-1
iOS/DoraemonKit/Src/Core/Plugin/Platform/Mock/View/List/Cell/DoraemonMockUploadCell.m
...gin/Platform/Mock/View/List/Cell/DoraemonMockUploadCell.m
+3
-4
iOS/DoraemonKit/Src/Core/Plugin/UI/ColorPick/Function/DoraemonColorPickInfoView.m
.../Plugin/UI/ColorPick/Function/DoraemonColorPickInfoView.m
+1
-2
iOS/DoraemonKit/Src/Core/Plugin/UI/ColorPick/Function/DoraemonColorPickWindow.m
...re/Plugin/UI/ColorPick/Function/DoraemonColorPickWindow.m
+0
-1
iOS/DoraemonKit/Src/Core/Util/DoraemonUtil.m
iOS/DoraemonKit/Src/Core/Util/DoraemonUtil.m
+8
-7
iOS/DoraemonKit/Src/MLeaksFinder/List/DoraemonMLeaksFinderListViewController.m
...LeaksFinder/List/DoraemonMLeaksFinderListViewController.m
+0
-1
未找到文件。
iOS/DoraemonKit/Src/Core/Category/UIImage+Doraemon.m
浏览文件 @
4a95d9e1
...
...
@@ -83,10 +83,6 @@
thumbnailRect
.
size
.
height
=
scaledHeight
;
[
sourceImage
drawInRect
:
thumbnailRect
];
newImage
=
UIGraphicsGetImageFromCurrentImageContext
();
if
(
newImage
==
nil
)
NSLog
(
@"could not scale image"
);
//pop the context to get back to the default
UIGraphicsEndImageContext
();
return
newImage
;
...
...
iOS/DoraemonKit/Src/Core/CommonUI/Visual/DoraemonVisualMagnifierWindow.m
浏览文件 @
4a95d9e1
...
...
@@ -9,12 +9,6 @@
@implementation
DoraemonVisualMagnifierWindow
#pragma mark - Lifecycle
-
(
void
)
dealloc
{
NSLog
(
@"DoraemonVisualMagnifierWindow dealloc"
);
}
-
(
instancetype
)
init
{
self
=
[
super
init
];
if
(
self
)
{
...
...
iOS/DoraemonKit/Src/Core/Define/DoraemonDefine.h
浏览文件 @
4a95d9e1
...
...
@@ -20,6 +20,14 @@
#define DoKitVersion @"3.0.0"
//#define DoKit_OpenLog
#ifdef DoKit_OpenLog
#define DoKitLog(...) NSLog(@"%s\n %@ \n\n",__func__,[NSString stringWithFormat:__VA_ARGS__]);
#else
#define DoKitLog(...)
#endif
#define DoraemonScreenWidth [UIScreen mainScreen].bounds.size.width
#define DoraemonScreenHeight [UIScreen mainScreen].bounds.size.height
...
...
iOS/DoraemonKit/Src/Core/Entry/View/DoraemonEntryView.m
浏览文件 @
4a95d9e1
...
...
@@ -125,6 +125,7 @@
}
else
{
[[
DoraemonHomeWindow
shareInstance
]
hide
];
}
DoKitLog
(
@"btn == %@"
,
btn
);
}
-
(
void
)
pan
:(
UIPanGestureRecognizer
*
)
sender
{
...
...
iOS/DoraemonKit/Src/Core/Network/Interceptor/DoraemonNSURLProtocol.m
浏览文件 @
4a95d9e1
...
...
@@ -12,6 +12,7 @@
#import "DoraemonURLSessionDemux.h"
#import "DoraemonNetworkInterceptor.h"
#import "DoraemonMockManager.h"
#import "DoraemonDefine.h"
static
NSString
*
const
kDoraemonProtocolKey
=
@"doraemon_protocol_key"
;
...
...
@@ -72,13 +73,12 @@ static NSString * const kDoraemonProtocolKey = @"doraemon_protocol_key";
}
+
(
NSURLRequest
*
)
canonicalRequestForRequest
:(
NSURLRequest
*
)
request
{
//NSLog(@"canonicalRequestForRequest");
NSMutableURLRequest
*
mutableReqeust
=
[
request
mutableCopy
];
[
NSURLProtocol
setProperty
:
@YES
forKey
:
kDoraemonProtocolKey
inRequest
:
mutableReqeust
];
if
([[
DoraemonMockManager
sharedInstance
]
needMock
:
request
])
{
NSString
*
sceneId
=
[[
DoraemonMockManager
sharedInstance
]
getSceneId
:
request
];
NSString
*
urlString
=
[
NSString
stringWithFormat
:
@"https://mock.dokit.cn/api/app/scene/%@"
,
sceneId
];
NS
Log
(
@"MOCK URL == %@"
,
urlString
);
DoKit
Log
(
@"MOCK URL == %@"
,
urlString
);
mutableReqeust
=
[
NSMutableURLRequest
requestWithURL
:[
NSURL
URLWithString
:
urlString
]];
}
return
[
mutableReqeust
copy
];
...
...
iOS/DoraemonKit/Src/Core/Plugin/Common/AppInfo/DoraemonAppInfoUtil.m
浏览文件 @
4a95d9e1
...
...
@@ -380,8 +380,6 @@
@[
/*IOS_VPN @"/" IP_ADDR_IPv6, IOS_VPN @"/" IP_ADDR_IPv4,*/
IOS_WIFI
@"/"
IP_ADDR_IPv6
,
IOS_WIFI
@"/"
IP_ADDR_IPv4
,
IOS_CELLULAR
@"/"
IP_ADDR_IPv6
,
IOS_CELLULAR
@"/"
IP_ADDR_IPv4
]
;
NSDictionary
*
addresses
=
[[
self
class
]
getIPAddresses
];
NSLog
(
@"addresses: %@"
,
addresses
);
__block
NSString
*
address
;
[
searchArray
enumerateObjectsUsingBlock
:
^
(
NSString
*
key
,
NSUInteger
idx
,
BOOL
*
stop
)
{
...
...
iOS/DoraemonKit/Src/Core/Plugin/Common/H5/DoraemonQRCodeViewController.m
浏览文件 @
4a95d9e1
...
...
@@ -50,13 +50,10 @@
dispatch_async
(
dispatch_get_main_queue
(),
^
{
if
(
granted
)
{
NSLog
(
@"用户允许"
);
[
self
createCode
];
[
self
.
qrcode
startScanning
];
}
else
{
//用户拒绝
NSLog
(
@"用户拒绝"
);
}
});
}];
...
...
iOS/DoraemonKit/Src/Core/Plugin/Common/H5/QRCode/DoraemonQRCodeTool.m
浏览文件 @
4a95d9e1
...
...
@@ -131,7 +131,6 @@
AVCaptureDeviceInput
*
input
=
[
AVCaptureDeviceInput
deviceInputWithDevice
:
codeCaptureDevice
error
:
&
error
];
if
(
error
)
{
NSLog
(
@"创建输入流error:%@"
,
error
);
return
[
NSString
stringWithFormat
:
@"%@"
,
error
];
}
...
...
@@ -324,7 +323,6 @@
-
(
void
)
captureOutput
:(
AVCaptureOutput
*
)
captureOutput
didOutputMetadataObjects
:(
NSArray
*
)
metadataObjects
fromConnection
:(
AVCaptureConnection
*
)
connection
{
if
(
metadataObjects
.
count
>
0
)
{
//NSLog(@"%@",[[metadataObjects objectAtIndex:0] stringValue]);
self
.
ScanResultsBlock
([[
metadataObjects
objectAtIndex
:
0
]
stringValue
]);
}
...
...
@@ -372,8 +370,6 @@
}
else
{
//[self addAlertViewControllerWithMessage:@"未正常解析二维码图片, 请确保iphone5/5c以上的设备"];
NSLog
(
@"未正常解析二维码图片, 请确保iphone5/5c以上的设备"
);
}
return
content
;
}
...
...
@@ -597,7 +593,6 @@ void ProviderReleaseData (void *info, const void *data, size_t size){
CIStarShineGenerator,
CIStripesGenerator,
CISunbeamsGenerator*/
NSLog
(
@"%@"
,[
CIFilter
filterNamesInCategory
:
kCICategoryGenerator
]);
// 实例化二维码滤镜
CIFilter
*
QRFilter
=
[
CIFilter
filterWithName
:
@"CIQRCodeGenerator"
];
...
...
iOS/DoraemonKit/Src/Core/Plugin/Common/Sanbox/VC/DB/DoraemonDBTableViewController.m
浏览文件 @
4a95d9e1
...
...
@@ -101,7 +101,6 @@
#pragma mark -- DoraemonDBRowViewTypeDelegate
-
(
void
)
rowView
:(
DoraemonDBRowView
*
)
rowView
didLabelTaped
:(
UILabel
*
)
label
{
NSString
*
content
=
label
.
text
;
NSLog
(
@"%@"
,
content
);
[
self
showText
:
content
];
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/Performance/FPS/Function/DoraemonFPSUtil.m
浏览文件 @
4a95d9e1
...
...
@@ -73,8 +73,4 @@
self
.
block
=
block
;
}
-
(
void
)
dealloc
{
NSLog
(
@"fps dealloc"
);
}
@end
iOS/DoraemonKit/Src/Core/Plugin/Performance/TimeProfiler/Function/DoraemonTimeProfiler.m
浏览文件 @
4a95d9e1
...
...
@@ -10,6 +10,7 @@
#include <objc/message.h>
#include <sys/sysctl.h>
#import "DoraemonHealthManager.h"
#import "DoraemonDefine.h"
static
NSTimeInterval
startTime
;
static
NSTimeInterval
stopTime
;
...
...
@@ -67,7 +68,7 @@ static NSTimeInterval stopTime;
+
(
void
)
printRecords
{
NSString
*
result
=
[
self
getRecordsResult
];
[
DoraemonHealthManager
sharedInstance
].
costDetail
=
result
;
NS
Log
(
@"%@"
,
result
);
DoKit
Log
(
@"%@"
,
result
);
}
+
(
NSString
*
)
getRecordsResult
{
...
...
@@ -143,7 +144,6 @@ static NSTimeInterval stopTime;
}
+
(
void
)
share
:(
NSString
*
)
str
{
//NSLog(@"%@",str);
}
@end
iOS/DoraemonKit/Src/Core/Plugin/Performance/VCProfiler/UIViewController+DoraemonVCProfiler.m
浏览文件 @
4a95d9e1
...
...
@@ -10,7 +10,7 @@
#import <objc/runtime.h>
#import "DoraemonHealthManager.h"
#define Doraemon_VC_Profiler_LOG_ENABLE 0
//#define Doraemon_VC_Profiler_LOG_ENABLE
#ifdef Doraemon_VC_Profiler_LOG_ENABLE
#define VCLog(...) NSLog(__VA_ARGS__)
...
...
iOS/DoraemonKit/Src/Core/Plugin/Platform/Health/DoraemonHealthViewController.m
浏览文件 @
4a95d9e1
...
...
@@ -86,7 +86,6 @@
DoraemonHealthAlertView
*
alertView
=
[[
DoraemonHealthAlertView
alloc
]
init
];
[
alertView
renderUI
:
DoraemonLocalizedString
(
@"结束前请完善下列信息"
)
placeholder
:@[]
inputTip
:
@[
DoraemonLocalizedString
(
@"测试用例名称"
),
DoraemonLocalizedString
(
@"测试人名称"
)]
ok
:
DoraemonLocalizedString
(
@"提交"
)
cancle
:
DoraemonLocalizedString
(
@"取消"
)
okBlock
:^
{
//NSLog(@"===== %@",[alertView getInputText]);
NSArray
*
result
=
[
alertView
getInputText
];
if
(
result
.
count
==
2
)
{
[
DoraemonHealthManager
sharedInstance
].
caseName
=
result
[
0
];
...
...
iOS/DoraemonKit/Src/Core/Plugin/Platform/Health/Function/DoraemonHealthManager.m
浏览文件 @
4a95d9e1
...
...
@@ -248,10 +248,10 @@
}
};
NS
Log
(
@"上传信息 == %@"
,
dic
);
DoKit
Log
(
@"上传信息 == %@"
,
dic
);
if
(
!
[
DoraemonManager
shareInstance
].
pId
)
{
NS
Log
(
@"dokik pId 为空"
);
DoKit
Log
(
@"dokik pId 为空"
);
}
[
DoraemonNetworkUtil
postWithUrlString
:
@"https://www.dokit.cn/healthCheck/addCheckData"
params
:
dic
success
:^
(
NSDictionary
*
_Nonnull
result
)
{
...
...
@@ -294,7 +294,7 @@
NSString
*
pageName
=
NSStringFromClass
(
vcClass
);
CGFloat
beginTime
=
CACurrentMediaTime
();
[
_pageEnterMap
setValue
:
@
(
beginTime
)
forKey
:
pageName
];
NS
Log
(
@"yixiang 开始进入页面 == %@ 时间 == %f"
,
pageName
,
beginTime
);
DoKit
Log
(
@"yixiang 开始进入页面 == %@ 时间 == %f"
,
pageName
,
beginTime
);
}
...
...
@@ -307,13 +307,11 @@
}
[[
DoraemonHealthCountdownWindow
shareInstance
]
start
:
10
];
NSString
*
pageName
=
NSStringFromClass
(
vcClass
);
NS
Log
(
@"yixiang 已经进入页面 == %@"
,
pageName
);
DoKit
Log
(
@"yixiang 已经进入页面 == %@"
,
pageName
);
if
(
_pageEnterMap
[
pageName
])
{
CGFloat
beginTime
=
[
_pageEnterMap
[
pageName
]
floatValue
];
CGFloat
endTime
=
CACurrentMediaTime
();
NSInteger
costTime
=
(
NSInteger
)((
endTime
-
beginTime
)
*
1000
+
0
.
5
);
//四舍五入 ms
NSLog
(
@"yixiang 耗时 == %f"
,
endTime
);
NSLog
(
@"yixiang 耗时 == %zi"
,
costTime
);
[
_pageLoadArray
addObject
:@{
@"page"
:
NSStringFromClass
(
vcClass
),
@"time"
:
@
(
costTime
)
//ms
...
...
@@ -339,7 +337,7 @@
_h5UrlString
=
nil
;
}
NS
Log
(
@"离开页面 == %@"
,
pageName
);
DoKit
Log
(
@"离开页面 == %@"
,
pageName
);
if
(
_networkPageArray
.
count
>
0
)
{
[
_networkArray
addObject
:@{
...
...
@@ -405,7 +403,6 @@
-
(
void
)
addHttpModel
:(
DoraemonNetFlowHttpModel
*
)
httpModel
{
if
(
_start
)
{
NSLog
(
@"网络来了"
);
dispatch_semaphore_wait
(
semaphore
,
DISPATCH_TIME_FOREVER
);
[
_networkPageArray
addObject
:@{
@"time"
:
[
DoraemonUtil
currentTimeInterval
],
...
...
iOS/DoraemonKit/Src/Core/Plugin/Platform/Mock/Function/DoraemonMockManager.m
浏览文件 @
4a95d9e1
...
...
@@ -12,6 +12,7 @@
#import "DoraemonUrlUtil.h"
#import "DoraemonManager.h"
#import "DoraemonMockUtil.h"
#import "DoraemonDefine.h"
@interface
DoraemonMockManager
()
<
DoraemonNetworkInterceptorDelegate
>
...
...
@@ -114,10 +115,10 @@
weakSelf
.
groups
=
groups
;
[
self
handleData
];
}
error
:^
(
NSError
*
_Nonnull
error
)
{
NS
Log
(
@"error == %@"
,
error
);
DoKit
Log
(
@"error == %@"
,
error
);
}];
}
else
{
NS
Log
(
@"请求接口列表必须保证pId不为空"
);
DoKit
Log
(
@"请求接口列表必须保证pId不为空"
);
}
}
...
...
@@ -151,7 +152,7 @@
if
(
api
)
{
mock
=
YES
;
}
NS
Log
(
@"yixiang mock = %d"
,
mock
);
DoKit
Log
(
@"yixiang mock = %d"
,
mock
);
return
mock
;
}
...
...
@@ -205,7 +206,7 @@
if
(
api
)
{
save
=
YES
;
}
NS
Log
(
@"yixiang save = %d api = %@ query = %@"
,
save
,
api
.
path
,
api
.
query
);
DoKit
Log
(
@"yixiang save = %d api = %@ query = %@"
,
save
,
api
.
path
,
api
.
query
);
return
save
;
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/Platform/Mock/Function/DoraemonMockUtil.m
浏览文件 @
4a95d9e1
...
...
@@ -8,6 +8,7 @@
#import "DoraemonMockUtil.h"
#import "DoraemonUtil.h"
#import "DoraemonMockManager.h"
#import "DoraemonDefine.h"
#define DoraemonMockFileName @"mock"
#define DoraemonUploadFileName @"upload"
...
...
@@ -117,7 +118,7 @@
NSString
*
text
=
[
DoraemonUtil
arrayToJsonStr
:
dataArray
];
BOOL
writeSuccess
=
[
text
writeToFile
:
path
atomically
:
YES
encoding
:
NSUTF8StringEncoding
error
:
nil
];
if
(
writeSuccess
)
{
NS
Log
(
@"写入成功"
);
DoKit
Log
(
@"写入成功"
);
}
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/Platform/Mock/View/List/Cell/DoraemonMockUploadCell.m
浏览文件 @
4a95d9e1
...
...
@@ -95,14 +95,13 @@
};
[
DoraemonNetworkUtil
patchWithUrlString
:
@"https://mock.dokit.cn/api/app/interface"
params
:
params
success
:^
(
NSDictionary
*
_Nonnull
result
)
{
//NSLog(@"result == %@",result);
[
self
showToast
:
@"上传成功"
];
}
error
:^
(
NSError
*
_Nonnull
error
)
{
NS
Log
(
@"error == %@"
,
error
);
DoKit
Log
(
@"error == %@"
,
error
);
[
self
showToast
:
@"上传失败"
];
}];
}
else
{
NS
Log
(
@"上传模板接口必须要传pid"
);
DoKit
Log
(
@"上传模板接口必须要传pid"
);
}
}
...
...
@@ -124,7 +123,7 @@
NSString
*
jsonString
;
if
(
!
jsonData
)
{
NS
Log
(
@"%@"
,
error
);
DoKit
Log
(
@"%@"
,
error
);
}
else
{
jsonString
=
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/UI/ColorPick/Function/DoraemonColorPickInfoView.m
浏览文件 @
4a95d9e1
...
...
@@ -111,8 +111,7 @@
CGPoint
prePoint
=
[
touch
previousLocationInView
:
self
];
CGFloat
offsetX
=
currentPoint
.
x
-
prePoint
.
x
;
CGFloat
offsetY
=
currentPoint
.
y
-
prePoint
.
y
;
// NSLog(@"PickInfoView----当前位置:%@---之前的位置:%@",NSStringFromCGPoint(currentPoint),NSStringFromCGPoint(prePoint));
self
.
transform
=
CGAffineTransformTranslate
(
self
.
transform
,
offsetX
,
offsetY
);
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/UI/ColorPick/Function/DoraemonColorPickWindow.m
浏览文件 @
4a95d9e1
...
...
@@ -140,7 +140,6 @@ static CGFloat const kColorPickWindowSize = 150;
CGContextRelease
(
context
);
NSString
*
hexColor
=
[
NSString
stringWithFormat
:
@"#%02x%02x%02x"
,
pixelData
[
0
],
pixelData
[
1
],
pixelData
[
2
]];
//NSLog(@"color == %@",hexColor);
return
hexColor
;
}
...
...
iOS/DoraemonKit/Src/Core/Util/DoraemonUtil.m
浏览文件 @
4a95d9e1
...
...
@@ -10,6 +10,7 @@
#import "UIViewController+Doraemon.h"
#import "DoraemonHomeWindow.h"
#import "DoraemonAppInfoUtil.h"
#import "DoraemonDefine.h"
@implementation
DoraemonUtil
...
...
@@ -81,7 +82,7 @@
NSString
*
text
=
data
;
BOOL
writeSuccess
=
[
text
writeToFile
:
path
atomically
:
YES
encoding
:
NSUTF8StringEncoding
error
:
nil
];
if
(
writeSuccess
)
{
NS
Log
(
@"写入成功"
);
DoKit
Log
(
@"写入成功"
);
}
}
...
...
@@ -96,7 +97,7 @@
options:
NSJSONReadingMutableContainers
error:
&
err
];
if
(
err
)
{
NS
Log
(
@"json解析失败:%@"
,
err
);
DoKit
Log
(
@"json解析失败:%@"
,
err
);
return
nil
;
}
return
dic
;
...
...
@@ -113,7 +114,7 @@
options:
NSJSONReadingMutableContainers
error:
&
err
];
if
(
err
)
{
NS
Log
(
@"json解析失败:%@"
,
err
);
DoKit
Log
(
@"json解析失败:%@"
,
err
);
return
nil
;
}
return
array
;
...
...
@@ -128,7 +129,7 @@
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
dict
options
:
NSJSONWritingPrettyPrinted
error
:&
error
];
jsonString
=
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
if
(
error
)
{
NS
Log
(
@"Error:%@"
,
error
);
DoKit
Log
(
@"Error:%@"
,
error
);
}
}
return
jsonString
;
...
...
@@ -143,7 +144,7 @@
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
array
options
:
NSJSONWritingPrettyPrinted
error
:&
error
];
jsonString
=
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
if
(
error
)
{
NS
Log
(
@"Error:%@"
,
error
);
DoKit
Log
(
@"Error:%@"
,
error
);
}
}
return
jsonString
;
...
...
@@ -171,7 +172,7 @@
}
}
else
{
//不存在该文件path
//NS
Log(@"不存在该文件");
DoKit
Log
(
@"不存在该文件"
);
}
}
...
...
@@ -199,7 +200,7 @@
}
}
else
{
//不存在该文件path
//NS
Log(@"不存在该文件");
DoKit
Log
(
@"不存在该文件"
);
}
return
nil
;
...
...
iOS/DoraemonKit/Src/MLeaksFinder/List/DoraemonMLeaksFinderListViewController.m
浏览文件 @
4a95d9e1
...
...
@@ -25,7 +25,6 @@
self
.
title
=
@"检测结果"
;
_dataArray
=
[
NSArray
arrayWithArray
:[[
DoraemonMemoryLeakData
shareInstance
]
getResult
]];
NSLog
(
@"_dataArray == %@"
,
_dataArray
);
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
self
.
view
.
doraemon_width
,
self
.
view
.
doraemon_height
)
style
:
UITableViewStylePlain
];
// self.tableView.backgroundColor = [UIColor whiteColor];
self
.
tableView
.
delegate
=
self
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录