{"id":7296,"date":"2023-10-20T15:32:02","date_gmt":"2023-10-20T07:32:02","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=7296"},"modified":"2023-10-20T15:32:02","modified_gmt":"2023-10-20T07:32:02","slug":"%e7%94%a8%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%89%93%e5%8c%85ipa%e6%9c%89%e5%95%a5%e6%8a%80%e6%9c%af%e5%8e%9f%e7%90%86%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/7296\/","title":{"rendered":"\u7528\u670d\u52a1\u5668\u6253\u5305ipa\u6709\u5565\u6280\u672f\u539f\u7406\uff1f"},"content":{"rendered":"

\u4f7f\u7528\u670d\u52a1\u5668\u6253\u5305IPA\u6587\u4ef6\uff08iOS\u5e94\u7528\u7a0b\u5e8f\u5b58\u6863\u6587\u4ef6\uff09<\/p>\n

\u5728\u60a8\u53d1\u5e03iOS\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u60a8\u9700\u8981\u521b\u5efa\u4e00\u4e2aIPA\u6587\u4ef6\u3002IPA\u662fiOS App Store\u7684\u5e94\u7528\u7a0b\u5e8f\u5b89\u88c5\u5305\u683c\u5f0f\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728\u670d\u52a1\u5668\u4e0a\uff08\u4f8b\u5982\uff1amacOS\u3001macOS Server\u6216\u4e91\u670d\u52a1\u5668\uff09\u8fdb\u884c\u6253\u5305IPA\u3002<\/p>\n

\u4e00\u3001\u8981\u6c42\u548c\u51c6\u5907\u5de5\u4f5c\uff1a<\/p>\n

1. macOS\u7cfb\u7edf\uff1a\u7531\u4e8e\u6784\u5efaiOS\u5e94\u7528\u6240\u9700\u7684Xcode\u53ea\u80fd\u5728macOS\u73af\u5883\u4e0b\u8fd0\u884c\uff0c\u56e0\u6b64\u60a8\u9700\u8981\u51c6\u5907\u4e00\u53f0\u5b89\u88c5\u4e86\u6700\u65b0\u7248\u672c\u7684mac OS\u7684\u7535\u8111\u6216\u670d\u52a1\u5668\u3002<\/p>\n

2. \u5b89\u88c5Xcode\uff1a\u60a8\u9700\u8981\u5728\u7535\u8111\u6216\u670d\u52a1\u5668\u4e0a\u5b89\u88c5Xcode\uff0c\u5e76\u786e\u4fdd\u5df2\u914d\u7f6e\u597dXcode Command Line Tools\u3002<\/p>\n

3. iOS\u5e94\u7528\u9879\u76ee\uff1a\u51c6\u5907\u597d\u60a8\u7684iOapp\u8f6c\u7f51\u9875\u94fe\u63a5<\/a>S\u5e94\u7528\u6e90\u7801\u3002<\/p>\n

4. iOS\u8bc1\u4e66\u548c\u914d\u7f6e\u6587\u4ef6\uff1a\u60a8\u9700\u8981\u83b7\u53d6\u6709\u6548\u7684\u5f00\u53d1\u8005\u8bc1\u4e66\u4ee5\u53ca\u76f8\u5173\u7684\u914d\u7f6e\u6587\u4ef6\uff08\u5982\uff1aApp ID\u3001Provisioning Profile\u7b49\uff09\u3002<\/p>\n

\u4e8c\u3001\u6253\u5305\u6d41\u7a0b\uff1a<\/p>\n

\u4ee5\u4e0b\u662f\u4e00\u4e2a\u57fa\u7840\u7684\u4f7f\u7528\u670d\u52a1\u5668\u6253\u5305IPA\u6587\u4ef6\u7684\u6d41\u7a0b\uff0c\u60a8\u53ef\u4ee5\u5bf9\u6b64\u8fc7\u7a0b\u8fdb\u884c\u5b9a\u5236\u4ee5\u6ee1\u8db3\u60a8\u7684\u5177\u4f53\u9700\u6c42\u3002<\/p>\n

1. \u51c6\u5907\u60a8\u7684iOS\u5e94\u7528\u6e90\u7801\uff0c\u5c06\u5176\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\u3002\u53ef\u4ee5\u4f7f\u7528Git\u3001SFTP\u3001SCP\u7b49\u65b9\u6cd5\u5c06\u9879\u76ee\u6e90\u7801\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u4e0a\u3002<\/p>\n

2. \u5728\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7ec8\u7aef\u5e76\u4f7f\u7528cd\u547d\u4ee4\u8fdb\u5165\u60a8\u7684\u9879\u76ee\u76ee\u5f55\uff0c\u4f8b\u5982\uff1a<\/p>\n

“`<\/p>\n

cd \/path\/to\/your\/project<\/p>\n

“`<\/p>\n

3. \u66f4\u65b0\u5e76\u5b89\u88c5CocoaPods\u4f9d\u8d56\uff08\u5982\u679c\u6709\uff09\uff1a<\/p>\n

“`<\/p>\n

pod install<\/p>\n

“`<\/p>\n

4. \u4f7f\u7528xcodebuild\u547d\u4ee4\u6784\u5efaiOS\u5e94\u7528\uff1a<\/p>\n

“`<\/p>\n

xcodebuild -workspace YourProject.xcworkspace -scheme YourScheme -configuration Release clean build CODE_SIGN_IDENTITY=”iPhone Distribution: YourCompanyName (ABCDEFGHIJ)” PROVISIONING_PROFILE=”YourProvisioningProfileUUID” -sdk iphoneos<\/p>\n

“`<\/p>\n

\u8bf7\u5c06YourProject.xcworkspace\u3001YourScheme\u3001YourCompanyName\u66ff\u6362\u4e3a\u60a8\u9879\u76ee\u7684\u5b9e\u9645\u540d\u79f0\uff0c\u4ee5\u53ca\u914d\u7f6e\u6587\u4ef6\u7684UUID\u3002<\/p>\n

5. \u4f7f\u7528xcodebuild\u5c06\u6784\u5efa\u597d\u7684Archive\u6587\u4ef6\u5bfc\u51fa\u4e3aIPA\uff1a<\/p>\n

“`<\/p>\n

xcodebuild -exportArchive -archivePath \/path\/to\/your\/archive\/YourProject.xcarchive -exportPath \/path\/to\/your\/output -exportOptionsPlist \/path\/to\/your\/exportOptions.plist<\/p>\n

“`<\/p>\n

exportOptions.plist\u662f\u4e00\u4e2aXML\u6587\u4ef6\uff0c\u7528\u4e8e\u914d\u7f6e\u5bfc\u51faIPA\u7684\u53c2\u6570\u3002\u901a\u8fc7\u8fd9\u4e2a\u6587\u4ef6h5app\u6709\u54ea\u4e9b<\/a>\uff0c\u60a8\u53ef\u4ee5\u6307\u5b9aApp Store\u6216Ad Hoc\u5206\u53d1\uff0c\u4ee5\u53ca\u76f8\u5173\u8bc1\u4e66\u548c\u914d\u7f6e\u6587\u4ef6\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2aexportOptions.plist\u7684<\/p>\n

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

\u793a\u4f8b\uff1a<\/p>\n

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

\n

\n

method<\/p>\n

app-store<\/p>\n

teamID<\/p>\n

ABCDEFGHIJ<\/p>\n

uploadSymbols<\/p>\n<\/p>\n

uploadBitcode<\/p>\n<\/p>\n

compileBitcode<\/p>\n<\/p>\n

provisioningProfiles<\/p>\n

\n

com.yourcompany.yourapp<\/p>\n

YourProvisioningProfileUUID<\/p>\n<\/p>\n

signingCertificate<\/p>\n

iPhone Distribution: YourCompanyName (ABCDEFGHIJ)<\/p>\n<\/p>\n

“`<\/p>\n

6. \u5728\/path\/to\/your\/output\u76ee\u5f55\u4e0b\uff0c\u60a8\u5c06\u627e\u5230\u5df2\u7ecf\u6253\u5305\u5b8c\u6210\u7684IPA\u6587\u4ef6\uff0c\u8fd9\u4e2aIPA\u53ef\u4ee5\u7528\u4e8eApp Store\u4e0a\u4f20\u6216\u8005Ad Hoc\u5206\u53d1\u3002<\/p>\n

\u4e09\u3001\u4f18\u5316\u548c\u81ea\u52a8\u5316\uff1a<\/p>\n

\u8003\u8651\u5230\u60a8\u53ef\u80fd\u9700\u8981\u9891\u7e41\u8fdb\u884cIPA\u6587\u4ef6\u7684\u6253\u5305\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u8bf8\u5982Fastlane\u3001Jenkins\u7b49\u5de5\u5177\u6765\u5e2e\u52a9\u81ea\u52a8\u5316\u4e0a\u8ff0\u64cd\u4f5c\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u60a8\u53ef\u4ee5\u51cf\u5c11\u624b\u52a8\u6b65\u9aa4\uff0c\u63d0\u9ad8\u6548\u7387\uff0c\u8fd8\u53ef\u4ee5\u4e0e\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff08\u5982\uff1aGit\uff09\u4ee5\u53ca\u5176\u4ed6\u6301\u7eed\u96c6\u6210\/\u6301\u7eed\u90e8\u7f72\u5de5\u5177\uff08\u5982\uff1aBitbucket\u3001GitLab\uff09\u4e00\u540c\u4f7f\u7528\uff0c\u4e3a\u60a8\u7684\u5e94\u7528\u53d1\u5e03\u8fc7\u7a0b\u5e26\u6765\u6548\u76ca\u3002<\/p>\n

\u603b\u7ed3\uff1a\u672c\u6587\u8bb2\u89e3\u4e86\u4f7f\u7528macOS\u670d\u52a1\u5668\u6253\u5305IPA\u6587\u4ef6\u7684\u57fa\u672c\u6d41\u7a0b\u3002\u5e0c\u671b\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\uff0c\u795d\u60a8\u5728iOS\u5f00\u53d1\u7684\u9053\u8def\u4e0a\u8d8a\u8d70\u8d8a\u597d\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

\u4f7f\u7528\u670d\u52a1\u5668\u6253\u5305IPA\u6587\u4ef6\uff08iOS\u5e94\u7528\u7a0b\u5e8f\u5b58\u6863\u6587\u4ef6\uff09\u5728\u60a8\u53d1\u5e03iOS\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u60a8\u9700\u8981\u521b\u5efa\u4e00\u4e2aIPA\u6587\u4ef6\u3002IPA\u662fiOS App Store\u7684\u5e94\u7528\u7a0b\u5e8f\u5b89\u88c5\u5305\u683c\u5f0f\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728\u670d\u52a1\u5668\u4e0a\uff08\u4f8b\u5982\uff1ama<\/p>\n","protected":false},"author":22,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[12997,12998,904,105,16],"topic":[],"class_list":["post-7296","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-iosflutterview","tag-web","tag-904","tag-105","tag-16"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/7296","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\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=7296"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/7296\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=7296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=7296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=7296"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=7296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}