{"id":3830,"date":"2019-02-02T11:45:15","date_gmt":"2019-02-02T03:45:15","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=3830"},"modified":"2019-02-02T11:46:30","modified_gmt":"2019-02-02T03:46:30","slug":"%e6%bb%b4%e6%bb%b4%e5%bc%80%e6%ba%90-doraemonkit-%e7%a0%94%e5%8f%91%e5%8a%a9%e6%89%8b%e4%bd%bf%e7%94%a8%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=3830","title":{"rendered":"\u6ef4\u6ef4\u5f00\u6e90 DoraemonKit \u7814\u53d1\u52a9\u624b\u4f7f\u7528\u6559\u7a0b"},"content":{"rendered":"<p>\n\t\u5927\u8fc7\u5e74\u7684\uff0c\u5f88\u591a\u4eba\u90fd\u56de\u5bb6\u4e86\uff0c\u6211\u8fd8\u575a\u6301\u5728\u5c97\u4f4d\u3002\u4eca\u5929\u6211\u770b\u5230\u4e86\u6ef4\u6ef4\u5f00\u6e90\u7684&nbsp;DoraemonKit \u7814\u53d1\u52a9\u624b\uff0c\u611f\u89c9\u975e\u5e38\u7684\u4e0d\u9519\u3002\u5c31\u4e0a\u624b\u4f53\u9a8c\u4e86\u4e00\u4e0b\uff0c\u4e0b\u9762\u8bb0\u5f55\u4e00\u4e0b\u6211\u7684\u8fd9\u6b21\u7b80\u5355\u4f53\u9a8c\uff01\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\u6ef4\u6ef4\u5f00\u6e90 DoraemonKit \u7814\u53d1\u52a9\u624b\u7ec4\u4ef6\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/wx1.sinaimg.cn\/large\/8fa5dcfcgy1fzrwggawtnj20ap0apmxq.jpg\" style=\"width: 385px;height: 385px\" \/>\n<\/p>\n<p>\n\tDoraemonKit \u662f\u4e00\u6b3e\u529f\u80fd\u9f50\u5168\u7684\u5ba2\u6237\u7aef\uff08iOS\u3001Android\uff09\u7814\u53d1\u52a9\u624b\u3002\n<\/p>\n<h2>\n\tDoraemonKit \u5177\u6709\u7684\u529f\u80fd<br \/>\n<\/h2>\n<p>\n\tDoraemonKit \u76ee\u524d\u4e00\u5171\u6709 13 \u5927\u529f\u80fd\u3002\n<\/p>\n<ul>\n<li>\n\t\t\u3010App\u4fe1\u606f\u67e5\u770b\u3011\u5feb\u901f\u67e5\u770b\u624b\u673a\u4fe1\u606f\uff0cApp\u4fe1\u606f\uff0c\u6743\u9650\u4fe1\u606f\u7684\u6e20\u9053\uff0c\u907f\u514d\u53bb\u624b\u673a\u8bbe\u7f6e\u67e5\u627e\u6216\u8005\u67e5\u770b\u9879\u76ee\u6e90\u4ee3\u7801\u7684\u9ebb\u70e6\u3002\n\t<\/li>\n<li>\n\t\t\u3010\u6c99\u76d2\u6d4f\u89c8\u3011App\u5185\u90e8\u6587\u4ef6\u6d4f\u89c8\u7684\u529f\u80fd\uff0c\u5e76\u4e14\u80fd\u901a\u8fc7airDrop\u6216\u8005\u5176\u4ed6\u5206\u4eab\u65b9\u5f0f\u4e0a\u4f20\u5230PC\u4e2d\uff0c\u8fdb\u884c\u66f4\u52a0\u7ec6\u81f4\u7684\u64cd\u4f5c\u3002\n\t<\/li>\n<li>\n\t\t\u3010MockGPS\u3011App\u80fd\u5b9a\u4f4d\u5230\u5168\u56fd\u5404\u5730\uff0c\u652f\u6301\u5730\u56fe\u5730\u4f4d\u548c\u624b\u52a8\u8f93\u5165\u7ecf\u7eac\u5ea6\u3002\n\t<\/li>\n<li>\n\t\t\u3010H5\u4efb\u610f\u95e8\u3011\u5f00\u53d1\u6d4b\u8bd5\u540c\u5b66\u53ef\u4ee5\u5feb\u901f\u8f93\u5165H5\u9875\u9762\u5730\u5740\uff0c\u67e5\u770b\u8be5\u9875\u9762\u6548\u679c\u3002\n\t<\/li>\n<li>\n\t\t\u3010\u65e5\u5fd7\u663e\u793a\u3011\u6bcf\u4e00\u6761\u65e5\u5fd7\u4fe1\u606f\uff0c\u90fd\u5728\u5728App\u7684\u754c\u9762\u4e2d\u663e\u793a\u51fa\u6765\uff0c\u518d\u4e5f\u4e0d\u9700\u8981\u5bfc\u51fa\u65e5\u5fd7\u8fd9\u4e48\u9ebb\u70e6\u3002\n\t<\/li>\n<li>\n\t\t\u3010\u5e27\u7387\u76d1\u63a7\u3011App \u5e27\u7387\u4fe1\u606f\u63d0\u4f9b\u6ce2\u5f62\u56fe\u67e5\u770b\u529f\u80fd\uff0c\u8ba9\u5e27\u7387\u76d1\u63a7\u7684\u8d8b\u52bf\u66f4\u52a0\u660e\u663e\u3002\n\t<\/li>\n<li>\n\t\t\u3010CPU\u76d1\u63a7\u3011App CPU\u4f7f\u7528\u7387\u4fe1\u606f\u63d0\u4f9b\u6ce2\u5f62\u56fe\u67e5\u770b\u529f\u80fd\uff0c\u8ba9CPU\u76d1\u63a7\u7684\u8d8b\u52bf\u66f4\u52a0\u5f62\u8c61\u3002\n\t<\/li>\n<li>\n\t\t\u3010\u5185\u5b58\u76d1\u63a7\u3011App \u5185\u5b58\u4f7f\u7528\u91cf\u4fe1\u606f\u63d0\u4f9b\u6ce2\u5f62\u56fe\u67e5\u770b\u529f\u80fd\uff0c\u8ba9\u5185\u5b58\u76d1\u63a7\u7684\u8d8b\u52bf\u66f4\u52a0\u9c9c\u660e\u3002\n\t<\/li>\n<li>\n\t\t\u3010\u6d41\u91cf\u76d1\u63a7\u3011\u62e6\u622aApp\u5185\u90e8\u6d41\u91cf\u4fe1\u606f\uff0c\u63d0\u4f9b\u6ce2\u5f62\u56fe\u5c55\u793a\u3001\u6d41\u91cf\u6982\u8981\u5c55\u793a\u3001\u6d41\u91cf\u5217\u8868\u5c55\u793a\u3001\u6d41\u91cf\u7b5b\u9009\u3001\u6d41\u91cf\u8be6\u60c5\uff0c\u5bf9\u6d41\u91cf\u4fe1\u606f\u7edf\u4e00\u62e6\u622a\uff0c\u6210\u4e3a\u6211\u4eecapp\u4e2d\u81ea\u5e26\u7684&ldquo;Charles&rdquo;\u3002\n\t<\/li>\n<li>\n\t\t\u3010\u81ea\u5b9a\u4e49\u76d1\u63a7\u3011\u53ef\u4ee5\u9009\u62e9\u4f60\u8981\u76d1\u63a7\u7684\u9009\u9879\uff0c\u5305\u62ecFPS\u3001CPU\u3001\u5185\u5b58\u3001\u6d41\u91cf\u3002\u76d1\u63a7\u5b8c\u6bd5\u4e4b\u540e\uff0c\u628a\u6570\u636e\u4fdd\u5b58\u5230\u672c\u5730\uff0c\u4e5f\u53ef\u4ee5\u5bfc\u51fa\u6765\u505a\u66f4\u52a0\u7ec6\u81f4\u7684\u5206\u6790\u3002\n\t<\/li>\n<li>\n\t\t\u3010\u989c\u8272\u5438\u7ba1\u3011\u65b9\u4fbf\u8bbe\u8ba1\u5e08UI\u6349\u866b\u7684\u65f6\u5019\uff0c\u67e5\u770b\u6bcf\u4e00\u4e2a\u7ec4\u4ef6\u7684\u989c\u8272\u503c\u662f\u5426\u8bbe\u7f6e\u6b63\u786e\u3002\n\t<\/li>\n<li>\n\t\t\u3010\u7ec4\u4ef6\u68c0\u67e5\u3011\u53ef\u4ee5\u6293\u53d6\u4efb\u610f\u4e00\u4e2aUI\u63a7\u4ef6\uff0c\u67e5\u770b\u5b83\u4eec\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5305\u62ec\u63a7\u4ef6\u540d\u79f0\u3001\u63a7\u4ef6\u4f4d\u7f6e\u3001\u80cc\u666f\u8272\u3001\u5b57\u4f53\u989c\u8272\u3001\u5b57\u4f53\u5927\u5c0f\u3002\n\t<\/li>\n<li>\n\t\t\u3010\u5bf9\u9f50\u6807\u5c3a\u3011\u53c2\u8003Android\u7cfb\u7edf\u81ea\u5e26\u6d4b\u8bd5\u5de5\u5177\uff0c\u80fd\u591f\u5b9e\u65f6\u6355\u83b7\u5c4f\u5e55\u5750\u6807\uff0c\u5e76\u4e14\u53ef\u4ee5\u67e5\u770b\u7ec4\u4ef6\u662f\u5426\u5bf9\u9f50\u3002\n\t<\/li>\n<\/ul>\n<h2>\n\t\u5b9e\u9645\u4f7f\u7528\u6548\u679c<br \/>\n<\/h2>\n<p>\n\t<img decoding=\"async\" alt=\"DoraemonKit \u4f7f\u7528\u6548\u679c\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/wx1.sinaimg.cn\/large\/8fa5dcfcgy1fzrwk1cqb0j20k00zk0v2.jpg\" style=\"width: 720px;height: 1280px\" \/>\n<\/p>\n<p>\n\t\u53d6\u8272\u5668\u4f7f\u7528\u6548\u679c\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"DoraemonKit \u53d6\u8272\u5668\u4f7f\u7528\u6548\u679c\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/wx1.sinaimg.cn\/large\/8fa5dcfcgy1fzrwlv7g2vj20af0h8wgs.jpg\" style=\"width: 375px;height: 620px\" \/>\n<\/p>\n<h2>\n\tAndroid \u7b80\u5355\u5165\u624b\u6559\u7a0b<br \/>\n<\/h2>\n<p>\n\t\u7b2c\u4e00\u6b65\u5f15\u5165\u4f9d\u8d56\u3002\n<\/p>\n<pre class=\"brush:java;\">\r\ndependencies {\r\n    ...\r\n    debugImplementation &#039;com.didichuxing.doraemonkit:doraemonkit:1.0.5&#039;\r\n    releaseImplementation &#039;com.didichuxing.doraemonkit:doraemonkit-no-op:1.0.5&#039;\r\n    ...\r\n}<\/pre>\n<p>\n\t\u7b2c\u4e8c\u6b65\uff0c\u5728 App \u542f\u52a8\u7684\u65f6\u5019\u8fdb\u884c\u521d\u59cb\u5316\u3002\n<\/p>\n<pre class=\"brush:java;\">\r\n@Override\r\npublic void onCreate() {\r\n    ...\r\n    DoraemonKit.install(application\uff09\r\n     \r\n    \/\/ H5\u4efb\u610f\u95e8\u529f\u80fd\u9700\u8981\uff0c\u975e\u5fc5\u987b\r\n    DoraemonKit.setWebDoorCallback(new WebDoorManager.WebDoorCallback() {\r\n    @Override\r\n    public void overrideUrlLoading(String s) {\r\n        \/\/ \u4f7f\u7528\u81ea\u5df1\u7684H5\u5bb9\u5668\u6253\u5f00\u8fd9\u4e2a\u94fe\u63a5\r\n    }\r\n    ...\r\n}<\/pre>\n<h2>\n\tIOS \u7b80\u5355\u5165\u624b\u6559\u7a0b<br \/>\n<\/h2>\n<p>\n\t\u7b2c\u4e00\u6b65\uff0c\u5f15\u5165 cocoapods \u4f9d\u8d56\u3002\n<\/p>\n<p>\n\t\u5305\u542b\u4e24\u4e2a subspec\uff0c\u4e00\u4e2a\u662f\u5305\u542b&ldquo;\u65e5\u5fd7\u663e\u793a&rdquo;\u7684&ldquo;WithLogger&rdquo; subspec\u3002\n<\/p>\n<pre class=\"brush:java;\">\r\npod &#039;DoraemonKit\/WithLogger&#039;, &#039;1.1.3&#039;, :configurations =&gt; ['Debug']<\/pre>\n<p>\n\t\u4e00\u4e2a\u662f\u4e0d\u5305\u542b&ldquo;\u65e5\u5fd7\u663e\u793a&rdquo;\u7684&ldquo;Core&rdquo; subspec\u3002\n<\/p>\n<pre class=\"brush:java;\">\r\npod &#039;DoraemonKit\/Core&#039;, &#039;1.1.3&#039;, :configurations =&gt; ['Debug']<\/pre>\n<p>\n\t\u9ed8\u8ba4\u5f15\u5165&ldquo;Core&rdquo; subspec\u3002\u4e3a\u4ec0\u4e48\u8981\u5206\u533a subspec \u5462\uff1f \u56e0\u4e3a\u65e5\u5fd7\u663e\u793a\u6a21\u5757\u662f\u57fa\u4e8e CocoaLumberjack \u8fd9\u4e2a\u4e09\u65b9\u5e93\uff0c\u5982\u679c\u4f60\u7684\u9879\u76ee\u65e5\u5fd7\u4e0d\u662f\u57fa\u4e8e CocoaLumberjack\uff0c\u90a3\u4f60\u5c31\u6ca1\u6709\u5fc5\u8981\u5f15\u5165 DoraemonKit \u4e2d\u65e5\u5fd7\u663e\u793a\u6a21\u5757\u4e86\u3002\u53ea\u5728 Debug \u73af\u5883\u4e2d\u8fdb\u884c\u96c6\u6210\uff0c\u4e0d\u8981\u5e26\u5230\u7ebf\u4e0a\u3002\u6709\u4e00\u4e9b hook \u64cd\u4f5c\u4f1a\u6c61\u67d3\u7ebf\u4e0a\u4ee3\u7801\u3002\n<\/p>\n<p>\n\t\u7b2c\u4e8c\u6b65\uff0c\u4f7f\u7528 DoraemonKit \u5185\u7f6e\u5de5\u5177\u96c6\u7684\u63a5\u5165\u65b9\u5f0f\u3002\u5728 App \u542f\u52a8\u7684\u65f6\u5019\u6dfb\u52a0\u4e00\u4e0b\u4ee3\u7801\u3002\n<\/p>\n<pre class=\"brush:bash;\">\r\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\r\n    #ifdef DEBUG\r\n        [[DoraemonManager shareInstance] addH5DoorBlock:^(NSString *h5Url) {\r\n              \/\/\u4f7f\u7528\u81ea\u5df1\u7684H5\u5bb9\u5668\u6253\u5f00\u8fd9\u4e2a\u94fe\u63a5\r\n        }];\r\n\r\n        [[DoraemonManager shareInstance] install];\r\n    #endif\r\n}<\/pre>\n<p>\n\t\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\u4f60\u5c31\u53ef\u4ee5\u4f7f\u7528 DorameonKit \u6240\u6709\u7684\u5185\u7f6e\u5de5\u5177\u96c6\u5408\u3002\n<\/p>\n<h2>\n\t\u53c2\u8003\u8d44\u6599<br \/>\n<\/h2>\n<ul>\n<li>\n\t\t<a href=\"https:\/\/github.com\/didi\/DoraemonKit\" name=\"DoraemonKit\" target=\"_blank\" title=\"DoraemonKit\">DoraemonKit<\/a>\n\t<\/li>\n<\/ul>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=3830\">\u6ef4\u6ef4\u5f00\u6e90 DoraemonKit \u7814\u53d1\u52a9\u624b\u4f7f\u7528\u6559\u7a0b<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u5927\u8fc7\u5e74\u7684\uff0c\u5f88\u591a\u4eba\u90fd\u56de\u5bb6\u4e86\uff0c\u6211\u8fd8\u575a\u6301\u5728\u5c97\u4f4d\u3002\u4eca\u5929\u6211\u770b\u5230\u4e86\u6ef4\u6ef4\u5f00\u6e90\u7684&nbsp;DoraemonKit \u7814\u53d1\u52a9\u624b\uff0c [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[891,1917,1422,1017,1013],"class_list":["post-3830","post","type-post","status-publish","format-standard","hentry","category-java","tag-android","tag-doraemonkit","tag-ios","tag-1017","tag-1013"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3830","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3830"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3830\/revisions"}],"predecessor-version":[{"id":3831,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3830\/revisions\/3831"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}