{"id":7696,"date":"2023-10-30T18:35:14","date_gmt":"2023-10-30T10:35:14","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=7696"},"modified":"2023-10-30T18:35:14","modified_gmt":"2023-10-30T10:35:14","slug":"%e5%a4%9a%e4%b8%aa%e7%bd%91%e9%a1%b5%e7%94%9f%e6%88%90app%e6%98%af%e6%80%8e%e4%b9%88%e5%ae%9e%e7%8e%b0%e7%9a%84%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/7696\/","title":{"rendered":"\u591a\u4e2a\u7f51\u9875\u751f\u6210app\u662f\u600e\u4e48\u5b9e\u73b0\u7684\uff1f"},"content":{"rendered":"

\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u6df1\u5165\u63a2\u8ba8\u5982\u4f55\u5c06\u591a\u4e2a\u7f51\u9875\u8f6c\u6362\u4e3a\u4e00\u4e2a\u5b8c\u6574\u7684\u79fb\u52a8\u5e94\u7528\uff08App\uff09\u3002\u8fd9\u79cd\u5e94\u7528\u7a0b\u5e8f\u901a\u5e38\u88ab\u79f0\u4e3a”\u6df7\u5408\u5e94\u7528\uff08Hybrid App\uff09”\uff0c\u5b83\u4eec\u7ed3\u5408\u4e86\u672c\u5730\u5e94\u7528\u7a0b\u8f93\u5165\u7f51\u5740\u81ea\u52a8\u751f\u6210app\u7f51\u9875<\/a>\u5e8f\u548c\u7f51\u9875\u5e94\u7528\u7a0b\u5e8f\u7684\u4f18\u52bf\u3002\u6df7\u5408\u5e94\u7528\u53ef\u4ee5\u901a\u8fc7\u5c06\u7f51\u9875\u5185\u5bb9\u5d4c\u5165\u5230\u4e00\u4e2a\u5e73\u53f0\u539f\u751f\u7684 WebView \u7ec4\u4ef6\u4e2d\uff0c\u5b9e\u73b0\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u4e0e\u7f51\u9875\u5185\u5bb9\u7684\u4ea4\u4e92\u3002\u8fd9\u6837\u7684\u8f6c\u6362\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff1a<\/p>\n

1. Apache Cordova\uff08\u524d PhoneGap\uff09<\/p>\n

Apache Cordova \u662f\u4e00\u4e2a\u77e5\u540d\u7684\u5f00\u6e90\u6df7\u5408\u5e94\u7528\u5f00\u53d1\u6846\u67b6\uff0c\u5b83\u63d0\u4f9b\u4e86\u5c06\u7f51\u9875\u5e94\u7528\u7a0b\u5e8f\u5305\u88c5\u4e3a\u539f\u751f\u5e94\u7528\u7a0b<\/p>\n

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

\u5e8f\u7684\u529f\u80fd\u3002\u6b64\u6846\u67b6\u5141\u8bb8\u60a8\u4f7f\u7528 HTML\/CSS\/JavaScript \u7f16\u5199\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u901a\u8fc7 Cordova \u63d0\u4f9b\u7684\u63d2\u4ef6\u8bbf\u95ee\u8bbe\u5907\u7684\u5e95\u5c42\u529f\u80fd\uff0c\u5982\u6444\u50cf\u5934\u3001GPS \u7b49\u3002<\/p>\n

\u5f00\u53d1\u6b65\u9aa4\uff1a<\/p>\n

– \u9996\u5148\u5b89\u88c5 Node.js \u548c Apache Cordova\u3002<\/p>\n

– \u521b\u5efa Cordova \u9879\u76ee\uff0c\u5c06\u7f51\u9875\u6587\u4ef6\uff08HTML\u3001CSS\u3001JavaScript\uff09\u653e\u5165 www \u76ee\u5f55\u3002<\/p>\n

– \u901a\u8fc7 CLI \u6216\u53ef\u89c6\u5316\u5de5\u5177\u6dfb\u52a0\u6240\u9700\u7684\u63d2\u4ef6\u4ee5\u8bbf\u95ee\u8bbe\u5907\u529f\u80fd\u3002<\/p>\n

– \u4f7f\u7528 Cordova \u547d\u4ee4\u5c06\u9879\u76ee\u6784\u5efa\u4e3a\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n

\u7ecf\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u591a\u4e2a\u7f51\u9875\u5c31\u751f\u6210\u4e86\u4e00\u4e2a\u53ef\u4ee5\u5728\u5404\u79cd\u79fb\u52a8\u8bbe\u5907\u4e0a\u8fd0\u884c\u7684 App\u3002<\/p>\n

2. WebView \u5c01\u88c5<\/p>\n

WebView \u662f\u4e00\u4e2a\u5d4c\u5165\u5f0f\u6d4f\u89c8\u5668\u7ec4\u4ef6\uff08Android \u4e2d\u7684 WebView \u7c7b\uff0ciOS \u4e2d\u7684 UIWebView \u6216 WKWebView \u7c7b\uff09\uff0c\u5b83\u5141\u8bb8\u5728\u539f\u751f\u5e94\u7528\u5185\u90e8\u52a0\u8f7d\u548c\u663e\u793a\u7f51\u9875\u3002\u521b\u5efa\u57fa\u4e8e WebView \u7684\u5e94\u7528\u7684\u5927\u81f4\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n

– \u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u539f\u751f\u5e94\u7528\u9879\u76ee\uff08Android \u4f7f\u7528 Android Studio\uff0ciOS \u4f7f\u7528 Xcode\uff09\u3002<\/p>\n

– \u5728\u4e3b Activity\uff08Android\uff09\u6216 ViewController\uff08iOS\uff09\u4e2d\u6dfb\u52a0 WebView \u7ec4\u4ef6\u3002<\/p>\n

– \u5c06\u672c\u5730\u6216\u8fdc\u7a0b\u7684\u7f51\u9875\u52a0\u8f7d\u5230 WebView \u4e2d\u3002<\/p>\n

– \u901a\u8fc7 WebView \u8bbe\u7f6e\uff08\u5982\u7981\u7528\u6eda\u52a8\u3001\u7f29\u653e\u7b49\uff09\uff0c\u8c03\u6574\u754c\u9762\u3002<\/p>\n

– \u9488\u5bf9\u8bbe\u5907\u5e95\u5c42\u529f\u80fd\uff0c\u4f7f\u7528\u5e73\u53f0\u539f\u751f\u4ee3\u7801\uff08Java\/Kotlin \u6216 Objective-C\/Swift\uff09\u7f16\u5199\u5e94\u7528\u903b\u8f91\u3002<\/p>\n

3. React Native \u6216 Flutter \u5f00\u53d1<\/p>\n

React Native\uff08\u57fa\u4e8e JavaScript \u7684\u8de8\u5e73\u53f0\u539f\u751f\u5e94\u7528\u6846\u67b6\uff09\u548c Flutter\uff08\u57fa\u4e8e Dart \u7684\u8de8\u5e73\u53f0\u539f\u751f\u5e94\u7528\u6846\u67b6\uff09\u662f\u53e6\u5916\u4e24\u79cd\u975e WebView \u7684\u6df7\u5408\u5e94\u7528\u5f00\u53d1\u65b9\u6cd5\u3002\u867d\u7136\u8fd9\u4e9b\u6846\u67b6\u7684\u76ee\u6807\u4e3b\u8981\u662f\u539f\u751f\u5e94\u7528\u5f00\u53d1\uff0c\u4f46\u5b83\u4eec\u4e5f\u63d0\u4f9b\u4e86 WebView \u7ec4\u4ef6\uff0c\u4f7f\u5f97\u5728\u4e00\u4e2a\u539f\u751f\u754c\u9762\u4e2d\u663e\u793a\u7f51\u9875\u6210\u4e3a\u53ef\u80fd\u3002<\/p>\n

\u5b9e\u9645\u64cd\u4f5c\uff1a<\/p>\n

– \u4f7f\u7528 React Native \u6216 Flutter \u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5e94\u7528\u9879\u76ee\u3002<\/p>\n

– \u5b89\u88c5\u5e76\u5bfc\u5165 WebView \u7ec4\u4ef6\u5e93\u3002<\/p>\n

– \u5728\u7ec4\u4ef6\u5c42\u4e2d\u6dfb\u52a0 WebView\uff0c\u5e76\u5c06\u591a\u5728\u7ebf\u751f\u6210appicon\u56fe\u6807<\/a>\u4e2a\u7f51\u9875\u52a0\u8f7d\u5230 WebView \u4e2d\u3002<\/p>\n

– \u5728\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u4e2d\u8bbf\u95ee\u5e95\u5c42\u529f\u80fd\uff0c\u5982\u5916\u89c2\u3001\u6027\u80fd\u548c\u8bbe\u5907\u529f\u80fd\u3002<\/p>\n

\u8fd9\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u8ba9\u591a\u4e2a\u7f51\u9875\u751f\u6210\u4e00\u4e2a\u9002\u7528\u4e8e\u591a\u79cd\u79fb\u52a8\u8bbe\u5907\u7684 App\u3002\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\u53d6\u51b3\u4e8e\u60a8\u7684\u7ecf\u9a8c\u3001\u6280\u80fd\u548c\u9879\u76ee\u9700\u6c42\u3002\u5c3d\u7ba1\u5b58\u5728\u4f18\u7f3a\u70b9\uff0c\u4f46\u8fd9\u4e9b\u6280\u672f\u90fd\u8ba9\u591a\u4e2a\u7f51\u9875\u5e94\u7528\u7a0b\u5e8f\u5728\u79fb\u52a8\u8bbe\u5907\u4e0a\u6709\u4e86\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u7684\u4f53\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u6df1\u5165\u63a2\u8ba8\u5982\u4f55\u5c06\u591a\u4e2a\u7f51\u9875\u8f6c\u6362\u4e3a\u4e00\u4e2a\u5b8c\u6574\u7684\u79fb\u52a8\u5e94\u7528\uff08App\uff09\u3002\u8fd9\u79cd\u5e94\u7528\u7a0b\u5e8f\u901a\u5e38\u88ab\u79f0\u4e3a\\”\u6df7\u5408\u5e94\u7528\uff08Hybrid App\uff09\\”\uff0c\u5b83\u4eec\u7ed3\u5408\u4e86\u672c\u5730\u5e94\u7528\u7a0b\u5e8f\u548c\u7f51\u9875\u5e94\u7528\u7a0b\u5e8f\u7684\u4f18\u52bf\u3002\u6df7\u5408\u5e94\u7528\u53ef\u4ee5\u901a\u8fc7<\/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":[10438,1006,12,149,13527],"topic":[],"class_list":["post-7696","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-app","tag-1006","tag-12","tag-149","tag-appv1-0"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/7696","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=7696"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/7696\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=7696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=7696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=7696"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=7696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}