<?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>iPhoneGeek 爱疯极客 &#187; Xcode</title>
	<atom:link href="http://www.iphone-geek.cn/tag/xcode/feed" rel="self" type="application/rss+xml" />
	<link>http://www.iphone-geek.cn</link>
	<description>iPhone 新闻，编程，技巧与提示，代码，教程</description>
	<lastBuildDate>Thu, 08 Dec 2011 01:18:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Xcode 4闲谈</title>
		<link>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/xcode-4</link>
		<comments>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/xcode-4#comments</comments>
		<pubDate>Thu, 31 Mar 2011 04:47:02 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[基础]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=1150</guid>
		<description><![CDATA[Xcode 4终于千呼万唤发布了，诚然它有太多亮点，不过目前还是感觉不够稳定，还有很多功能都不会用。举个简单的例子，在Ｘcode 3下，使用Analyze时有非常多的误报，但Ｘcode 4似乎又走了另一个极端，几乎没有什么报告。我有一个程序明显有memory leak（因为我安装了状态条可以显示内存的软件），但Analyze的结果是没有potential leak，而且使用Instrument也没有发现任何leak，不知是不是我还不太会用。
另外，还有一些以前比较熟练的事情在Xcode 4下，都不会做了。比如， 当程序出现EXC_BAD_ACCESS时添加NSZombieEnabled环境变量开始都找不到地方。最后终于找到了，在：
Product -&#62; Edit Scheme&#8230;

4月1日更新：
今天发现一个有趣的现象。突然发现以前为Xcode项目添加静态库子项目的方法不再适用，添加的项目文件只是一个文件而已。后来经过研究才发现是因为Xcode打开了另外一个项目的缘故。关掉另一个Xcode后，问题解决。
]]></description>
			<content:encoded><![CDATA[<p>Xcode 4终于千呼万唤发布了，诚然它有太多亮点，不过目前还是感觉不够稳定，还有很多功能都不会用。举个简单的例子，在Ｘcode 3下，使用Analyze时有非常多的误报，但Ｘcode 4似乎又走了另一个极端，几乎没有什么报告。我有一个程序明显有memory leak（因为我安装了状态条可以显示内存的软件），但Analyze的结果是没有potential leak，而且使用Instrument也没有发现任何leak，不知是不是我还不太会用。<br class="spacer_" /><br />
另外，还有一些以前比较熟练的事情在Xcode 4下，都不会做了。比如， 当程序出现EXC_BAD_ACCESS时添加NSZombieEnabled环境变量开始都找不到地方。最后终于找到了，在：</p>
<blockquote><p>Product -&gt; Edit Scheme&#8230;</p></blockquote>
<p><br class="spacer_" /><br />
<strong>4月1日更新：</strong><br />
今天发现一个有趣的现象。突然发现以前为Xcode项目添加静态库子项目的方法不再适用，添加的项目文件只是一个文件而已。后来经过研究才发现是因为Xcode打开了另外一个项目的缘故。关掉另一个Xcode后，问题解决。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/xcode-4/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Xcode不支持iPhoe OS 3.2.1的解决方法</title>
		<link>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/xcode%e4%b8%8d%e6%94%af%e6%8c%81iphoe-os-3-2-1%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95</link>
		<comments>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/xcode%e4%b8%8d%e6%94%af%e6%8c%81iphoe-os-3-2-1%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95#comments</comments>
		<pubDate>Wed, 01 Sep 2010 06:15:10 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[基础]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[系统安装]]></category>
		<category><![CDATA[调试]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[提示与技巧]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=1069</guid>
		<description><![CDATA[最近iPad升级到iPhone 3.2.1，今天准备进行真机调试，猛然发现Xcode下出现下列错误：

The version of iPhone OS on &#8220;xxxx&#8221; does not match any of the versions of iPhone OS supported for development with this copy of Xcode. Please restore the device to a version of the OS listed below. If necessary, the latest version of Xcode is available here.

Google 了一下，发现是3.2.1的目录在DeviceSupport下不存在。解决办法是用最接近的OS版本使用ln命令进行链接。不过在操作过程中有两个问题：

1. 不知什么原因，ln -s 命令后总是为文件而不是目录
2. 不知OS 3.2的build number

于是，采用最笨但最为有效的方法：

在/Developer/Platforms/iPhoneOS.platform/DeviceSupport目录下创建3.2.1目录，然后，将3.2下所有文件及目录复制到3.2.1下，重新启动Xcode，问题解决。
]]></description>
			<content:encoded><![CDATA[<p>最近iPad升级到iPhone 3.2.1，今天准备进行真机调试，猛然发现Xcode下出现下列错误：<br />
<br class="spacer_" /><br />
The version of iPhone OS on &#8220;xxxx&#8221; does not match any of the versions of iPhone OS supported for development with this copy of Xcode. Please restore the device to a version of the OS listed below. If necessary, the latest version of Xcode is available here.<br />
<br class="spacer_" /><br />
Google 了一下，发现是3.2.1的目录在DeviceSupport下不存在。解决办法是用最接近的OS版本使用ln命令进行链接。不过在操作过程中有两个问题：<br />
<br class="spacer_" /><br />
1. 不知什么原因，ln -s 命令后总是为文件而不是目录<br />
2. 不知OS 3.2的build number<br />
<br class="spacer_" /><br />
于是，采用最笨但最为有效的方法：<br />
<br class="spacer_" /><br />
在/Developer/Platforms/iPhoneOS.platform/DeviceSupport目录下创建3.2.1目录，然后，将3.2下所有文件及目录复制到3.2.1下，重新启动Xcode，问题解决。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/xcode%e4%b8%8d%e6%94%af%e6%8c%81iphoe-os-3-2-1%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>修改公司名称的“新”方法</title>
		<link>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/%e4%bf%ae%e6%94%b9%e5%85%ac%e5%8f%b8%e5%90%8d%e7%a7%b0%e7%9a%84%e2%80%9c%e6%96%b0%e2%80%9d%e6%96%b9%e6%b3%95</link>
		<comments>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/%e4%bf%ae%e6%94%b9%e5%85%ac%e5%8f%b8%e5%90%8d%e7%a7%b0%e7%9a%84%e2%80%9c%e6%96%b0%e2%80%9d%e6%96%b9%e6%b3%95#comments</comments>
		<pubDate>Fri, 20 Aug 2010 04:52:41 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[基础]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=1064</guid>
		<description><![CDATA[以前发过一篇文章介绍怎样修改Xcode中的公司名称，见怎样替换Xcode中__MyCompanyName__。
现在（不知是从Xcode哪个版本开始，我是3.2.3）可以有更简单的方法修改公司名称，而且还可以在基于项目修改。方法如下：
1. 右击项目名称，选择“Get Info&#8230;”
2. 在“General Settings”一栏中可以看到“Organization Name”，修改它，那么本项目中的公司名称就修改了。
]]></description>
			<content:encoded><![CDATA[<p>以前发过一篇文章介绍怎样修改Xcode中的公司名称，见<a href="技巧与提示/怎样替换xcode中__mycompanyname__">怎样替换Xcode中__MyCompanyName__</a>。</p>
<p>现在（不知是从Xcode哪个版本开始，我是3.2.3）可以有更简单的方法修改公司名称，而且还可以在基于项目修改。方法如下：</p>
<p>1. 右击项目名称，选择“Get Info&#8230;”<br />
2. 在“General Settings”一栏中可以看到“Organization Name”，修改它，那么本项目中的公司名称就修改了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/%e4%bf%ae%e6%94%b9%e5%85%ac%e5%8f%b8%e5%90%8d%e7%a7%b0%e7%9a%84%e2%80%9c%e6%96%b0%e2%80%9d%e6%96%b9%e6%b3%95/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>怎样离线使用iPhone SDK文档</title>
		<link>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/%e6%80%8e%e6%a0%b7%e7%a6%bb%e7%ba%bf%e4%bd%bf%e7%94%a8iphone-sdk%e6%96%87%e6%a1%a3</link>
		<comments>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/%e6%80%8e%e6%a0%b7%e7%a6%bb%e7%ba%bf%e4%bd%bf%e7%94%a8iphone-sdk%e6%96%87%e6%a1%a3#comments</comments>
		<pubDate>Wed, 18 Aug 2010 06:34:38 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[基础]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[提示与技巧]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=1055</guid>
		<description><![CDATA[我是用Dell机安装的雪豹系统，由于没有无线网卡的支持，所以上网很不方便。在使用Xcode进行iPhone编程时，有时需要参考iPhone SDK的文档，不过每次Control+Click后，Xcode都会试图连接Internet，进行在线读取。有什么方法能够把资料下载到硬盘上进行离线阅读吗？

答案是肯定的。首先去Xcode的Preference中的Documentation Sets下，选择所需的docset，这里是iPhone 4.0 Reference Library，右击选择“Get Info&#8230;”，找到Feed URL：

http://developer.apple.com/rss/com.apple.adc.documentation.AppleiPhone4_0.atom

用浏览器打开，下面列出了许多版本，在Windows下你就可以使用迅雷下载了。

下载后，拷贝到Mac的/Developer/Documentations/Docset目录下，使用终端命令：


sudo xar -xf 下载的文件名.xar


将其解压，然后使用:


sudo chown -R -P devdocs 解压后的文件名.docset


将文档的所有者改为devdocs。打开Xcode就可以离线浏览了。
]]></description>
			<content:encoded><![CDATA[<p>我是用Dell机安装的雪豹系统，由于没有无线网卡的支持，所以上网很不方便。在使用Xcode进行iPhone编程时，有时需要参考iPhone SDK的文档，不过每次Control+Click后，Xcode都会试图连接Internet，进行在线读取。有什么方法能够把资料下载到硬盘上进行离线阅读吗？<br />
<br class="spacer_" /><br />
答案是肯定的。首先去Xcode的Preference中的Documentation Sets下，选择所需的docset，这里是iPhone 4.0 Reference Library，右击选择“Get Info&#8230;”，找到Feed URL：<br />
<br class="spacer_" /><br />
<a "http://developer.apple.com/rss/com.apple.adc.documentation.AppleiPhone4_0.atom">http://developer.apple.com/rss/com.apple.adc.documentation.AppleiPhone4_0.atom</a><br />
<br class="spacer_" /><br />
用浏览器打开，下面列出了许多版本，在Windows下你就可以使用迅雷下载了。<br />
<br class="spacer_" /><br />
下载后，拷贝到Mac的/Developer/Documentations/Docset目录下，使用终端命令：<br />
<br class="spacer_" /></p>
<blockquote><p>
sudo xar -xf 下载的文件名.xar
</p></blockquote>
<p><br class="spacer_" /><br />
将其解压，然后使用:<br />
<br class="spacer_" /></p>
<blockquote><p>
sudo chown -R -P devdocs 解压后的文件名.docset
</p></blockquote>
<p><br class="spacer_" /><br />
将文档的所有者改为devdocs。打开Xcode就可以离线浏览了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/%e6%80%8e%e6%a0%b7%e7%a6%bb%e7%ba%bf%e4%bd%bf%e7%94%a8iphone-sdk%e6%96%87%e6%a1%a3/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Navigation-Based应用程序iPad模板</title>
		<link>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/navigation-based%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8fipad%e6%a8%a1%e6%9d%bf</link>
		<comments>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/navigation-based%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8fipad%e6%a8%a1%e6%9d%bf#comments</comments>
		<pubDate>Sat, 14 Aug 2010 10:45:41 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[基础]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[用户界面]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[提示与技巧]]></category>
		<category><![CDATA[模板]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=1050</guid>
		<description><![CDATA[准备为iPad写一个Navigation-Based程序，却发现XCode 3.2中根本没有iPad的Navigation-Based程序的模板。Apple推荐在iPad下使用Split-View程序，但我并不想这样做，原因是我的iPad程序以后可能要放到iPhone中去，所以我需要一个Universal版。如果我在iPad下使用Split-View，那么这两个版本相差太大，所以我觉得都使用Navigation-Based程序。

试了半天想修改iPhone的Navigation-Based程序的模板到iPad下，却没有成功，在网上搜了一下，终于找到一个别人做好的。下面是下载地址。可以使用如下命令将其加到XCode的模板中：


mkdir -p &#8220;$HOME/Library/Application Support/Developer/Shared/XCode/Project Templates/My Templates&#8221;
cd &#8220;$HOME/Library/Application Support/Developer/Shared/XCode/Project Templates/My Templates&#8221;
git clone git://github.com/benellingson/Universal-Navigation-based-Application.git
rm -rf &#8220;Universal-Navigation-based-Application/.git&#8221;


或者下载zip文件，在创建了目录后，将zip解压其下。
]]></description>
			<content:encoded><![CDATA[<p>准备为iPad写一个Navigation-Based程序，却发现XCode 3.2中根本没有iPad的Navigation-Based程序的模板。Apple推荐在iPad下使用Split-View程序，但我并不想这样做，原因是我的iPad程序以后可能要放到iPhone中去，所以我需要一个Universal版。如果我在iPad下使用Split-View，那么这两个版本相差太大，所以我觉得都使用Navigation-Based程序。<br />
<br class="spacer_" /><br />
试了半天想修改iPhone的Navigation-Based程序的模板到iPad下，却没有成功，在网上搜了一下，终于找到一个别人做好的。下面是下载<a href="http://github.com/benellingson/Universal-Navigation-based-Application">地址</a>。可以使用如下命令将其加到XCode的模板中：<br />
<br class="spacer_" /></p>
<blockquote><p>
mkdir -p &#8220;$HOME/Library/Application Support/Developer/Shared/XCode/Project Templates/My Templates&#8221;</p>
<p>cd &#8220;$HOME/Library/Application Support/Developer/Shared/XCode/Project Templates/My Templates&#8221;</p>
<p>git clone git://github.com/benellingson/Universal-Navigation-based-Application.git</p>
<p>rm -rf &#8220;Universal-Navigation-based-Application/.git&#8221;
</p></blockquote>
<p><br class="spacer_" /><br />
或者下载zip文件，在创建了目录后，将zip解压其下。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/navigation-based%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8fipad%e6%a8%a1%e6%9d%bf/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>都是Backgrounder惹的祸 &#8211; 解决“越狱”真机调试的问题</title>
		<link>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/%e9%83%bd%e6%98%afbackgrounder%e6%83%b9%e7%9a%84%e7%a5%b8-%e8%a7%a3%e5%86%b3%e2%80%9c%e8%b6%8a%e7%8b%b1%e2%80%9d%e7%9c%9f%e6%9c%ba%e8%b0%83%e8%af%95%e7%9a%84%e9%97%ae%e9%a2%98</link>
		<comments>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/%e9%83%bd%e6%98%afbackgrounder%e6%83%b9%e7%9a%84%e7%a5%b8-%e8%a7%a3%e5%86%b3%e2%80%9c%e8%b6%8a%e7%8b%b1%e2%80%9d%e7%9c%9f%e6%9c%ba%e8%b0%83%e8%af%95%e7%9a%84%e9%97%ae%e9%a2%98#comments</comments>
		<pubDate>Sun, 08 Aug 2010 05:07:22 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[编程]]></category>
		<category><![CDATA[调试]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[后台程序]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=1038</guid>
		<description><![CDATA[我的iPhone越狱后，在用Xcode进行调试时出现以下错误信息：

warning: Unable to read symbols for &#8220;/Library/MobileSubstrate/DynamicLibraryies/libstatusbar.dylib” (file not found).
Program received singal: &#8220;SIGUSR1&#8243;.

上网查了一下原来是Backgrounder在作怪，最简单的解决方法就是在Backgournder的overrides设定中，禁止要调试的程序以background模式运行即可。

想要知道具体原因，请参见：Backgrounder vs. Build and Run
]]></description>
			<content:encoded><![CDATA[<p>我的iPhone越狱后，在用Xcode进行调试时出现以下错误信息：<br />
<br class="spacer_" /><br />
warning: Unable to read symbols for &#8220;/Library/MobileSubstrate/DynamicLibraryies/libstatusbar.dylib” (file not found).</p>
<p>Program received singal: &#8220;SIGUSR1&#8243;.<br />
<br class="spacer_" /><br />
上网查了一下原来是Backgrounder在作怪，最简单的解决方法就是在Backgournder的overrides设定中，禁止要调试的程序以background模式运行即可。<br />
<br class="spacer_" /><br />
想要知道具体原因，请参见：<a title="Backgrounder vs. Build and Run" href="http://www.alexwhittemore.com/?p=412">Backgrounder vs. Build and Run</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/%e9%83%bd%e6%98%afbackgrounder%e6%83%b9%e7%9a%84%e7%a5%b8-%e8%a7%a3%e5%86%b3%e2%80%9c%e8%b6%8a%e7%8b%b1%e2%80%9d%e7%9c%9f%e6%9c%ba%e8%b0%83%e8%af%95%e7%9a%84%e9%97%ae%e9%a2%98/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone项目使用静态库的最佳方法</title>
		<link>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/iphone%e9%a1%b9%e7%9b%ae%e4%bd%bf%e7%94%a8%e9%9d%99%e6%80%81%e5%ba%93%e7%9a%84%e6%9c%80%e4%bd%b3%e6%96%b9%e6%b3%95</link>
		<comments>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/iphone%e9%a1%b9%e7%9b%ae%e4%bd%bf%e7%94%a8%e9%9d%99%e6%80%81%e5%ba%93%e7%9a%84%e6%9c%80%e4%bd%b3%e6%96%b9%e6%b3%95#comments</comments>
		<pubDate>Tue, 22 Dec 2009 05:20:40 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[基础]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=369</guid>
		<description><![CDATA[由于Apple禁止在iPhone中使用外部框架或动态链接库，所以要重用代码（第三方库或自己的代码）只能选择如下方法：

直接将代码加入项目。这种方法有点笨。例如，你的一段代码被五个项目共享，如果你发现一个小bug，那么你需要更改五个地方。够麻烦吧？
使用静态库。这是我经常使用的方法。但Xcode并未为iPhone提供静态库的模板。有两种解决方法：



如果你的项目主要是使用Objective-C（C/C++也可使用，只要做些简单修改），那么你可使用现成的Xcode模板。
通过Mac OS X栏下的Static Library中的BSD Static Library建立一个静态库。但要用于iPhone项目，还需做些修改（需要将项目的Base SDK改为iPhone）。

&#160;


&#160;
但怎样在项目中链接静态库呢？如果你熟悉Xcode，那么你可跳过此段。很简单：

指定静态库的头文件路径Head Search Paths。


添加静态库到Xcode项目中。




&#160;
就这么简单。但是且慢，万事大吉了吗？如果你要修改你的静态库呢？你需要从Find中找到你的静态库项目，打开它修改。有点麻烦，不能像Visual Studio一样将相关项目包括在应用项目中吗？答案是：可以，虽然还是没有Visual Studio中的工作空间好用。但你可以从Xcode中直接打开相关的静态库。方法是使用Xcode的Cross-Project Reference(跨项目参考)。

将静态库的Xcode项目加入到当前项目。


右击Targets下本项目，添加到静态库项目的关联。


在项目下，扩展静态库项目，拖动xxxx.a到Targets下的Link Binary With Libraries。



&#160;
这样你就可以从当前项目下，双击静态库的项目来打开和修改静态库的代码了。
]]></description>
			<content:encoded><![CDATA[<p>由于Apple禁止在iPhone中使用外部框架或动态链接库，所以要重用代码（第三方库或自己的代码）只能选择如下方法：</p>
<ol>
<li>直接将代码加入项目。这种方法有点笨。例如，你的一段代码被五个项目共享，如果你发现一个小bug，那么你需要更改五个地方。够麻烦吧？</li>
<li>使用静态库。这是我经常使用的方法。但Xcode并未为iPhone提供静态库的模板。有两种解决方法：</li>
</ol>
<p><span id="more-369"></span></p>
<ul>
<li>如果你的项目主要是使用Objective-C（C/C++也可使用，只要做些简单修改），那么你可使用现成的<a href="http://www.iphone-geek.cn/%E7%BC%96%E7%A8%8B/iphone%E9%9D%99%E6%80%81%E5%BA%93%E9%A1%B9%E7%9B%AE%E6%A8%A1%E6%9D%BF">Xcode模板</a>。</li>
<li>通过Mac OS X栏下的Static Library中的BSD Static Library建立一个静态库。但要用于iPhone项目，还需做些修改（需要将项目的Base SDK改为iPhone）。</li>
</ul>
<p>&nbsp;</p>
<p style="text-align: center;"><a href="http://www.iphone-geek.cn/wp-content/uploads/2009/12/1.jpg"><img class="size-full wp-image-501 aligncenter" title="1" src="http://www.iphone-geek.cn/wp-content/uploads/2009/12/1.jpg" alt="1" width="480" height="354" /></a></p>
<p style="text-align: center;"><img title="2" src="http://www.iphone-geek.cn/wp-content/uploads/2009/12/2.jpg" alt="2" width="519" height="490" /></p>
<p>&nbsp;</p>
<p>但怎样在项目中链接静态库呢？如果你熟悉Xcode，那么你可跳过此段。很简单：</p>
<ol>
<li>指定静态库的头文件路径Head Search Paths。<br />
<a href="http://www.iphone-geek.cn/wp-content/uploads/2009/12/2.jpg"></a></li>
<p style="text-align: center;"><img title="3" src="http://www.iphone-geek.cn/wp-content/uploads/2009/12/3.jpg" alt="3" width="519" height="490" /></p>
<li>添加静态库到Xcode项目中。<br />
<a href="http://www.iphone-geek.cn/wp-content/uploads/2009/12/3.jpg"></a><a href="http://www.iphone-geek.cn/wp-content/uploads/2009/12/4.jpg"></a></li>
<p style="text-align: center;"><img class="alignnone size-full wp-image-504" title="4" src="http://www.iphone-geek.cn/wp-content/uploads/2009/12/4.jpg" alt="4" width="383" height="354" /></p>
<p style="text-align: center;">
</ol>
<p>&nbsp;</p>
<p>就这么简单。但是且慢，万事大吉了吗？如果你要修改你的静态库呢？你需要从Find中找到你的静态库项目，打开它修改。有点麻烦，不能像Visual Studio一样将相关项目包括在应用项目中吗？答案是：可以，虽然还是没有Visual Studio中的工作空间好用。但你可以从Xcode中直接打开相关的静态库。方法是使用Xcode的Cross-Project Reference(跨项目参考)。</p>
<ol>
<li>将静态库的Xcode项目加入到当前项目。<br />
<a href="http://www.iphone-geek.cn/wp-content/uploads/2009/12/5.jpg"></a></li>
<p style="text-align: center;"><img class="alignnone size-full wp-image-505" title="5" src="http://www.iphone-geek.cn/wp-content/uploads/2009/12/5.jpg" alt="5" width="298" height="383" /></p>
<li>右击Targets下本项目，添加到静态库项目的关联。<br />
<a href="http://www.iphone-geek.cn/wp-content/uploads/2009/12/6.jpg"></a></li>
<p style="text-align: center;"><img class="alignnone size-full wp-image-506" title="6" src="http://www.iphone-geek.cn/wp-content/uploads/2009/12/6.jpg" alt="6" width="519" height="490" /></p>
<li>在项目下，扩展静态库项目，拖动xxxx.a到Targets下的Link Binary With Libraries。<br />
<a href="http://www.iphone-geek.cn/wp-content/uploads/2009/12/7.jpg"></a></li>
<p style="text-align: center;"><img class="alignnone size-full wp-image-507" title="7" src="http://www.iphone-geek.cn/wp-content/uploads/2009/12/7.jpg" alt="7" width="242" height="418" /></p>
</ol>
<p>&nbsp;</p>
<p>这样你就可以从当前项目下，双击静态库的项目来打开和修改静态库的代码了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/iphone%e9%a1%b9%e7%9b%ae%e4%bd%bf%e7%94%a8%e9%9d%99%e6%80%81%e5%ba%93%e7%9a%84%e6%9c%80%e4%bd%b3%e6%96%b9%e6%b3%95/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>iPhone静态库项目模板</title>
		<link>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/iphone%e9%9d%99%e6%80%81%e5%ba%93%e9%a1%b9%e7%9b%ae%e6%a8%a1%e6%9d%bf</link>
		<comments>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/iphone%e9%9d%99%e6%80%81%e5%ba%93%e9%a1%b9%e7%9b%ae%e6%a8%a1%e6%9d%bf#comments</comments>
		<pubDate>Mon, 30 Nov 2009 01:28:05 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[基础]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=367</guid>
		<description><![CDATA[Xcode并未提供iPhone静态库的模板，所以我每次都使用Mac Application的静态库模板，但每次建立项目后，都要针对iPhone进行一些修改，比较麻烦。我在网上找到一个可以直接被iPhone项目使用的静态库模板：
见http://github.com/keremk/iphone-static-library-project-template。
]]></description>
			<content:encoded><![CDATA[<p>Xcode并未提供iPhone静态库的模板，所以我每次都使用Mac Application的静态库模板，但每次建立项目后，都要针对iPhone进行一些修改，比较麻烦。我在网上找到一个可以直接被iPhone项目使用的静态库模板：</p>
<p>见<a href="http://github.com/keremk/iphone-static-library-project-template">http://github.com/keremk/iphone-static-library-project-template</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e7%bc%96%e7%a8%8b/iphone%e9%9d%99%e6%80%81%e5%ba%93%e9%a1%b9%e7%9b%ae%e6%a8%a1%e6%9d%bf/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Xcode之宏</title>
		<link>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/xcode%e4%b9%8b%e5%ae%8f</link>
		<comments>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/xcode%e4%b9%8b%e5%ae%8f#comments</comments>
		<pubDate>Thu, 12 Nov 2009 04:30:54 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[技巧与提示]]></category>
		<category><![CDATA[调试]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=200</guid>
		<description><![CDATA[注：宏的使用可以节省代码重复输入工作，还可以为调试带来各种好处。本文列出了几个非常简单实用的宏。

&#160;
这些是我在Xcode中常用到的宏： 
&#160;
CMLog: 用它来代替NSLog：
1#define CMLog(format, ...) NSLog(@&#34;%s:%@&#34;, __PRETTY_FUNCTION__,[NSString stringWithFormat:format, ## __VA_ARGS__]);
&#160;
它的作用是将调用它的类和方法的名称一起输出到控制台。比如你在MyAppDelegate类的applicationDidFinishLaunching方法中调用它：
1CMLog&#40;@&#34;My iPhone is an %@, v %@&#34;, &#91;&#91;UIDevice currentDevice&#93; model&#93;, &#91;&#91;UIDevice currentDevice&#93; systemVersion&#93;&#41;;
&#160;
控制台将输出：
2009-01-05 10:06:28.957 MyApp15173:20b] -[MyAppDelegate applicationDidFinishLaunching:]:
My iPhone is an iPhone Simulator, v 2.2
&#160;
MARK: 此宏用于输出调用它的类和方法名称。适用于只想知道是否一个方法被调用了。
1#define MARK&#160; &#160; CMLog(@&#34;%s&#34;, __PRETTY_FUNCTION__);
&#160;
START_TIMER和END_TIMER: 用于确定一个方法或一段代码的运行时间：
12#define START_TIMER NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate]; &#160;
#define END_TIMER(msg) &#160;NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; CMLog([NSString stringWithFormat:@&#34;%@ Time [...]]]></description>
			<content:encoded><![CDATA[<p>注：宏的使用可以节省代码重复输入工作，还可以为调试带来各种好处。本文列出了几个非常简单实用的宏。<br />
<span id="more-200"></span></p>
<p>&nbsp;</p>
<p>这些是我在Xcode中常用到的宏： </p>
<p>&nbsp;</p>
<p><strong>CMLog</strong>: 用它来代替NSLog：</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6e371a;">#define CMLog(format, ...) NSLog(@&quot;%s:%@&quot;, __PRETTY_FUNCTION__,[NSString stringWithFormat:format, ## __VA_ARGS__]);</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>它的作用是将调用它的类和方法的名称一起输出到控制台。比如你在<strong>MyAppDelegate</strong>类的<strong>applicationDidFinishLaunching</strong>方法中调用它：</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">CMLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;My iPhone is an %@, v %@&quot;</span>, <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIDevice currentDevice<span style="color: #002200;">&#93;</span> model<span style="color: #002200;">&#93;</span>, <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIDevice currentDevice<span style="color: #002200;">&#93;</span> systemVersion<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;</div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>控制台将输出：</p>
<pre>2009-01-05 10:06:28.957 MyApp15173:20b] -[MyAppDelegate applicationDidFinishLaunching:]:
My iPhone is an iPhone Simulator, v 2.2</pre>
<p>&nbsp;</p>
<p><strong>MARK</strong>: 此宏用于输出调用它的类和方法名称。适用于只想知道是否一个方法被调用了。</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6e371a;">#define MARK&nbsp; &nbsp; CMLog(@&quot;%s&quot;, __PRETTY_FUNCTION__);</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p><strong>START_TIMER</strong>和<strong>END_TIMER</strong>: 用于确定一个方法或一段代码的运行时间：</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6e371a;">#define START_TIMER NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate]; &nbsp;</span><br />
<span style="color: #6e371a;">#define END_TIMER(msg) &nbsp;NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; CMLog([NSString stringWithFormat:@&quot;%@ Time = %f&quot;;, msg, stop-start]);</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>将<strong>START_TIMER</strong> 置于需评测的代码段开始处，并将<strong>END_TIMER</strong>置于代码段结束处，你就可获得这段代码的运行时间：</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/"><span style="color: #400080;">NSData</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>loadDataFromURL<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>dataURL &nbsp;<br />
<span style="color: #002200;">&#123;</span> &nbsp; &nbsp;<br />
&nbsp; &nbsp; START_TIMER; &nbsp; &nbsp;<br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/"><span style="color: #400080;">NSData</span></a> <span style="color: #002200;">*</span>data <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>self doSomeStuff<span style="color: #002200;">:</span>dataURL<span style="color: #002200;">&#93;</span>; &nbsp; &nbsp;<br />
&nbsp; &nbsp; END_TIMER<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;loadDataFromURL&quot;</span><span style="color: #002200;">&#41;</span>; &nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #a61390;">return</span> data; &nbsp;<br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>输出为:</p>
<pre>2009-01-05 10:31:37.943 MyApp[15283:20b] -[MyAppDelegate loadDataFromURL:]:
loadDataFromURL Time = 3.636021  </pre>
<p>&nbsp;</p>
<p>将所有这些宏定义整理使用条件标志放在预编译的头文件中。调试时，此标志设为1 ，发布时将其设为0 。</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6e371a;">#if DEBUG==1 &nbsp;</span><br />
&nbsp; &nbsp; <span style="color: #6e371a;">#define CMLog(format, ...) NSLog(@&quot;%s:%@&quot;;, __PRETTY_FUNCTION__,[NSString stringWithFormat:format, ## __VA_ARGS__]); &nbsp; </span><br />
&nbsp; &nbsp; <span style="color: #6e371a;">#define MARK&nbsp; &nbsp; CMLog(@&quot;%s&quot;;, __PRETTY_FUNCTION__); &nbsp;</span><br />
&nbsp; &nbsp; <span style="color: #6e371a;">#define START_TIMER NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate]; &nbsp;</span><br />
&nbsp; &nbsp; <span style="color: #6e371a;">#define END_TIMER(msg) &nbsp;NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; CMLog([NSString stringWithFormat:@&quot;%@ Time = %f&quot;;, msg, stop-start]); &nbsp;</span><br />
<span style="color: #6e371a;">#else &nbsp;</span><br />
&nbsp; &nbsp; <span style="color: #6e371a;">#define CMLog(format, ...) &nbsp;</span><br />
&nbsp; &nbsp; <span style="color: #6e371a;">#define MARK &nbsp;#define START_TIMER &nbsp;</span><br />
&nbsp; &nbsp; <span style="color: #6e371a;">#define END_TIMER(msg) &nbsp;</span><br />
<span style="color: #6e371a;">#endif</span></div></td></tr></tbody></table></div>
<p>&nbsp;</p>
<p>在<em>Debug</em>目标设定中加入：</p>
<pre>OTHER_CFLAGS = -DDEBUG=1  </pre>
<p>&nbsp;</p>
<p>在<em>Release</em> 目标设定中加入：</p>
<pre>OTHER_CFLAGS = -DDEBUG=0
</pre>
<p>&nbsp;</p>
<h5>
          原文见：<a href="http://blog.coriolis.ch/2009/01/05/macros-for-xcode/" rel="bookmark" title="Permanent Link: Macros for Xcode">Macros for Xcode</a><br />
        </h5>
<pre>&nbsp;        </pre>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/xcode%e4%b9%8b%e5%ae%8f/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>怎样替换Xcode中__MyCompanyName__</title>
		<link>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e6%80%8e%e6%a0%b7%e6%9b%bf%e6%8d%a2xcode%e4%b8%ad__mycompanyname__</link>
		<comments>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e6%80%8e%e6%a0%b7%e6%9b%bf%e6%8d%a2xcode%e4%b8%ad__mycompanyname__#comments</comments>
		<pubDate>Wed, 11 Nov 2009 14:07:18 +0000</pubDate>
		<dc:creator>bagusflyer</dc:creator>
				<category><![CDATA[技巧与提示]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[提示与技巧]]></category>

		<guid isPermaLink="false">http://www.iphone-geek.cn/?p=195</guid>
		<description><![CDATA[我们知道，Xcode在每个.h和.m文件头都会加上一些发行信息，如姓名，创建日期，公司名等。但公司名是用__MyCompanyName__代表，每个文件都要手工修改十分麻烦。此信息的模板存在/Library/Application Support/Apple/Developer Tools/File Templates下，格式如下：
12345678/*
&#160;* &#160;«FILENAME»
&#160;* &#160;«PROJECTNAME»
&#160;*
&#160;* &#160;Created by «FULLUSERNAME» on «DATE».
&#160;* &#160;Copyright «YEAR» «ORGANIZATIONNAME». All rights reserved.
&#160;*
&#160;*/
我们当然可以修改此文件。但每次Xcode升级后，此信息就会丢失。我在一本有关Xcode的书中找到一个方法：
1defaults write com.apple.xcode PBXCustomTemplateMacroDefinitions '{ ORGANIZATIONNAME = &#34;Joan Smith&#34;; }'
另一种方法是通过双击~/Library/Preferences下com.apple.Xcode.plist来修改。
]]></description>
			<content:encoded><![CDATA[<p>我们知道，Xcode在每个.h和.m文件头都会加上一些发行信息，如姓名，创建日期，公司名等。但公司名是用__MyCompanyName__代表，每个文件都要手工修改十分麻烦。此信息的模板存在/Library/Application Support/Apple/Developer Tools/File Templates下，格式如下：</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #11740a; font-style: italic;">/*<br />
&nbsp;* &nbsp;«FILENAME»<br />
&nbsp;* &nbsp;«PROJECTNAME»<br />
&nbsp;*<br />
&nbsp;* &nbsp;Created by «FULLUSERNAME» on «DATE».<br />
&nbsp;* &nbsp;Copyright «YEAR» «ORGANIZATIONNAME». All rights reserved.<br />
&nbsp;*<br />
&nbsp;*/</span></div></td></tr></tbody></table></div>
<p>我们当然可以修改此文件。但每次Xcode升级后，此信息就会丢失。我在一本有关Xcode的书中找到一个方法：</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">defaults write com.apple.xcode PBXCustomTemplateMacroDefinitions <span style="color: #bf1d1a;">'{ ORGANIZATIONNAME = &quot;Joan Smith&quot;; }'</span></div></td></tr></tbody></table></div>
<p>另一种方法是通过双击~/Library/Preferences下com.apple.Xcode.plist来修改。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphone-geek.cn/%e6%8a%80%e5%b7%a7%e4%b8%8e%e6%8f%90%e7%a4%ba/%e6%80%8e%e6%a0%b7%e6%9b%bf%e6%8d%a2xcode%e4%b8%ad__mycompanyname__/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

