{"id":2207,"date":"2023-06-28T15:32:34","date_gmt":"2023-06-28T07:32:34","guid":{"rendered":"https:\/\/app.60day.cn\/appday\/?p=2207"},"modified":"2023-06-28T15:32:34","modified_gmt":"2023-06-28T07:32:34","slug":"%e8%87%aa%e5%8a%a8%e5%8c%96%e6%89%93%e5%8c%85ios%e5%ae%9e%e7%8e%b0%e5%8e%9f%e7%90%86%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/app.60day.cn\/appday\/kaifaapp\/2207\/","title":{"rendered":"\u81ea\u52a8\u5316\u6253\u5305ios\u5b9e\u73b0\u539f\u7406\u4ecb\u7ecd"},"content":{"rendered":"<p>\u81ea\u52a8\u5316\u6253\u5305iOS\u5e94\u7528\u7a0b\u5e8f\u662f\u4e00\u79cd\u5728iOS\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u63d0\u9ad8\u751f\u4ea7\u529b\u548c\u6548\u7387\u7684\u65b9\u6cd5\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecdiOS\u81ea\u52a8\u5316\u6253\u5305\u7684\u539f\u7406\u548c\u65b9\u6cd5\uff0c\u5e2e\u52a9\u4f60\u8f7b\u677e\u638c\u63e1\u8fd9\u4e2a\u91cd\u8981\u6280\u80fd\u3002<\/p>\n<p>### \u4ec0\u4e48\u662f\u81ea\u52a8\u5316\u6253\u5305<\/p>\n<p>\u81ea\u52a8\u5316\u6253\u5305\u662f\u4e00\u79cd\u81ea\u52a8\u6784\u5efa\u3001\u7b7e\u540d\u3001\u53d1\u5e03\u548c\u90e8\u7f72\u5e94\u7528\u7a0b\u5e8f\u7684\u65b9\u6cd5\u3002\u5728iOS\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528Xcode\u8fdb\u884c\u7f16\u8bd1\u3001\u7b7e\u540d\u3001\u6253\u5305ipa\u4ee5\u53ca\u4e0a\u4f20\u5230App Store\u6216\u4f01\u4e1a<a href=\"https:\/\/appfengzhuang.yimenapp.com\/app-707.html\">ios\u5c01\u88c5\u5e73\u53f0<\/a>\u5185\u90e8\u5e94\u7528\u5546\u5e97\u7b49\u64cd\u4f5c\uff0c\u8fd9\u4e9b\u8fc7\u7a0b\u90fd\u9700\u8981\u8017\u8d39\u5927\u91cf\u65f6\u95f4\u548c\u7cbe\u529b\u3002\u81ea\u52a8\u5316\u6253\u5305\u5c31\u662f\u5c06\u8fd9\u4e9b\u7e41\u7410\u7684\u5de5\u4f5c\u4ea4\u7ed9\u673a\u5668\u81ea\u52a8\u5b8c\u6210\uff0c\u4f7f\u6211\u4eec\u80fd\u591f\u66f4\u4e13\u6ce8\u4e8e\u5f00\u53d1\u548c\u8c03\u8bd5\u5e94\u7528\u7a0b\u5e8f\u672c\u8eab\u3002<\/p>\n<p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.cdn.yimenapp.com\/2023-04\/07\/10\/00762491691.jpg\" \/><\/figure>\n<\/p>\n<p>### iOS\u81ea\u52a8\u5316\u6253\u5305\u539f\u7406<\/p>\n<p>iOS\u81ea\u52a8\u5316\u6253\u5305\u4e3b\u8981\u662f\u5229\u7528Apple\u63d0\u4f9b\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff08\u5982xcodebuild\u548caltool\uff09\u548c\u5f00\u6e90\u5e93\uff08\u5982fastlane\uff09\u6765\u5b9e\u73b0\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684iOS\u81ea\u52a8\u5316\u6253\u5305\u8fc7\u7a0b\uff1a<\/p>\n<p>1. \u4f7f\u7528xcodebuild\u547d\u4ee4\u6784\u5efa\u5e94\u7528\u7a0b\u5e8f\uff0c\u8fd9\u4e2a\u547d\u4ee4\u53ef\u4ee5\u6267\u884c\u6784\u5efa\u3001\u6e05\u7406\u3001\u5206\u6790\u548c\u6d4b\u8bd5\u7b49Xcode\u5de5\u7a0b\u7684\u64cd\u4f5c\u3002<\/p>\n<p>2. \u4f7f\u7528xcod<a href=\"https:\/\/appfengzhuang.yimenapp.com\/app-772.html\">ios\u7cfb\u7edf<\/a>ebuild\u547d\u4ee4\u5bfc\u51fa\u5e94\u7528\u7a0b\u5e8f\u7684ipa\u6587\u4ef6\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u9700\u8981\u5c06\u5e94\u7528\u7a0b\u5e8f\u7b7e\u540d\uff0c\u7136\u540e\u5c06.app\u6587\u4ef6\u6253\u5305\u6210.ipa\u6587\u4ef6\u3002<\/p>\n<p>3. \u4f7f\u7528altool\u547d\u4ee4\u4e0a\u4f20ipa\u6587\u4ef6\u5230App Store Connect\uff0c\u8fd9\u4e2a\u5de5\u5177\u53ef\u4ee5\u8fdb\u884c\u5e94\u7528\u7a0b\u5e8f\u7684\u9a8c\u8bc1\u548c\u4e0a\u4f20\u3002<\/p>\n<p>\u540c\u65f6\uff0c\u4e3a\u4e86\u4fbf\u4e8e\u7ba1\u7406\u548c\u63a7\u5236\u7248\u672c\uff0c\u901a\u5e38\u4f1a\u5c06\u9879\u76ee\u6258\u7ba1\u5728Git\u4ed3\u5e93\u4e2d\u3002\u7ed3\u5408Git\u7248\u672c\u7ba1\u7406\u548c\u81ea\u52a8\u5316\u6784\u5efa\u5de5\u5177CI (Continuous Integration, \u6301\u7eed\u96c6\u6210)\uff0c\u53ef\u4ee5\u4f7fiOS\u5f00\u53d1\u8fc7\u7a0b\u66f4\u52a0\u987a\u7545\u3002<\/p>\n<p>### iOS\u81ea\u52a8\u5316\u6253\u5305\u8be6\u7ec6\u5b9e\u73b0<\/p>\n<p>\u8fd9\u91cc\u6211\u4eec\u4ecb\u7ecd\u4e00\u4e2a\u5e7f\u6cdb\u4f7f\u7528\u7684\u5f00\u6e90\u81ea\u52a8\u5316\u5de5\u5177 &#8211; Fastlane\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u529f\u80fd\u5f3a\u5927\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0iOS\u81ea\u52a8\u5316\u6253\u5305\u3002<\/p>\n<p>#### \u5b89\u88c5Fastlane<\/p>\n<p>Fastlane\u662f\u4e00\u4e2aRuby\u5e93\uff0c\u6240\u4ee5\u9996\u5148\u9700\u8981\u786e\u4fdd\u5b89\u88c5\u4e86ruby\u73af\u5883\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5fastlane\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>gem install fastlane<\/p>\n<p>&#8220;`<\/p>\n<p>#### \u914d\u7f6eFastlane<\/p>\n<p>\u5728\u4f60\u7684iOS\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u521d\u59cb\u5316fastlane\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>fastlane init<\/p>\n<p>&#8220;`<\/p>\n<p>\u6b64\u547d\u4ee4\u4f1a\u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u751f\u6210\u4e00\u4e2a`fastlane`\u6587\u4ef6\u5939\uff0c\u5305\u62ec\u4e00\u4e2a`Fastfile`\u6587\u4ef6\u3002\u5728`Fastfile`\u6587\u4ef6\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9a\u4e49\u81ea\u52a8\u5316\u4efb\u52a1\uff08\u67e5\u770bFastlane\u5b98\u65b9\u6587\u6863\u4e86\u89e3\u8be6\u7ec6\u4efb\u52a1\u914d\u7f6e\u9009\u9879\uff09\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684iOS\u81ea\u52a8\u5316\u6253\u5305\u4efb\u52a1\uff1a<\/p>\n<p>&#8220;`ruby<\/p>\n<p>platform :ios do<\/p>\n<p>  lane :build_and_submit do<\/p>\n<p>    # \u6784\u5efa<\/p>\n<p>    build_app(scheme: &#8220;MyApp&#8221;, configuration: &#8220;Release&#8221;)<\/p>\n<p>    # \u5bfc\u51fa.ipa\u6587\u4ef6<\/p>\n<p>    archive_path = &#8220;path\/to\/ipa\/MyApp.ipa&#8221;<\/p>\n<p>    export_options = {<\/p>\n<p>      method: &#8220;app-store&#8221;, #\u6216\u8005 &#8220;ad-hoc&#8221; \u6216 &#8220;enterprise&#8221;<\/p>\n<p>    }<\/p>\n<p>    export_xcarchive(archive_path: archive_path, export_options: export_options)<\/p>\n<p>    # \u4e0a\u4f20\u5230App Store Connect<\/p>\n<p>    upload_to_app_store(skip_metadata: true, skip_screenshots: true)<\/p>\n<p>  end<\/p>\n<p>end<\/p>\n<p>&#8220;`<\/p>\n<p>#### \u6267\u884c\u81ea\u52a8\u5316\u6253\u5305\u4efb\u52a1<\/p>\n<p>\u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5f00\u542f\u81ea\u52a8\u5316\u6253\u5305\u6d41\u7a0b\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>fastlane build_and_submit<\/p>\n<p>&#8220;`<\/p>\n<p>Fastlane\u4f1a\u6309\u7167`Fastfile`\u4e2d\u7684\u914d\u7f6e\uff0c\u81ea\u52a8\u5b8c\u6210\u6784\u5efa\u3001\u5bfc\u51faipa\u6587\u4ef6\u548c\u4e0a\u4f20\u5230App Store Connect\u7684\u8fc7\u7a0b\u3002<\/p>\n<p>### \u7ed3\u8bba<\/p>\n<p>\u81ea\u52a8\u5316\u6253\u5305\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8iOS\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u7684\u6548\u7387\uff0c\u4e3a\u5f00\u53d1\u8005\u8282\u7701\u5927\u91cf\u65f6\u95f4\u3002\u901a\u8fc7\u539f\u751f\u547d\u4ee4\u884c\u5de5\u5177\u548c\u5f00\u6e90\u5e93\u5982Fastlane\u7b49\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0iOS\u5e94\u7528\u7a0b\u5e8f\u7684\u81ea\u52a8\u5316\u6784\u5efa\u3001\u90e8\u7f72\u548c\u53d1\u5e03\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u5bf9\u4e8e\u4e86\u89e3\u548c\u5165\u95e8iOS\u81ea\u52a8\u5316\u6253\u5305\u63d0\u4f9b\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u52a8\u5316\u6253\u5305iOS\u5e94\u7528\u7a0b\u5e8f\u662f\u4e00\u79cd\u5728iOS\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u63d0\u9ad8\u751f\u4ea7\u529b\u548c\u6548\u7387\u7684\u65b9\u6cd5\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecdiOS\u81ea\u52a8\u5316\u6253\u5305\u7684\u539f\u7406\u548c\u65b9\u6cd5\uff0c\u5e2e\u52a9\u4f60\u8f7b\u677e\u638c\u63e1\u8fd9\u4e2a\u91cd\u8981\u6280\u80fd\u3002### \u4ec0\u4e48\u662f\u81ea\u52a8\u5316\u6253\u5305\u81ea\u52a8\u5316\u6253\u5305\u662f\u4e00\u79cd\u81ea<\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[4683,166,84,132,4684],"topic":[],"class_list":["post-2207","post","type-post","status-publish","format-standard","hentry","category-kaifaapp","tag-h5appapp","tag-166","tag-84","tag-132","tag-app"],"_links":{"self":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/2207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/comments?post=2207"}],"version-history":[{"count":0,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/2207\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/media?parent=2207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/categories?post=2207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/tags?post=2207"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/topic?post=2207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}