{"id":4614,"date":"2023-05-09T13:13:48","date_gmt":"2023-05-09T05:13:48","guid":{"rendered":"https:\/\/app.applebyme.cn\/cloud\/?p=4614"},"modified":"2023-05-09T13:13:48","modified_gmt":"2023-05-09T05:13:48","slug":"ios-h5%e5%85%8d%e7%ad%be%e5%b0%81%e8%a3%85%e6%8e%a8%e8%8d%90%e4%bd%bf%e7%94%a8%e4%b8%80%e9%97%a8app","status":"publish","type":"post","link":"https:\/\/app.applebyme.cn\/cloud\/pgmianqian\/4614.html","title":{"rendered":"ios h5\u514d\u7b7e\u5c01\u88c5\u63a8\u8350\u4f7f\u7528\u4e00\u95e8APP"},"content":{"rendered":"<p>\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u5b66\u4e60\u5982\u4f55\u4f7f\u7528HTML5\u6280\u672f\u548c\u76f8\u5173\u5de5\u5177\u5c01\u88c5\u4e00\u4e2aiOS\u5e94\u7528\uff0c\u4f7f\u5176\u514d\u4e8e\u5728App St<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.cdn.yimenapp.com\/2023-03\/30\/12\/34791613726.jpg\" \/><\/figure>\n<\/p>\n<p>ore\u53d1\u5e03\u65f6\u7ecf\u5386\u7b7e\u540d\u8fc7\u7a0b\u3002\u4f46\u5728\u9996\u6b21\u53d1\u5e03\u65f6\uff0c\u4ecd\u9700\u7b26\u5408\u82f9\u679c\u7684\u76f8\u5e94\u8981\u6c42\u3002<\/p>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u4e86\u89e3\u4ec0\u4e48\u662fH5\u9879\u76ee\u5c01\u88c5\u3002\u7b80\u5355\u6765\u8bf4\uff0cH5\u9879\u76ee\u5c01\u88c5\u6307\u7684\u662f\u5c06\u4e00\u4e2a\u57fa\u4e8eHTML5\u7684\u7f51\u9875\u5e94\u7528\u5c01\u88c5\u5230\u4e00\u4e2a\u539f\u751fAPP\u5e94\u7528\u4e2d\uff0c\u8fd9\u6837\u7528\u6237\u53ef\u4ee5\u50cf\u4f7f\u7528\u5176\u4ed6\u539f\u751fAPP\u4e00\u6837\u4f7f\u7528\u8fd9\u4e2a\u9879\u76ee\u3002\u4e00\u4e2a\u5178\u578b\u7684H5\u5c01\u88c5\u6280\u672f\u5c31\u662f\u5229\u7528WebView\u7ec4\u4ef6\u6765\u52a0\u8f7dH5\u9875\u9762\u3002<\/p>\n<p>\u5173\u4e8e\u514d\u7b7e\u540d\uff0c\u6b63\u5e38\u60c5\u51b5\u4e0b\u53d1\u5e03\u4e00\u4e2aiOS\u5e94\u7528\u5230App Store\u9700\u8981\u62e5\u6709\u82f9\u679c\u63d0\u4f9b\u7684\u8bc1\u4e66\u548c\u63cf\u8ff0\u6587\u4ef6\uff0cAPP<a href=\"https:\/\/iosmianqian.yimenapp.com\/webclip-856.html\">ipad\u5220\u9664webclip<\/a>\u7b7e\u540d\u662f\u9a8c\u8bc1\u5e94\u7528\u6765\u6e90\u7684\u4e00\u79cd\u624b\u6bb5\u3002\u514d\u7b7e\u540d\u7684\u65b9\u5f0f\u9700\u8981\u901a\u8fc7\u4e00\u4e9b\u6280\u5de7\uff0c\u4f46\u8bf7\u6ce8\u610f\uff0c\u4e3a\u4e86\u786e\u4fdd\u5b89\u5168\u548c\u7b26\u5408\u82f9\u679c\u653f\u7b56\uff0c\u5f3a\u70c8\u4e0d\u5efa\u8bae\u7ed5\u8fc7\u7b7e\u540d\u673a\u5236\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u8ba9\u6211\u4eec\u8be6\u7ec6\u4e86\u89e3H5\u9879\u76ee\u5c01\u88c5\u7684\u539f\u7406\u548c\u8fc7\u7a0b\u3002<\/p>\n<p>1. \u51c6\u5907\u73af\u5883\u548c\u5de5\u5177\uff1a<\/p>\n<p>   &#8211; Xcode: \u4e0b\u8f7d\u5b89\u88c5\u6700\u65b0\u7248Xcode\uff0c\u7528\u4e8e\u7f16\u8bd1\u548c\u6784\u5efaiOS\u5e94\u7528\u3002<\/p>\n<p>   &#8211; Cordova: \u4f7f\u7528\u5305\u7ba1\u7406\u5668\u5982npm\u6216yarn\u5168\u5c40\u5b89\u88c5Apache Cordova\uff0c\u7528\u4e8e\u751f\u6210H5\u9879\u76ee\u7684iOS\u5e94\u7528\u6846\u67b6\u3002<\/p>\n<\/p>\n<p>&#8220;`bash<\/p>\n<p>n<a href=\"https:\/\/iosmianqian.yimenapp.com\/webclip-1209.html\">\u82f9\u679ctf\u514d\u8d39\u7b7e\u540d\u8f6f\u4ef6<\/a>pm install -g cordova<\/p>\n<p>&#8220;`<\/p>\n<p>2. \u5f00\u53d1\u4e00\u4e2a\u7b80\u5355\u7684H5\u9879\u76ee\uff0c\u4f8b\u5982\u4e00\u4e2a\u5e26\u6709\u6587\u5b57\u548c\u6309\u94ae\u7684\u9875\u9762\u3002<\/p>\n<p>3. \u4f7f\u7528Cordova\u751f\u6210\u9879\u76ee\u7ed3\u6784\uff1a<\/p>\n<p>&#8220;`bash<\/p>\n<p>cordova create your-app-name com.example.yourapp YourAppName<\/p>\n<p>cd your-app-name<\/p>\n<p>cordova platform add ios<\/p>\n<p>&#8220;`<\/p>\n<p>\u6b64\u65f6\uff0cCordova\u4f1a\u5728`your-app-name`\u6587\u4ef6\u5939\u5185\u4e3a\u4f60\u521b\u5efa\u597d\u4e00\u4e2a\u539f\u751fiOS\u5de5\u7a0b\uff0c\u5b83\u5df2\u7ecf\u96c6\u6210\u4e86\u4e00\u4e2aWebView\u3002<\/p>\n<p>4. \u5c06\u4f60\u7684H5\u9875\u9762\u66ff\u6362Cordova\u751f\u6210\u7684`www`\u6587\u4ef6\u5939\u91cc\u7684\u5185\u5bb9\uff0c\u7136\u540e\u751f\u6210\u4e00\u4e2a\u9879\u76ee\u6587\u4ef6\u4ee5\u4fbf\u5728Xcode\u4e2d\u6253\u5f00\u3002<\/p>\n<p>&#8220;`bash<\/p>\n<p>cordova prepare ios<\/p>\n<p>&#8220;`<\/p>\n<p>5. \u4f7f\u7528Xcode\u6253\u5f00\u751f\u6210\u7684`.xcodeproj`\u6587\u4ef6\uff0c\u5728Xcode\u4e2d\u8bbe\u7f6e\u597d\u4f60\u7684\u8bbe\u7f6e\u63cf\u8ff0\u6587\u4ef6\u3001\u8bc1\u4e66\u548c\u5176\u4ed6\u4fe1\u606f\uff08\u5982\u679c\u4f60\u662f\u4f01\u4e1a\u5f00\u53d1\u8005\u53ef\u4ee5\u7533\u8bf7\u4e00\u4e2a\u4f01\u4e1a\u8bc1\u4e66\uff0c\u7b7e\u540d\u540e\u53ef\u4ee5\u901a\u8fc7\u5176\u4ed6\u65b9\u5f0f\u5206\u53d1\u5b89\u88c5\uff09\u3002<\/p>\n<p>6. \u70b9\u51fb\u8fd0\u884c\u6309\u94ae\uff0c\u4f60\u7684\u5e94\u7528\u5c06\u88ab\u7f16\u8bd1\u5e76\u8fd0\u884c\u5728\u4f60\u6240\u9009\u62e9\u7684\u6a21\u62df\u5668\u6216\u8fde\u63a5\u7684iPhone\u4e0a\u3002<\/p>\n<p>\u81f3\u6b64\uff0c\u4f60\u5df2\u7ecf\u5b8c\u6210\u4e86\u4e00\u4e2a\u7b80\u5355\u7684H5\u9879\u76ee\u5c01\u88c5\u5230iOS\u7684\u8fc7\u7a0b\u3002\u7528\u6237\u53ef\u4ee5\u76f4\u63a5\u70b9\u51fb\u56fe\u6807\u6253\u5f00\u8fd9\u4e2a\u5e94\u7528\uff0c\u5c31\u50cf\u5176\u4ed6\u539f\u751f\u5e94\u7528\u90a3\u6837\u8fd0\u884c\u5728WebView\u73af\u5883\u4e2d\u3002<\/p>\n<p>\u8bf7\u6ce8\u610f\uff1a\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u662f\u4e3a\u4e86\u8ba9\u4f60\u4e86\u89e3\u4e00\u4e0b\u514d\u7b7e\u5c01\u88c5\u7684\u6982\u5ff5\uff0c\u4f46\u5b9e\u9645\u64cd\u4f5c\u4e2d\uff0c\u8bf7\u59cb\u7ec8\u9075\u5faa\u82f9\u679c\u5b98\u65b9\u653f\u7b56\u548c\u76f8\u5173\u5b89\u5168\u6307\u5357\u3002\u514d\u7b7e\u5e76\u4e0d\u610f\u5473\u7740\u4f60\u7684\u5e94\u7528\u53ef\u4ee5\u7ed5\u8fc7\u5ba1\u67e5\u6216\u7565\u8fc7\u82f9\u679c\u53d1\u5e03\u6d41\u7a0b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u5b66\u4e60\u5982\u4f55\u4f7f\u7528HTML5\u6280\u672f\u548c\u76f8\u5173\u5de5\u5177\u5c01\u88c5\u4e00\u4e2aiOS\u5e94\u7528\uff0c\u4f7f\u5176\u514d\u4e8e\u5728App Store\u53d1\u5e03\u65f6\u7ecf\u5386\u7b7e\u540d\u8fc7\u7a0b\u3002\u4f46\u5728\u9996\u6b21\u53d1\u5e03\u65f6\uff0c\u4ecd\u9700\u7b26\u5408\u82f9\u679c\u7684\u76f8\u5e94\u8981\u6c42\u3002\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u4e86\u89e3\u4ec0\u4e48\u662fH5\u9879\u76ee\u5c01<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[6229,6230,802,379,1220],"class_list":["post-4614","post","type-post","status-publish","format-standard","hentry","category-pgmianqian","tag-ios","tag-wapios","tag-802","tag-379","tag-1220"],"_links":{"self":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/4614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/comments?post=4614"}],"version-history":[{"count":0,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/4614\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/media?parent=4614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/categories?post=4614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/tags?post=4614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}