{"id":24519,"date":"2024-05-29T15:31:01","date_gmt":"2024-05-29T07:31:01","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=24519"},"modified":"2024-05-29T15:31:01","modified_gmt":"2024-05-29T07:31:01","slug":"%e7%bd%91%e9%a1%b5%e6%89%93%e5%8c%85app%e6%ba%90%e7%a0%81%e4%bd%9c%e7%94%a8%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/24519\/","title":{"rendered":"\u7f51\u9875\u6253\u5305app\u6e90\u7801\u4f5c\u7528\u4ecb\u7ecd"},"content":{"rendered":"

\u7f51\u9875\u6253\u5305\u4e3aAPP\u6e90\u7801\uff1a\u539f\u7406\u4e0e\u8be6\u7ec6\u4ecb\u7ecd<\/p>\n

\u968f\u7740\u79fb\u52a8\u8bbe\u5907\u7684\u666e\u53ca\u548c\u79fb\u52a8\u5e94\u7528\u7684\u9700\u6c42\u9010\u6e10\u589e\u52a0\uff0c\u7f51\u9875\u6253\u5305\u4e3aAPP\uff08Application\uff0c\u5e94\u7528\u7a0b\u5e8f\uff09\u7684\u6280\u672f\u4e5f\u8d8a\u6765\u8d8a\u53d7\u6b22<\/p>\n

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

\u8fce\u3002\u8fd9\u79cd\u6280\u672f\u4e3b\u8981\u5229\u7528\u73b0\u6709\u7684\u7f51\u9875\u6280\u672f\u548c\u8d44\u6e90\uff0c\u5c06\u5176\u5305\u88c5\u6210\u4e00\u4e2a\u53ef\u4ee5\u5728\u79fb\u52a8\u8bbe\u5907\u4e0a\u8fd0\u884c\u7684\u72ec\u7acb\u5e94\u7528\u3002\u5bf9\u4e8e\u7f51\u7ad9\u5f00\u53d1\u8005\u548c\u5c0f\u578b\u4f01\u4e1a\u6765\u8bf4\uff0c\u8fd9\u610f\u5473\u7740\u53ef\u4ee5\u8282\u7701\u5927\u91cf\u7684\u5f00\u53d1\u6210\u672c\u548c\u65f6\u95f4\u3002\u63a5\u4e0b\u6765\uff0c\u8ba9\u6211\u4eec\u8be6\u7ec6\u4e86\u89e3\u4e00\u4e0b\u7f51\u9875\u6253\u5305\u4e3aAPP\u7684\u539f\u7406\u548c\u4e00\u4e9b\u4e3b\u8981\u6280\u672f\u3002<\/p>\n

\u4e00\u3001\u7f51\u9875\u6253\u5305APP\u7684\u539f\u7406<\/p>\n

\u7f51\u9875\u6253\u5305\u4e3aAPP\u7684\u6838\u5fc3\u539f\u7406\u662f\u5c06\u73b0\u6709\u7684\u7f51\u9875\u5e94\u7528\uff08\u4e5f\u79f0\u4e3aWeb App\uff09\u5d4c\u5165\u5230\u4e00\u4e2a\u53ef\u4ee5\u8fd0\u884c\u5728\u79fb\u52a8\u8bbe\u5907\u4e0a\u7684\u539f\u751f\u5e94\u7528\u5bb9\u5668\u4e2d\u3002\u5bb9\u5668\u63d0\u4f9b\u4e86\u4e00\u4e2aWebView\u7ec4\u4ef6\uff0c\u6b64\u7ec4\u4ef6\u53ef\u4ee5\u5728\u539f\u751f\u5e94\u7528\uff08\u5982Android\u548ciOS\u5e94\u7528\u7a0b\u5e8f\uff09\u4e2d\u663e\u793aWeb\u5185\u5bb9\u3002WebView\u7ec4\u4ef6\u57fa\u672c\u4e0a\u662f\u4e00\u4e2a\u6d4f\u89c8\u5668\u7a97\u53e3\uff0c\u5b83\u652f\u6301HTML\u3001CSS\u3001JavaScript\u7b49\u7f51\u9875\u6280\u672f\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u7528\u6237\u5c31\u53ef\u4ee5\u5728\u4e0d\u8bbf\u95ee\u7f51\u7ad9\u7684\u60c5\u51b5\u4e0b\uff0c\u76f4\u63a5\u901a\u8fc7\u79fb\u52a8\u8bbe\u5907\u4e0a\u7684APP\u4f7f\u7528Web\u5e94\u7528\u3002<\/p>\n

\u4e8c\u3001\u5173\u952e\u6280\u672f\u548c\u5de5\u5177<\/p>\n

1. PhoneGap\uff08Apache Cordova\uff09<\/p>\n

PhoneGap\uff08\u73b0\u5728\u5df2\u88ab\u91cd\u547d\u540d\u4e3aApache Cordova\uff09\u662f\u4e00\u4e2a\u6d41\u884c\u7684\u8de8\u5e73\u53f0\u79fb\u52a8\u5e94\u7528\u5f00\u53d1\u6846\u67b6\u3002\u5b83\u5141\u8bb8\u5f00\u53d1\u8005\u5229\u7528HTML\u3001CSS\u548cJavaScript\u6280\u672f\u521b\u9020\u79fb\u52a8\u5e94\u7528\uff0c\u5e76\u901a\u8fc7\u4e00\u4e2a\u7edf\u4e00\u7684API\u8bbf\u95ee\u8bbe\u5907\u7684\u539f\u751f\u529f\u80fd\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u5c06Web\u5e94\u7528\u4f7f\u7528PhoneGap\u6253\u5305\u4e3a\u539f\u751f\u5e94\u7528\u3002<\/p>\n

2. WebView\u7ec4\u4ef6<\/p>\n

\u5982\u524d\u6240\u8ff0\uff0cWebView\u7ec4\u4ef6\u662f\u5b9e\u73b0\u7f51\u9875\u6253\u5305APP\u7684\u6838\u5fc3\u6280\u672f\u3002\u5728Android\u4e2d\uff0cWebView\u662fandroid.webkit.WebView\u7c7b\u7684\u4e00\u4e2a\u5b9e\u4f8b\uff0c\u5728iOS\u4e2d\uff0cWebView\u5bf9\u5e94\u4e8eWKWebView\u6216UIWebView\u7c7b\u3002\u8fd9\u4e9b\u7ec4\u4ef6\u5141\u8bb8\u5f00\u53d1\u8005\u5728\u539f\u751f\u5e94\u7528\u4e2d\u5d4c\u5165HTML\u3001CSS\u548cJavaScript\u7684\u5185\u5bb9\uff0c\u5e76\u652f\u6301\u7f51\u9875\u7684\u5bfc\u822a\u3001\u7f29\u653e\u3001\u6eda\u52a8\u7b49\u57fa\u672c\u64cd\u4f5c\u3002<\/p>\n

3. Manifest\u6587\u4ef6<\/p>\n

\u4e3a\u4e86\u8ba9Web\u5e94\u7528\u66f4\u50cf\u539f\u751f\u5e94\u7528\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u4f7f\u7528Manifest\u6587\u4ef6\u6765\u914d\u7f6e\u5e94\u7528\u7684\u542f\u52a8\u56fe\u6807\u3001\u542f\u52a8\u753b\u9762\u3001\u5168\u5c4f\u6a21\u5f0f\u7b49\u591a\u79cd\u7279\u6027\u3002Manifest\u6587\u4ef6\u662f\u4e00\u4e2aJSON\u6587\u4ef6\uff0c\u5177\u6709\u63cf\u8ff0Web\u5e94\u7528\u7684\u4fe1\u606f\u548c\u914d\u7f6e\u53c2\u6570\u3002<\/p>\n

4. Progressive Web App\uff08PWA\uff09<\/p>\n

PWA\uff08\u6e10\u8fdb\u5f0fWeb\u5e94\u7528\uff09\u662f\u4e00\u79cd\u65b0\u7684Web\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u8ba9\u7528\u6237\u5728\u6d4f\u89c8\u5668\u4e2d\u76f4apk\u76f4\u88c5<\/a>\u63a5\u5b89\u88c5\u5e76\u4f7f\u7528Web\u5e94\u7528\uff0c\u65e0\u9700\u901a\u8fc7\u5e94\u7528\u5546\u5e97\u3002PWA\u5177\u6709\u7c7b\u4f3c\u4e8e\u539f\u751f\u5e94\u7528\u7684\u6027\u80fd\u548c\u4f53\u9a8c\uff0c\u800c\u4e14\u652f\u6301\u79bb\u7ebf\u8bbf\u95ee\u3001\u6d88\u606f\u63a8\u9001\u7b49\u9ad8\u7ea7\u529f\u80fd\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u5c06\u73b0\u6709\u7684Web\u5e94\u7528\u5347\u7ea7\u4e3aPWA\uff0c\u5e76\u5c06\u5176\u6253\u5305\u4e3a\u539f\u751f\u5e94\u7528\u3002<\/p>\n

\u4e09\u3001\u7f51\u9875\u6253\u5305APP\u7684\u6b65\u9aa4<\/p>\n

1. \u51c6\u5907Web\u5e94\u7528\u5e76\u4f18\u5316\uff1a\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684Web\u5e94\u7528\u5177\u6709\u826f\u597d\u7684\u54cd\u5e94\u5f0f\u8bbe\u8ba1\u548c\u9ad8\u5ea6\u4f18\u5316\u7684\u6027\u80fd\u3002\u540c\u65f6\u68c0\u67e5\u5e76\u4fee\u590d\u53ef\u80fd\u5b58\u5728\u7684\u517c\u5bb9\u6027\u95ee\u9898\u3002<\/p>\n

2. \u9009\u62e9\u6280\u672f\u548c\u5de5\u5177\uff1a\u6839\u636e\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u6280\u672f\u548c\u5de5\u5177\uff0c\u4f8b\u5982PhoneGap\u3001WebView\u7ec4\u4ef6\u6216PWA\u3002<\/p>\n

3. \u7f16\u5199Manifest\u6587\u4ef6\uff1a\u7f16\u5199\u63cf\u8ff0\u4f60\u7684Web\u5e94\u7528\u7684Manifest\u6587\u4ef6\uff0c\u8bbe\u7f6e\u56fe\u6807\u3001\u542f\u52a8\u753b\u9762\u3001\u5168\u5c4f\u6a21\u5f0f\u7b49\u7279\u6027\u3002<\/p>\n

4. \u914d\u7f6eWebView\u7ec4\u4ef6\uff1a\u5728\u539f\u751f\u5e94\u7528\u4e2d\u6dfb\u52a0\u548c\u914d\u7f6eWebView\u7ec4\u4ef6\uff0c\u5c06Web\u5e94\u7528\u5d4c\u5165\u5230\u5e94\u7528\u4e2d\u5e76\u8bbe\u7f6e\u8df3\u8f6c\u3001\u7f29\u653e\u7b49\u884c\u4e3a\u3002<\/p>\n

5. \u6253\u5305\u548c\u53d1\u5e03\uff1a\u4f7f\u7528PhoneGap\u6216\u7c7b\u4f3c\u7684\u5de5\u5177\u5c06Web\u5e94\u7528\u6253\u5305\u4e3a\u539f\u751f\u5e94\u7528\uff0c\u5e76\u5c06\u751f\u6210\u7684\u5b89\u88c5\u5305\u63d0\u4ea4\u5230\u5e94\u7528\u5546\u5e97\u3002<\/p>\n

\u56db\u3001\u7f51\u9875\u6253\u5305APP\u7684\u4f18\u7f3a\u70b9<\/p>\n

\u4f18\u70b9\uff1a<\/p>\n

1. \u8282\u7701\u5f00\u53d1\u6210\u672c\u548c\u65f6\u95f4\uff1a\u53ef\u4ee5\u76f4\u63a5\u5229\u7528\u73b0\u6709\u7684\u7f51\u9875\u8d44\u6e90\u548c\u6280\u672f\uff0c\u51cf\u5c11\u91cd\u590d\u5f00\u53d1\u3002<\/p>\n

2. \u8de8\u5e73\u53f0\u652f\u6301\uff1a\u57fa\u4e8eWeb\u6280\u672f\u7684APP\u53ef\u4ee5\u5728\u591a\u4e2a\u5e73\u53f0\u4e0a\u8fd0\u884c\uff0c\u4f8b\u5982Android\u3001iOS\u3001Windows\u7b49\u3002<\/p>\n

3. \u7b80\u5316\u7ef4\u62a4\uff1a\u5f00\u53d1\u8005\u53ea\u9700\u8981\u7ef4\u62a4\u4e00\u4efdWeb\u5e94\u7528\u4ee3\u7801\uff0c\u800c\u65e0\u9700\u5173\u5fc3\u4e0d\u540c\u5e73\u53f0\u7684\u539f\u751f\u4ee3\u7801\u3002<\/p>\n

\u7f3a\u70b9\uff1a<\/p>\n

1. \u6027\u80fd\uff1a\u7531\u4e8eWebView\u662f\u57fa\u4e8e\u6d4f\u89c8\u5668\u5f15\u64ce\u7684\uff0c\u56e0\u6b64\u7528\u7f51\u9875\u6253\u5305\u7684APP\u5728\u6027\u80fd\u65b9\u9762\u53ef\u80fd\u4e0d\u5982\u7eaf\u539f\u751f\u5e94\u7528\u3002<\/p>\n

2. \u8bbe\u5907\u7279\u6027\u8bbf\u95ee\uff1a\u867d\u7136PhoneGap\u548c\u7c7b\u4f3c\u6846\u67b6\u63d0\u4f9b\u4e86\u8bbf\u95ee\u8bbe\u5907\u7279\u6027\u7684API\uff0c\u4f46\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u53ef\u80fd\u4e0d\u5982\u539f\u751f\u5e94\u7528\u7075\u6d3b\u548c\u7a33\u5b9a\u3002<\/p>\n

3. \u7528\u6237\u4f53\u9a8c\uff1a\u7f51\u9875\u6253\u5305APP\u7684\u7528\u6237\u4f53\u9a8c\u53ef\u80fd\u53d7\u9650\u4e8eWebView\u7684\u529f\u80fd\u548c\u6027\u7f51\u7ad9\u5c01\u88c5\u5c01\u88c5app<\/a>\u80fd\u3002<\/p>\n

\u603b\u7ed3<\/p>\n

\u7f51\u9875\u6253\u5305\u4e3aAPP\u7684\u6280\u672f\u539f\u7406\u4e3b\u8981\u662f\u5c06\u73b0\u6709\u7684\u7f51\u9875\u5e94\u7528\u5d4c\u5165\u5230\u4e00\u4e2a\u79fb\u52a8\u8bbe\u5907\u4e0a\u7684\u539f\u751f\u5e94\u7528\u5bb9\u5668\u4e2d\u3002\u901a\u8fc7\u8fd9\u79cd\u6280\u672f\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5feb\u901f\u5c06Web\u8d44\u6e90\u8f6c\u5316\u4e3a\u79fb\u52a8\u5e94\u7528\u3002\u7136\u800c\uff0c\u8fd9\u79cd\u65b9\u6cd5\u53ef\u80fd\u5728\u6027\u80fd\u548c\u7528\u6237\u4f53\u9a8c\u65b9\u9762\u5b58\u5728\u4e00\u5b9a\u7684\u5c40\u9650\uff0c\u56e0\u6b64\u9700\u8981\u6839\u636e\u9879\u76ee\u9700\u6c42\u6743\u8861\u662f\u5426\u5408\u9002\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u7f51\u9875\u6253\u5305\u4e3aAPP\u6e90\u7801\uff1a\u539f\u7406\u4e0e\u8be6\u7ec6\u4ecb\u7ecd\u968f\u7740\u79fb\u52a8\u8bbe\u5907\u7684\u666e\u53ca\u548c\u79fb\u52a8\u5e94\u7528\u7684\u9700\u6c42\u9010\u6e10\u589e\u52a0\uff0c\u7f51\u9875\u6253\u5305\u4e3aAPP\uff08Application\uff0c\u5e94\u7528\u7a0b\u5e8f\uff09\u7684\u6280\u672f\u4e5f\u8d8a\u6765\u8d8a\u53d7\u6b22\u8fce\u3002\u8fd9\u79cd\u6280\u672f\u4e3b\u8981\u5229\u7528\u73b0\u6709\u7684\u7f51\u9875\u6280\u672f\u548c\u8d44\u6e90\uff0c\u5c06\u5176\u5305<\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[17624,3860,17,391,149],"topic":[],"class_list":["post-24519","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-htmlapk","tag-ios","tag-17","tag-391","tag-149"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/24519","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\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=24519"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/24519\/revisions"}],"predecessor-version":[{"id":24560,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/24519\/revisions\/24560"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=24519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=24519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=24519"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=24519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}