{"id":12503,"date":"2023-12-18T18:33:34","date_gmt":"2023-12-18T10:33:34","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=12503"},"modified":"2023-12-18T18:33:34","modified_gmt":"2023-12-18T10:33:34","slug":"%e6%80%8e%e4%b9%88%e6%8a%8a%e7%bd%91%e9%a1%b5%e7%94%9f%e6%88%90app%e5%91%a2","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/12503\/","title":{"rendered":"\u600e\u4e48\u628a\u7f51\u9875\u751f\u6210app\u5462?"},"content":{"rendered":"

\u5c06\u7f51<\/p>\n

<\/figure>\n<\/p>\n

\u9875\u751f\u6210APP\u7684\u8fc7\u7a0b\u901a\u5e38\u88ab\u79f0\u4e3a\u201c\u7f51\u9875\u5c01\u88c5\u201d\u6216\u201cWebview\u5c01\u88c5\u201d\u3002\u987e\u540d\u601d\u4e49\uff0c\u5b83\u662f\u5c06\u4e00\u4e2a\u7f51\u9875\u6216Web\u5e94\u7528\u5c01\u88c5\u6210\u4e00\u4e2a\u539f\u751f\u79fb\u52a8\u5e94\u7528\u3002\u6b64\u7c7b\u5e94\u7528\u901a\u5e38\u4f7f\u7528WebView\u7ec4\u4ef6\uff0c\u5728\u539f\u751f\u5e94\u7528\u4e2d\u5c55\u793a\u7f51\u9875\u5185\u5bb9\u3002WebView\u7ec4\u4ef6\u662f\u4e00\u4e2a\u7cfb\u7edf\u5185\u7f6e\u7684\u6d4f\u89c8\u5668\u89c6\u56fe\uff0c\u53ef\u7528\u4e8e\u5728APP\u5185\u663e\u793a\u7f51\u9875\u5185\u5bb9\u3002<\/p>\n

\u4ee5\u4e0b\u662f\u5c06\u7f51\u9875\u751f\u6210APP\u7684\u5177\u4f53\u6b65\u9aa4\u548c\u8be6\u7ec6\u4ecb\u7ecd\uff1a<\/p>\n

1. \u786e\u5b9a\u76ee\u6807\u5e73\u53f0\uff1a\u9996\u5148\uff0c\u4f60\u9700\u8981\u786e\u5b9a\u5c06\u7f51\u9875\u751f\u6210\u7684APP\u8981\u652f\u6301\u54ea\u4e9b\u5e73\u53f0\u3002\u6700\u5e38\u89c1\u7684\u5e73\u53f0\u5305\u62ecAndroid\u548ciOS\u3002\u4e3a\u4e86\u5c06\u7f51\u9875\u751f\u6210\u4e3a\u8fd9\u4e24\u4e2a\u5e73\u53f0\u7684APP\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u8de8\u5e73\u53f0\u7684\u5c01\u88c5\u5de5\u5177\uff0c\u4f8b\u5982Apache Cordova\/PhoneGap\u3001React Native\u7b49\u3002<\/p>\n

2. \u8bbe\u8ba1\u548c\u521b\u5efa\u7f51\u9875\uff1a\u63a5\u4e0b\u6765\uff0c\u4f60\u9700\u8981\u51c6\u5907\u597d\u8981\u5d4c\u5165\u5230APP\u4e2d\u7684Web\u5185\u5bb9\u3002\u8fd9\u5305\u62ec\u7f51\u9875\u8bbe\u8ba1\u3001\u7f16\u5199HTML\/CSS\/JavaScript\u7b49\u3002\u786e\u4fdd\u4f60\u8c03\u6574\u4e86\u54cd\u5e94\u5f0f\u5e03\u5c40\uff0c\u56e0\u4e3a\u4f60\u9700\u8981\u9002\u5e94\u5728\u4e0d\u540c\u5c3a\u5bf8\u7684\u624b\u673a\u4e0a\u663e\u793a\u7684\u5185\u5bb9\u3002<\/p>\n

3. \u4f7f\u7528\u8de8\u5e73\u53f0\u5de5\u5177\u8fdb\u884c\u5c01\u88c5\uff1a<\/p>\n

a. Apache Cordova\/PhoneGap\uff1a\u8fd9\u662f\u4e00\u4e2a\u5f00\u6e90\u79fb\u52a8\u5f00\u53d1\u6846\u67b6\uff0c\u5141\u8bb8\u4f7f\u7528HTML\u3001CSS\u548cJavaScript\u6784\u5efa\u8de8\u5e73\u53f0\u79fb\u52a8\u5e94\u7528\u3002\u5b83\u5728Native WebView\u7ec4\u4ef6\u5185\u5c55\u793aWeb\u5185\u5bb9\uff0c\u4ece\u800c\u4f7f\u5f97APP\u80fd\u591f\u4e3aAndroid\u548ciOS\u8bbe\u5907\u6784\u5efa\u3002<\/p>\n

– \u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5Node.js\u3001Apache Cordova CLI\u548c\u5176\u4ed6\u76f8\u5173\u4f9d\u8d56\u3002<\/p>\n

– \u63a5\u4e0b\u6765\uff0c\u4f7f\u7528Cordova CLI\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u9879\u76ee\uff0c\u5e76\u6dfb\u52a0\u6240\u9700\u7684\u5e73\u53f0\uff08\u5982Android\u548ciOS\uff09\u3002<\/p>\n

– \u4f60\u53ef\u4ee5\u5c06\u7f51\u9875\u6587\u4ef6\u653e\u5165\u201cwww\u201d\u6587\u4ef6\u5939\u5185\uff0c\u5e76\u5728\u201cconfig.xml\u201d\u6587\u4ef6\u4e2d\u8fdb\u884c\u5fc5\u8981\u7684\u914d\u7f6e\u3002<\/p>\n

– \u6700\u540e\uff0c\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u6784\u5efa\u548c\u751f\u6210APP\u3002\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u5c06\u751f\u6210\u7684APP\u6587\u4ef6\u90e8\u7f72\u5230\u76f8\u5e94\u7684\u5e94\u7528\u5546\u5e97\u3002<\/p>\n

b. React Native\uff1a\u5b83\u662f\u4e00\u4e2a\u7531Facebook\u5f00\u53d1\u7684\u8de8\u5e73\u53f0\u5e94\u7528\u5f00\u53d1\u6846\u67b6\u3002\u5b83\u5141\u8bb8\u4f60\u4f7f\u7528React\u548cJavaScript\u6784\u5efa\u539f\u751f\u5e94\u7528\u3002<\/p>\n

– \u9996\u5148\uff0c\u5728\u4f60\u7684\u8ba1\u7b97\u673a\u4e0a\u7f51\u9875\u751f\u6210app \u514d\u8d39<\/a>\u5b89\u88c5React Native CLI\u3001Node.js\u548c\u6240\u9700\u7684\u4f9d\u8d56\u3002<\/p>\n

– \u4f7f\u7528React Native CLI\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee\uff0c\u7136\u540e\u5728\u65b0\u9879\u76ee\u4e2d\u6dfb\u52a0\u7f51\u9875\u5185\u5bb9\u3002<\/p>\n

– \u4e3a\u4e86\u5728React Native\u9879\u76ee\u4e2d\u5c55\u793aWeb\u5185\u5bb9\uff0c\u4f60\u9700\u8981\u4f7f\u7528\u201creact-native-webview\u201d\u7ec4\u4ef6\u3002<\/p>\n

– \u5c06\u7f51\u9875\u8f6c\u6362\u4e3aAPP\u540e\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528React Native CLI\u6784\u5efa\u548c\u90e8\u7f72\u5e94\u7528\u3002<\/p>\n

4. \u6d4b\u8bd5app\u7f51\u7ad9\u751f\u6210<\/a>\u548c\u4f18\u5316\uff1a\u5728\u90e8\u7f72APP\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u5bf9\u5176\u8fdb\u884c\u5145\u5206\u7684\u6d4b\u8bd5\u3002\u8fd9\u5305\u62ec\u5728\u4e0d\u540c\u7684\u8bbe\u5907\u548c\u5c4f\u5e55\u5c3a\u5bf8\u4e0a\u8fdb\u884c\u529f\u80fd\u548c\u6027\u80fd\u6d4b\u8bd5\u3002\u6839\u636e\u6d4b\u8bd5\u7ed3\u679c\u5bf9\u7f51\u9875\u6216\u5c01\u88c5\u4ee3\u7801\u8fdb\u884c\u5fc5\u8981\u7684\u4f18\u5316\u3002\u8fd9\u53ef\u4ee5\u63d0\u9ad8APP\u5728\u5404\u79cd\u8bbe\u5907\u4e0a\u7684\u517c\u5bb9\u6027\u548c\u6027\u80fd\u3002<\/p>\n

5. \u90e8\u7f72\u5230\u5e94\u7528\u5546\u5e97\uff1a\u5b8c\u6210\u8fd9\u4e9b\u6b65\u9aa4\u540e\uff0c\u4e00\u4e2a\u57fa\u4e8e\u7f51\u9875\u5185\u5bb9\u7684\u539f\u751fAPP\u5c06\u88ab\u6210\u529f\u521b\u5efa\u3002\u4f60\u53ef\u4ee5\u5c06\u5b83\u90e8\u7f72\u5230Google Play\u5546\u5e97\u3001Apple App Store\u6216\u5176\u4ed6\u5e94\u7528\u5546\u5e97\u3002<\/p>\n

\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u5c06\u7f51\u9875\u751f\u6210\u4e3a\u8de8\u5e73\u53f0\u79fb\u52a8\u5e94\u7528\u3002\u8fd9\u6837\u7684\u5e94\u7528\u53ef\u4ee5\u5e2e\u52a9\u4f60\u6269\u5927\u53d7\u4f17\u8303\u56f4\uff0c\u4e3a\u7528\u6237\u63d0\u4f9b\u66f4\u4fbf\u6377\u7684\u8bbf\u95ee\u65b9\u5f0f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5c06\u7f51\u9875\u751f\u6210APP\u7684\u8fc7\u7a0b\u901a\u5e38\u88ab\u79f0\u4e3a\u201c\u7f51\u9875\u5c01\u88c5\u201d\u6216\u201cWebview\u5c01\u88c5\u201d\u3002\u987e\u540d\u601d\u4e49\uff0c\u5b83\u662f\u5c06\u4e00\u4e2a\u7f51\u9875\u6216Web\u5e94\u7528\u5c01\u88c5\u6210\u4e00\u4e2a\u539f\u751f\u79fb\u52a8\u5e94\u7528\u3002\u6b64\u7c7b\u5e94\u7528\u901a\u5e38\u4f7f\u7528WebView\u7ec4\u4ef6\uff0c\u5728\u539f\u751f\u5e94\u7528\u4e2d\u5c55\u793a\u7f51\u9875\u5185\u5bb9\u3002Web<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[27,80,10444,149,17485],"topic":[],"class_list":["post-12503","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-27","tag-80","tag-app","tag-149"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/12503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=12503"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/12503\/revisions"}],"predecessor-version":[{"id":12596,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/12503\/revisions\/12596"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=12503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=12503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=12503"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=12503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}