{"id":3672,"date":"2023-04-25T17:51:19","date_gmt":"2023-04-25T09:51:19","guid":{"rendered":"https:\/\/app.applebyme.cn\/cloud\/?p=3672"},"modified":"2023-04-25T17:51:19","modified_gmt":"2023-04-25T09:51:19","slug":"python%e6%89%93%e5%8c%85ipa%e5%8f%af%e4%bb%a5%e5%98%9b%ef%bc%9f%e5%8e%9f%e7%90%86%e6%98%af%e4%bb%80%e4%b9%88%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/app.applebyme.cn\/cloud\/appkaifa\/3672.html","title":{"rendered":"python\u6253\u5305ipa\u53ef\u4ee5\u561b\uff1f\u539f\u7406\u662f\u4ec0\u4e48\uff1f"},"content":{"rendered":"<p>Python\u53ef\u4ee5\u7528\u6765\u6253\u5305iOS\u5e94\u7528\u7a0b\u5e8f\u5305\uff08IPA\uff09\uff0c\u8fd9\u662f\u56e0\u4e3a\u5b83\u662f<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-850.html\">app\u8fdb\u884cipa\u6253\u5305<\/a>\u4e00\u79cd\u529f\u80fd\u5f3a\u5927\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u53ef\u4ee5\u8bbf\u95ee<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-2726.html\">\u5c06\u81ea\u9002\u5e94\u7f51\u9875\u6253\u5305apk<\/a>iOS\u5f00\u53d1\u5de5\u5177\u94fe\u4e2d\u7684\u5404\u79cd\u547d\u4ee4\u884c\u5de5\u5177\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Python\u6765\u6253\u5305iOS\u5e94\u7528\u7a0b\u5e8f\u5305\u3002<\/p>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u4e86\u89e3\u4e00\u4e0biOS\u5e94\u7528\u7a0b\u5e8f\u5305\u7684\u7ed3\u6784\u3002iOS\u5e94\u7528\u7a0b\u5e8f\u5305\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2aZIP\u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u3001\u8d44\u6e90\u6587\u4ef6\u3001\u914d\u7f6e\u6587\u4ef6\u7b49\u3002\u6211\u4eec\u9700\u8981\u5c06\u8fd9\u4e9b\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2aIPA\u6587\u4ef6\uff0c\u7136\u540e\u5c06\u5176\u5b89\u88c5\u5230iOS\u8bbe\u5907\u4e0a\u3002<\/p>\n<p>\u5728Python\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528subprocess\u6a21\u5757\u6765\u6267\u884c\u547d\u4ee4\u884c\u5de5\u5177\u3002\u6211\u4eec\u9700\u8981\u4f7f\u7528Xcode\u7684\u547d\u4ee4\u884c\u5de5\u5177\u94fe\u4e2d\u7684\u4e00\u4e9b\u5de5\u5177\u6765\u6253\u5305IPA\u6587\u4ef6\u3002\u8fd9\u4e9b\u5de5\u5177\u5305\u62ecxcodebuild\u3001xcrun\u548cPackageApplication\u3002<\/p>\n<p>xcodebuild\u662f\u7528\u4e8e\u6784\u5efaXcode\u9879\u76ee\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u7f16\u8bd1\u548c\u6784\u5efa\u6211\u4eec\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u8981\u4f7f\u7528xcodebuild\uff0c\u6211\u4eec\u9700\u8981\u6307\u5b9a\u9879\u76ee\u6587\u4ef6\u548c\u76ee\u6807\u8bbe\u5907\uff0c\u4f8b\u5982\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>xcodebuild -project MyProject.xcodeproj -scheme MyScheme -destination &#8216;platform=iOS,name=iPhone&#8217;<\/p>\n<p>&#8220;`<\/p>\n<p>\u8fd9\u5c06\u7f16\u8bd1\u5e76\u6784\u5efaMyProject.xcodeproj\u9879\u76ee\uff0c\u5e76\u5c06\u5176\u90e8\u7f72\u5230iPhone\u8bbe\u5907\u4e0a\u3002<\/p>\n<p>xcrun\u662f\u4e00\u4e2a\u7528\u4e8e\u8fd0\u884cXcode\u5de5\u5177\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u83b7\u53d6SDK\u8def\u5f84\u3001\u7b7e\u540d\u8bc1\u4e66\u7b49\u4fe1\u606f\u3002\u4f8b\u5982\uff0c\u8981\u83b7\u53d6\u5f53\u524dXcode\u5b89\u88c5\u7684iOS SDK\u8def\u5f84\uff0c\u53ef\u4ee5\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>xcrun &#8211;sdk iphoneos &#8211;show-sdk-path<\/p>\n<p>&#8220;`<\/p>\n<p>PackageApplication\u662f\u4e00\u4e2a\u7528\u4e8e\u6253\u5305iOS\u5e94\u7528\u7a0b\u5e8f\u5305\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002\u5b83\u5c06\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210IPA\u6587\u4ef6\uff0c\u5e76\u5c06\u5176\u7b7e\u540d\u3002\u8981\u4f7f\u7528PackageApplication\uff0c\u6211\u4eec\u9700\u8981\u6307\u5b9a\u5e94\u7528\u7a0b\u5e8f\u7684\u8def\u5f84\u3001\u7b7e\u540d\u8bc1\u4e66\u3001\u63cf\u8ff0\u6587\u4ef6\u7b49\u3002\u4f8b\u5982\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>PackageApplication -v \/path\/to\/MyApp.app -o \/path\/to\/MyApp.ipa &#8211;sign &#8220;iPhone Distribution: MyCompany, Inc.&#8221; &#8211;embed &#8220;\/path\/to\/MyApp.mobileprovision&#8221;<\/p>\n<p>&#8220;`<\/p>\n<p>\u8fd9\u5c06\u6253\u5305MyApp.app\u5e94\u7528\u7a0b\u5e8f\u5e76\u7b7e\u540d\uff0c\u7136\u540e\u5c06\u5176\u4fdd\u5b58\u4e3aMyApp.ipa\u6587\u4ef6\u3002<\/p>\n<p>\u73b0\u5728\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u8fd9\u4e9b\u547d\u4ee4\u7ec4\u5408\u5728\u4e00\u8d77\u6765\u6253\u5305iOS\u5e94\u7528\u7a0b\u5e8f\u5305\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.cdn.yimenapp.com\/2023-03\/20\/13\/30415933178.jpg\" \/><\/figure>\n<\/p>\n<p>\u4f7f\u7528Python\u811a\u672c\u6253\u5305iOS\u5e94\u7528\u7a0b\u5e8f\u5305\u7684\u793a\u4f8b\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>import subprocess<\/p>\n<p># \u7f16\u8bd1\u548c\u6784\u5efa\u9879\u76ee<\/p>\n<p>subprocess.check_call([&#8216;xcodebuild&#8217;, &#8216;-project&#8217;, &#8216;MyProject.xcodeproj&#8217;, &#8216;-scheme&#8217;, &#8216;MyScheme&#8217;, &#8216;-destination&#8217;, &#8216;platform=iOS,name=iPhone&#8217;])<\/p>\n<p># \u83b7\u53d6iOS SDK\u8def\u5f84<\/p>\n<p>sdk_path = subprocess.check_output([&#8216;xcrun&#8217;, &#8216;&#8211;sdk&#8217;, &#8216;iphoneos&#8217;, &#8216;&#8211;show-sdk-path&#8217;]).strip()<\/p>\n<p># \u6253\u5305\u5e94\u7528\u7a0b\u5e8f<\/p>\n<p>subprocess.check_call([&#8216;PackageApplication&#8217;, &#8216;-v&#8217;, &#8216;\/path\/to\/MyApp.app&#8217;, &#8216;-o&#8217;, &#8216;\/path\/to\/MyApp.ipa&#8217;, &#8216;&#8211;sign&#8217;, &#8216;iPhone Distribution: MyCompany, Inc.&#8217;, &#8216;&#8211;embed&#8217;, &#8216;\/path\/to\/MyApp.mobileprovision&#8217;, &#8216;&#8211;sdk&#8217;, sdk_path])<\/p>\n<p>&#8220;`<\/p>\n<p>\u8fd9\u4e2a\u811a\u672c\u5c06\u7f16\u8bd1\u548c\u6784\u5efaMyProject.xcodeproj\u9879\u76ee\uff0c\u5e76\u5c06\u5176\u6253\u5305\u6210MyApp.ipa\u6587\u4ef6\u3002\u5b83\u8fd8\u83b7\u53d6\u4e86\u5f53\u524d\u5b89\u88c5\u7684iOS SDK\u8def\u5f84\uff0c\u5e76\u5c06\u5176\u4f20\u9012\u7ed9PackageApplication\u547d\u4ee4\u3002<\/p>\n<p>\u603b\u4e4b\uff0c\u4f7f\u7528Python\u6253\u5305iOS\u5e94\u7528\u7a0b\u5e8f\u5305\u53ef\u80fd\u9700\u8981\u4e00\u4e9b\u547d\u4ee4\u884c\u5de5\u5177\u7684\u77e5\u8bc6\uff0c\u4f46\u662fPython\u7684\u5f3a\u5927\u529f\u80fd\u53ef\u4ee5\u4f7f\u8fd9\u4e2a\u8fc7\u7a0b\u53d8\u5f97\u66f4\u52a0\u7b80\u5355\u548c\u81ea\u52a8\u5316\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python\u53ef\u4ee5\u7528\u6765\u6253\u5305iOS\u5e94\u7528\u7a0b\u5e8f\u5305\uff08IPA\uff09\uff0c\u8fd9\u662f\u56e0\u4e3a\u5b83\u662f\u4e00\u79cd\u529f\u80fd\u5f3a\u5927\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u53ef\u4ee5\u8bbf\u95eeiOS\u5f00\u53d1\u5de5\u5177\u94fe\u4e2d\u7684\u5404\u79cd\u547d\u4ee4\u884c\u5de5\u5177\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Python\u6765\u6253\u5305iOS\u5e94\u7528\u7a0b\u5e8f\u5305\u3002\u9996<\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[4403,4402,3183,960,802],"class_list":["post-3672","post","type-post","status-publish","format-standard","hentry","category-appkaifa","tag-h5app","tag-htmlapp","tag-3183","tag-960","tag-802"],"_links":{"self":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/3672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/comments?post=3672"}],"version-history":[{"count":0,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/3672\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/media?parent=3672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/categories?post=3672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/tags?post=3672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}