{"id":7282,"date":"2023-10-20T15:32:05","date_gmt":"2023-10-20T07:32:05","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=7282"},"modified":"2023-10-20T15:32:05","modified_gmt":"2023-10-20T07:32:05","slug":"%e5%8e%9f%e7%94%9f%e6%89%93%e5%8c%85%e7%bd%91%e7%ab%99%e5%88%b0app%e6%80%8e%e4%b9%88%e5%ae%9e%e7%8e%b0%e7%9a%84","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/7282\/","title":{"rendered":"\u539f\u751f\u6253\u5305\u7f51\u7ad9\u5230app\u600e\u4e48\u5b9e\u73b0\u7684?"},"content":{"rendered":"

\u539f\u751f\u6253\u5305\u7f51\u7ad9\u5230App\uff08\u539f\u7406\u4e0e\u8be6\u7ec6\u4ecb\u7ecd\uff09<\/p>\n

\u968f\u7740\u79fb\u52a8\u4e92\u8054\u7f51\u7684\u8fc5\u901f\u53d1\u5c55\uff0c\u8d8a\u6765\u8d8a\u591a\u7684\u4f01\u4e1a\u548c\u4e2a\u4eba\u5f00\u59cb\u8003\u8651\u5c06\u81ea\u5df1\u7684\u7f51\u7ad9\u8f6c\u5316\u4e3a\u79fb\u52a8\u5e94\u7528\uff0c\u4ee5\u5b9e\u73b0\u66f4\u597d\u5730\u7528\u6237\u4f53\u9a8c\u548c\u521b\u6536\u3002\u90a3\u4e48\uff0c\u5982\u4f55\u5c06\u7f51\u7ad9\u539f\u751f\u6253\u5305\u6210App\u5462\uff1f\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u8bb2\u89e3\u539f\u751f\u6253\u5305\u7f51\u7ad9\u5230App\u7684\u539f\u7406\u548c\u8be6\u7ec6\u64cd\u4f5c\u3002<\/p>\n

1. \u539f\u7406<\/p>\n

\u539f\u751f\u6253\u5305\u7f51\u7ad9\u5230App\u7684\u6280\u672f\u539f\u7406\u5176\u5b9e\u76f8\u5bf9\u7b80\u5355\uff1a\u901a\u8fc7\u4e00\u4e2a\u672c\u5730\u7684\u539f\u751f\u5bb9\u5668\u53bb\u52a0\u8f7d\u7f51\u7ad9\u5185\u5bb9\uff0c\u8fd9\u4e2a\u5bb9\u5668\u4e3a\u7f51\u7ad9\u63d0\u4f9b\u4e86\u4e00\u5957App\u7684\u5916\u58f3\uff0c\u80fd\u591f\u5b9e\u73b0App\u7684\u57fa\u672c\u529f\u80fd\u3002<\/p>\n

\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0c\u4f60\u9700\u8981\u501f\u52a9\u4e00\u4e9b\u4e13\u95e8\u7684\u6846\u67b6\u548c\u5de5\u5177\uff08\u4f8b\u5982\uff1aApache Cordova\u3001PhoneGap\u3001React Native\u7b49\uff09\u6765\u5b9e\u73b0\u539f\u751f\u5bb9\u5668\u7684\u529f\u80fd\uff08\u5982\uff1a\u4e2a\u6027\u5316UI\u3001\u672c\u5730\u5b58\u50a8\u3001\u4e8b\u4ef6\u76d1\u542c\u7b49\uff09\u3002\u8fd9\u4e9b\u6846\u67b6\u548c\u5de5\u5177\u5c06\u7f51\u7ad9\u7684HTML\u3001CSS\u548cJavaScript\u4ee3\u7801\u4e0e\u76ee\u6807\u5e73\u53f0\u7684\u539f\u751fAPI\uff08\u5982\uff1aiOS\u7684Swift\u3001Android\u7684Java\u7b49\uff09\u8fdb\u884c\u4e86\u6574\u5408\uff0c\u8ba9\u4f60\u53ef\u4ee5\u7528\u719f\u6089\u7684\u524d\u7aef\u6280\u672f\u6808\u5f00\u53d1\u79fb\u52a8\u5e94\u7528\uff0c\u540c\u65f6\u83b7\u53d6\u5230\u66f4\u597d\u7684\u8de8\u5e73\u53f0\u517c\u5bb9\u6027\u3002<\/p>\n

2. \u7f51\u7ad9\u7c7b\u578b<\/p>\n

\u5728\u5c06\u7f51\u7ad9\u6253\u5305\u6210App\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5206\u6790\u7f51\u7ad9\u6240\u5c5e\u7684\u7c7b\u578b\u3002\u4e00\u822c\u800c\u8a00\uff0c\u7f51\u7ad9\u5206\u4e3a\u9759\u6001\u7f51\u7ad9\u548c\u52a8\u6001\u7f51\u7ad9\u4e24\u7c7b\u3002<\/p>\n

\u9759\u6001\u7f51\u7ad9\u4e3b\u8981\u7531HTML\u3001CSS\u548cJavaScript\u8fd9\u4e09\u79cd\u8bed\u8a00\u7f16\u5199\uff0c\u901a\u5e38\u4f1a\u6709\u9650\u7684\u529f\u80fd\u548c\u4ea4\u4e92\u3002\u539f\u751f\u6253\u5305\u9759\u6001\u7f51\u7ad9\u5230App\u7684\u8fc7\u7a0b\u76f8\u5bf9\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5728\u539f\u751f\u5bb9\u5668\u4e2d\u52a0\u8f7d\u9759\u6001\u8d44\u6e90\u5373\u53ef\u3002\u4f46\u8fd9\u79cd\u65b9\u5f0f\u663e\u7136\u65e0\u6cd5\u6ee1\u8db3\u4e00\u4e9b\u590d\u6742\u3001\u9ad8\u5ea6\u4e92\u52a8\u7684\u5e94\u7528\u9700\u6c42\u3002<\/p>\n

\u52a8\u6001\u7f51\u7ad9\u5219\u6d89\u53ca\u540e\u7aef\u8ba1\u7b97\uff0c\u4f8b\u5982\u6570\u636e\u5e93\u64cd\u4f5c\u3001\u6570\u636e\u6e32\u67d3\u7b49\uff0c\u66f4\u9002\u5408\u8f83\u4e3a\u590d\u6742\u7684\u5e94\u7528\u573a\u666f\u3002\u539f\u751f\u6253\u5305\u52a8\u6001\u7f51\u7ad9\u5230App\u7684\u8fc7\u7a0b\u4f1a\u76f8\u5bf9\u590d\u6742\u4e00\u4e9b\uff0c\u56e0\u4e3a\u9700\u8981\u5904\u7406\u540e\u7aef\u670d\u52a1\u5668\u4e0e\u539f\u751f\u5bb9\u5668\u4e4b\u95f4\u7684\u901a\u4fe1\uff0c\u4ee5\u53ca\u52a8\u6001\u8d44\u6e90\u7684\u52a0\u8f7d\u548c\u6e32\u67d3\u3002<\/p>\n

3. \u8be6\u7ec6\u6b65\u9aa4<\/p>\n

\u4e0b\u9762\u5c06\u4ecb\u7ecd\u9759\u6001\u7f51\u7ad9\u6253\u5305\u6210App\u7684\u793a\u4f8b\u6b65\u9aa4\uff0c\u64cd\u4f5c\u8fc7\u7a0b\u5982\u4e0b\uff1a<\/p>\n

Step 1\uff1a\u9009\u62e9\u5408\u9002\u7684\u6846\u67b6<\/p>\n

\u6839\u636e\u4f60\u7684\u9700\u6c42\u548c\u6280\u672f\u80cc\u666f\uff0c\u9009\u62e9\u4e00\u4e2a\u5408\u9002\u7684\u539f\u751f\u6253\u5305\u6846\u67b6\uff0c\u4f8b\u5982\uff1aApache Cordova\u3001PhoneGap\u3001React Native\u7b49\u3002\u8fd9\u4e00\u6b65\u975e\u5e38\u91cd\u8981\uff0c\u56e0\u4e3a\u4e0d\u540c\u7684\u6846\u67b6\u53ef\u80fd\u4f1a\u5f71\u54cd\u5230\u5f00\u53d1\u6548\u7387\u3001\u6027\u80fd\u548c\u6210\u672c\u7b49\u3002<\/p>\n

Step 2\uff1a\u521b\u5efaApp\u5de5\u7a0b<\/p>\n

\u4f7f\u7528\u6846\u67b6\u63d0\u4f9b\u7684CLI\u5de5\u5177\uff0c\u6839\u636e\u6307\u4ee4\u521b\u5efa\u4e00\u4e2a\u65b0\u7684App\u5de5\u7a0b\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8eCordova\u6846\u67b6\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5de5\u7a0b\uff1a<\/p>\n

“`<\/p>\n

cordova create MyApp co\u7f51\u9875\u5c01\u5305\u6210app<\/a>m.example.myapp <\/p>\n

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

MyApp<\/p>\n

“`<\/p>\n

Step 3\uff1a\u6dfb\u52a0\u76ee\u6807\u5e73\u53f0<\/p>\n

\u5728\u521b\u5efa\u5de5\u7a0b\u540e\uff0c\u6dfb\u52a0\u9700\u8981\u6253\u5305\u7684\u76ee\u6807\u5e73\u53f0\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u60f3\u628a\u7f51\u7ad9\u6253\u5305\u6210iOS\u548cAndroid\u4e24\u79cd\u5e73\u53f0\u7684App\uff0c\u90a3\u4e48\u53ef\u4ee5\u8fd0\u884c\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n

“`<\/p>\n

cordova platform add ios<\/p>\n

cordova platform add android<\/p>\n

\u5c01\u88c5\u6210app<\/a>`<\/p>\n

Step 4\uff1a\u96c6\u6210\u7f51\u7ad9\u5185\u5bb9<\/p>\n

\u5c06\u4f60\u7684\u7f51\u7ad9<\/p>\n","protected":false},"excerpt":{"rendered":"

\u539f\u751f\u6253\u5305\u7f51\u7ad9\u5230App\uff08\u539f\u7406\u4e0e\u8be6\u7ec6\u4ecb\u7ecd\uff09\u968f\u7740\u79fb\u52a8\u4e92\u8054\u7f51\u7684\u8fc5\u901f\u53d1\u5c55\uff0c\u8d8a\u6765\u8d8a\u591a\u7684\u4f01\u4e1a\u548c\u4e2a\u4eba\u5f00\u59cb\u8003\u8651\u5c06\u81ea\u5df1\u7684\u7f51\u7ad9\u8f6c\u5316\u4e3a\u79fb\u52a8\u5e94\u7528\uff0c\u4ee5\u5b9e\u73b0\u66f4\u597d\u5730\u7528\u6237\u4f53\u9a8c\u548c\u521b\u6536\u3002\u90a3\u4e48\uff0c\u5982\u4f55\u5c06\u7f51\u7ad9\u539f\u751f\u6253\u5305\u6210App\u5462\uff1f\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec<\/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":[12978,6399,384,247,6092],"topic":[],"class_list":["post-7282","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-php","tag-6399","tag-384","tag-247","tag-6092"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/7282","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=7282"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/7282\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=7282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=7282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=7282"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=7282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}