{"id":24198,"date":"2024-04-25T11:57:30","date_gmt":"2024-04-25T03:57:30","guid":{"rendered":"https:\/\/www.zhidianwl.net\/zhidianwl\/2024\/04\/25\/wordpress-%e6%89%93%e5%8c%85ios%e5%ba%94%e7%94%a8%e6%8e%a8%e8%8d%90%e4%b8%80%e9%97%a8\/"},"modified":"2024-04-25T11:57:30","modified_gmt":"2024-04-25T03:57:30","slug":"wordpress-%e6%89%93%e5%8c%85ios%e5%ba%94%e7%94%a8%e6%8e%a8%e8%8d%90%e4%b8%80%e9%97%a8","status":"publish","type":"post","link":"https:\/\/www.zhidianwl.net\/zhidianwl\/2024\/04\/25\/wordpress-%e6%89%93%e5%8c%85ios%e5%ba%94%e7%94%a8%e6%8e%a8%e8%8d%90%e4%b8%80%e9%97%a8\/","title":{"rendered":"wordpress \u6253\u5305ios\u5e94\u7528\u63a8\u8350\u4e00\u95e8"},"content":{"rendered":"
WordPress\u662f\u4e00\u6b3e\u975e\u5e38\u6d41\u884c\u7684\u5f00\u6e90\u535a\u5ba2\u7cfb\u7edf\uff0c\u5b83\u63d0\u4f9b\u4e86\u975e\u5e38\u7075\u6d3b\u7684\u63d2\u4ef6\u673a\u5236\uff0c\u53ef\u4ee5\u8ba9\u7528\u6237\u901a\u8fc7\u5b89\u88c5\u5404\u79cd\u63d2\u4ef6\u6765\u6269\u5c55\u5176\u529f\u80fd\u3002\u5728\u79fb\u52a8\u4e92\u8054\u7f51\u65f6\u4ee3\uff0c\u8bb8\u591a\u7528\u6237\u5e0c\u671b\u80fd\u591f\u5c06WordPress\u7f51\u7ad9\u6253\u5305\u6210\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\uff0c\u4ee5\u4fbf\u66f4\u65b9\u4fbf\u5730\u8bbf\u95ee\u548c\u7ba1\u7406\u3002<\/p>\n
iOS\u662f\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u7684\u91cd\u8981\u5e73\u53f0\u4e4b\u4e00\uff0c\u56e0\u6b64\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5c06WordPress\u7f51\u7ad9\u6253\u5305\u6210iOS\u5e94\u7528\u7a0b\u5e8f\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u672c\u6587\u4ec5\u4ecb\u7ecd\u539f\u7406\u548c\u601d\u8def\uff0c\u5177\u4f53\u5b9e\u73b0\u8fc7\u7a0b\u53ef\u80fd\u56e0\u4e3a\u6280\u672f\u548c\u5de5\u5177\u7684\u66f4\u65b0\u800c\u6709\u6240\u4e0d\u540c\u3002<\/p>\n
\u4e00\u3001\u539f\u7406\u4ecb\u7ecd<\/p>\n
\u5c06WordPress\u7f51\u7ad9\u6253\u5305\u6210iOS\u5e94\u7528\u7a0b\u5e8f\u7684\u57fa\u672c\u601d\u8def\u662f\uff1a\u5c06WordPress\u7f51\u7ad9\u5c01\u88c5\u5728\u4e00\u4e2aWebView\u4e2d\uff0c\u7136\u540e\u5c06WebView\u5d4c\u5165\u5230iOS\u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002\u5f53\u7528\u6237\u6253\u5f00\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0cWebView\u4f1a\u52a0\u8f7dWordPress\u7f51\u7ad9\uff0c\u5e76\u5728\u5e94\u7528\u7a0b\u5e8f\u5185\u663e\u793a\u3002\u8fd9\u79cd\u65b9\u6cd5\u7684\u597d\u5904\u662f\uff0c\u53ef\u4ee5\u901a\u8fc7WebView\u6765\u5b9e\u73b0WordPress\u7f51\u7ad9\u7684\u5927\u90e8\u5206\u529f\u80fd\uff0c\u800c\u65e0\u9700\u989d\u5916\u5f00\u53d1iOS\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n
\u4e8c\u3001\u5b9e\u73b0\u8fc7\u7a0b<\/p>\n
\u5b9e\u73b0\u5c06WordPress\u7f51\u7ad9\u6253\u5305\u6210iOS\u5e94\u7528\u7a0b\u5e8f\u7684\u8fc7\u7a0b\uff0c\u5927\u81f4\u53ef\u4ee5\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n
1.\u51c6\u5907\u5de5\u4f5c<\/p>\n
\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u9700\u8981\u51c6\u5907\u597d\u4ee5\u4e0b\u5de5\u5177\uff1a<\/p>\n
– Xcode\uff1a\u7528\u4e8e\u5f00\u53d1iOS\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n
– PhoneGap\uff1a\u4e00\u4e2a\u5f00\u6e90\u7684\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u6846\u67b6\uff0c\u53ef\u4ee5\u7528\u4e8e\u5c06Web\u5e94\u7528\u7a0b\u5e8f\u8f6c\u6362\u4e3aiOS\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n
– WordPress\u63d2\u4ef6\uff1a\u53ef\u4ee5\u7528\u4e8e\u4f18\u5316WordPress\u7f51\u7ad9\u5728\u79fb\u52a8\u8bbe\u5907\u4e0a\u7684\u663e\u793a\u6548\u679c\uff0c\u4f8b\u5982WPtouch\u3002<\/p>\n
2.\u521b\u5efa\u9879\u76ee<\/p>\n
\u4f7f\u7528Xcode\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u9879\u76ee\uff0c\u9009\u62e9Single View Application\u6a21\u677f\u3002\u5728\u9879\u76ee\u8bbe\u7f6e\u4e2d\uff0c\u9009\u62e9Swift\u4f5c\u4e3a\u5f00\u53d1\u8bed\u8a00\uff0c\u7136\u540e\u5c06Deployment Info\u4e2d\u7684Devices\u8bbe\u7f6e\u4e3aiPhone\u3002<\/p>\n
3.\u5b89\u88c5PhoneGap<\/p>\n
\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5b89\u88c5PhoneGap\uff1a<\/p>\n
npm install -g phonegap<\/p>\n
4.\u521b\u5efaPhoneGap\u9879\u76ee<\/p>\n
\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684PhoneGap\u9879\u76ee\uff1a<\/p>\n
phonegap create myApp<\/p>\n
\u5176\u4e2d\uff0cmyApp\u662f\u9879\u76ee\u540d\u79f0\u3002<\/p>\n
5.\u6dfb\u52a0iOS\u5e73\u53f0<\/p>\n
\u5728\u7ec8\u7aef\u4e2d\u8fdb\u5165myApp\u76ee\u5f55\uff0c\u7136\u540e\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff0c\u6dfb\u52a0iOS\u5e73\u53f0\uff1a<\/p>\n
phonegap platform add ios<\/p>\n
6.\u5c06WordPress\u7f51\u7ad9\u5d4c\u5165\u5230\u5e94\u7528\u7a0b\u5e8f\u4e2d<\/p>\n
\u5c06WordPress\u7f51\u7ad9\u7684URL\u6dfb\u52a0\u5230\u5e94\u7528\u7a0b\u5e8f\u7684Info.plist\u6587\u4ef6\u4e2d\uff0c\u4f8b\u5982\uff1a<\/p>\n
“`<\/p>\n
NSAppTransportSecurity<\/p>\n
\n
NSExceptionDomains<\/p>\n
\n
example.com<\/p>\n
\n
NSExceptionAllowsInsecureHTTPLoads<\/p>\n<\/p>\n<\/p>\n
“`<\/p>\n
7.\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f<\/p>\n
\u5728Xcode\u4e2d\u8fd0\u884c\u5e94\u7528<\/p>\n
\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u770b\u5230WordPress\u7f51\u7ad9\u5df2\u7ecf\u5d4c\u5165\u5230\u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002<\/p>\n \u4e09\u3001\u603b\u7ed3<\/p>\n \u5c06WordPress\u7f51\u7ad9\u6253\u5305\u6210iOS\u5e94\u7528\u7a0b\u5e8f\u7684\u65b9\u6cd5\u6bd4\u8f83\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5c06WordPress\u7f51\u7ad9\u5c01\u88c5\u5236\u4f5cweb\u5e94\u7528<\/a>\u5728\u4e00\u4e2aWebView\u4e2d\uff0c\u7136\u540e\u5c06\u5feb\u901f\u5f00\u53d1android app\u53d1\u5e03\u5230\u82f9\u679c\u624b\u673a<\/a>WebView\u5d4c\u5165\u5230iOS\u5e94\u7528\u7a0b\u5e8f\u4e2d\u5373\u53ef\u3002\u8fd9\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5927\u5927\u7b80\u5316\u5e94\u7528\u7a0b\u5e8f\u7684\u5f00\u53d1\u8fc7\u7a0b\uff0c\u540c\u65f6\u4e5f\u53ef\u4ee5\u8ba9\u7528\u6237\u66f4\u65b9\u4fbf\u5730\u8bbf\u95ee\u548c\u7ba1\u7406WordPress\u7f51\u7ad9\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5177\u4f53\u5b9e\u73b0\u8fc7\u7a0b\u53ef\u80fd\u56e0\u4e3a\u6280\u672f\u548c\u5de5\u5177\u7684\u66f4\u65b0\u800c\u6709\u6240\u4e0d\u540c\uff0c\u9700\u8981\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u8c03\u6574\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" WordPress\u662f\u4e00\u6b3e\u975e\u5e38\u6d41\u884c\u7684\u5f00\u6e90\u535a\u5ba2\u7cfb\u7edf\uff0c\u5b83\u63d0\u4f9b\u4e86\u975e\u5e38\u7075\u6d3b\u7684\u63d2\u4ef6\u673a\u5236\uff0c\u53ef\u4ee5\u8ba9\u7528\u6237\u901a\u8fc7\u5b89\u88c5\u5404\u79cd\u63d2\u4ef6\u6765\u6269\u5c55\u5176\u529f\u80fd\u3002\u5728\u79fb\u52a8\u4e92\u8054\u7f51\u65f6\u4ee3\uff0c\u8bb8\u591a\u7528\u6237\u5e0c\u671b\u80fd\u591f\u5c06WordPress\u7f51\u7ad9\u6253\u5305\u6210\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\uff0c\u4ee5\u4fbf<\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[18518,8351,116,194,588],"topic":[],"class_list":["post-24198","post","type-post","status-publish","format-standard","hentry","category-kaifaapp","tag-apk","tag-ios-uialertviewcontroller","tag-116","tag-194","tag-588"],"_links":{"self":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/24198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/comments?post=24198"}],"version-history":[{"count":0,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/24198\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/media?parent=24198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/categories?post=24198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/tags?post=24198"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/topic?post=24198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<\/figure>\n<\/p>\n