{"id":20706,"date":"2024-04-07T16:44:49","date_gmt":"2024-04-07T08:44:49","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=20706"},"modified":"2024-04-07T16:44:49","modified_gmt":"2024-04-07T08:44:49","slug":"%e6%89%b9%e9%87%8f%e6%89%93%e5%8c%85ipa%e6%8a%80%e6%9c%af%e5%8e%9f%e7%90%86%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/20706\/","title":{"rendered":"\u6279\u91cf\u6253\u5305ipa\u6280\u672f\u539f\u7406\u4ecb\u7ecd"},"content":{"rendered":"

\u6279\u91cf\u6253\u5305IPA\u662f\u4e00\u79cd\u5c06\u591a\u4e2aiOS\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210IPA\u6587\u4ef6\u7684\u64cd\u4f5c\u3002\u8fd9\u79cd\u64cd\u4f5c\u901a\u5e38\u7528\u4e8e\u4f01\u4e1a\u5185\u90e8\u5206\u53d1\u3001\u5e94\u7528\u6d4b\u8bd5\u548c\u53d1\u5e03\u7b49\u573a\u666f\u3002\u4e0b\u9762\u6211\u5c06\u4e3a\u4f60\u8be6\u7ec6\u4ecb\u7ecd\u6279\u91cf\u6253\u5305IPA\u7684\u539f\u7406\u548c\u64cd\u4f5c\u6b65\u9aa4\u3002<\/p>\n

\u539f\u7406\uff1a<\/p>\n

\u5728iOS\u5f00\u53d1\u4e2d\uff0c\u6253\u5305IPA\u662f\u5c06\u5e94\u7528\u7a0b\u5e8f\u3001\u914d\u7f6e\u6587\u4ef6\u548c\u8d44\u6e90\u6587\u4ef6\u7b49\u6253\u5305\u6210\u4e00\u4e2aIPA\u6587\u4ef6\uff0c\u7136\u540e\u901a\u8fc7iTunes\u6216\u8005\u82f9\u679c\u4f01\u4e1a\u7ea7\u53d1\u5e03\u5e73\u53f0\u8fdb\u884c\u5b89\u88c5\u548c\u5206\u53d1\u3002\u6240\u4ee5\u8981\u8fdb\u884c\u6279\u91cf\u6253\u5305IPA\uff0c\u6211\u4eec\u9700\u8981\u5148\u5c06\u6bcf\u4e2a\u5e94\u7528\u7a0b\u5e8f\u7684\u76f8\u5173\u6587\u4ef6\u6574\u7406\u597d\uff0c\u5e76\u6309\u7167\u56fa\u5b9a\u7684\u76ee\u5f55\u7ed3\u6784\u8fdb\u884c\u5b58\u653e\uff0c\u7136ipa\u6253\u5305\u5e73\u53f0<\/a>\u540e\u5229\u7528\u811a\u672c\u6216\u8005\u5de5\u5177\u8fdb\u884c\u81ea\u52a8\u5316\u6279\u91cf\u6253\u5305\u7684\u64cd\u4f5c\u3002<\/p>\n

\u64cd\u4f5c\u6b65\u9aa4\uff1a<\/p>\n

1. \u51c6\u5907\u5de5\u4f5c\uff1a<\/p>\n

– \u5b89\u88c5Xcode\u5f00\u53d1\u5de5\u5177\uff1a\u6279\u91cf\u6253\u5305IPA\u9700\u8981\u4f9d\u8d56Xcode\u5f00\u53d1\u5de5\u5177\uff0c\u6240\u4ee5\u9996\u5148\u8981\u786e\u4fdd\u4f60\u7684\u7535\u8111\u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86\u6700\u65b0\u7684Xcode\u7248\u672c\u3002<\/p>\n

– \u51c6\u5907\u5e94\u7528\u7a0b\u5e8f\uff1a\u5c06\u9700\u8981\u6253\u5305\u7684\u5e94\u7528\u7a0b\u5e8f\u6574\u7406\u597d\uff0c\u5e76\u6309\u7167\u56fa\u5b9a\u7684\u76ee\u5f55\u7ed3\u6784\u8fdb\u884c\u5b58\u653e\u3002\u6bcf\u4e2a\u5e94\u7528\u7a0b\u5e8f\u7684\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a<\/p>\n

– \u5e94\u7528\u7a0b\u5e8f\u540d\u79f0.ipa<\/p>\n

– \u5e94\u7528\u7a0b\u5e8f\u540d\u79f0.app<\/p>\n

– Info.pli<\/p>\n

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

st<\/p>\n

– Assets.car<\/p>\n

– Provisioning Profile.mobileprovision<\/p>\n

2. \u521b\u5efa\u6253\u5305\u811a\u672c\uff1a<\/p>\n

– \u5728\u7ec8\u7aef\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u6587\u4ef6\uff0c\u5e76\u547d\u540d\u4e3a`build.sh`\u6216\u8005\u5176\u4ed6\u4f60\u559c\u6b22\u7684\u540d\u5b57\uff1b<\/p>\n

– \u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00`build.sh`\uff0c\u8f93\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n

“`<\/p>\n

#!\/bin\/bash<\/p>\n

# Path to your Xcode project<\/p>\n

project_path=”\/path\/to\/your\/project”<\/p>\n

# Path to output directory<\/p>\n

output_path=”\/path\/to\/output\/directory”<\/p>\n

# App names<\/p>\n

app_names=(“App1” “App2” “App3”)<\/p>\n

# Build each app<\/p>\n

for app_name in ${app_names[@]}; do<\/p>\n

# Build the app<\/p>\n

xcodebuild -project “${project_path}\/${app_name}.xcodeproj” -scheme “${app_name}” -configuration “Release” -archivePath “${output_path}\/${app_name}.xcarchive” archive<\/p>\n

# Export the app as IPA<\/p>\n

xcodebuild -exportArchive -archivePath “${output_path}\/${app_name}.xcarchive” -exportPath “${output_path}\/${app_name}” -exportOptionsPlist “${project_path}\/${app_name}\/ExportOptions.plist”<\/p>\n

done<\/p>\n

“`<\/p>\n

– \u5c06`\/path\/to\/your\/project`\u66ff\u6362\u4e3a\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u6240\u5728\u7684\u9879\u76ee\u76ee\u5f55\uff1b<\/p>\n

– \u5c06`\/path\/to\/output\/directory`\u66ff\u6362\u4e3a\u4f60\u8981\u5bfc\u51faIPA\u6587\u4ef6\u7684\u76ee\u5f55\uff1b<\/p>\n

– \u5c06`(“App1” “App2” “App3”)`\u66ff\u6362\u4e3a\u4f60\u8981\u6253\u5305\u7684\u5e94\u7528\u7a0b\u5e8f\u540d\u79f0\u3002<\/p>\n

3. \u914d\u7f6eExportOptions.plist\u6587\u4ef6\uff1a<\/p>\n

– \u5728\u6bcf\u4e2a\u5e94\u7528\u7a0b\u5e8f\u7684\u76ee\u5f55\u4e0b\uff0c\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a`ExportOptions.plist`\u7684\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\uff1b<\/p>\n

– \u8f93\u5165\u4ee5\u4e0b\u5185\u5bb9\u5230`ExportOptions.plist`\u4e2d\uff1a<\/p>\n

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

\n

\n

method<\/p>\n

enterprise<\/p>\n<\/p>\n

“`<\/p>\n

4. \u8fd0\u884c\u6253\u5305\u811a\u672c\uff1a<\/p>\n

– \u5728\u7ec8\u7aef\u4e2d\uff0c\u8fdb\u5165\u5230\u4f60\u7684`build.sh`\u6240\u5728\u7684\u76ee\u5f55\uff1b<\/p>\n

– \u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u7ed9`build.sh`\u6587\u4ef6\u6dfb\u52a0\u53ef\u6267\u884c\u6743\u9650\uff1a<\/p>\n

“`<\/p>\n

chmod +x build.sh<\/p>\n

“`<\/p>\n

– \u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5f00\u59cb\u6267\u884c\u6253\u5305\u811a\u672c\uff1a<\/p>\n

\u6253\u5305ipa\u9047\u5230\u7684\u95ee\u9898<\/a> “`<\/p>\n

.\/build.sh<\/p>\n

“`<\/p>\n

– \u7a0d\u7b49\u7247\u523b\uff0c\u811a\u672c\u4f1a\u81ea\u52a8\u6253\u5305\u6bcf\u4e2a\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u8f93\u51fa\u5230\u6307\u5b9a\u7684\u76ee\u5f55\u4e2d\u3002<\/p>\n

\u81f3\u6b64\uff0c\u4f60\u5c31\u6210\u529f\u5b8c\u6210\u4e86\u6279\u91cf\u6253\u5305IPA\u7684\u64cd\u4f5c\u3002\u4f60\u53ef\u4ee5\u5728\u8f93\u51fa\u76ee\u5f55\u4e2d\u627e\u5230\u6bcf\u4e2a\u5e94\u7528\u7a0b\u5e8f\u7684IPA\u6587\u4ef6\uff0c\u5e76\u8fdb\u884c\u76f8\u5e94\u7684\u90e8\u7f72\u548c\u5206\u53d1\u3002<\/p>\n

\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u8fd9\u91cc\u53ea\u662f\u7b80\u5355\u4ecb\u7ecd\u4e86\u4e00\u79cd\u6279\u91cf\u6253\u5305IPA\u7684\u65b9\u5f0f\u3002\u5b9e\u9645\u5f00\u53d1\u4e2d\uff0c\u53ef\u80fd\u4f1a\u6709\u66f4\u591a\u7684\u590d\u6742\u9700\u6c42\uff0c\u6bd4\u5982\u81ea\u52a8\u5316\u7b7e\u540d\u3001\u4e0a\u4f20\u5230App Store\u7b49\u3002\u9488\u5bf9\u4e0d\u540c\u7684\u9700\u6c42\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u505a\u989d\u5916\u7684\u914d\u7f6e\u548c\u4fee\u6539\u3002\u5e0c\u671b\u8fd9\u4e2a\u7b80\u5355\u7684\u6559\u7a0b\u80fd\u591f\u5e2e\u52a9\u5230\u4f60\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

\u6279\u91cf\u6253\u5305IPA\u662f\u4e00\u79cd\u5c06\u591a\u4e2aiOS\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210IPA\u6587\u4ef6\u7684\u64cd\u4f5c\u3002\u8fd9\u79cd\u64cd\u4f5c\u901a\u5e38\u7528\u4e8e\u4f01\u4e1a\u5185\u90e8\u5206\u53d1\u3001\u5e94\u7528\u6d4b\u8bd5\u548c\u53d1\u5e03\u7b49\u573a\u666f\u3002\u4e0b\u9762\u6211\u5c06\u4e3a\u4f60\u8be6\u7ec6\u4ecb\u7ecd\u6279\u91cf\u6253\u5305IPA\u7684\u539f\u7406\u548c\u64cd\u4f5c\u6b65\u9aa4\u3002\u539f\u7406\uff1a\u5728iOS\u5f00\u53d1\u4e2d\uff0c\u6253\u5305IP<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[10026,3256,12,5215,16],"topic":[],"class_list":["post-20706","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-iosipa","tag-shellipa","tag-12","tag-5215","tag-16"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/20706","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=20706"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/20706\/revisions"}],"predecessor-version":[{"id":20771,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/20706\/revisions\/20771"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=20706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=20706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=20706"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=20706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}