{"id":1489,"date":"2023-08-01T16:45:25","date_gmt":"2023-08-01T08:45:25","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=1489"},"modified":"2023-08-01T16:45:25","modified_gmt":"2023-08-01T08:45:25","slug":"ios-%e8%87%aa%e5%8a%a8%e6%89%93%e5%8c%85ipa%e6%b5%81%e7%a8%8b%e6%ad%a5%e9%aa%a4%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/1489\/","title":{"rendered":"ios \u81ea\u52a8\u6253\u5305ipa\u6d41\u7a0b\u6b65\u9aa4\u4ecb\u7ecd"},"content":{"rendered":"

iOS\u81ea\u52a8\u6253\u5305IPA\u662f\u4e00\u79cd\u65b9\u4fbf\u5feb\u6377\u7684\u65b9\u5f0f\uff0c\u80fd\u591f\u5e2e\u52a9\u5f00\u53d1\u8005\u81ea\u52a8\u5b8c\u6210\u6784\u5efa\u3001\u7b7e\u540d\u548c\u6253\u5305\u7b49\u7e41\u7410\u7684\u5de5\u4f5c\u3002\u672c\u6587\u5c06\u4ecb\u7ecdiOS\u81ea\u52a8\u6253\u5305IPA\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n

\u4e00\u3001\u539f\u7406\u4ecb\u7ecd<\/p>\n

iOS\u81ea\u52a8\u6253\u5305IPA\u7684\u539f\u7406\u662f\u901a\u8fc7\u547d\u4ee4\u884c\u5de5\u5177xcodebuild\u548cxcrun\u6765\u8fdb\u884c\u6784\u5efa\u548c\u7b7e\u540d\u3002xcodebuild\u662f\u82f9\u679c\u5b98\u65b9\u63d0\u4f9b\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u53ef\u4ee5\u8fdb\u884cBuild\u3001Archive\u548cExport\u7b49\u64cd\u4f5c\u3002\u800cxcrun\u5219\u662f\u7528\u4e8e\u6267\u884c\u5176\u4ed6\u5f00\u53d1\u8005\u5de5\u5177\u7684\u547d\u4ee4\u884c\u63a5\u53e3\uff0c\u5305\u62ec\u7b7e\u540d\u3001\u9a8c\u8bc1\u548c\u5c01\u88c5\u7b49\u3002<\/p>\n

\u5177\u4f53\u6765\u8bf4\uff0ciOS\u81ea\u52a8\u6253\u5305IPA\u7684\u8fc7\u7a0b\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n

1. \u8bbe\u7f6e\u5de5\u7a0b\u76f8\u5173\u4fe1\u606f\uff1a\u8bbe\u7f6eSDK\u7248\u672c\u3001\u5de5\u7a0b\u76ee\u5f55\u548c\u8bc1\u4e66\u7b49\u3002<\/p>\n

2. \u6e05\u7406\u5de5\u7a0b\uff1a\u6267\u884cxcodebuild clean\u547d\u4ee4\uff0c\u6e05\u7406\u6784\u5efa\u76ee\u5f55\u3002<\/p>\n

3. \u6784\u5efa\u5de5\u7a0b\uff1a\u6267\u884cxcodebuild build\u547d\u4ee4\uff0c\u7f16\u8bd1\u5de5\u7a0b\u3002<\/p>\n

4. \u5f52\u6863\u5de5\u7a0b\uff1a\u6267\u884cxcodebuild archive\u547d\u4ee4\uff0c\u5c06\u7f16\u8bd1\u540e\u7684\u4ea7\u54c1\u6587\u4ef6\u5f52\u6863\u3002<\/p>\n

5. \u5bfc\u51faIPA\u6587\u4ef6\uff1a\u6267\u884cxcodebuild exportArchive\u547d\u4ee4\uff0c\u5bfc\u51faIPA\u6587\u4ef6\u3002<\/p>\n

6. \u7b7e\u540dIPA\u6587\u4ef6\uff1a\u4f7f\u7528xcrun\u547d\u4ee4\u5bf9\u5bfc\u51fa\u7684IPA\u6587\u4ef6\u8fdb\u884c\u7b7e\u540d\u3002<\/p>\n

7. \u6253\u5305\u5b8c\u6210\uff1a\u751f\u6210\u6700\u7ec8\u7684IPA\u6587\u4ef6\uff0c\u53ef\u4ee5\u8fdb\u884c\u5b89\u88c5\u548c\u53d1\u5e03\u3002<\/p>\n

\u4e8c\u3001\u8be6\u7ec6\u6b65\u9aa4\u4ecb\u7ecd<\/p>\n

\u4e0b\u9762\u8be6\u7ec6\u4ecb\u7ecdiOS\u81ea\u52a8\u6253\u5305IPA\u7684\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n

1. \u8bbe\u7f6e\u5de5\u7a0b\u76f8\u5173\u4fe1\u606f<\/p>\n

\u5728\u547d\u4ee4\u884c\u4e2d\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u8bbe\u7f6e\u5de5\u7a0b\u76f8\u5173\u4fe1\u606f\uff1a<\/p>\n

“`<\/p>\n

xcodebuild -project YourProject.xcodeproj -sdk iphoneos -configuration Release -scheme YourScheme<\/p>\n

“`<\/p>\n

\u5176\u4e2d\uff0cYourProject.xcodeproj\u4e3a\u4f60\u7684\u5de5\u7a0b\u6587\u4ef6\u540d\uff0ch5\u6253\u5305ios\u662fipa\u683c\u5f0f<\/a>YourScheme\u4e3a\u4f60\u7684\u5de5\u7a0b\u7684Scheme\u540d\u3002<\/p>\n

2. \u6e05\u7406\u5de5\u7a0b<\/p>\n

\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u6e05\u7406\u6784\u5efa\u76ee\u5f55\uff1a<\/p>\n

“`<\/p>\n

xcodebuild clean<\/p>\n

“`<\/p>\n

3. \u6784\u5efa\u5de5\u7a0b<\/p>\n

\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u7f16\u8bd1\u5de5\u7a0b\uff1a<\/p>\n

“`<\/p>\n

xcodebuild build<\/p>\n

“`<\/p>\n

4. \u5f52\u6863\u5de5\u7a0b<\/p>\n

\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5c06\u7f16\u8bd1\u540e\u7684\u4ea7\u54c1\u6587\u4ef6\u5f52\u6863\uff1a<\/p>\n

“`<\/p>\n

xcodebuild archive -archivePath YourArchivePath<\/p>\n

“`<\/p>\n

\u5176\u4e2d\uff0cYourArchivePath\u4e3a\u4f60\u7684\u5f52\u6863\u6587\u4ef6\u8def\u5f84\u3002<\/p>\n

5. \u5bfc\u51faIPA\u6587\u4ef6<\/p>\n

\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5bfc\u51faIPA\u6587\u4ef6\uff1a<\/p>\n

“`<\/p>\n

xcodebuild -exportArchive -archivePath YourArchivePath -exportPath YourExportPath -exportOptionsPlist YourExportOptionsPlistPath<\/p>\n

“`<\/p>\n

\u5176\u4e2d\uff0cYourExportPath\u4e3a\u4f60\u7684\u5bfc\u51fa\u6587\u4ef6\u8def\u5f84\uff0cYourExportOptionsPlistPath\u4e3a\u4f60\u7684\u5bfc\u51fa\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u3002<\/p>\n

\u5bfc\u51fa\u914d\u7f6e\u6587\u4ef6\uff08YourExportOptionsPlistPath\uff09\u7684\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n

“`<\/p>\n<\/p>\n

\n

\n

method<\/p>\n

development|app-store|ad-hoc|enterprise<\/p>\n

teamID<\/p>\n

YourTeamID<\/p>\n

provisioningProfiles<\/p>\n

\n

YourBundleIdentifier<\/p>\n

YourProvisioningProfileName<\/p>\n<\/p>\n<\/p>\n

“`<\/p>\n

\u5176\u4e2d\uff0cmethod\u4e3a\u5bfc\u51fa\u7c7b\u578b\uff08development\u3001app-store\u3001ad-hoc\u3001enterprise\uff09\uff0cteamID\u4e3a\u5f00\u53d1\u8005\u56e2\u961fID\uff0cYourBundleIdentifier\u4e3a\u4f60\u7684\u5e94\u7528\u7684Bundle Identifier\uff0cYourProvisioningProfileName\u4e3a\u4f60\u7684\u63cf\u8ff0\u6587\u4ef6\u540d\u79f0\uff08\u4e0d\u5e26\u540e\u7f00\uff09\u3002<\/p>\n

6. \u7b7e\u540dIPA\u6587\u4ef6<\/p>\n

\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5bf9\u5bfc\u51fa\u7684IPA\u6587\u4ef6\u8fdb\u884c\u7b7e\u540d\uff1a<\/p>\n

“`<\/p>\n

xcrun -sdk iphoneos PackageApplication -v YourAppPath -o YourIpaPath<\/p>\n

“`<\/p>\n

\u5176\u4e2d\uff0cYourAppPath\u4e3a\u5bfc\u51fa\u7684.app\u6587\u4ef6\u8def\u5f84\uff0cYourIpaPath\u4e3a\u6700\u7ec8\u7684IPA\u6587\u4ef6\u8def\u5f84\u3002<\/p>\n

7. \u6253\u5305<\/p>\n

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

\u5b8c\u6210<\/p>\n

\u81f3\u6b64\uff0c\u6574\u4e2aiOS\u81ea\u52a8\u6253\u5305IPA\u7684\u8fc7\u7a0b\u5b8c\u6210\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u751f\u6210\u7684IPA\u6587\u4ef6\u8fdb\u884c\u5b89\u88c5\u548c\u53d1\u5e03\u3002<\/p>\n

\u603b\u7ed3\uff1a<\/p>\n

\u672c\u6587\u4ecb\u7ecd\u4e86iOS\u81ea\u52a8\u6253\u5305IPA\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002\u901a\u8fc7xcodebuild\u548cxcrun\u547d\u4ee4\u884c\u5de5\u5177\u7684\u914d\u5408\u4f7f\u7528\uff0c\u6ca1\u6709\u5f00\u53d1\u8005\u8d26\u53f7\u600e\u4e48\u6253\u5305ipa<\/a>\u53ef\u4ee5\u5feb\u901f\u5b8c\u6210\u6784\u5efa\u3001\u7b7e\u540d\u548c\u6253\u5305\u7b49\u64cd\u4f5c\uff0c\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002\u5e0c\u671b\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

iOS\u81ea\u52a8\u6253\u5305IPA\u662f\u4e00\u79cd\u65b9\u4fbf\u5feb\u6377\u7684\u65b9\u5f0f\uff0c\u80fd\u591f\u5e2e\u52a9\u5f00\u53d1\u8005\u81ea\u52a8\u5b8c\u6210\u6784\u5efa\u3001\u7b7e\u540d\u548c\u6253\u5305\u7b49\u7e41\u7410\u7684\u5de5\u4f5c\u3002\u672c\u6587\u5c06\u4ecb\u7ecdiOS\u81ea\u52a8\u6253\u5305IPA\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002\u4e00\u3001\u539f\u7406\u4ecb\u7ecdiOS\u81ea\u52a8\u6253\u5305IPA\u7684\u539f\u7406\u662f\u901a\u8fc7\u547d\u4ee4\u884c\u5de5\u5177x<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[3274,1627,3275,16,3276],"topic":[],"class_list":["post-1489","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-ipa","tag-1627","tag-3275","tag-16"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/1489","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\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=1489"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/1489\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=1489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=1489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=1489"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=1489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}