{"id":11169,"date":"2023-12-05T12:33:18","date_gmt":"2023-12-05T04:33:18","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=11169"},"modified":"2023-12-05T12:33:18","modified_gmt":"2023-12-05T04:33:18","slug":"ios-%e8%bf%9c%e7%a8%8b%e6%89%93%e5%8c%85%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e7%9a%84%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/11169\/","title":{"rendered":"ios \u8fdc\u7a0b\u6253\u5305\u5982\u4f55\u5b9e\u73b0\u7684\uff1f"},"content":{"rendered":"

iOS\u8fdc\u7a0b\u6253\u5305\u662f\u6307\u5229\u7528\u8fdc\u7a0b\u670d\u52a1\u5668\u6765\u8fdb\u884ciOS\u5e94\u7528\u7684\u6253\u5305\u64cd\u4f5c\uff0c\u800c\u4e0d\u9700\u8981\u5728\u672c\u5730\u7535\u8111\u4e0a\u8fdb\u884c\u3002\u5b83\u7684\u539f\u7406\u662f\u901a\u8fc7\u5728\u672c\u5730\u7535\u8111\u4e0a\u6267\u884c\u547d\u4ee4\uff0c\u5c06\u76f8\u5173\u6784\u5efa\u4efb\u52a1\u548c\u914d\u7f6e\u4fe1\u606f\u4f20\u8f93\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\uff0c\u7136\u540e\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u8fdb\u884c\u6253\u5305\u64cd\u4f5c\u5e76\u751f\u6210.ipa\u6587\u4ef6\u3002\u6700\u540e\uff0c\u5c06\u6253\u5305\u751f\u6210\u7684.ipa\u6587\u4ef6\u4e0b\u8f7d\u5230\u672c\u5730\u7535\u8111\u4e0a\u3002<\/p>\n

\u4e0b\u9762\u662f\u8be6\u7ec6\u7684\u4ecb\u7ecd\u548c\u6b65\u9aa4\uff1a<\/p>\n

1. \u914d\u7f6e\u8fdc\u7a0b\u670d\u52a1\u5668\uff1a\u9996\u5148\uff0c\u9700\u8981\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u5fc5\u8981\u7684\u8f6f\u4ef6\u548c\u5de5\u5177\uff0c\u5982Xcode\u547d\u4ee4\u884c\u5de5\u5177\u3001Cocoapods\u7b49\u3002\u901a\u8fc7\u7ec8\u7aef\u767b\u5f55\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u5b89\u88c5Xcode\u547d\u4ee4\u884c\u5de5\u5177\uff1a<\/p>\n

“`shell<\/p>\n

xcode-select –install<\/p>\n

“`<\/p>\n

\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u901a\u8fc7\u5982\u4e0b\u547d\u4ee4\u5b89\u88c5Cocoapods\uff1a<\/p>\n

“`shell<\/p>\n

sudo gem install cocoapods<\/p>\n

“`<\/p>\n

2. \u914d\u7f6e\u672c\u5730\u7535\u8111\uff1a\u5728\u672c\u5730\u7535\u8111\u4e0a\uff0c\u9700\u8981\u5b89\u88c5\u5e76\u914d\u7f6eSSH\u5bc6\u94a5\uff0c\u4ee5\u4fbf\u80fd\u591f\u5728\u672c\u5730\u7535\u8111\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e4b\u95f4\u8fdb\u884c\u5b89\u5168\u7684\u901a\u4fe1\u3002\u5728\u7ec8\u7aef\u4e2d\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u751f\u6210SSH\u5bc6\u94a5\uff1a<\/p>\n

“`shell<\/p>\n

ssh-keygen -t rsa -b 4096 -C “your_email@example.com”<\/p>\n

“`<\/p>\n

\u6309\u7167\u63d0\u793a\u64cd\u4f5c\uff0c\u751f\u6210\u5bc6\u94a5\u540e\u4f1a\u5728\u672c\u5730\u7535\u8111\u7684\u7528\u6237\u76ee\u5f55\u4e0b\u751f\u6210.ssh\u6587\u4ef6\u5939\uff0c\u5176\u4e2d\u5305\u542bid_rsa\u548cid_rsa.pub\u4e24\u4e2a\u6587\u4ef6\u3002\u7136\u540e\u5c06\u751f\u6210\u7684\u516c\u94a5\uff08id_rsa.pub\u6587\u4ef6\uff09\u590d\u5236\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684~\/.ssh\/authorized_keys\u6587\u4ef6\u4e2d\uff0c\u4ee5\u5b9e\u73b0\u53cc\u65b9\u7684\u4e92\u4fe1\u3002<\/p>\n

3. \u5728\u672c\u5730\u7535\u8111\u4e0a\u521b\u5efa\u6253\u5305\u811a\u672c\uff1a\u6253\u5f00\u7ec8\u7aef\uff0c\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u521b\u5efa\u4e00\u4e2a\u540d\u4e3abuild.sh\u7684\u6587\u4ef6\uff0c\u5e76\u5c06\u4ee5\u4e0b\u5185\u5bb9\u7c98\u8d34\u8fdb\u53bb\uff1a<\/p>\n

“`shell<\/p>\n

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

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

pod install<\/p>\n

xcodebuild \\<\/p>\n

-workspace YourProject.xcworkspace \\<\/p>\n

-scheme YourScheme \\<\/p>\n

-configuration Release \\<\/p>\n

-archivePath YourProject.xcarchive \\<\/p>\n

archive<\/p>\n

xcodebuild \\<\/p>\n

-exportArchive \\<\/p>\n

-archivePath YourProject.xcarchive \\<\/p>\n

-exportPath YourProjecthb\u6253\u5305ios<\/a> \\<\/p>\n

-exportOptionsPlist ExportOptions.plist<\/p>\n

“`<\/p>\n

\u5176\u4e2d\uff0c\/path\/to\/project\u662f\u4f60\u7684\u9879\u76ee\u6240\u5728\u7684\u8def\u5f84\uff0cYourProject.xcworkspace\u662f\u4f60\u7684\u9879\u76ee\u7684workspace\u6587\u4ef6\u540d\uff0cYourScheme\u662f\u4f60\u7684\u9879\u76ee\u7684scheme\u540d\u79f0\uff0cYourProject\u662f\u6253\u5305\u751f\u6210\u7684.ipa\u6587\u4ef6\u7684\u8f93\u51fa\u8def\u5f84\u3002<\/p>\n

4. \u521b\u5efa\u5bfc\u51fa\u9009\u9879\u914d\u7f6e\u6587\u4ef6\uff1a\u5728\u7ec8\u7aef\u4e2d\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u521b\u5efa\u4e00\u4e2a\u540d\u4e3aExportOptions.plist\u7684\u6587\u4ef6\uff0c\u5e76\u5c06\u4ee5\u4e0b\u5185\u5bb9\u7c98\u8d34\u8fdb\u53bb\uff1a<\/p>\n

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

\n

\n

method<\/p>\n

ad-hoc<\/p>\n

teamID<\/p>\n

YourTeamID<\/p>\n

destination<\/p>\n

export<\/p>\n

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

“`<\/p>\n

\u5176\u4e2d\uff0cYourTeamID\u662f\u4f60\u7684\u5f00\u53d1\u8005\u56e2\u961f\u7684Team ID\uff08\u53ef\u4ee5\u5728\u82f9\u679c\u5f00\u53d1\u8005\u8d26\u6237\u4e2d\u67e5\u627e\uff09\u3002<\/p>\n

5. \u5728\u7ec8\u7aef\u4e2d\u7ed9build.sh\u6587\u4ef6\u6dfb\u52a0\u6267\u884c\u6743\u9650\uff1a<\/p>\n

“`shell<\/p>\n

chmod +x build.sh<\/p>\n

“`<\/p>\n

6. \u6267\u884c\u6253\u5305\u64cd\u4f5c\uff1a\u5728\u7ec8\u7aef\u4e2d\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fde\u63a5\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u5e76\u6267\u884c\u6253\u5305\u811a\u672c\uff1a<\/p>\n

“`shell<\/p>\n

ssh username@remoteServer ‘bash -s’ <\/p>\n

“`<\/p>\n

\u5176\u4e2d\uff0cusername\u662f\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u7528\u6237\u540d\uff0cremoteServer\u662f\u8fdc\u7a0b\u670d\u52a1\u5668\u7684IP\u5730\u5740\u6216\u57df\u540d\u3002\u6267\u884c\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4ece\u8fdc\u7a0b\u670d<\/p>\n

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

\u52a1\u5668\u4e0a\u4e0b\u8f7d\u751f\u6210\u7684.ipa\u6587\u4ef6\u3002<\/p>\n

ios\u6301\u7eed\u96c6\u6210\u4e0e\u81ea\u52a8\u6253\u5305<\/a><\/p>\n

\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u5c31\u53ef\u4ee5\u5b9e\u73b0iOS\u5e94\u7528\u7684\u8fdc\u7a0b\u6253\u5305\u64cd\u4f5c\u4e86\u3002\u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u8282\u7701\u672c\u5730\u7535\u8111\u7684\u8d44\u6e90\uff0c\u63d0\u9ad8\u6253\u5305\u6548\u7387\uff0c\u5e76\u65b9\u4fbf\u4e0e\u56e2\u961f\u6210\u5458\u5171\u4eab\u6253\u5305\u751f\u6210\u7684.ipa\u6587\u4ef6\u3002\u540c\u65f6\uff0c\u8fdc\u7a0b\u6253\u5305\u8fd8\u53ef\u4ee5\u7528\u4e8e\u81ea\u52a8\u5316\u6784\u5efa\u548c\u6301\u7eed\u96c6\u6210\u7b49\u573a\u666f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

iOS\u8fdc\u7a0b\u6253\u5305\u662f\u6307\u5229\u7528\u8fdc\u7a0b\u670d\u52a1\u5668\u6765\u8fdb\u884ciOS\u5e94\u7528\u7684\u6253\u5305\u64cd\u4f5c\uff0c\u800c\u4e0d\u9700\u8981\u5728\u672c\u5730\u7535\u8111\u4e0a\u8fdb\u884c\u3002\u5b83\u7684\u539f\u7406\u662f\u901a\u8fc7\u5728\u672c\u5730\u7535\u8111\u4e0a\u6267\u884c\u547d\u4ee4\uff0c\u5c06\u76f8\u5173\u6784\u5efa\u4efb\u52a1\u548c\u914d\u7f6e\u4fe1\u606f\u4f20\u8f93\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\uff0c\u7136\u540e\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u8fdb\u884c\u6253\u5305\u64cd\u4f5c\u5e76<\/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":[16751,16752,16,9374,2263],"topic":[],"class_list":["post-11169","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-iosipa","tag-ios","tag-16","tag-9374","tag-2263"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/11169","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=11169"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/11169\/revisions"}],"predecessor-version":[{"id":11211,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/11169\/revisions\/11211"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=11169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=11169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=11169"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=11169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}