{"id":30461,"date":"2024-05-20T17:49:19","date_gmt":"2024-05-20T09:49:19","guid":{"rendered":"https:\/\/h5app.yimenapp.cn\/h5app\/?p=30461"},"modified":"2024-05-20T17:49:19","modified_gmt":"2024-05-20T09:49:19","slug":"quick%e6%89%93%e5%8c%85app%e6%93%8d%e4%bd%9c%e6%ad%a5%e9%aa%a4%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/h5app.yimenapp.cn\/h5app\/2024\/sjapp\/30461\/","title":{"rendered":"quick\u6253\u5305app\u64cd\u4f5c\u6b65\u9aa4\u4ecb\u7ecd"},"content":{"rendered":"<p>Quick\u662f\u4e00\u6b3eiOS\u5f00\u53d1\u8bed\u8a00Swift\u7684\u6846\u67b6\uff0c\u5b83\u7684\u76ee\u6807\u662f\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\uff0c\u7b80\u5316\u7f16\u5199\u4ee3\u7801\u7684\u8fc7\u7a0b\u3002\u5176\u4e2d\uff0cQuick\u63d0\u4f9b\u4e86\u4e00\u79cd\u65b9\u4fbf\u7684\u65b9\u5f0f\uff0c\u53ef\u4ee5\u901a\u8fc7\u6253\u5305app\u6765\u6d4b\u8bd5\u5e94\u7528\u7a0b\u5e8f\u7684\u529f\u80fd\u3002\u4e0b\u9762\u5c06\u4ecb\u7ecdQuick\u6253\u5305app\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n<p>\u4e00\u3001\u539f\u7406<\/p>\n<p>Quick\u6253\u5305app\u7684\u539f\u7406\u662f\u5c06\u5e94\u7528\u7a0b\u5e8f\u7f16\u8bd1\u4e3a.ipa\u6587\u4ef6\uff0c\u7136\u540e\u901a\u8fc7Xcode\u6216\u5176\u4ed6\u5de5\u5177\u5c06\u5176\u5b89\u88c5\u5230\u8bbe\u5907\u4e0a\u3002\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0cQuick\u63d0\u4f9b\u4e86\u4e00\u4e9b\u65b9\u4fbf\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u81ea\u52a8\u5316\u6253\u5305\u8fc7\u7a0b\uff0c\u51cf\u5c11\u6253\u5305\u7684\u65f6\u95f4\u548c\u624b\u52a8\u64cd\u4f5c\u3002<\/p>\n<p>\u4e8c\u3001\u6b65\u9aa4<\/p>\n<p>1.\u521b\u5efa\u9879\u76ee<\/p>\n<p>\u5728Xcode\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee\uff0c\u9009\u62e9Single View App\u6a21\u677f\uff0c\u5e76\u8bbe\u7f6e\u597d\u5e94\u7528\u7a0b\u5e8f\u7684\u540d\u79f0\u548c\u5176\u4ed6\u76f8\u5173\u4fe1\u606f\u3002<\/p>\n<p>2.\u5b89\u88c5Quick<\/p>\n<p>\u6253\u5f00Terminal\u5e94\u7528\u7a0b\u5e8f\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>sudo g<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-108.html\">\u7f51\u9875\u6253\u5305app\u5de5\u5177<\/a>em install quick<\/p>\n<p>&#8220;`<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u68c0\u67e5\u662f\u5426\u5df2\u6210\u529f\u5b89\u88c5Quick\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>quick help<\/p>\n<p>&#8220;`<\/p>\n<p>3.\u521b\u5efa\u6d4b\u8bd5\u7528\u4f8b<\/p>\n<p>\u5728\u9879\u76ee\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6d4b\u8bd5\u6587\u4ef6\uff0c\u4f8b\u5982SampleSpec.swift\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p><a href=\"https:\/\/appdabao.yimenapp.com\/jiage-2439.html\">\u7b80\u5355h5app<\/a><\/p>\n<p>import Quick<\/p>\n<p>import Nimble<\/p>\n<p>class SampleSpec: QuickSpec {<\/p>\n<p>    override func spec() {<\/p>\n<p>        describe(&#8220;Sample&#8221;) {<\/p>\n<p>            context(&#8220;when initialized&#8221;) {<\/p>\n<p>                it(&#8220;should have a name&#8221;) {<\/p>\n<p>                    let sample = Sample(name: &#8220;Test&#8221;)<\/p>\n<p>                    expect(sample.name).to(equal(&#8220;Test&#8221;))<\/p>\n<p>                }<\/p>\n<p>            }<\/p>\n<p>        }<\/p>\n<p>    }<\/p>\n<p>}<\/p>\n<p>class Sample {<\/p>\n<p>    let name: String<\/p>\n<\/p>\n<p>    init(name: String) {<\/p>\n<p>        self.name = name<\/p>\n<p>    }<\/p>\n<p>}<\/p>\n<p>&#8220;`<\/p>\n<p>\u8fd9\u4e2a\u6d4b\u8bd5\u7528\u4f8b\u6d4b\u8bd5\u4e86\u4e00\u4e2a\u7b80\u5355\u7684Sample\u7c7b\uff0c\u786e\u4fdd\u5b83\u7684name\u5c5e\u6027\u5728\u521d\u59cb\u5316\u65f6\u88ab\u6b63\u786e\u8bbe\u7f6e\u3002<\/p>\n<p>4.\u7f16\u5199\u6253\u5305\u811a\u672c<\/p>\n<p>\u5728\u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3abuild.sh\u7684\u6587\u4ef6\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>#!\/bin\/sh<\/p>\n<p>xcodebuild -workspace Sample.xcworkspace -scheme Sample<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.yimenyun.net\/2023-03\/21\/10\/02714928547.jpg\" \/><\/figure>\n<\/p>\n<p> -configuration Release -sdk iphoneos build CODE_SIGN_IDENTITY=&#8221;&#8221; CODE_SIGNING_REQUIRED=NO<\/p>\n<p>mkdir -p build\/device<\/p>\n<p>cp -r build\/Release-iphoneos\/Sample.app build\/device\/<\/p>\n<p>ipa build -w Sample.xcworkspace -s Sample -c Release -o build\/device\/Sample.ipa<\/p>\n<p>&#8220;`<\/p>\n<p>\u8fd9\u4e2a\u811a\u672c\u4f7f\u7528xcodebuild\u547d\u4ee4\u7f16\u8bd1\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u5c06\u5176\u590d\u5236\u5230build\/device\u76ee\u5f55\u4e0b\u3002\u7136\u540e\uff0c\u4f7f\u7528ipa\u547d\u4ee4\u521b\u5efa\u4e00\u4e2a.ipa\u6587\u4ef6\u3002<\/p>\n<p>5.\u8fd0\u884c\u6253\u5305\u811a\u672c<\/p>\n<p>\u5728Terminal\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>sh build.sh<\/p>\n<p>&#8220;`<\/p>\n<p>\u8fd9\u4e2a\u547d\u4ee4\u5c06\u4f1a\u6267\u884cbuild.sh\u811a\u672c\uff0c\u5e76\u81ea\u52a8\u5316\u6267\u884c\u6253\u5305\u8fc7\u7a0b\u3002<\/p>\n<p>6.\u5b89\u88c5\u5e94\u7528\u7a0b\u5e8f<\/p>\n<p>\u5c06\u751f\u6210\u7684.ipa\u6587\u4ef6\u62d6\u52a8\u5230Xcode\u4e2d\u7684Devices and Simulators\u7a97\u53e3\u4e2d\uff0c\u7136\u540e\u5c06\u5e94\u7528\u7a0b\u5e8f\u5b89\u88c5\u5230\u8bbe\u5907\u4e0a\u3002<\/p>\n<p>7.\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b<\/p>\n<p>\u5728\u8bbe\u5907\u4e0a\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\uff0c\u5728Xcode\u4e2d\u6253\u5f00\u63a7\u5236\u53f0\u7a97\u53e3\uff0c\u53ef\u4ee5\u770b\u5230\u6d4b\u8bd5\u7528\u4f8b\u7684\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fQuick\u6253\u5305app\u7684\u8be6\u7ec6\u6b65\u9aa4\u3002\u901a\u8fc7\u4f7f\u7528Quick\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5feb\u901f\u5730\u521b\u5efa\u6d4b\u8bd5\u7528\u4f8b\uff0c\u81ea\u52a8\u5316\u6253\u5305\u8fc7\u7a0b\uff0c\u5e76\u5728\u8bbe\u5907\u4e0a\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b\uff0c\u4ece\u800c\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u548c\u4ee3\u7801\u8d28\u91cf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quick\u662f\u4e00\u6b3eiOS\u5f00\u53d1\u8bed\u8a00Swift\u7684\u6846\u67b6\uff0c\u5b83\u7684\u76ee\u6807\u662f\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\uff0c\u7b80\u5316\u7f16\u5199\u4ee3\u7801\u7684\u8fc7\u7a0b\u3002\u5176\u4e2d\uff0cQuick\u63d0\u4f9b\u4e86\u4e00\u79cd\u65b9\u4fbf\u7684\u65b9\u5f0f\uff0c\u53ef\u4ee5\u901a\u8fc7\u6253\u5305app\u6765\u6d4b\u8bd5\u5e94\u7528\u7a0b\u5e8f\u7684\u529f\u80fd\u3002\u4e0b\u9762\u5c06\u4ecb\u7ecdQuick\u6253\u5305ap<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[22364,5334,395,11,252],"topic":[],"class_list":["post-30461","post","type-post","status-publish","format-standard","hentry","category-sjapp","tag-app","tag-ios","tag-395","tag-11","tag-252"],"_links":{"self":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/30461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/comments?post=30461"}],"version-history":[{"count":1,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/30461\/revisions"}],"predecessor-version":[{"id":30510,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/30461\/revisions\/30510"}],"wp:attachment":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/media?parent=30461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/categories?post=30461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/tags?post=30461"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/topic?post=30461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}