{"id":1574,"date":"2023-06-28T17:50:46","date_gmt":"2023-06-28T09:50:46","guid":{"rendered":"https:\/\/h5app.yimenapp.cn\/h5app\/?p=1574"},"modified":"2023-06-28T17:50:46","modified_gmt":"2023-06-28T09:50:46","slug":"h5%e6%89%93%e5%8c%85%e6%88%90app%e6%94%af%e6%8c%81sdk%e6%94%af%e4%bb%98%e6%80%8e%e4%b9%88%e5%ae%9e%e7%8e%b0%e7%9a%84","status":"publish","type":"post","link":"https:\/\/h5app.yimenapp.cn\/h5app\/2023\/sjapp\/1574\/","title":{"rendered":"h5\u6253\u5305\u6210app\u652f\u6301sdk\u652f\u4ed8\u600e\u4e48\u5b9e\u73b0\u7684?"},"content":{"rendered":"<p>\u5c06H5\u7f51\u9875\u6253\u5305\u6210App\u5e76\u652f\u6301SDK\u652f\u4ed8\u662f\u4e00\u79cd\u5e38\u89c1\u7684\u505a\u6cd5\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f01\u4e1a\u5feb\u901f\u63a8\u51fa\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u4e3a\u7528\u6237\u63d0\u4f9b\u66f4\u52a0\u4fbf\u6377\u7684\u652f\u4ed8\u65b9\u5f0f\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u4ecb\u7ecdH5\u6253\u5305\u6210App\u652f\u6301SDK\u652f\u4ed8\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n<p>\u4e00\u3001\u539f\u7406\u4ecb\u7ecd<\/p>\n<p>H5\u6253\u5305\u6210App\u652f\u6301SDK\u652f\u4ed8\u7684\u539f\u7406\u662f\u5c06H5\u7f51\u9875\u5d4c\u5165\u5230\u539f\u751fApp\u4e2d\uff0c\u5e76\u901a\u8fc7\u8c03\u7528SDK\u5b9e\u73b0\u652f\u4ed8\u529f\u80fd\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u5c31\u662f\u901a\u8fc7WebView\u7ec4\u4ef6\u5c06H5\u7f51\u9875\u5d4c\u5165\u5230\u539f\u751fApp\u4e2d\uff0c\u7136\u540e\u5728App\u4e2d\u8c03\u7528\u652f\u4ed8SDK\u5b9e\u73b0\u652f\u4ed8\u529f\u80fd\u3002<\/p>\n<p>\u4e8c\u3001\u6b65\u9aa4\u4ecb\u7ecd<\/p>\n<p>1. \u51c6\u5907\u5de5\u4f5c<\/p>\n<p>\u5728\u5f00\u59cbH5\u6253\u5305\u6210App\u652f\u6301SDK\u652f\u4ed8\u4e4b\u524d\uff0c\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u51c6\u5907\u5de5\u4f5c\u3002\u9996\u5148\uff0c\u9700\u8981\u5f00\u53d1\u4e00\u6b3e\u539f\u751fApp\uff0c\u5e76\u5728\u5176\u4e2d\u5d4c\u5165WebView\u7ec4\u4ef6\u3002\u5176\u6b21\uff0c\u9700\u8981\u9009\u62e9\u4e00\u4e2a\u652f\u6301SDK\u652f\u4ed8\u7684\u7b2c\u4e09\u65b9\u652f\u4ed8\u5e73\u53f0\uff0c\u5e76\u5728\u5f00\u53d1\u8005\u4e2d\u5fc3\u6ce8\u518c\u4e00\u4e2a\u8d26\u53f7\u3002\u6700\u540e\uff0c\u9700\u8981\u5728\u5f00\u53d1\u8005\u4e2d\u5fc3\u4e2d\u521b\u5efa\u4e00\u4e2a\u5e94\u7528\uff0c\u5e76\u83b7\u53d6\u5e94\u7528\u7684AppID\u548cAppSecret\u7b49\u4fe1\u606f\u3002<\/p>\n<p>2. \u5c06H5\u7f51\u9875\u5d4c\u5165\u5230App\u4e2d<\/p>\n<p>\u5728\u51c6\u5907\u5de5\u4f5c\u5b8c\u6210\u540e\uff0c\u5c31\u53ef\u4ee5\u5c06H5\u7f51\u9875\u5d4c\u5165\u5230App\u4e2d\u4e86\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p>\uff081\uff09\u5728\u539f\u751fApp\u4e2d\u521b\u5efa\u4e00\u4e2aWebView\u7ec4\u4ef6\uff0c\u5e76\u8bbe\u7f6eWebView\u7684\u5c5e\u6027\uff0c\u5982\u5bbd\u5ea6\u3001\u9ad8\u5ea6\u3001URL\u7b49\u7b49\u3002<\/p>\n<p>\uff082\uff09\u5c06H5\u7f51\u9875\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2azip\u6587\u4ef6\uff0c\u5e76\u5c06\u5176\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u3002<\/p>\n<p>\uff083\uff09\u5728WebView\u4e2d\u52a0\u8f7dH5\u7f51\u9875\u7684URL\uff0c\u5982 http:\/\/www.example.com\/index.html\u3002<\/p>\n<p>\uff084\uff09\u5728WebView\u4e2d\u8bbe\u7f6eWebViewClient\u548cWebChromeClient\uff0c\u4ee5\u4fbf\u5728WebV<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-2752.html\">\u4efb\u52a1\u53d1\u5e03\u5e73\u53f0app<\/a>iew\u4e2d\u5904\u7406\u7f51\u9875\u52a0\u8f7d\u4e8b\u4ef6\u548cJavaScript\u5bf9\u8bdd\u6846\u7b49\u4e8b\u4ef6\u3002<\/p>\n<p>3. \u96c6\u6210SDK\u652f\u4ed8<\/p>\n<p>\u5728\u5c06H5\u7f51\u9875\u5d4c\u5165\u5230App\u4e2d\u540e\uff0c\u5c31\u53ef\u4ee5\u5f00\u59cb\u96c6\u6210SDK\u652f\u4ed8\u4e86\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p>\uff081\uff09\u5728\u5f00\u53d1\u8005\u4e2d\u5fc3\u4e2d\u83b7\u53d6SDK\u652f\u4ed8\u7684\u96c6\u6210\u5305\uff0c\u5e76\u5c06\u5176\u4e0b\u8f7d\u5230\u672c\u5730\u3002<\/p>\n<p>\uff082\uff09\u5c06SDK\u652f\u4ed8\u7684\u96c6\u6210<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-2787.html\">web\u4e00\u952e\u6253\u5305app<\/a>\u5305\u89e3\u538b\u7f29\uff0c\u5e76\u5c06\u5176\u4e2d\u7684\u5e93\u6587\u4ef6\u548c\u8d44\u6e90\u6587\u4ef6\u590d\u5236\u5230\u539f\u751fApp\u4e2d\u3002<\/p>\n<p>\uff083\uff09\u5728\u539f\u751fApp\u4e2d\u6dfb\u52a0\u652f\u4ed8SDK\u7684\u4f9d\u8d56\u5e93\uff0c\u5e76\u5728\u4ee3\u7801\u4e2d\u8c03\u7528\u652f\u4ed8\u63a5\u53e3\u3002<\/p>\n<p>\uff084\uff09\u5728\u652f\u4ed8\u63a5\u53e3\u4e2d\u4f20\u9012\u652f\u4ed8\u53c2\u6570\uff0c\u5e76\u901a\u8fc7\u56de\u8c03\u51fd\u6570\u83b7\u53d6\u652f\u4ed8\u7ed3\u679c\u3002<\/p>\n<p>4. \u6d4b\u8bd5\u548c\u53d1\u5e03<\/p>\n<p>\u5728\u96c6\u6210SDK\u652f\u4ed8\u540e\uff0c\u9700\u8981\u8fdb\u884c\u6d4b\u8bd5\u548c\u53d1\u5e03\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p>\uff081\uff09\u5728\u6d4b\u8bd5\u73af\u5883\u4e2d\u8fdb\u884c\u6d4b\u8bd5\uff0c\u4ee5\u786e\u4fdd\u652f\u4ed8\u529f\u80fd\u6b63\u5e38\u3002<\/p>\n<p>\uff082\uff09\u5728\u53d1\u5e03\u524d\uff0c\u9700\u8981\u5bf9\u539f\u751fApp\u8fdb\u884c\u4f18\u5316\u548c\u52a0\u5bc6\uff0c\u4ee5\u63d0\u9ad8\u5e94\u7528\u7684\u5b89\u5168\u6027\u548c\u6027\u80fd\u3002<\/p>\n<p>\uff083\uff09\u5c06\u539f\u751fApp\u6253\u5305\u6210APK\u6587\u4ef6\uff0c\u5e76\u53d1\u5e03\u5230\u5e94\u7528<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.cdn.yimenapp.com\/2023-03\/17\/17\/25379295060.jpg\" \/><\/figure>\n<\/p>\n<p>\u5546\u5e97\u6216\u4f01\u4e1a\u5185\u90e8\u5206\u53d1\u6e20\u9053\u3002<\/p>\n<p>\u603b\u7ed3\uff1a<\/p>\n<p>H5\u6253\u5305\u6210App\u652f\u6301SDK\u652f\u4ed8\u662f\u4e00\u79cd\u5e38\u89c1\u7684\u505a\u6cd5\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f01\u4e1a\u5feb\u901f\u63a8\u51fa\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u4e3a\u7528\u6237\u63d0\u4f9b\u66f4\u52a0\u4fbf\u6377\u7684\u652f\u4ed8\u65b9\u5f0f\u3002\u5176\u4e2d\uff0c\u5173\u952e\u662f\u5c06H5\u7f51\u9875\u5d4c\u5165\u5230\u539f\u751fApp\u4e2d\uff0c\u5e76\u901a\u8fc7\u8c03\u7528SDK\u5b9e\u73b0\u652f\u4ed8\u529f\u80fd\u3002\u5728\u5b9e\u73b0\u8fc7\u7a0b\u4e2d\uff0c\u9700\u8981\u8fdb\u884c\u51c6\u5907\u5de5\u4f5c\u3001\u5c06H5\u7f51\u9875\u5d4c\u5165\u5230App\u4e2d\u3001\u96c6\u6210SDK\u652f\u4ed8\u3001\u6d4b\u8bd5\u548c\u53d1\u5e03\u7b49\u6b65\u9aa4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5c06H5\u7f51\u9875\u6253\u5305\u6210App\u5e76\u652f\u6301SDK\u652f\u4ed8\u662f\u4e00\u79cd\u5e38\u89c1\u7684\u505a\u6cd5\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f01\u4e1a\u5feb\u901f\u63a8\u51fa\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u4e3a\u7528\u6237\u63d0\u4f9b\u66f4\u52a0\u4fbf\u6377\u7684\u652f\u4ed8\u65b9\u5f0f\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u4ecb\u7ecdH5\u6253\u5305\u6210App\u652f\u6301SDK\u652f\u4ed8\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002\u4e00\u3001\u539f\u7406\u4ecb\u7ecdH<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[3347,3346,3348,3345,206],"topic":[],"class_list":["post-1574","post","type-post","status-publish","format-standard","hentry","category-sjapp","tag-ios","tag-3346","tag-3348","tag-app","tag-206"],"_links":{"self":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/1574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/comments?post=1574"}],"version-history":[{"count":0,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/1574\/revisions"}],"wp:attachment":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/media?parent=1574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/categories?post=1574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/tags?post=1574"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/topic?post=1574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}