{"id":1169,"date":"2018-04-27T20:06:54","date_gmt":"2018-04-27T12:06:54","guid":{"rendered":"https:\/\/damogame.cn:15443\/wordpress\/?p=1169"},"modified":"2018-04-27T20:06:54","modified_gmt":"2018-04-27T12:06:54","slug":"%e5%be%ae%e4%bf%a1%e5%ae%98%e6%96%b9%e7%9a%84%e8%b7%a8%e5%b9%b3%e5%8f%b0%e8%b7%a8%e4%b8%9a%e5%8a%a1%e7%9a%84%e7%bb%88%e7%ab%af%e5%9f%ba%e7%a1%80%e7%bb%84%e4%bb%b6mars","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/1169","title":{"rendered":"\u5fae\u4fe1\u5b98\u65b9\u7684\u8de8\u5e73\u53f0\u8de8\u4e1a\u52a1\u7684\u7ec8\u7aef\u57fa\u7840\u7ec4\u4ef6Mars"},"content":{"rendered":"<h2>https:\/\/github.com\/Tencent\/mars<\/h2>\n<h2><a name=\"user-content-mars_cn\"><\/a>Mars<\/h2>\n<p><a href=\"https:\/\/github.com\/Tencent\/mars\/blob\/master\/LICENSE\"><img decoding=\"async\" src=\"https:\/\/camo.githubusercontent.com\/d4d7e802861ee34f2db3a98f8558278fb2a7a106\/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c6174\" alt=\"license\" data-canonical-src=\"https:\/\/img.shields.io\/badge\/license-MIT-brightgreen.svg?style=flat\" \/><\/a>\u00a0<a href=\"https:\/\/github.com\/Tencent\/mars\/releases\"><img decoding=\"async\" src=\"https:\/\/camo.githubusercontent.com\/4f208c7398ddfd1ec4b485f2dbefa1b298e02de1\/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656c656173652d312e312e392d7265642e737667\" alt=\"Release Version\" data-canonical-src=\"https:\/\/img.shields.io\/badge\/release-1.1.9-red.svg\" \/><\/a>\u00a0<a href=\"https:\/\/github.com\/Tencent\/mars\/pulls\"><img decoding=\"async\" src=\"https:\/\/camo.githubusercontent.com\/d4e0f63e9613ee474a7dfdc23c240b9795712c96\/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e737667\" alt=\"PRs Welcome\" data-canonical-src=\"https:\/\/img.shields.io\/badge\/PRs-welcome-brightgreen.svg\" \/><\/a>\u00a0<a href=\"https:\/\/github.com\/Tencent\/mars\/wiki\"><img decoding=\"async\" src=\"https:\/\/camo.githubusercontent.com\/354762c0ed4477d6de4ab890537bf1fc2688c479\/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5765636861745f417070726f7665642d312e312e392d7265642e737667\" alt=\"WeChat Approved\" data-canonical-src=\"https:\/\/img.shields.io\/badge\/Wechat_Approved-1.1.9-red.svg\" \/><\/a>\u00a0<a href=\"https:\/\/github.com\/Tencent\/mars\/wiki\"><img decoding=\"async\" src=\"https:\/\/camo.githubusercontent.com\/084bc868a7f8e1e72a43e4e3cf2f8a71e66308d3\/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506c6174666f726d2d253230694f532532302537432532304f5325323058253230253743253230416e64726f69642532302d627269676874677265656e2e737667\" alt=\"WeChat Approved\" data-canonical-src=\"https:\/\/img.shields.io\/badge\/Platform-%20iOS%20%7C%20OS%20X%20%7C%20Android%20-brightgreen.svg\" \/><\/a><\/p>\n<p>Mars \u662f\u5fae\u4fe1\u5b98\u65b9\u7684\u8de8\u5e73\u53f0\u8de8\u4e1a\u52a1\u7684\u7ec8\u7aef\u57fa\u7840\u7ec4\u4ef6\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/WeMobileDev\/article\/blob\/master\/assets\/mars\/mars.png?raw=true\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/github.com\/WeMobileDev\/article\/raw\/master\/assets\/mars\/mars.png?raw=true\" alt=\"mars\" \/><\/a><\/p>\n<ul>\n<li>comm\uff1a\u53ef\u4ee5\u72ec\u7acb\u4f7f\u7528\u7684\u516c\u5171\u5e93\uff0c\u5305\u62ec socket\u3001\u7ebf\u7a0b\u3001\u6d88\u606f\u961f\u5217\u3001\u534f\u7a0b\u7b49\uff1b<\/li>\n<li>xlog\uff1a\u9ad8\u53ef\u9760\u6027\u9ad8\u6027\u80fd\u7684\u8fd0\u884c\u671f\u65e5\u5fd7\u7ec4\u4ef6\uff1b<\/li>\n<li>SDT\uff1a \u7f51\u7edc\u8bca\u65ad\u7ec4\u4ef6\uff1b<\/li>\n<li>STN\uff1a \u4fe1\u4ee4\u5206\u53d1\u7f51\u7edc\u6a21\u5757\uff0c\u4e5f\u662f Mars \u6700\u4e3b\u8981\u7684\u90e8\u5206\u3002<\/li>\n<\/ul>\n<h2><a id=\"user-content-samples-1\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#samples-1\" aria-hidden=\"true\"><\/a>Samples<\/h2>\n<p>sample \u7684\u4f7f\u7528\u8bf7\u53c2\u8003<a href=\"https:\/\/github.com\/Tencent\/mars\/wiki\/Mars-sample-%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E\">\u8fd9\u91cc<\/a>\u3002<\/p>\n<h2><a id=\"user-content-getting-started-1\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#getting-started-1\" aria-hidden=\"true\"><\/a>Getting started<\/h2>\n<p>\u63a5\u5165\u00a0<a href=\"https:\/\/github.com\/Tencent\/mars#android_cn\">Android<\/a>\u00a0\u6216\u8005\u00a0<a href=\"https:\/\/github.com\/Tencent\/mars#apple_cn\">iOS\/OS X<\/a>\u00a0\u6216\u8005\u00a0<a href=\"https:\/\/github.com\/Tencent\/mars#windows_cn\">Windows<\/a>\u00a0\u3002<\/p>\n<h3><a id=\"user-content-android-1\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#android-1\" aria-hidden=\"true\"><\/a><a name=\"user-content-android_cn\"><\/a><a href=\"https:\/\/github.com\/Tencent\/mars\/wiki\/Mars-Android-%E6%8E%A5%E5%85%A5%E6%8C%87%E5%8D%97\">Android<\/a><\/h3>\n<p>gradle \u63a5\u5165\u6211\u4eec\u63d0\u4f9b\u4e86\u4e24\u79cd\u63a5\u5165\u65b9\u5f0f\uff1a<a href=\"https:\/\/github.com\/Tencent\/mars#wrapper\">mars-wrapper<\/a>\u00a0\u6216\u8005\u00a0<a href=\"https:\/\/github.com\/Tencent\/mars#core\">mars-core<\/a>\u3002\u5982\u679c\u4f60\u53ea\u662f\u60f3\u505a\u4e2a sample \u63a8\u8350\u4f7f\u7528 mars-wrapper\uff0c\u53ef\u4ee5\u5feb\u901f\u5f00\u53d1\uff1b\u4f46\u662f\u5982\u679c\u4f60\u60f3\u628a mars \u7528\u5230\u4f60\u7684 app \u4e2d\u7684\u8bdd\uff0c\u63a8\u8350\u4f7f\u7528 mars-core\uff0c\u53ef\u5b9a\u5236\u6027\u66f4\u9ad8\u3002<\/p>\n<h4><a id=\"user-content-mars-wrapper-1\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#mars-wrapper-1\" aria-hidden=\"true\"><\/a><a name=\"user-content-wrapper\"><\/a>mars-wrapper<\/h4>\n<p>\u5728 app\/build.gradle \u4e2d\u6dfb\u52a0 mars-wrapper \u7684\u4f9d\u8d56\uff1a<\/p>\n<div class=\"highlight highlight-text-xml\">\n<pre>dependencies {\r\n    compile 'com.tencent.mars:mars-wrapper:1.1.8'\r\n}<\/pre>\n<\/div>\n<p><strong>\u6216\u8005<\/strong><\/p>\n<h4><a id=\"user-content-mars-core-1\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#mars-core-1\" aria-hidden=\"true\"><\/a><a name=\"user-content-core\"><\/a>mars-core<\/h4>\n<p>\u5728 app\/build.gradle \u4e2d\u6dfb\u52a0 mars-core \u7684\u4f9d\u8d56\uff1a<\/p>\n<div class=\"highlight highlight-text-xml\">\n<pre>dependencies {\r\n    compile 'com.tencent.mars:mars-core:1.2.1'\r\n}<\/pre>\n<\/div>\n<p><strong>\u6216\u8005<\/strong><\/p>\n<h4><a id=\"user-content-mars-xlog-1\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#mars-xlog-1\" aria-hidden=\"true\"><\/a>mars-xlog<\/h4>\n<p>\u5982\u679c\u53ea\u60f3\u4f7f\u7528 xlog,\u53ef\u4ee5\u53ea\u52a0 xlog \u7684\u4f9d\u8d56(mars-core,mars-wrapper \u4e2d\u90fd\u5df2\u7ecf\u5305\u62ec xlog)\uff1a<\/p>\n<div class=\"highlight highlight-text-xml\">\n<pre>dependencies {\r\n    compile 'com.tencent.mars:mars-xlog:1.0.6'\r\n}<\/pre>\n<\/div>\n<p>\u63a5\u7740\u5f80\u4e0b\u64cd\u4f5c\u4e4b\u524d\uff0c\u8bf7\u5148\u786e\u4fdd\u4f60\u5df2\u7ecf\u6dfb\u52a0\u4e86 mars-wrapper \u6216\u8005 mars-core \u6216\u8005 mars-xlog \u7684\u4f9d\u8d56<\/p>\n<h4><a id=\"user-content-xlog-init-3\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#xlog-init-3\" aria-hidden=\"true\"><\/a><a name=\"user-content-Xlog\"><\/a>Xlog Init<\/h4>\n<p>\u5728\u7a0b\u5e8f\u542f\u52a8\u52a0\u8f7d Xlog \u540e\u7d27\u63a5\u7740\u521d\u59cb\u5316 Xlog\u3002\u4f46\u8981\u6ce8\u610f\u5982\u679c\u4f60\u7684\u7a0b\u5e8f\u4f7f\u7528\u4e86\u591a\u8fdb\u7a0b\uff0c\u4e0d\u8981\u628a\u591a\u4e2a\u8fdb\u7a0b\u7684\u65e5\u5fd7\u8f93\u51fa\u5230\u540c\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u4fdd\u8bc1\u6bcf\u4e2a\u8fdb\u7a0b\u72ec\u4eab\u4e00\u4e2a\u65e5\u5fd7\u6587\u4ef6\u3002\u800c\u4e14\u4fdd\u5b58 log \u7684\u76ee\u5f55\u8bf7\u4f7f\u7528\u5355\u72ec\u7684\u76ee\u5f55\uff0c\u4e0d\u8981\u5b58\u653e\u4efb\u4f55\u5176\u4ed6\u6587\u4ef6\u9632\u6b62\u88ab xlog \u81ea\u52a8\u6e05\u7406\u529f\u80fd\u8bef\u5220\u3002<\/p>\n<div class=\"highlight highlight-source-java\">\n<pre><span class=\"pl-smi\">System<\/span><span class=\"pl-k\">.<\/span>loadLibrary(<span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>stlport_shared<span class=\"pl-pds\">\"<\/span><\/span>);\r\n<span class=\"pl-smi\">System<\/span><span class=\"pl-k\">.<\/span>loadLibrary(<span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>marsxlog<span class=\"pl-pds\">\"<\/span><\/span>);\r\n\r\n<span class=\"pl-k\">final<\/span> <span class=\"pl-smi\">String<\/span> <span class=\"pl-c1\">SDCARD<\/span> <span class=\"pl-k\">=<\/span> <span class=\"pl-smi\">Environment<\/span><span class=\"pl-k\">.<\/span>getExternalStorageDirectory()<span class=\"pl-k\">.<\/span>getAbsolutePath();\r\n<span class=\"pl-k\">final<\/span> <span class=\"pl-smi\">String<\/span> logPath <span class=\"pl-k\">=<\/span> <span class=\"pl-c1\">SDCARD<\/span> <span class=\"pl-k\">+<\/span> <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>\/marssample\/log<span class=\"pl-pds\">\"<\/span><\/span>;\r\n\r\n<span class=\"pl-c\">\/\/ this is necessary, or may cash for SIGBUS<\/span>\r\n<span class=\"pl-k\">final<\/span> <span class=\"pl-smi\">String<\/span> cachePath <span class=\"pl-k\">=<\/span> <span class=\"pl-c1\">this<\/span><span class=\"pl-k\">.<\/span>getFilesDir() <span class=\"pl-k\">+<\/span> <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>\/xlog<span class=\"pl-pds\">\"<\/span><\/span>\r\n\r\n<span class=\"pl-c\">\/\/init xlog<\/span>\r\n<span class=\"pl-k\">if<\/span> (<span class=\"pl-smi\">BuildConfig<\/span><span class=\"pl-c1\"><span class=\"pl-k\">.<\/span>DEBUG<\/span>) {\r\n    <span class=\"pl-smi\">Xlog<\/span><span class=\"pl-k\">.<\/span>appenderOpen(<span class=\"pl-smi\">Xlog<\/span><span class=\"pl-c1\"><span class=\"pl-k\">.<\/span>LEVEL_DEBUG<\/span>, <span class=\"pl-smi\">Xlog<\/span><span class=\"pl-k\">.<\/span><span class=\"pl-smi\">AppednerModeAsync<\/span>, cachePath, logPath, <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>MarsSample<span class=\"pl-pds\">\"<\/span><\/span>, <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span><span class=\"pl-pds\">\"<\/span><\/span>);\r\n    <span class=\"pl-smi\">Xlog<\/span><span class=\"pl-k\">.<\/span>setConsoleLogOpen(<span class=\"pl-c1\">true<\/span>);\r\n\r\n} <span class=\"pl-k\">else<\/span> {\r\n    <span class=\"pl-smi\">Xlog<\/span><span class=\"pl-k\">.<\/span>appenderOpen(<span class=\"pl-smi\">Xlog<\/span><span class=\"pl-c1\"><span class=\"pl-k\">.<\/span>LEVEL_INFO<\/span>, <span class=\"pl-smi\">Xlog<\/span><span class=\"pl-k\">.<\/span><span class=\"pl-smi\">AppednerModeAsync<\/span>, cachePath, logPath, <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>MarsSample<span class=\"pl-pds\">\"<\/span><\/span>, <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span><span class=\"pl-pds\">\"<\/span><\/span>);\r\n    <span class=\"pl-smi\">Xlog<\/span><span class=\"pl-k\">.<\/span>setConsoleLogOpen(<span class=\"pl-c1\">false<\/span>);\r\n}\r\n\r\n<span class=\"pl-smi\">Log<\/span><span class=\"pl-k\">.<\/span>setLogImp(<span class=\"pl-k\">new<\/span> <span class=\"pl-smi\">Xlog<\/span>());<\/pre>\n<\/div>\n<p>\u7a0b\u5e8f\u9000\u51fa\u65f6\u5173\u95ed\u65e5\u5fd7\uff1a<\/p>\n<div class=\"highlight highlight-source-java\">\n<pre><span class=\"pl-smi\">Log<\/span><span class=\"pl-k\">.<\/span>appenderClose();<\/pre>\n<\/div>\n<h4><a id=\"user-content-stn-init-3\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#stn-init-3\" aria-hidden=\"true\"><\/a><a name=\"user-content-STN\"><\/a>STN Init<\/h4>\n<p>\u5982\u679c\u4f60\u662f\u628a mars-core \u4f5c\u4e3a\u4f9d\u8d56\u52a0\u5165\u5230\u4f60\u7684\u9879\u76ee\u4e2d\u7684\u8bdd\uff0c\u4f60\u9700\u8981\u663e\u5f0f\u7684\u521d\u59cb\u5316\u548c\u53cd\u521d\u59cb\u5316 STN<\/p>\n<p>\u5728\u4f7f\u7528 STN \u4e4b\u524d\u8fdb\u884c\u521d\u59cb\u5316<\/p>\n<div class=\"highlight highlight-source-java\">\n<pre><span class=\"pl-c\">\/\/ set callback<\/span>\r\n<span class=\"pl-smi\">AppLogic<\/span><span class=\"pl-k\">.<\/span>setCallBack(stub);\r\n<span class=\"pl-smi\">StnLogic<\/span><span class=\"pl-k\">.<\/span>setCallBack(stub);\r\n<span class=\"pl-smi\">SdtLogic<\/span><span class=\"pl-k\">.<\/span>setCallBack(stub);\r\n\r\n<span class=\"pl-c\">\/\/ Initialize the Mars PlatformComm<\/span>\r\n<span class=\"pl-smi\">Mars<\/span><span class=\"pl-k\">.<\/span>init(getApplicationContext(), <span class=\"pl-k\">new<\/span> <span class=\"pl-smi\">Handler<\/span>(<span class=\"pl-smi\">Looper<\/span><span class=\"pl-k\">.<\/span>getMainLooper()));\r\n\r\n<span class=\"pl-c\">\/\/ Initialize the Mars<\/span>\r\n<span class=\"pl-smi\">StnLogic<\/span><span class=\"pl-k\">.<\/span>setLonglinkSvrAddr(profile<span class=\"pl-k\">.<\/span>longLinkHost(), profile<span class=\"pl-k\">.<\/span>longLinkPorts());\r\n<span class=\"pl-smi\">StnLogic<\/span><span class=\"pl-k\">.<\/span>setShortlinkSvrAddr(profile<span class=\"pl-k\">.<\/span>shortLinkPort());\r\n<span class=\"pl-smi\">StnLogic<\/span><span class=\"pl-k\">.<\/span>setClientVersion(profile<span class=\"pl-k\">.<\/span>productID());\r\n<span class=\"pl-smi\">Mars<\/span><span class=\"pl-k\">.<\/span>onCreate(<span class=\"pl-c1\">true<\/span>);\r\n<span class=\"pl-smi\">BaseEvent<\/span><span class=\"pl-k\">.<\/span>onForeground(<span class=\"pl-c1\">true<\/span>);\r\n\r\n<span class=\"pl-smi\">StnLogic<\/span><span class=\"pl-k\">.<\/span>makesureLongLinkConnected();<\/pre>\n<\/div>\n<p>\u521d\u59cb\u5316\u987a\u5e8f\u4e0d\u4e00\u5b9a\u8981\u4e25\u683c\u9075\u5b88\u4e0a\u8ff0\u4ee3\u7801\u7684\u987a\u5e8f\uff0c\u4f46\u5728\u521d\u59cb\u5316\u65f6\u9996\u5148\u8981\u8c03\u7528 setCallBack \u63a5\u53e3 (callback \u6587\u4ef6\u7684\u7f16\u5199\u53ef\u4ee5\u53c2\u8003 demo)\uff0c\u518d\u8c03\u7528 Mars.init\uff0c\u6700\u540e\u518d\u8c03\u7528 onForeground \u548c makesureLongLinkConnect\uff0c\u4e2d\u95f4\u987a\u5e8f\u53ef\u4ee5\u968f\u610f\u66f4\u6539\u3002<strong>\u6ce8\u610f\uff1aSTN \u9ed8\u8ba4\u662f\u540e\u53f0\uff0c\u6240\u4ee5\u521d\u59cb\u5316 STN \u540e\u9700\u8981\u4e3b\u52a8\u8c03\u7528\u4e00\u6b21<\/strong><code>BaseEvent.onForeground(true)<\/code><\/p>\n<p>\u9700\u8981\u91ca\u653e STN \u6216\u8005\u9000\u51fa\u7a0b\u5e8f\u65f6:<\/p>\n<div class=\"highlight highlight-source-java\">\n<pre><span class=\"pl-smi\">Mars<\/span><span class=\"pl-k\">.<\/span>onDestroy();<\/pre>\n<\/div>\n<h4><a id=\"user-content-event-change-2\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#event-change-2\" aria-hidden=\"true\"><\/a><a name=\"user-content-even\"><\/a>Event Change<\/h4>\n<p>\u7f51\u7edc\u5207\u6362\u65f6:<\/p>\n<div class=\"highlight highlight-source-java\">\n<pre><span class=\"pl-smi\">BaseEvent<\/span><span class=\"pl-k\">.<\/span>onNetworkChange()<\/pre>\n<\/div>\n<hr \/>\n<p>\u5982\u679c\u4f60\u662f\u628a mars-wrapper \u4f5c\u4e3a\u4f9d\u8d56\u52a0\u5165\u5230\u4f60\u7684\u9879\u76ee\u4e2d\uff0c\u4f60\u53ea\u9700\u8981\u663e\u5f0f\u7684\u521d\u59cb\u5316 STN\uff0c\u4e0d\u9700\u8981\u53cd\u521d\u59cb\u5316(\u56e0\u4e3a mars-wrapper \u4f1a\u8fdb\u884c\u53cd\u521d\u59cb\u5316)<\/p>\n<div class=\"highlight highlight-source-java\">\n<pre><span class=\"pl-smi\">MarsServiceProxy<\/span><span class=\"pl-k\">.<\/span>init(<span class=\"pl-c1\">this<\/span>, getMainLooper(),<span class=\"pl-c1\">null<\/span>);<\/pre>\n<\/div>\n<hr \/>\n<p>\u4e0d\u7ba1\u4f60\u662f\u4f7f\u7528 mars-wrapper \u8fd8\u662f mars-core\uff0c\u4f60\u90fd\u9700\u8981\u7279\u522b\u6ce8\u610f\u4ee5\u4e0b\u4e8b\u4ef6\uff1a<\/p>\n<p>\u524d\u540e\u53f0\u5207\u6362:<\/p>\n<div class=\"highlight highlight-source-java\">\n<pre><span class=\"pl-smi\">BaseEvent<\/span><span class=\"pl-k\">.<\/span>onForeground(<span class=\"pl-k\">boolean<\/span>);<\/pre>\n<\/div>\n<p>\u5e94\u7528\u7684\u8d26\u53f7\u4fe1\u606f\u66f4\u6539:<\/p>\n<div class=\"highlight highlight-source-java\">\n<pre><span class=\"pl-smi\">StnLogic<\/span><span class=\"pl-k\">.<\/span>reset();<\/pre>\n<\/div>\n<p>\u5982\u679c\u4f60\u60f3\u4fee\u6539 Xlog \u7684\u52a0\u5bc6\u7b97\u6cd5\u6216\u8005\u957f\u77ed\u8fde\u7684\u52a0\u89e3\u5305\u90e8\u5206\u751a\u81f3\u66f4\u6539\u7ec4\u4ef6\u7684\u5176\u4ed6\u90e8\u5206\uff0c\u53ef\u4ee5\u53c2\u8003<a href=\"https:\/\/github.com\/Tencent\/mars\/wiki\/Mars-Android-%E6%8E%A5%E5%85%A5%E6%8C%87%E5%8D%97\">\u8fd9\u91cc<\/a><\/p>\n<h3><a id=\"user-content-iosos-x-1\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#iosos-x-1\" aria-hidden=\"true\"><\/a><a name=\"user-content-apple_cn\"><\/a><a href=\"https:\/\/github.com\/Tencent\/mars\/wiki\/Mars-iOS%EF%BC%8FOS-X-%E6%8E%A5%E5%85%A5%E6%8C%87%E5%8D%97\">iOS\/OS X<\/a><\/h3>\n<p>\u7f16\u8bd1<\/p>\n<pre><code>python build_apple.py\r\n<\/code><\/pre>\n<p>\u628a mars.framework \u4f5c\u4e3a\u4f9d\u8d56\u52a0\u5165\u5230\u4f60\u7684\u9879\u76ee\u4e2d\uff0c\u628a\u548c mars.framework \u540c\u76ee\u5f55\u7684\u540e\u7f00\u540d\u4e3a rewriteme \u7684\u6587\u4ef6\u540d\u5220\u6389&#8221;.rewriteme&#8221;\u548c\u5934\u6587\u4ef6\u4e00\u8d77\u52a0\u5165\u5230\u4f60\u7684\u9879\u76ee\u4e2d\u3002<\/p>\n<h4><a id=\"user-content-xlog-init-4\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#xlog-init-4\" aria-hidden=\"true\"><\/a><a name=\"user-content-Xlog\"><\/a>Xlog Init<\/h4>\n<p>\u5728\u7a0b\u5e8f\u542f\u52a8\u52a0\u8f7d Xlog \u540e\u7d27\u63a5\u7740\u521d\u59cb\u5316 Xlog\u3002\u4f46\u8981\u6ce8\u610f\u4fdd\u5b58 log \u7684\u76ee\u5f55\u8bf7\u4f7f\u7528\u5355\u72ec\u7684\u76ee\u5f55\uff0c\u4e0d\u8981\u5b58\u653e\u4efb\u4f55\u5176\u4ed6\u6587\u4ef6\u9632\u6b62\u88ab xlog \u81ea\u52a8\u6e05\u7406\u529f\u80fd\u8bef\u5220\u3002<\/p>\n<div class=\"highlight highlight-source-c++\">\n<pre>NSString* logPath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:<span class=\"pl-c1\">0<\/span>] stringByAppendingString:@<span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>\/log<span class=\"pl-pds\">\"<\/span><\/span>];\r\n\r\n<span class=\"pl-c\">\/\/ set do not backup for logpath<\/span>\r\n<span class=\"pl-k\">const<\/span> <span class=\"pl-k\">char<\/span>* attrName = <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>com.apple.MobileBackup<span class=\"pl-pds\">\"<\/span><\/span>;\r\n<span class=\"pl-c1\">u_int8_t<\/span> attrValue = <span class=\"pl-c1\">1<\/span>;\r\n<span class=\"pl-en\">setxattr<\/span>([logPath UTF8String], attrName, &amp;attrValue, <span class=\"pl-k\">sizeof<\/span>(attrValue), 0, 0);\r\n\r\n<span class=\"pl-c\">\/\/ init xlogger<\/span>\r\n#<span class=\"pl-k\">if<\/span> DEBUG\r\n<span class=\"pl-en\">xlogger_SetLevel<\/span>(<span class=\"pl-c1\">kLevelDebug<\/span>);\r\n<span class=\"pl-en\">appender_set_console_log<\/span>(<span class=\"pl-c1\">true<\/span>);\r\n#<span class=\"pl-k\">else<\/span>\r\n<span class=\"pl-en\">xlogger_SetLevel<\/span>(<span class=\"pl-c1\">kLevelInfo<\/span>);\r\n<span class=\"pl-en\">appender_set_console_log<\/span>(<span class=\"pl-c1\">false<\/span>);\r\n#<span class=\"pl-k\">endif<\/span>\r\n<span class=\"pl-en\">appender_open<\/span>(<span class=\"pl-c1\">kAppednerAsync<\/span>, [logPath UTF8String], <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>Test<span class=\"pl-pds\">\"<\/span><\/span>, <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span><span class=\"pl-pds\">\"<\/span><\/span>);<\/pre>\n<\/div>\n<p>\u5728\u51fd\u6570 &#8220;applicationWillTerminate&#8221; \u4e2d\u53cd\u521d\u59cb\u5316 Xlog<\/p>\n<div class=\"highlight highlight-source-c++\">\n<pre><span class=\"pl-en\">appender_close<\/span>();<\/pre>\n<\/div>\n<h4><a id=\"user-content-stn-init-4\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#stn-init-4\" aria-hidden=\"true\"><\/a><a name=\"user-content-STN\"><\/a>STN Init<\/h4>\n<p>\u5728\u4f60\u7528 STN \u4e4b\u524d\u521d\u59cb\u5316\uff1a<\/p>\n<div class=\"highlight highlight-source-objc\">\n<pre>- (<span class=\"pl-k\">void<\/span>)setCallBack {\r\n    <span class=\"pl-c1\">mars::stn::SetCallback<\/span>(<span class=\"pl-c1\">mars::stn::StnCallBack::Instance<\/span>());\r\n    <span class=\"pl-c1\">mars::app::SetCallback<\/span>(<span class=\"pl-c1\">mars::app::AppCallBack::Instance<\/span>());\r\n}\r\n\r\n- (<span class=\"pl-k\">void<\/span>) createMars {\r\n    <span class=\"pl-c1\">mars::baseevent::OnCreate<\/span>();\r\n}\r\n\r\n- (<span class=\"pl-k\">void<\/span>)setClientVersion:(<span class=\"pl-c1\">UInt32<\/span>)clientVersion {\r\n    <span class=\"pl-c1\">mars::stn::SetClientVersion<\/span>(clientVersion);\r\n}\r\n\r\n- (<span class=\"pl-k\">void<\/span>)setShortLinkDebugIP:(<span class=\"pl-c1\">NSString<\/span> *)IP port:(<span class=\"pl-k\">const<\/span> <span class=\"pl-k\">unsigned<\/span> <span class=\"pl-k\">short<\/span>)port {\r\n    std::string <span class=\"pl-smi\">ipAddress<\/span>([IP <span class=\"pl-c1\">UTF8String<\/span>]);\r\n    <span class=\"pl-c1\">mars::stn::SetShortlinkSvrAddr<\/span>(port, ipAddress);\r\n}\r\n\r\n- (<span class=\"pl-k\">void<\/span>)setShortLinkPort:(<span class=\"pl-k\">const<\/span> <span class=\"pl-k\">unsigned<\/span> <span class=\"pl-k\">short<\/span>)port {\r\n    <span class=\"pl-c1\">mars::stn::SetShortlinkSvrAddr<\/span>(port);\r\n}\r\n\r\n- (<span class=\"pl-k\">void<\/span>)setLongLinkAddress:(<span class=\"pl-c1\">NSString<\/span> *)string port:(<span class=\"pl-k\">const<\/span> <span class=\"pl-k\">unsigned<\/span> <span class=\"pl-k\">short<\/span>)port debugIP:(<span class=\"pl-c1\">NSString<\/span> *)IP {\r\n    std::string <span class=\"pl-smi\">ipAddress<\/span>([string <span class=\"pl-c1\">UTF8String<\/span>]);\r\n    std::string <span class=\"pl-smi\">debugIP<\/span>([IP <span class=\"pl-c1\">UTF8String<\/span>]);\r\n    std::vector&lt;<span class=\"pl-c1\">uint16_t<\/span>&gt; ports;\r\n    ports.<span class=\"pl-c1\">push_back<\/span>(port);\r\n    <span class=\"pl-c1\">mars::stn::SetLonglinkSvrAddr<\/span>(ipAddress,ports,debugIP);\r\n}\r\n\r\n- (<span class=\"pl-k\">void<\/span>)setLongLinkAddress:(<span class=\"pl-c1\">NSString<\/span> *)string port:(<span class=\"pl-k\">const<\/span> <span class=\"pl-k\">unsigned<\/span> <span class=\"pl-k\">short<\/span>)port {\r\n    std::string <span class=\"pl-smi\">ipAddress<\/span>([string <span class=\"pl-c1\">UTF8String<\/span>]);\r\n    std::vector&lt;<span class=\"pl-c1\">uint16_t<\/span>&gt; ports;\r\n    ports.<span class=\"pl-c1\">push_back<\/span>(port);\r\n    <span class=\"pl-c1\">mars::stn::SetLonglinkSvrAddr<\/span>(ipAddress,ports);\r\n}\r\n\r\n- (<span class=\"pl-k\">void<\/span>)reportEvent_OnForeground:(<span class=\"pl-c1\">BOOL<\/span>)isForeground {\r\n    <span class=\"pl-c1\">mars::baseevent::OnForeground<\/span>(isForground);\r\n}\r\n\r\n- (<span class=\"pl-k\">void<\/span>)makesureLongLinkConnect {\r\n    <span class=\"pl-c1\">mars::stn::MakesureLonglinkConnected<\/span>();\r\n}<\/pre>\n<\/div>\n<p>\u521d\u59cb\u5316\u987a\u5e8f\u4e0d\u4e00\u5b9a\u8981\u4e25\u683c\u9075\u5b88\u4e0a\u8ff0\u4ee3\u7801\u7684\u987a\u5e8f\uff0c\u4f46\u5728\u521d\u59cb\u5316\u65f6\u9996\u5148\u8981\u8c03\u7528 setCallBack \u63a5\u53e3 (callback \u6587\u4ef6\u7684\u7f16\u5199\u53ef\u4ee5\u53c2\u8003 demo)\uff0c\u518d\u8c03\u7528 Mars.init\uff0c\u6700\u540e\u518d\u8c03\u7528 onForeground \u548c makesureLongLinkConnect\uff0c\u4e2d\u95f4\u987a\u5e8f\u53ef\u4ee5\u968f\u610f\u66f4\u6539\u3002<strong>\u6ce8\u610f\uff1aSTN \u9ed8\u8ba4\u662f\u540e\u53f0\uff0c\u6240\u4ee5\u521d\u59cb\u5316 STN \u540e\u9700\u8981\u4e3b\u52a8\u8c03\u7528\u4e00\u6b21<\/strong><code>BaseEvent.onForeground(true)<\/code><\/p>\n<p>\u9700\u8981\u91ca\u653e STN \u6216\u8005\u9000\u51fa\u7a0b\u5e8f\u65f6:<\/p>\n<div class=\"highlight highlight-source-objc\">\n<pre>- (<span class=\"pl-k\">void<\/span>)destroyMars {\r\n    <span class=\"pl-c1\">mars::baseevent::OnDestroy<\/span>();\r\n}<\/pre>\n<\/div>\n<h4><a id=\"user-content-event-change-3\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#event-change-3\" aria-hidden=\"true\"><\/a><a name=\"user-content-even\"><\/a>Event Change<\/h4>\n<p>\u524d\u540e\u53f0\u5207\u6362\u65f6:<\/p>\n<div class=\"highlight highlight-source-objc\">\n<pre>- (<span class=\"pl-k\">void<\/span>)reportEvent_OnForeground:(<span class=\"pl-c1\">BOOL<\/span>)isForeground {\r\n    <span class=\"pl-c1\">mars::baseevent::OnForeground<\/span>(isForeground);\r\n}<\/pre>\n<\/div>\n<p>\u7f51\u7edc\u5207\u6362\u65f6\uff1a<\/p>\n<div class=\"highlight highlight-source-objc\">\n<pre>- (<span class=\"pl-k\">void<\/span>)reportEvent_OnNetworkChange {\r\n    <span class=\"pl-c1\">mars::baseevent::OnNetworkChange<\/span>();\r\n}<\/pre>\n<\/div>\n<h3><a id=\"user-content-windows-1\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#windows-1\" aria-hidden=\"true\"><\/a><a name=\"user-content-windows_cn\"><\/a><a href=\"https:\/\/github.com\/Tencent\/mars\/wiki\/Mars-Windows-%E6%8E%A5%E5%85%A5%E6%8C%87%E5%8D%97\">Windows<\/a><\/h3>\n<p>\u5b89\u88c5Visual Studio 2015<\/p>\n<p>\u7f16\u8bd1<\/p>\n<div class=\"highlight highlight-source-python\">\n<pre>python build_for_win32.py<\/pre>\n<\/div>\n<p>\u628a mars.lib\u4f5c\u4e3a\u4f9d\u8d56\u52a0\u5165\u5230\u4f60\u7684\u9879\u76ee\u4e2d\uff0c\u628a\u548c mars.lib \u540c\u76ee\u5f55\u7684\u540e\u7f00\u540d\u4e3a rewriteme \u7684\u6587\u4ef6\u540d\u5220\u6389&#8221;.rewriteme&#8221;\u548c\u5934\u6587\u4ef6\u4e00\u8d77\u52a0\u5165\u5230\u4f60\u7684\u9879\u76ee\u4e2d\u3002<\/p>\n<h4><a id=\"user-content-xlog-init-5\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#xlog-init-5\" aria-hidden=\"true\"><\/a><a name=\"user-content-Xlog\"><\/a>Xlog Init<\/h4>\n<p>\u5728\u7a0b\u5e8f\u542f\u52a8\u52a0\u8f7d Xlog \u540e\u7d27\u63a5\u7740\u521d\u59cb\u5316 Xlog\u3002\u4f46\u8981\u6ce8\u610f\u4fdd\u5b58 log \u7684\u76ee\u5f55\u8bf7\u4f7f\u7528\u5355\u72ec\u7684\u76ee\u5f55\uff0c\u4e0d\u8981\u5b58\u653e\u4efb\u4f55\u5176\u4ed6\u6587\u4ef6\u9632\u6b62\u88ab xlog \u81ea\u52a8\u6e05\u7406\u529f\u80fd\u8bef\u5220\u3002<\/p>\n<div class=\"highlight highlight-source-c++\">\n<pre>std::string logPath = <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span><span class=\"pl-pds\">\"<\/span><\/span>; <span class=\"pl-c\">\/\/use your log path<\/span>\r\nstd::string pubKey = <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span><span class=\"pl-pds\">\"<\/span><\/span>; <span class=\"pl-c\">\/\/use you pubkey for log encrypt<\/span>\r\n\r\n<span class=\"pl-c\">\/\/ init xlog<\/span>\r\n#<span class=\"pl-k\">if<\/span> DEBUG\r\n<span class=\"pl-en\">xlogger_SetLevel<\/span>(<span class=\"pl-c1\">kLevelDebug<\/span>);\r\n<span class=\"pl-en\">appender_set_console_log<\/span>(<span class=\"pl-c1\">true<\/span>);\r\n#<span class=\"pl-k\">else<\/span>\r\n<span class=\"pl-en\">xlogger_SetLevel<\/span>(<span class=\"pl-c1\">kLevelInfo<\/span>);\r\n<span class=\"pl-en\">appender_set_console_log<\/span>(<span class=\"pl-c1\">false<\/span>);\r\n#<span class=\"pl-k\">endif<\/span>\r\n<span class=\"pl-en\">appender_open<\/span>(<span class=\"pl-c1\">kAppednerAsync<\/span>, logPath.c_str(), \"Test\", pubKey.c_str());<\/pre>\n<\/div>\n<p>\u5728\u7a0b\u5e8f\u9000\u51fa\u524d\u53cd\u521d\u59cb\u5316 Xlog<\/p>\n<div class=\"highlight highlight-source-c++\">\n<pre><span class=\"pl-en\">appender_close<\/span>();<\/pre>\n<\/div>\n<h4><a id=\"user-content-stn-init-5\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#stn-init-5\" aria-hidden=\"true\"><\/a><a name=\"user-content-STN\"><\/a>STN Init<\/h4>\n<p>\u5728\u4f60\u7528 STN \u4e4b\u524d\u521d\u59cb\u5316\uff1a<\/p>\n<div class=\"highlight highlight-source-c++\">\n<pre><span class=\"pl-k\">void<\/span> <span class=\"pl-en\">setShortLinkDebugIP<\/span>(<span class=\"pl-k\">const<\/span> std::string&amp; _ip, <span class=\"pl-k\">unsigned<\/span> <span class=\"pl-k\">short<\/span> _port)\r\n{\r\n\t<span class=\"pl-c1\">mars::stn::SetShortlinkSvrAddr<\/span>(_port, _ip);\r\n}\r\n<span class=\"pl-k\">void<\/span> <span class=\"pl-en\">setShortLinkPort<\/span>(<span class=\"pl-k\">unsigned<\/span> <span class=\"pl-k\">short<\/span> _port)\r\n{\r\n\t<span class=\"pl-c1\">mars::stn::SetShortlinkSvrAddr<\/span>(_port, <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span><span class=\"pl-pds\">\"<\/span><\/span>);\r\n}\r\n<span class=\"pl-k\">void<\/span> <span class=\"pl-en\">setLongLinkAddress<\/span>(<span class=\"pl-k\">const<\/span> std::string&amp; _ip, <span class=\"pl-k\">unsigned<\/span> <span class=\"pl-k\">short<\/span> _port, <span class=\"pl-k\">const<\/span> std::string&amp; _debug_ip)\r\n{\r\n\tvector&lt;<span class=\"pl-c1\">uint16_t<\/span>&gt; ports;\r\n\tports.<span class=\"pl-c1\">push_back<\/span>(_port);\r\n\t<span class=\"pl-c1\">mars::stn::SetLonglinkSvrAddr<\/span>(_ip, ports, _debug_ip);\r\n}\r\n\r\n<span class=\"pl-k\">void<\/span> <span class=\"pl-en\">Init<\/span>()\r\n{\r\n\t<span class=\"pl-c1\">mars::stn::SetCallback<\/span>(<span class=\"pl-c1\">mars::stn::StnCallBack::Instance<\/span>());\r\n\t<span class=\"pl-c1\">mars::app::SetCallback<\/span>(<span class=\"pl-c1\">mars::app::AppCallBack::Instance<\/span>());\r\n\t<span class=\"pl-c1\">mars::baseevent::OnCreate<\/span>();\r\n\t\r\n\t<span class=\"pl-c\">\/\/todo<\/span>\r\n\t<span class=\"pl-c\">\/\/mars::stn::SetClientVersion(version);<\/span>\r\n\t<span class=\"pl-c\">\/\/setShortLinkDebugIP(...)<\/span>\r\n\t<span class=\"pl-c\">\/\/setLongLinkAddress(...)<\/span>\r\n\t\r\n\t<span class=\"pl-c1\">mars::baseevent::OnForeground<\/span>(<span class=\"pl-c1\">true<\/span>);\r\n\t<span class=\"pl-c1\">mars::stn::MakesureLonglinkConnected<\/span>();\r\n}<\/pre>\n<\/div>\n<p>\u521d\u59cb\u5316\u987a\u5e8f\u4e0d\u4e00\u5b9a\u8981\u4e25\u683c\u9075\u5b88\u4e0a\u8ff0\u4ee3\u7801\u7684\u987a\u5e8f\uff0c\u4f46\u5728\u521d\u59cb\u5316\u65f6\u9996\u5148\u8981\u8c03\u7528 setCallBack \u63a5\u53e3 (callback \u6587\u4ef6\u7684\u7f16\u5199\u53ef\u4ee5\u53c2\u8003 demo)\uff0c\u518d\u8c03\u7528 Mars.init\uff0c\u6700\u540e\u518d\u8c03\u7528 onForeground \u548c makesureLongLinkConnect\uff0c\u4e2d\u95f4\u987a\u5e8f\u53ef\u4ee5\u968f\u610f\u66f4\u6539\u3002<strong>\u6ce8\u610f\uff1aSTN \u9ed8\u8ba4\u662f\u540e\u53f0\uff0c\u6240\u4ee5\u521d\u59cb\u5316 STN \u540e\u9700\u8981\u4e3b\u52a8\u8c03\u7528\u4e00\u6b21<\/strong><code>BaseEvent.onForeground(true)<\/code><\/p>\n<p>\u9700\u8981\u91ca\u653e STN \u6216\u8005\u9000\u51fa\u7a0b\u5e8f\u65f6:<\/p>\n<div class=\"highlight highlight-source-c++\">\n<pre><span class=\"pl-en\">mars::baseevent::OnDestroy<\/span>();<\/pre>\n<\/div>\n<h2><a id=\"user-content-support-1\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#support-1\" aria-hidden=\"true\"><\/a>Support<\/h2>\n<p>\u8fd8\u6709\u5176\u4ed6\u95ee\u9898\uff1f<\/p>\n<ol>\n<li>\u53c2\u770b\u00a0<a href=\"https:\/\/github.com\/Tencent\/mars\/tree\/master\/samples\">mars\/sample<\/a>\uff1b<\/li>\n<li>\u9605\u8bfb\u00a0<a href=\"https:\/\/github.com\/Tencent\/mars\/tree\/master\">\u6e90\u7801<\/a>\uff1b<\/li>\n<li>\u9605\u8bfb\u00a0<a href=\"https:\/\/github.com\/Tencent\/mars\/wiki\">wiki<\/a>\u00a0\u6216\u8005\u00a0<a href=\"https:\/\/github.com\/Tencent\/mars\/wiki\/Mars-%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98\">FAQ<\/a>\uff1b<\/li>\n<li>\u8054\u7cfb\u6211\u4eec\u3002<\/li>\n<\/ol>\n<h2><a id=\"user-content-contributing-1\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#contributing-1\" aria-hidden=\"true\"><\/a>Contributing<\/h2>\n<p>\u5173\u4e8e Mars \u5206\u652f\u7ba1\u7406\u3001issue \u4ee5\u53ca pr \u89c4\u8303\uff0c\u8bf7\u9605\u8bfb\u00a0<a href=\"https:\/\/github.com\/Tencent\/mars\/blob\/master\/CONTRIBUTING.md\">Mars Contributing Guide<\/a>\u3002<\/p>\n<h2><a id=\"user-content-license-1\" class=\"anchor\" href=\"https:\/\/github.com\/Tencent\/mars#license-1\" aria-hidden=\"true\"><\/a>License<\/h2>\n<p>Mars \u4f7f\u7528\u7684 MIT \u534f\u8bae\uff0c\u8be6\u7ec6\u8bf7\u53c2\u8003\u00a0<a href=\"https:\/\/github.com\/Tencent\/mars\/blob\/master\/LICENSE\">LICENSE<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/github.com\/T<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[],"tags":[118],"class_list":["post-1169","post","type-post","status-publish","format-standard","hentry","tag-02-"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/1169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=1169"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/1169\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=1169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=1169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=1169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}