<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>xcodebuild &#8211; 编程技术记录</title>
	<atom:link href="https://blog.z6z8.cn/tag/xcodebuild/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.z6z8.cn</link>
	<description>世界你好!</description>
	<lastBuildDate>Thu, 14 Nov 2019 05:42:47 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>xcode-select切换或者指定xcode命令行版本</title>
		<link>https://blog.z6z8.cn/2019/11/14/xcode-select%e5%88%87%e6%8d%a2%e6%88%96%e8%80%85%e6%8c%87%e5%ae%9axcodebuild%e7%89%88%e6%9c%ac/</link>
					<comments>https://blog.z6z8.cn/2019/11/14/xcode-select%e5%88%87%e6%8d%a2%e6%88%96%e8%80%85%e6%8c%87%e5%ae%9axcodebuild%e7%89%88%e6%9c%ac/#respond</comments>
		
		<dc:creator><![CDATA[holdsky]]></dc:creator>
		<pubDate>Thu, 14 Nov 2019 05:42:47 +0000</pubDate>
				<category><![CDATA[安全运维]]></category>
		<category><![CDATA[xcodebuild]]></category>
		<guid isPermaLink="false">http://blog.z6z8.cn/?p=565</guid>

					<description><![CDATA[切换xcode命令行版本 sudo xcode-select --switch /指定版本的xcode路径Xc [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>切换xcode命令行版本</p>
<pre><code class="language-shell">sudo xcode-select --switch /指定版本的xcode路径Xcode.app </code></pre>
<p>恢复默认的xcode命令行版本<br />
当使用<code>xcodebuild</code>莫名其妙的出问题时，可以考虑使用此命令恢复</p>
<pre><code class="language-shell">sudo xcode-select -r</code></pre>
<p>使用对话框安装命令行工具</p>
<pre><code class="language-shell">sudo xcode-select --install</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.z6z8.cn/2019/11/14/xcode-select%e5%88%87%e6%8d%a2%e6%88%96%e8%80%85%e6%8c%87%e5%ae%9axcodebuild%e7%89%88%e6%9c%ac/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>iOS xcodebuild自动构建常用命令</title>
		<link>https://blog.z6z8.cn/2019/10/30/ios-xcodebuild%e8%87%aa%e5%8a%a8%e6%9e%84%e5%bb%ba%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4/</link>
					<comments>https://blog.z6z8.cn/2019/10/30/ios-xcodebuild%e8%87%aa%e5%8a%a8%e6%9e%84%e5%bb%ba%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4/#respond</comments>
		
		<dc:creator><![CDATA[holdsky]]></dc:creator>
		<pubDate>Wed, 30 Oct 2019 02:17:27 +0000</pubDate>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[xcodebuild]]></category>
		<guid isPermaLink="false">http://blog.z6z8.cn/?p=537</guid>

					<description><![CDATA[列出工作空间中的所有scheme xcodebuild -list -workspace abc.xcwork [&#8230;]]]></description>
										<content:encoded><![CDATA[<h1>列出工作空间中的所有scheme</h1>
<pre><code class="language-shell">xcodebuild -list -workspace abc.xcworkspace

输出
Information about workspace "abc":
    Schemes:
            abc
        AFNetworking
        FMDB
        GTMBase64
        Minizip
        Pods-abc</code></pre>
<h1>列出项目的所有target及Configurations</h1>
<pre><code class="language-shell">xcodebuild -list -project abc.xcodeproj

输出
Information about project "abc":
    Targets:
        abc

    Build Configurations:
        Debug
        Release

    If no build configuration is specified and -scheme is not passed then "Release" is used.

    Schemes:
        abc</code></pre>
<h1>编译指定的scheme或Target</h1>
<h2>指定scheme</h2>
<pre><code class="language-shell">xcodebuild -workspace abc.xcworkspace -scheme test

或者

xcodebuild -project abc.xcodeproj -scheme test</code></pre>
<p>此时默认编译<code>Release</code>版</p>
<h2>指定target</h2>
<pre><code class="language-shell">xcodebuild -project abc.xcodeproj -target test</code></pre>
<h2>指定 configuration</h2>
<pre><code class="language-shell">xcodebuild -workspace abc.xcworkspace -scheme test -configuration Debug</code></pre>
<p>此时编译<code>Debug</code>版</p>
<h2>指定编译依赖的sdk环境</h2>
<pre><code class="language-shell">xcodebuild -workspace abc.xcworkspace -scheme test -configuration Debug -sdk iphoneos</code></pre>
<p>将使用名字为<code>iphoneos</code>（真机版）的sdk环境编译，同样的<code>-sdk iphonesimulator</code>指定编译模拟器版本</p>
<blockquote>
<p>需要注意的，当不指定<code>-sdk</code>参数时，xcodebuild的某些版本会同时构建mac ,iPhone, iPad对应的版本</p>
</blockquote>
<h2>指定编译输出产物的目录</h2>
<p><code>BUILD_DIR</code>，在自动打包时很有用</p>
<pre><code class="language-shell">xcodebuild -workspace abc.xcworkspace -scheme test -configuration Debug -sdk iphoneos BUILD_DIR=/a/b/c/d/e</code></pre>
<h2>指定Xcode支持的其他配置</h2>
<p>以bitcode为例，设置键<code>ENABLE_BITCODE</code>的值：</p>
<pre><code class="language-shell">xcodebuild -workspace abc.xcworkspace -scheme test ENABLE_BITCODE=NO</code></pre>
<p>其他配置的键需要打开xcode的具体项目配置文件自行寻找</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.z6z8.cn/2019/10/30/ios-xcodebuild%e8%87%aa%e5%8a%a8%e6%9e%84%e5%bb%ba%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
