{"id":5345,"date":"2023-09-21T12:33:38","date_gmt":"2023-09-21T04:33:38","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=5345"},"modified":"2023-09-21T12:33:38","modified_gmt":"2023-09-21T04:33:38","slug":"ionic-%e6%89%93%e5%8c%85-ios%e6%80%8e%e4%b9%88%e5%81%9a%e7%9a%84%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/5345\/","title":{"rendered":"ionic \u6253\u5305 ios\u600e\u4e48\u505a\u7684\uff1f"},"content":{"rendered":"

Ionic\u662f\u4e00\u4e2a\u7528\u4e8e\u5f00\u53d1\u8de8\u5e73\u53f0\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u7684\u5f00\u6e90\u6846\u67b6\u3002\u5b83\u4f7f\u7528\u57fa\u4e8eAngular\u7684Web\u6280\u672f\uff08HTML\u3001CSS\u548cJah5\u6253\u5305app ios<\/a>vaScript\uff09\u6765\u6784\u5efa\u539f\u751f\u79fb\u52a8\u5e94\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u53d1\u5e03\u5230iOS\u3001Android\u548c\u5176\u4ed6\u5e73\u53f0\u4e0a\u3002\u5728\u672c\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Ionic\u6846\u67b6\u6253\u5305iOS\u5e94\u7528\u3002<\/p>\n

\u5728\u4f7f\u7528Ionic\u6253\u5305iOS\u5e94\u7528\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5b8c\u6210\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n

1. \u786e\u8ba4\u5f00\u53d1\u73af\u5883\uff1a\u9996\u5148\uff0c\u4f60\u9700\u8981\u786e\u4fdd\u4f60\u7684\u7535\u8111\u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86Node.js\u3001npm\u3001Cordova\u548cIonic\u3002\u4f60\u53ef\u4ee5\u5728\u5b98\u65b9\u7f51\u7ad9\u4e0a\u627e\u5230\u8fd9\u4e9b\u5de5\u5177\u7684\u5b89\u88c5\u65b9\u6cd5\u548c\u6700\u65b0\u7248\u672c\u3002<\/p>\n

2. \u521b\u5efaIonic\u9879\u76ee\uff1a\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Ionic\u9879\u76ee\uff1a<\/p>\n

“`bash<\/p>\n

ionic start myApp blank<\/p>\n

“`<\/p>\n

\u8fd9\u4f1a\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a”myApp”\u7684\u65b0\u9879\u76ee\uff0c\u5e76\u4e14\u4f7f\u7528”blank”\u6a21\u677f\u3002<\/p>\n

3. \u6dfb\u52a0iOS\u5e73\u53f0\uff1a\u8fdb\u5165\u4f60\u7684\u9879\u76ee\u76ee\u5f55\uff0c\u5e76\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u6dfb\u52a0iOS\u5e73\u53f0\uff1a<\/p>\n

“`bash<\/p>\n

cd myApp<\/p>\n

ionic platform<\/p>\n

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

add ios<\/p>\n

“`<\/p>\n

\u8fd9\u4f1a\u5728\u4f60\u7684\u9879\u76ee\u4e2d\u6dfb\u52a0iOS\u5e73\u53f0\uff0c\u5e76\u4e14Ionic\u4f1a\u81ea\u52a8\u4e3a\u4f60\u751f\u6210\u4e00\u4e9b\u5fc5\u8981\u7684\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n

4. \u6784\u5efa\u5e94\u7528\uff1a\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u6784\u5efa\u4f60\u7684\u5e94\u7528\uff1a<\/p>\n

“`bash<\/p>\n

ionic build ios<\/p>\n

“`<\/p>\n

\u8fd9\u4f1a\u751f\u6210\u4e00\u4e2a\u5f00\u53d1\u7248\u672c\u7684iOS\u5e94\u7528\uff0c\u5e76\u4e14\u5c06\u5b83\u4fdd\u5b58\u5728\u9879\u76ee\u7684”platforms\/ios\/build\/emulator”\u76ee\u5f55\u4e2d\u3002<\/p>\n

5. \u8fd0\u884c\u5e94\u7528\uff1a\u5982\u679c\u4f60\u60f3\u5728\u6a21\u62df\u5668\u4e2d\u8fd0\u884c\u4f60\u7684\u5e94\u7528\uff0c\u53ef\u4ee5\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

“`bash<\/p>\n

ionic emulate ios<\/p>\n

“`<\/p>\n

\u8fd9\u4f1a\u5728iOS\u6a21\u62df\u5668\u4e2d\u542f\u52a8\u4f60\u7684\u5e94\u7528\u3002<\/p>\n

6. \u6253\u5305\u5e94\u7528\uff1a\u6700\u540e\u4e00\u6b65\u662f\u6253\u5305\u4f60\u7684\u5e94\u7528\u3002\u7531\u4e8eiOS\u5e94\u7528\u9700\u8981\u4f7f\u7528Xcode\u6765\u8fdb\u884c\u6253\u5305\uff0c\u6240\u4ee5\u4f60\u9700\u8981\u786e\u4fdd\u4f60\u7684\u7535\u8111\u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86Xcode\u3002\u7136\u540e\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u6253\u5f00Xcode\u9879\u76ee\uff1a<\/p>\n

“`bash<\/p>\n

open platforms\/ios\/YourApp.xcodeproj<\/p>\n

“`<\/p>\n

\u5728Xcode\u4e2d\uff0c\u9009\u62e9\u4f60\u7684\u9879\u76ee\uff0c\u5e76\u9009\u62e9\u6b63\u786e\u7684iOS\u8bbe\u5907\u4f5c\u4e3a\u76ee\u6807\u3002\u7136\u540e\uff0c\u70b9\u51fb”Product”->”Archive”\u6765\u751f\u6210\u5e94\u7528\u7684\u5f52\u6863\u6587\u4ef6\u3002<\/p>\n

\u8fd9\u53ea\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4ecb\u7ecd\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u4f60\u7684\u9700\u6c42\u8fdb\u884c\u66f4\u591a\u7684\u914d\u7f6e\u548c\u5b9a\u5236\u3002\u4f8b\u5982\uff0c\u4f60\u53ef\u4ee5\u5728Xcode\u4e2d\u8bbe\u7f6e\u5e94\u7528\u7684\u56fe\u6807\u3001\u542f\u52a8\u753b\u9762\u7b49\u7b49\u3002\u6b64\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u4f7f\u7528Ionic\u63d0\u4f9b\u7684\u547d\u4ee4\u884c\u5de5\u5177\u6765\u81ea\u52a8\u5316\u4e00\u4e9b\u4efb\u52a1\uff0c\u4f8b\u5982\u751f\u6210\u7b7e\u540d\u8bc1\u4e66\u3001\u6253\u5305\u53d1\u5e03\u7b49\u3002<\/p>\n

\u603b\u7ed3\u8d77\u6765\uff0c\u4f7f\u7528Ioniios\u600e\u6837\u6253\u5305\u901a\u8baf\u5f55<\/a>c\u6846\u67b6\u6253\u5305iOS\u5e94\u7528\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u5feb\u901f\u6784\u5efa\u539f\u751f\u79fb\u52a8\u5e94\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u8f7b\u677e\u5730\u53d1\u5e03\u5230iOS\u5e73\u53f0\u3002\u65e0\u8bba\u4f60\u662f\u521d\u5b66\u8005\u8fd8\u662f\u6709\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\uff0c\u4f7f\u7528Ionic\u6846\u67b6\u8fdb\u884ciOS\u5f00\u53d1\u90fd\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002\u5e0c\u671b\u672c\u7bc7\u6587\u7ae0\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

Ionic\u662f\u4e00\u4e2a\u7528\u4e8e\u5f00\u53d1\u8de8\u5e73\u53f0\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u7684\u5f00\u6e90\u6846\u67b6\u3002\u5b83\u4f7f\u7528\u57fa\u4e8eAngular\u7684Web\u6280\u672f\uff08HTML\u3001CSS\u548cJavaScript\uff09\u6765\u6784\u5efa\u539f\u751f\u79fb\u52a8\u5e94\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u53d1\u5e03\u5230iOS\u3001Android\u548c\u5176\u4ed6\u5e73\u53f0<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[10042,10041,27,10043,23],"topic":[],"class_list":["post-5345","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-appcanios","tag-ios","tag-27","tag-10043","tag-23"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/5345","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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=5345"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/5345\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=5345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=5345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=5345"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=5345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}