{"id":7258,"date":"2023-10-20T12:33:30","date_gmt":"2023-10-20T04:33:30","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=7258"},"modified":"2023-10-20T12:33:30","modified_gmt":"2023-10-20T04:33:30","slug":"ios-%e5%91%bd%e4%bb%a4%e8%a1%8c%e6%89%93%e5%8c%85ipa%e6%80%8e%e4%b9%88%e6%93%8d%e4%bd%9c%e7%9a%84","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/7258\/","title":{"rendered":"ios \u547d\u4ee4\u884c\u6253\u5305ipa\u600e\u4e48\u64cd\u4f5c\u7684?"},"content":{"rendered":"

\u5728iOS\u5f00\u53d1\u4e2d\uff0c\u6211\u4eec\u901a\u5e38\u9700\u8981\u5c06\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u4e3aipa\u6587\u4ef6\u8fdb\u884c\u5206\u53d1\u6216\u8005\u53d1\u5e03\u5230App Store\u3002\u867d\u7136\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Xcode\u6765\u5b8c\u6210\u8fd9\u4e2a\u8fc7\u7a0b\uff0c\u4f46\u662f\u547d\u4ee4\u884c\u5de5\u5177\u63d0\u4f9b\u4e86\u66f4\u9ad8\u6548\u7684\u65b9\u6cd5\u6765\u6253\u5305ipa\u6587\u4ef6\u3002\u8fd9\u7bc7\u6587\u7ae0\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728\u547d\u4ee4\u884c\u4e2d\u6253\u5305ipa\u6587\u4ef6\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n

\u6253\u5305ipa\u6587\u4ef6\u7684\u539f\u7406<\/p>\n

\u5728iOS\u5f00\u53d1\u4e2d\uff0c\u6253\u5305ipa\u6587\u4ef6\u7684\u8fc7\u7a0b\u53ef\u4ee5\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n

1. \u7f16\u8bd1\u5e94\u7528\u7a0b\u5e8f\uff1a\u5c06\u6e90\u4ee3\u7801\u7f16\u8bd1\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n

2. \u6784\u5efa\u5e94\u7528\u7a0b\u5e8f\u5305\uff1a\u5c06\u7f16\u8bd1\u540e\u7684\u53ef\u6267\u884c\u6587\u4ef6\u548c\u8d44\u6e90\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u5305\u3002<\/p>\n

3. \u7b7e\u540d\u5e94\u7528\u7a0b\u5e8f\u5305\uff1a\u4f7f\u7528\u8bc1\u4e66\u5bf9\u5e94\u7528\u7a0b\u5e8f\u5305\u8fdb\u884c\u7b7e\u540d\uff0c\u4ee5\u786e\u8ba4\u5e94\u7528\u7a0b\u5e8f\u7684\u8eab\u4efd\u548c\u5b8c\u6574\u6027\u3002<\/p>\n

4. \u6253\u5305ipa\u6587\u4ef6\uff1a\u5c06\u7b7e\u540d\u540e\u7684\u5e94\u7528\u7a0b\u5e8f\u5305\u538b\u7f29\u6210ipa\u6587\u4ef6\u3002<\/p>\n

\u6b65\u9aa4\u4e00\uff1a\u7f16\u8bd1\u5e94\u7528\u7a0b\u5e8f<\/p>\n

\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528xcodebuild\u547d\u4ee4\u7f16\u8bd1\u5e94\u7528\u7a0b\u5e8f\u3002\u5728\u547d\u4ee4\u884c\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

“`<\/p>\n

xcodebuild -workspace YourWorkspace.xcworkspace -scheme YourScheme -configuration Release -archivePath YourArchivePath.xcarchive archive<\/p>\n

“`<\/p>\n

\u89e3\u91ca\u4e00\u4e0b\u8fd9\u4e2a\u547d\u4ee4\uff1a<\/p>\n

– YourWorkspace.xcworkspace\uff1a\u4f60\u7684\u5de5\u4f5c\u533a\u6587\u4ef6\u540d\u3002<\/p>\n

– YourScheme\uff1a\u4f60\u7684scheme\u540d\uff0c\u7528\u4e8e\u6307\u5b9a\u8981\u7f16\u8bd1\u7684\u76ee\u6807\u3002<\/p>\n

– Release\uff1a\u7f16\u8bd1\u7684\u914d\u7f6e\uff0c\u53ef\u4ee5\u6539\u4e3aDebug\u6216\u8005\u5176\u4ed6\u4f60\u9700\u8981\u7684\u914d\u7f6e\u3002<\/p>\n

– YourArchivePath.xcarchive\uff1a\u6307\u5b9a\u751f\u6210\u7684.xcarchive\u6587\u4ef6\u7684\u4fdd\u5b58\u8def\u5f84\u3002<\/p>\n

\u8fd0\u884c\u4e0a\u8ff0ios\u4e91\u7aef\u6253\u5305\u540e<\/a>\u547d\u4ee4\u540e\uff0cXcode\u4f1a\u81ea\u52a8\u521b\u5efa\u4e00\u4e2a.xcarchive\u6587\u4ef6\uff0c\u8be5\u6587\u4ef6\u5305\u542b\u4e86\u6211\u4eec\u7f16\u8bd1\u540e\u7684\u53ef\u6267\u884c\u6587\u4ef6\u548c\u8d44\u6e90\u6587\u4ef6\u3002<\/p>\n

\u6b65\u9aa4\u4e8c\uff1a\u6784\u5efa\u5e94\u7528\u7a0b\u5e8f\u5305<\/p>\n

\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528xcodebuild\u547d\u4ee4\u5c06.xcarchive\u6587\u4ef6\u6784\u5efa\u6210\u5e94\u7528\u7a0b\u5e8f\u5305\u3002\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

“`<\/p>\n

xcodebuild -exportArchive -archivePath YourArchivePath.xcarchive -exportPath YourExportPath -exportOptionsPlist YourExportOptions.plist<\/p>\n

“`<\/p>\n

\u89e3\u91ca\u4e00\u4e0b\u8fd9\u4e2a\u547d\u4ee4\uff1a<\/p>\n

– YourArchivePath.xcarchive\uff1a\u4e4b\u524d\u751f\u6210\u7684.xcarchive\u6587\u4ef6\u8def\u5f84\u3002<\/p>\n

– YourExportPath\uff1a\u6307\u5b9a\u751f\u6210\u7684\u5e94\u7528\u7a0b\u5e8f\u5305\u7684\u4fdd\u5b58\u8def\u5f84\u3002<\/p>\n

– YourExportOptions.plist\uff1a\u5bfc\u51fa\u9009\u9879\u7684\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\uff0c\u5305\u542b\u4e86\u4e00\u4e9b\u6253\u5305\u9009\u9879\uff0c\u4f8b\u5982\u5bfc\u51fa\u65b9\u6cd5\u3001\u63cf\u8ff0\u6587\u4ef6\u7b49\u3002<\/p>\n

\u8fd0\u884c\u4e0a\u8ff0\u547d\u4ee4\u540e\uff0cXcode\u4f1a\u81ea\u52a8\u5c06.xcarchive\u6587\u4ef6\u89e3\u538b\u5e76\u6784\u5efa\u51fa\u5e94\u7528\u7a0b\u5e8f\u5305\u3002<\/p>\n

\u6b65\u9aa4\u4e09\uff1a\u7b7e\u540d\u5e94\u7528\u7a0b\u5e8f\u5305<\/p>\n

\u5728iOS\u5f00\u53d1\u4e2d\uff0c\u5e94\u7528\u7a0b\u5e8f\u5305\u5fc5\u987b\u7ecf\u8fc7\u7b7e\u540d\u624d\u80fd\u5728\u8bbe\u5907\u4e0a\u5b89\u88c5\u548c\u8fd0\u884c\u3002\u7b7e\u540d\u4f7f\u7528\u5230\u4e86\u8bc1\u4e66\u548c\u63cf\u8ff0\u6587\u4ef6\u3002\u53ef\u4ee5\u5728\u82f9\u679c\u5f00\u53d1\u8005\u7f51\u7ad9\u4e0a\u521b\u5efa\u548c\u4e0b\u8f7d\u3002<\/p>\n

\u6211\u4eec\u9700\u8981\u4f7f\u7528codesign\u547d\u4ee4\u5bf9\u5e94\u7528\u7a0b\u5e8f\u5305\u8fdb\u884c\u7b7e\u540d\u3002\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

“`<\/p>\n

codesign -s “YourCertificate” –entitlements YourEntitlements.plist YourAppPath.app<\/p>\n

“`<\/p>\n

\u89e3\u91ca\u4e00\u4e0b\u8fd9\u4e2a\u547d\u4ee4\uff1a<\/p>\n

– YourCertificate\uff1a\u4f60<\/p>\n

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

\u7684\u8bc1\u4e66\u540d\u79f0\uff0c\u53ef\u4ee5\u4f7f\u7528\u8bc1\u4e66\u6253\u5305ios\u54ea\u4e9b\u5751<\/a>\u7684Common Name\u6216\u8005\u5168\u540d\u3002<\/p>\n

– YourEntitlements.plist\uff1a\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u6743\u9650\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u53ef\u4ee5\u4e3a\u7a7a\u3002<\/p>\n

– YourAppPath.app\uff1a\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u5305\u7684\u8def\u5f84\u3002<\/p>\n

\u8fd0\u884c\u4e0a\u8ff0\u547d\u4ee4\u540e\uff0c\u5e94\u7528\u7a0b\u5e8f\u5305\u5c06\u88ab\u7b7e\u540d\uff0c\u5e76\u5177\u6709\u6b63\u786e\u7684\u8eab\u4efd\u4fe1\u606f\u3002<\/p>\n

\u6b65\u9aa4\u56db\uff1a\u6253\u5305ipa\u6587\u4ef6<\/p>\n

\u6700\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177xcrun\u5c06\u7b7e\u540d\u540e\u7684\u5e94\u7528\u7a0b\u5e8f\u5305\u6253\u5305\u6210ipa\u6587\u4ef6\u3002\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

“`<\/p>\n

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

“`<\/p>\n

\u89e3\u91ca\u4e00\u4e0b\u8fd9\u4e2a\u547d\u4ee4\uff1a<\/p>\n

– YourAppPath.app\uff1a\u4e4b\u524d\u7b7e\u540d\u540e\u7684\u5e94\u7528\u7a0b\u5e8f\u5305\u7684\u8def\u5f84\u3002<\/p>\n

– YourIpaPath.ipa\uff1a\u751f\u6210\u7684ipa\u6587\u4ef6\u7684\u4fdd\u5b58\u8def\u5f84\u3002<\/p>\n

\u8fd0\u884c\u4e0a\u8ff0\u547d\u4ee4\u540e\uff0c<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728iOS\u5f00\u53d1\u4e2d\uff0c\u6211\u4eec\u901a\u5e38\u9700\u8981\u5c06\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u4e3aipa\u6587\u4ef6\u8fdb\u884c\u5206\u53d1\u6216\u8005\u53d1\u5e03\u5230App Store\u3002\u867d\u7136\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Xcode\u6765\u5b8c\u6210\u8fd9\u4e2a\u8fc7\u7a0b\uff0c\u4f46\u662f\u547d\u4ee4\u884c\u5de5\u5177\u63d0\u4f9b\u4e86\u66f4\u9ad8\u6548\u7684\u65b9\u6cd5\u6765\u6253\u5305ipa\u6587\u4ef6\u3002\u8fd9\u7bc7\u6587\u7ae0\u5c06\u4ecb\u7ecd<\/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":[12937,832,16,12936,8298],"topic":[],"class_list":{"0":"post-7258","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-appkf","7":"tag-ios","8":"tag-832","9":"tag-16","11":"tag-8298"},"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/7258","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=7258"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/7258\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=7258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=7258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=7258"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=7258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}