{"id":21240,"date":"2024-03-05T17:49:39","date_gmt":"2024-03-05T09:49:39","guid":{"rendered":"https:\/\/h5app.yimenapp.cn\/h5app\/?p=21240"},"modified":"2024-03-05T17:49:39","modified_gmt":"2024-03-05T09:49:39","slug":"%e5%89%8d%e7%ab%af%e6%89%93%e5%8c%85%e7%a8%8bapp%e6%96%b9%e5%bc%8f%e6%9c%89%e5%93%aa%e4%ba%9b%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/h5app.yimenapp.cn\/h5app\/2024\/sjapp\/21240\/","title":{"rendered":"\u524d\u7aef\u6253\u5305\u7a0bapp\u65b9\u5f0f\u6709\u54ea\u4e9b\uff1f"},"content":{"rendered":"<p>\u524d\u7aef\u6253\u5305\u6210app\u7684\u65b9\u5f0f\u6709\u5f88\u591a\u79cd\uff0c\u5176\u4e2d\u6bd4\u8f83\u5e38\u89c1\u7684\u6709\u4e24\u79cd\uff1a\u57fa\u4e8eWebView\u7684Hybrid App\u548c\u57fa\u4e8eReact Native\u7684Native App\u3002<\/p>\n<p>1. \u57fa\u4e8eWebView\u7684Hybrid App<\/p>\n<p>Hybrid App\u662f\u6307\u5c06Web\u6280\u672f\u548cNative\u6280\u672f\u76f8\u7ed3\u5408\uff0c\u6784\u5efa\u51fa\u4e00\u79cd\u4ecb\u4e8eWeb App\u548cNative App\u4e4b\u95f4\u7684\u5e94\u7528\u3002\u5176\u4e2d\uff0c\u57fa\u4e8eWebView<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-2987.html\">\u7528app<\/a>\u7684Hybrid App\u662f\u6700\u5e38\u89c1\u7684\u4e00\u79cd\u65b9\u5f0f\u3002<\/p>\n<p><a href=\"https:\/\/appdabao.yimenapp.com\/jiage-2040.html\">\u521b\u5efawebapp<\/a>WebView\u662fAndroid\u548ciOS\u5e73\u53f0\u4e0a\u7684\u4e00\u4e2a\u7ec4\u4ef6\uff0c\u53ef\u4ee5\u5c06Web\u9875\u9762\u5d4c\u5165\u5230Native\u5e94\u7528\u4e2d\uff0c\u5b9e\u73b0\u7c7b\u4f3c\u4e8e\u6d4f\u89c8\u5668\u7684\u529f\u80fd\u3002\u5728Hybrid App\u4e2d\uff0c\u6211\u4eec\u4f1a\u5c06\u4e00\u4e9b\u6838\u5fc3\u7684\u529f\u80fd\u4f7f\u7528Native\u4ee3\u7801\u5b9e\u73b0\uff0c\u6bd4\u5982\u8c03\u7528\u8bbe\u5907\u7684\u6444\u50cf\u5934\u3001\u5b9a\u4f4d\u7b49\u529f\u80fd\uff0c\u7136\u540e\u5c06\u8fd9\u4e9bNative\u4ee3\u7801\u7684\u63a5\u53e3\u66b4\u9732\u7ed9JavaScript\uff0cJavaScript\u5728WebView\u4e2d<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.yimenyun.net\/2023-03\/15\/13\/04558523401.jpg\" \/><\/figure>\n<\/p>\n<p>\u901a\u8fc7\u8c03\u7528\u8fd9\u4e9b\u63a5\u53e3\u6765\u5b9e\u73b0Native\u529f\u80fd\u3002<\/p>\n<p>\u6253\u5305\u6210Hybrid App\u7684\u65b9\u5f0f\u4e00\u822c\u91c7\u7528Cordova\u6216Ionic\u8fd9\u6837\u7684\u6846\u67b6\u3002\u8fd9\u4e9b\u6846\u67b6\u63d0\u4f9b\u4e86\u4e00\u4e9b\u7b80\u5355\u7684API\uff0c\u53ef\u4ee5\u8ba9\u6211\u4eec\u65b9\u4fbf\u5730\u5728JavaScript\u4e2d\u8c03\u7528Native\u529f\u80fd\uff0c\u800c\u4e14\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e9b\u63d2\u4ef6\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5b9e\u73b0\u4e00\u4e9b\u5e38\u7528\u7684\u529f\u80fd\uff0c\u6bd4\u5982\u5206\u4eab\u3001\u652f\u4ed8\u7b49\u7b49\u3002<\/p>\n<p>2. \u57fa\u4e8eReact Native\u7684Native App<\/p>\n<p>React Native\u662fFacebook\u5f00\u6e90\u7684\u4e00\u79cd\u5168\u65b0\u7684\u79fb\u52a8\u5e94\u7528\u5f00\u53d1\u6846\u67b6\uff0c\u5b83\u53ef\u4ee5\u8ba9\u6211\u4eec\u4f7f\u7528JavaScript\u6765\u6784\u5efaNative\u5e94\u7528\u3002React Native\u4f7f\u7528\u4e86\u4e00\u79cd\u53eb\u505a\u201c\u5e03\u5c40\u5f15\u64ce\u201d\u7684\u6280\u672f\uff0c\u53ef\u4ee5\u5c06JavaScript\u4ee3\u7801\u8f6c\u6362\u6210Native\u4ee3\u7801\uff0c\u4ece\u800c\u5b9e\u73b0Native\u5e94\u7528\u7684\u6548\u679c\u3002<\/p>\n<p>React Native\u7684\u597d\u5904\u5728\u4e8e\uff0c\u5b83\u53ef\u4ee5\u8ba9\u6211\u4eec\u4f7f\u7528JavaScript\u6765\u7f16\u5199Native\u5e94\u7528\uff0c\u800c\u4e14\u8fd8\u53ef\u4ee5\u8de8\u5e73\u53f0\u4f7f\u7528\uff0c\u4e00\u4efd\u4ee3\u7801\u53ef\u4ee5\u540c\u65f6\u8fd0\u884c\u5728Android\u548ciOS\u4e0a\u3002React Native\u4e5f\u63d0\u4f9b\u4e86\u5f88\u591a\u7ec4\u4ef6\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5b9e\u73b0\u4e00\u4e9b\u5e38\u7528\u7684UI\u6548\u679c\uff0c\u6bd4\u5982\u5217\u8868\u3001\u6eda\u52a8\u7b49\u7b49\u3002<\/p>\n<p>\u6253\u5305\u6210React Native\u7684\u65b9\u5f0f\u4e00\u822c\u4f7f\u7528React Native CLI\u6216Expo\u8fd9\u6837\u7684\u5de5\u5177\u3002React Native CLI\u63d0\u4f9b\u4e86\u4e00\u4e9b\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u521b\u5efa\u548c\u6784\u5efaReact Native\u5e94\u7528\uff0c\u800c\u4e14\u8fd8\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528Native\u6a21\u5757\u6765\u5b9e\u73b0\u4e00\u4e9b\u9ad8\u7ea7\u529f\u80fd\u3002Expo\u5219\u662f\u4e00\u4e2a\u57fa\u4e8eReact Native\u7684\u5e73\u53f0\uff0c\u53ef\u4ee5\u8ba9\u6211\u4eec\u66f4\u65b9\u4fbf\u5730\u5f00\u53d1\u548c\u6784\u5efaReact Native\u5e94\u7528\uff0c\u800c\u4e14\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5e38\u7528\u7684\u63d2\u4ef6\u548c\u7ec4\u4ef6\uff0c\u53ef\u4ee5\u8ba9\u6211\u4eec\u5feb\u901f\u5730\u5b9e\u73b0\u4e00\u4e9b\u529f\u80fd\u3002<\/p>\n<p>\u603b\u7ed3<\/p>\n<p>\u65e0\u8bba\u662f\u57fa\u4e8eWebView\u7684Hybrid App\u8fd8\u662f\u57fa\u4e8eReact Native\u7684Native App\uff0c\u5b83\u4eec\u90fd\u6709\u5404\u81ea\u7684\u4f18\u7f3a\u70b9\u3002Hybrid App\u76f8\u5bf9\u6765\u8bf4\u6bd4\u8f83\u7b80\u5355\uff0c\u53ef\u4ee5\u5feb\u901f\u5730\u5f00\u53d1\u51fa\u4e00\u4e2a\u7c7b\u4f3c\u4e8eNative\u7684\u5e94\u7528\uff0c\u4f46\u662f\u56e0\u4e3a\u4f7f\u7528\u4e86WebView\uff0c\u6240\u4ee5\u6027\u80fd\u4e0a\u53ef\u80fd\u4f1a\u6709\u4e00\u4e9b\u95ee\u9898\u3002\u800cReact Native\u5219\u66f4\u52a0\u5f3a\u8c03\u6027\u80fd\u548c\u7528\u6237\u4f53\u9a8c\uff0c\u4f46\u662f\u5b66\u4e60\u6210\u672c\u53ef\u80fd\u4f1a\u6bd4\u8f83\u9ad8\u3002\u9009\u62e9\u54ea\u79cd\u65b9\u5f0f\uff0c\u9700\u8981\u6839\u636e\u5177\u4f53\u7684\u9700\u6c42\u548c\u9879\u76ee\u60c5\u51b5\u6765\u51b3\u5b9a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u7aef\u6253\u5305\u6210app\u7684\u65b9\u5f0f\u6709\u5f88\u591a\u79cd\uff0c\u5176\u4e2d\u6bd4\u8f83\u5e38\u89c1\u7684\u6709\u4e24\u79cd\uff1a\u57fa\u4e8eWebView\u7684Hybrid App\u548c\u57fa\u4e8eReact Native\u7684Native App\u30021. \u57fa\u4e8eWebView\u7684Hybrid AppHy<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[193,389,24206,24207,7961],"topic":[],"class_list":["post-21240","post","type-post","status-publish","format-standard","hentry","category-sjapp","tag-193","tag-389","tag-app","tag-24207","tag-7961"],"_links":{"self":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/21240","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\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/comments?post=21240"}],"version-history":[{"count":1,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/21240\/revisions"}],"predecessor-version":[{"id":21427,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/21240\/revisions\/21427"}],"wp:attachment":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/media?parent=21240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/categories?post=21240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/tags?post=21240"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/topic?post=21240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}