<\/figure>\n<\/p>\n 1.0<\/p>\n
kind<\/p>\n
software<\/p>\n
title<\/p>\n
MyApp<\/p>\n<\/p>\n
”’<\/p>\n
with open(“Payload\/MyApp.app\/iTunesMetadata.plist”, “w”) as f:<\/p>\n
f.write(plist)<\/p>\n
# \u521b\u5efa IPA \u6587\u4ef6<\/p>\n
def create_ipa_file():<\/p>\n
shutil.make_archive(“MyApp”, “zip”, “Payload”)<\/p>\n
shutil.move(“MyApp.zip”, “MyApp.ipa”)<\/p>\n
def main():<\/p>\n
clean_build()<\/p>\n
build_app()<\/p>\n
create_payload_folder()<\/p>\n
copy_app_to_payload()<\/p>\n
create_metadata_plist()<\/p>\n
create_ipa_file()<\/p>\n
if __name__ == “__main__”:<\/p>\n
main()<\/p>\n
“`<\/p>\n
\u8fd9\u6bb5\u6e90\u7801\u4f7f\u7528 Python \u7f16\u5199\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8fd0\u884c\u3002\u5b83\u7684\u5de5\u4f5c\u6d41\u7a0b\u5982\u4e0b\uff1a<\/p>\n
1. \u6e05\u9664\u4e4b\u524d\u7684\u6784\u5efa\u6587\u4ef6\uff0c\u4ee5\u786e\u4fdd\u6bcf\u6b21\u90fd\u4ece\u65b0\u7684\u72b6\u6001\u5f00\u59cb\u3002<\/p>\n
2. \u4f7f\u7528 `xcodebuild` \u547d\u4ee4\u8fdb\u884c\u5e94\u7528\u7a0b\u5e8f\u7684\u6784\u5efa\uff0c\u8fd9\u53ef\u80fd\u9700\u8981\u4e00\u4e9b\u7279\u5b9a\u7684\u53c2\u6570\uff0c\u6bd4\u5982\u9879\u76ee\u540d\u79f0\u3001scheme \u540d\u79f0\u548c\u914d\u7f6e\u540d\u79f0\u7b49\u3002<\/p>\n
3. \u521b\u5efa\u4e00\u4e2a\u540d\u4e3a Payload \u7684\u6587\u4ef6\u5939\uff0c\u5b83\u5c06\u6210\u4e3a IPA \u6587\u4ef6\u7684\u6839\u76ee\u5f55\u3002<\/p>\n
4. \u5c06\u6784\u5efa\u597d\u7684\u5e94\u7528\u7a0b\u5e8f\u62f7\u8d1d\u5230 Payload \u6587\u4ef6\u5939\u4e2d\u3002<\/p>\n
5. \u521b\u5efa\u4e00\u4e2a\u540d\u4e3a iTunesMetadata.plist \u7684\u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u5e94\u7528\u7a0b\u5e8f\u7684\u76f8\u5173\u4fe1\u606f\uff0c\u6bd4\u5982\u5305\u6807\u8bc6\u7b26\u3001\u7248\u672c\u53f7\u548c\u540d\u79f0\u7b49\u3002<\/p>\n
6. \u4f7f\u7528 `shutil` \u5e93\u5c06 Payload \u6587\u4ef6\u5939\u6253\u5305\u6210\u540d\u4e3a MyApp.zip \u7684\u538b\u7f29\u6587\u4ef6\u3002<\/p>\n
7. \u5c06 MyApp.zip \u6587\u4ef6\u66f4\u540d\u4e3a MyApp.ipa\uff0c\u8fd9\u5c31\u662f\u6700\u7ec8\u7684 IPA \u6587\u4ef6\u3002<\/p>\n
\u5f53\u4f60\u8fd0\u884c\u8fd9\u6bb5\u6e90\u7801\u65f6\uff0c\u5b83\u5c06\u81ea\u52a8\u5b8c\u6210\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u5e76\u751f\u6210\u4e00\u4e2a\u53ef\u7528\u4e8e\u6d4b\u8bd5\u6216\u5206\u53d1\u7684 IPA \u6587\u4ef6\u3002<\/p>\n
\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u8fd9\u53ea\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u5b9e\u9645\u7684\u6253\u5305\u8fc7\u7a0b\u53ef\u80fd\u4f1a\u66f4\u52a0\u590d\u6742\uff0c\u53d6\u51b3\u4e8e\u4f60\u7684\u9879\u76ee\u914d\u7f6e\u548c\u9700\u6c42\u3002\u4f46\u662f\u8fd9\u4e2a\u793a\u4f8b\u8db3\u591f\u5e2e\u52a9\u4f60\u4e86\u89e3 IPA \u6253\u5305\u7684\u57fa\u672c\u6d41\u7a0b\u548c\u539f\u7406\u3002<\/p>\n
\u5e0c\u671b\u8fd9\u4e2a\u6559\u7a0b\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff01\u5982\u679c\u4f60\u8fd8\u6709\u5176\u4ed6\u95ee\u9898\uff0c\u8bf7\u968f\u65f6\u63d0\u95ee\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
IPA (iOS App Store Package) \u662f iOS \u5e94\u7528\u7a0b\u5e8f\u5305\u7684\u6587\u4ef6\u683c\u5f0f\uff0c\u7528\u4e8e\u5c06 iOS \u5e94\u7528\u7a0b\u5e8f\u5206\u53d1\u7ed9\u7528\u6237\u6216\u63d0\u4ea4\u5230 App Store \u8fdb\u884c\u5ba1\u6838\u3002\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u901a\u5e38\u9700\u8981\u5c06\u5e94\u7528\u7a0b<\/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":[10722,12,16,3399,10723],"topic":[],"class_list":["post-5798","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-appipa","tag-12","tag-16","tag-3399","tag-ipa"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/5798","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=5798"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/5798\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=5798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=5798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=5798"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=5798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}