{"id":1037,"date":"2015-01-14T18:07:00","date_gmt":"2015-01-14T10:07:00","guid":{"rendered":"http:\/\/www.yeetrack.com\/?p=1037"},"modified":"2023-11-23T09:37:18","modified_gmt":"2023-11-23T01:37:18","slug":"ios%e5%91%bd%e4%bb%a4%e8%a1%8c%e6%89%93%e5%8c%85%e9%9d%99%e6%80%81%e4%bb%a3%e7%a0%81%e6%a3%80%e6%9f%a5","status":"publish","type":"post","link":"https:\/\/www.yeetrack.com\/?p=1037","title":{"rendered":"IOS\u547d\u4ee4\u884c\u6253\u5305&#038;\u9759\u6001\u4ee3\u7801\u68c0\u67e5"},"content":{"rendered":"<p>\u654f\u6377\u5f00\u53d1\u4e2d\uff0c\u4ece\u4ee3\u7801\u5230\u6253\u5305\uff0c\u5230\u9759\u6001\u68c0\u67e5\uff0c\u5230\u5355\u6d4b\uff0c\u5230\u63a5\u53e3\u6d4b\u8bd5\uff0c\u518d\u5230\u9875\u9762\u6d4b\u8bd5\uff0c\u5e94\u8be5\u662f\u4e2a\u5b8c\u6574\u7684\u6d41\u7a0b\uff0cios\u867d\u7136\u662f\u95ed\u6e90\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5de5\u5177\u5b9e\u73b0\u8fd9\u4e00\u8fc7\u7a0b\uff0c\u4e0b\u9762\u7b80\u5355\u8bb0\u5f55\u4e0b\u6253\u5305\u548c\u9759\u6001\u4ee3\u7801\u68c0\u67e5\u7684\u65b9\u6cd5\u3002<\/p>\n<h2>\u6253\u5305<\/h2>\n<p>ios\u547d\u4ee4\u884c\u6253\u5305\uff0c\u65e0\u975e\u5c31\u662f\u4e24\u6761\u547d\u4ee4<code>xcodebuild<\/code>\u548c<code>xcrun<\/code>,\u4e0d\u8fc7\u56e0\u4e3a\u82f9\u679c\u5bf9\u7b7e\u540d\u548c\u6743\u9650\u63a7\u5236\u7684\u6bd4\u8f83\u4e25\u683c\uff0c\u9700\u8981\u5f00\u53d1\u8005\u8d26\u53f7\u624d\u80fd\u641e\u5b9a\u3002<!--more--><\/p>\n<pre><code>    xcodebuild -target \"${PROJECT_NAME}\" -sdk \"${TARGET_SDK}\" -configuration Release | tee xcodebuild.log\n\n    \/usr\/bin\/xcrun -sdk iphoneos PackageApplication -v \"${PROJECT_BUILDDIR}\/${PROJECT_NAME}.app\" -o \"${OUTPUT_DIR}\/${PROJECT_NAME}.ipa\" --sign \"\u5f00\u53d1\u8005\u540d\u5b57\u6216\u8005\u516c\u53f8\u540d\u5b57\" --embed \"${PROVISONNING_PROFILE}\"\n<\/code><\/pre>\n<p>\u5982\u679c\u9700\u8981\u8fdc\u7a0b\u6253\u5305\uff0c\u9700\u8981\u63d0\u524d\u6267\u884c\u4e0b\u9762\u7684\u547d\u4ee4\uff1a<\/p>\n<pre><code>    security unlock-keychain -p yourpassword  ~\/Library\/Keychains\/login.keychain\n<\/code><\/pre>\n<h2>\u9759\u6001\u4ee3\u7801\u68c0\u67e5<\/h2>\n<p>\u8fd9\u91cc\u4f7f\u7528oclint\uff0c\u4f7f\u7528oclint\u9700\u8981xcodebuild\u7f16\u8bd1\u65f6\u7684\u65e5\u5fd7\u4f5c\u4e3a\u8f93\u5165\u3002\u6240\u4ee5\u5728ios\u6253\u5305\u7684\u65f6\u5019\uff0c\u8981\u628a\u65e5\u5fd7\u8bb0\u5f55\u4e0b\u6765\u3002<\/p>\n<pre><code>    xcodebuild -target \"${PROJECT_NAME}\" -sdk \"${TARGET_SDK}\" -configuration Release | tee xcodebuild.log  \n<\/code><\/pre>\n<p>\u4e0b\u9762\u662foclint\u68c0\u67e5\u7684\u8fc7\u7a0b\uff1a<\/p>\n<pre><code>oclint-xcodebuild xcodebuild.log\noclint-json-compilation-database -e 3rdLibs* -e LONG_CLASS -e LONG_METHOD -e TOO_MANY_PARAMETERS -e LONG_LINE -- -report-type pmd -o oclint.xml\n\nif [ \"$?\" = \"0\" ]; then\n    echo \"no warning\"\nelse\n    echo \"with warning\"\nfi\n<\/code><\/pre>\n<p>oclint.xml\u5c31\u662f\u68c0\u67e5\u7684\u7ed3\u679c\uff0cjenkins\u4e2d\u6709\u63d2\u4ef6\u53ef\u4ee5\u76f4\u63a5\u4ee5\u9875\u9762\u7684\u5f62\u5f0f\u5c55\u793a\u51fa\u6765\uff0c\u65b9\u5f0f\u662f\u4f7f\u7528&quot;Publish PMD analysis results&quot;\u3002<\/p>\n<p><a href=\"https:\/\/yeetrack-space.bj.bcebos.com\/blog\/201501\/\/\u5c4f\u5e55\u5feb\u7167-2015-01-14-\u4e0b\u53486.03.12.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1038\" src=\"https:\/\/yeetrack-space.bj.bcebos.com\/blog\/201501\/\/\u5c4f\u5e55\u5feb\u7167-2015-01-14-\u4e0b\u53486.03.12.png\" alt=\"\u5c4f\u5e55\u5feb\u7167 2015-01-14 \u4e0b\u53486.03.12\" width=\"956\" height=\"360\" \/><\/a><\/p>\n<h2>\u624b\u673aapp\u7684\u5b89\u88c5\u5378\u8f7d<\/h2>\n<p>ipa\u6587\u4ef6\u6253\u51fa\u6765\u4e86\uff0c\u9759\u6001\u4ee3\u7801\u68c0\u67e5\u5b8c\u4e86\u3002\u5982\u4f55\u628aapp\u76f4\u63a5\u88c5\u5230\u624b\u673a\u4e0a\uff0c\u53ef\u4ee5\u4f7f\u7528fruitstrap\u8fd9\u6b3e\u5de5\u5177,Github\u5730\u5740:<a href=\"https:\/\/github.com\/ghughes\/fruitstrap\"><\/a><a href=\"https:\/\/github.com\/ghughes\/fruitstrap\">https:\/\/github.com\/ghughes\/fruitstrap<\/a><\/p>\n<p>\u5b89\u88c5\u5378\u8f7d\u547d\u4ee4\uff1a<\/p>\n<pre><code>    #echo \"uninstall ios app\"\n    cd $Project_path\n    $Fruit_path\/fruitstrap uninstall --bundle some.ipa\n\n    echo \"install ios app\"\n    \/Users\/apple\/work\/fruitstrap\/fruitstrap install --bundle some.ipa\n<\/code><\/pre>\n<p>\u8fd9\u6837\u540e\u9762\u518d\u8fd0\u884c\u754c\u9762\u81ea\u52a8\u5316\uff0c\u6d41\u7a0b\u5c31\u8d70\u901a\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u654f\u6377\u5f00\u53d1\u4e2d\uff0c\u4ece\u4ee3\u7801\u5230\u6253\u5305\uff0c\u5230\u9759\u6001\u68c0\u67e5\uff0c\u5230\u5355\u6d4b\uff0c\u5230\u63a5\u53e3\u6d4b\u8bd5\uff0c\u518d\u5230\u9875\u9762\u6d4b\u8bd5\uff0c\u5e94\u8be5\u662f\u4e2a\u5b8c\u6574\u7684\u6d41\u7a0b\uff0cios\u867d\u7136\u662f\u95ed\u6e90\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5de5\u5177\u5b9e\u73b0\u8fd9\u4e00\u8fc7\u7a0b\uff0c\u4e0b\u9762\u7b80\u5355\u8bb0\u5f55\u4e0b\u6253\u5305\u548c\u9759\u6001\u4ee3\u7801\u68c0\u67e5\u7684\u65b9\u6cd5\u3002 \u6253\u5305 ios\u547d\u4ee4\u884c\u6253&#46;&#46;&#46;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pgc_sgb_lightbox_settings":"","footnotes":""},"categories":[33],"tags":[44,5,16,42,41],"class_list":["post-1037","post","type-post","status-publish","format-standard","hentry","category-coding","tag-ios","tag-5","tag-16","tag-42","tag-41"],"views":5259,"_links":{"self":[{"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/posts\/1037","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1037"}],"version-history":[{"count":3,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/posts\/1037\/revisions"}],"predecessor-version":[{"id":1506,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/posts\/1037\/revisions\/1506"}],"wp:attachment":[{"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1037"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1037"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}