{"id":3482,"date":"2023-08-22T16:45:21","date_gmt":"2023-08-22T08:45:21","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=3482"},"modified":"2023-08-22T16:45:21","modified_gmt":"2023-08-22T08:45:21","slug":"ios%e5%88%86%e4%ba%ab%e4%b8%80%e4%b8%aaipa%e6%89%93%e5%8c%85%e8%84%9a%e6%9c%ac%e6%ad%a5%e9%aa%a4%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/3482\/","title":{"rendered":"ios\u5206\u4eab\u4e00\u4e2aipa\u6253\u5305\u811a\u672c\u6b65\u9aa4\u4ecb\u7ecd"},"content":{"rendered":"

iOS \u662f\u4e00\u79cd\u95ed\u6e90\u64cd\u4f5c\u7cfb\u7edf\uff0c\u53ea\u5141\u8bb8\u5728\u82f9\u679c\u6388\u6743\u7684\u8bbe\u5907\u4e0a\u8fd0\u884c\uff0c\u56e0\u6b64\u5f00\u53d1\u8005\u60f3\u8981\u5728\u672a\u8d8a\u72f1\u7684\u8bbe\u5907\u4e0a\u5b89\u88c5\u81ea\u5df1\u5f00\u53d1\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u5c31\u9700\u8981\u8fdb\u884c\u4e00\u7cfb\u5217\u6253\u5305\u64cd\u4f5c\u3002IPA \u662f iOS \u5e94\u7528\u7a0b\u5e8f\u7684\u5b89\u88c5\u5305\uff0c\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u3001\u8d44\u6e90\u6587\u4ef6\u548c\u5143\u6570\u636e\u7b49\u3002<\/p>\n

\u4e0b\u9762\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7\u4f7f\u7528\u811a\u672c\u6765\u6253\u5305\u751f\u6210 IPA \u6587\u4ef6\u3002<\/p>\n

**\u6b65\u9aa4\u4e00\uff1a\u521b\u5efa\u5de5mac\u7cfb\u7edf\u6253\u5305ipa<\/a>\u7a0b**<\/p>\n

ipa\u6253\u5305\u9700\u8981\u4ec0\u4e48<\/a>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2a iOS \u5de5\u7a0b\uff0c\u5e76\u5728 Xcode \u4e2d\u8fdb\u884c\u5f00\u53d1\u3002\u786e\u4fdd\u4f60\u5df2\u7ecf\u5b8c\u6210\u4e86\u5e94\u7528\u7684\u5f00\u53d1\u548c\u8c03\u8bd5\uff0c\u5e76\u53ef\u4ee5\u6b63\u5e38\u5728\u6a21\u62df\u5668\u6216\u771f\u673a\u4e0a\u8fd0\u884c\u3002<\/p>\n

**\u6b65\u9aa4\u4e8c\uff1a\u914d\u7f6e\u5e94\u7528**<\/p>\n

\u5728\u8fdb\u884c\u6253\u5305\u4e4b\u524d\uff0c\u9700\u8981\u5bf9\u5e94\u7528\u8fdb\u884c\u5fc5\u8981\u7684\u914d\u7f6e\u3002\u6253\u5f00\u9879\u76ee\u7684 Targets \u8bbe\u7f6e\u9875\u9762\uff0c\u9009\u62e9\u6b63\u786e\u7684 Bundle Identifier\uff0c\u5e76\u4e14\u8fdb\u884c\u7b7e\u540d\u8ba4\u8bc1\u7b49\u76f8\u5173\u8bbe\u7f6e\u3002<\/p>\n

**\u6b65\u9aa4\u4e09\uff1a\u751f\u6210 Archive**<\/p>\n

\u5728 Xcode \u4e2d\u9009\u62e9 Product > Archive\uff0cXcode \u5c06\u81ea\u52a8\u4e3a\u4f60\u7684\u5e94\u7528\u751f\u6210\u4e00\u4e2a Archive \u6587\u4ef6\u3002\u8fd9\u4e2a\u6587\u4ef6\u662f\u751f\u6210 IPA \u7684\u57fa\u7840\u3002<\/p>\n

**\u6b65\u9aa4\u56db\uff1a\u5bfc\u51fa\u7b7e\u540d**<\/p>\n

\u5728 Xcode \u4e2d\u9009\u62e9 Window > Organizer \u6253\u5f00 Organizer \u7a97\u53e3\u3002\u5728 Organizer \u7a97\u53e3\u4e2d\u9009\u62e9 Archives \u6807\u7b7e\u9875\uff0c\u9009\u62e9\u521a\u624d\u751f\u6210\u7684 Archive \u6587\u4ef6\uff0c\u5e76\u70b9\u51fb Export… \u6309\u94ae\u3002\u9009\u62e9\u9700\u8981\u7684\u7b7e\u540d\u8bc1\u4e66\uff0c\u70b9\u51fb Next\uff0c\u9009\u62e9 Export \u6309\u94ae\u3002\u6b64\u65f6 Xcode \u4f1a\u751f\u6210\u4e00\u4e2a\u5e26\u6709\u7b7e\u540d\u7684 IPA \u5305\u3002<\/p>\n

\u4e0a\u8ff0\u6b65\u9aa4\u53ef\u4ee5\u901a\u8fc7\u624b\u52a8\u64cd\u4f5c\u6765\u5b8c\u6210\uff0c\u4f46\u662f\u5982\u679c\u4f60\u9700\u8981\u6279\u91cf\u6253\u5305\u6216\u81ea\u52a8\u5316\u6253\u5305\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528\u811a\u672c\u6765\u5b9e\u73b0\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684 IPA \u6253\u5305\u811a\u672c\u793a\u4f8b\uff1a<\/p>\n

“`<\/p>\n

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

# \u5de5\u7a0b\u8def\u5f84<\/p>\n

project_path=”Your_Project_Path”<\/p>\n

# scheme \u540d\u79f0<\/p>\n

scheme_name=”Your_Scheme_Name”<\/p>\n

# \u8bc1\u4e66\u548c\u914d\u7f6e<\/p>\n

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

development_team=”Your_Development_Team”<\/p>\n

code_sign_identity=”Your_Code_Sign_Identity”<\/p>\n

mobileprovision_profile=”Your_Mobileprovision_Profile”<\/p>\n

# \u8f93\u51fa\u76ee\u5f55\u548c\u6587\u4ef6\u540d<\/p>\n

output_directory=”Your_Output_Directory”<\/p>\n

ipa_name=”Your_IPA_Name”<\/p>\n

# \u6e05\u7406\u5de5\u7a0b<\/p>\n

xcodebuild clean -project “$project_path” -scheme “$scheme_name”<\/p>\n

# \u6784\u5efa\u5de5\u7a0b<\/p>\n

xcodebuild archive -project “$project_path” -scheme “$scheme_name” -archivePath “$output_directory\/$scheme_name.xcarchive” CODE_SIGN_IDENTITY=”$code_sign_identity” PROVISIONING_PROFILE=”$mobileprovision_profile” DEVELOPMENT_TEAM=”$development_team”<\/p>\n

# \u5bfc\u51fa IPA<\/p>\n

xcodebuild -exportArchive -archivePath “$output_directory\/$scheme_name.xcarchive” -exportOptionsPlist “ExportOptions.plist” -exportPath “$output_directory\/$ipa_name.ipa”<\/p>\n

“`<\/p>\n

\u4ee5\u4e0a\u811a\u672c\u4e2d\uff0c\u4f60\u9700\u8981\u5c06 `Your_Project_Path`\u3001`Your_Scheme_Name` \u7b49\u53c2\u6570\u66ff\u6362\u4e3a\u4f60\u5177\u4f53\u7684\u9879\u76ee\u8def\u5f84\u3001Scheme \u540d\u79f0\u4ee5\u53ca\u5176\u4ed6\u76f8\u5173\u53c2\u6570\u3002\u7136\u540e\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u7ec8\u7aef\u8fdb\u5165\u811a\u672c\u6240\u5728\u7684\u76ee\u5f55\uff0c\u5e76\u6267\u884c `.\/build.sh` \u547d\u4ee4\u6765\u542f\u52a8\u811a\u672c\u3002\u811a\u672c\u5c06\u81ea\u52a8\u6267\u884c\u6e05\u7406\u3001\u6784\u5efa\u548c\u5bfc\u51fa IPA \u7684\u64cd\u4f5c\uff0c\u5e76\u5c06\u751f\u6210\u7684 IPA \u6587\u4ef6\u4fdd\u5b58\u5728\u6307\u5b9a\u7684\u76ee\u5f55\u4e2d\u3002<\/p>\n

\u901a\u8fc7\u4f7f\u7528\u4e0a\u8ff0\u811a\u672c\uff0c\u4f60\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u6279\u91cf\u6253\u5305\u6216\u5b9e\u73b0\u81ea\u52a8\u5316\u6253\u5305\u7684\u64cd\u4f5c\u3002\u5f53\u7136\uff0c\u4f60\u8fd8\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u9700\u6c42\u8fdb\u884c\u811a\u672c\u7684\u5b9a\u5236\u548c\u6269\u5c55\u3002<\/p>\n

\u5e0c\u671b\u4ee5\u4e0a\u5185\u5bb9\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff0c\u5982\u679c\u6709\u5176\u4ed6\u95ee\u9898\uff0c\u8bf7\u968f\u65f6\u5411\u6211\u63d0\u95ee\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

iOS \u662f\u4e00\u79cd\u95ed\u6e90\u64cd\u4f5c\u7cfb\u7edf\uff0c\u53ea\u5141\u8bb8\u5728\u82f9\u679c\u6388\u6743\u7684\u8bbe\u5907\u4e0a\u8fd0\u884c\uff0c\u56e0\u6b64\u5f00\u53d1\u8005\u60f3\u8981\u5728\u672a\u8d8a\u72f1\u7684\u8bbe\u5907\u4e0a\u5b89\u88c5\u81ea\u5df1\u5f00\u53d1\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u5c31\u9700\u8981\u8fdb\u884c\u4e00\u7cfb\u5217\u6253\u5305\u64cd\u4f5c\u3002IPA \u662f iOS \u5e94\u7528\u7a0b\u5e8f\u7684\u5b89\u88c5\u5305\uff0c\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u4e8c\u8fdb\u5236<\/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":[6973,6974,16,797,408],"topic":[],"class_list":{"0":"post-3482","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-appkf","7":"tag-ipa","9":"tag-16","10":"tag-797","11":"tag-408"},"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/3482","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=3482"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/3482\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=3482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=3482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=3482"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=3482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}