<?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>roobasoft blog &#187; Xcode</title>
	<atom:link href="http://roobasoft.com/blog/category/xcode/feed/" rel="self" type="application/rss+xml" />
	<link>http://roobasoft.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 05 Aug 2010 13:35:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Uncrustified</title>
		<link>http://roobasoft.com/blog/2010/08/05/uncrustified/</link>
		<comments>http://roobasoft.com/blog/2010/08/05/uncrustified/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 13:34:58 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/?p=231</guid>
		<description><![CDATA[While looking for how to setup user scripts in Xcode 4 I stumbled into Tony Arnold&#8217;s Xcode-4-Uncrustify-Automator-Services on github. Creating a service with Automator answered my original, but the real find was uncrustify.

From the uncrustify website:


  The goals of this project are simple: Create a highly configurable, easily modifiable source code beautifier.


Since Tony had [...]]]></description>
			<content:encoded><![CDATA[<p>While looking for how to setup user scripts in Xcode 4 I stumbled into <a href="http://tonyarnold.com">Tony Arnold&#8217;s</a> <a href="http://github.com/tonyarnold/Xcode-4-Uncrustify-Automator-Services">Xcode-4-Uncrustify-Automator-Services</a> on github. Creating a service with Automator answered my original, but the real find was <a href="http://uncrustify.sourceforge.net/">uncrustify</a>.</p>

<p>From the uncrustify website:</p>

<blockquote>
  <p>The goals of this project are simple: Create a highly configurable, easily modifiable source code beautifier.</p>
</blockquote>

<p>Since Tony had provided nice Automator actions, I figured I&#8217;d take it for a spin. After a quick</p>

<pre><code>brew install uncrustify
</code></pre>

<p>and a few minutes messing with <a href="http://gist.github.com/261662/">Tony&#8217;s sample .uncrustify.cfg</a> making <a href="http://gist.github.com/509705">my own</a>, I was impressed.</p>

<p>While in Xcode 4 I used Tony&#8217;s Automator service to uncrustify the selected text (I select whole files at a time). However, I had to give up on Xcode 4 due to stability issues so found myself back in Xcode 3.2.x. While in Xcode 3 I decided to create a User Script for uncrustify, thinking it would be much faster to execute. So now I have a shell script execute uncrustify on the selection and replace the selection with the uncrustified result (stealing the uncrustify line from Tony&#8217;s Automator service). I also have this bound to cmd+option+ctrl+u.</p>

<pre><code>#!/bin/sh
/usr/local/bin/uncrustify -l OC -q
</code></pre>

<p>Here&#8217;s the User Script setup:</p>

<p><img src="http://rawk.it/s/Edit_User_Scripts-20100805-071604.png" alt="user script setup in Xcode 3.2.3" /></p>

<p><small>Liar! Note that it says I&#8217;m using &#8216;g&#8217; as the shortcut instead of &#8216;u&#8217; like I said. I&#8217;m pushing the &#8216;u&#8217; key but it&#8217;s bound to &#8216;g&#8217; in the Dvorak keyboard layout.</small></p>

<p>I&#8217;m not sure if I&#8217;m early or late to the uncrustify party, but I&#8217;m happy to be here.</p>

<p>Oh, and if someone does know how to setup User Scripts in Xcode 4, do tell!</p>

<p>Wait, one more thing! I&#8217;m working on a project where my 6 lines of whitespace after each function body wasn&#8217;t appreciated (understandable, it&#8217;s not for everyone <img src='http://roobasoft.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ). <a href="http://rooswitch.com">rooSwitch</a> to the rescue! I already have profiles for slight differences in Xcode prefs, so I dropped my .uncrustify.cfg on each profile and am now switching that file with the slight difference for this project. Success.</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2010/08/05/uncrustified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mistakes I Made Using Bindings Without Core Data</title>
		<link>http://roobasoft.com/blog/2006/06/07/mistakes-i-made-using-bindings-without-core-data-2/</link>
		<comments>http://roobasoft.com/blog/2006/06/07/mistakes-i-made-using-bindings-without-core-data-2/#comments</comments>
		<pubDate>Wed, 07 Jun 2006 13:24:33 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/2006/06/07/mistakes-i-made-using-bindings-without-core-data-2/</guid>
		<description><![CDATA[Key-Value Coding is part of the magic behind Cocoa&#8217;s bindings. Up until yesterday I had only been binding to an ObjectController or to an ArrayController backed by Core Data. This is very powerful, but bindings pre-date Core Data so clearly not a necessity. So yesterday I went to bind an NSProgressIndicator&#8217;s &#8216;isIndeteriminate&#8217; to a BOOL. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/BasicPrinciples.html">Key-Value Coding</a> is part of the magic behind Cocoa&#8217;s <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/CocoaBindings.html">bindings</a>. Up until yesterday I had only been binding to an ObjectController or to an ArrayController backed by Core Data. This is very powerful, but bindings pre-date Core Data so clearly not a necessity. So yesterday I went to bind an NSProgressIndicator&#8217;s &#8216;isIndeteriminate&#8217; to a BOOL. Two gotchas that I ran into that I can see myself running into again:</p>

<p>1) <b>update 6.7.06</b>: there is no #1 &#8211; I just had this blatantly wrong &#8211; see comments. Thanks Jean-Francois.</p>

<p>&lt;</p>

<p>p>
<strike>Binding to a BOOL requires the result to be returned in an NSNumber. My isIndeterminate method, although backed by a simple BOOL, needed to be
<pre class="code">- (NSNumber <em>) isIndeterminate
{
return [NSNumber numberWithBool:isIndeterminate];
}</em></pre></strike>
2) Bindings require you to notify them when you change the value (see, it&#8217;s not *all magic). So setIsIndeterminate looks like this:
<pre class="code">- (void)setIsIndeteriminate:(NSNumber *)flag
{
[self willChangeValueForKey:@â€œisIndeteriminateâ€];
isIndeteriminate = [flag boolValue];
[self didChangeValueForKey:@â€œisIndeteriminateâ€];
}</pre>
Without this, changing the isIndeterminate member variable would have no effect.</p>

<p>Some other goodies:</p>

<ul>
    <li><a href="http://www.kevincallahan.org/software/accessorizer.html">Accessorizer</a> can create your accessor methods for you. This is a great tool that greatly speeds up a tedious task.</li>
</ul>

<ul>
    <li><a onclick="window.open('http://roobasoft.com/blog/wp-content/uploads/coredata_menu.png','popup','width=427,height=74,scrollbars=no,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=yes,left=0,top=0');return false" href="http://roobasoft.com/blog/wp-content/uploads/coredata_menu.png"><img width="288" vspace="4" hspace="4" height="50" border="0" align="right" alt="Coredata Menu" src="http://roobasoft.com/blog/wp-content/uploads/coredata_menu-tm.jpg" /></a>Core Data can generate similar code for you. Go to your data model and right click on an entities attribute. You should see a â€œCopy Method Declarations to Clipboardâ€ and a â€œCopy Method Implementations to Clipboardâ€. Core Data doesn&#8217;t need you to generate these. If you use the setValue:foo forKey:@â€œbarâ€ syntax the correct things happen. However, it&#8217;s often nice to just say [obj setBar:foo];</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2006/06/07/mistakes-i-made-using-bindings-without-core-data-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>You Can Pass &#8216;NO&#8217; as a NSNumber, But You Probably Don&#8217;t Want To</title>
		<link>http://roobasoft.com/blog/2006/05/30/you-can-pass-no-as-a-nsnumber-but-you-probably-dont-want-to/</link>
		<comments>http://roobasoft.com/blog/2006/05/30/you-can-pass-no-as-a-nsnumber-but-you-probably-dont-want-to/#comments</comments>
		<pubDate>Tue, 30 May 2006 07:22:50 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/2006/05/30/you-can-pass-no-as-a-nsnumber-but-you-probably-dont-want-to/</guid>
		<description><![CDATA[When using Core Data, Boolean values as an attribute are represented using NSNumber. That&#8217;s all fine and good, but it requires you to use [NSNumber numberWithBool:YES&#124;NO] when you set the value.

NO is defined as:



define NO              (BOOL)0



we have an issue. 0 is also [...]]]></description>
			<content:encoded><![CDATA[<p>When using Core Data, Boolean values as an attribute are represented using NSNumber. That&#8217;s all fine and good, but it requires you to use [NSNumber numberWithBool:YES|NO] when you set the value.</p>

<p>NO is defined as:</p>

<p><pre class="code"></pre></p>

<h1>define NO              (BOOL)0</h1>

<p></p>

<p>we have an issue. 0 is also &#8216;nil&#8217;. Just below the definition of NO we see nil:</p>

<p><pre class="code"></pre></p>

<h1>define nil 0       /* id of Nil instance */</h1>

<p></p>

<p>Since &#8216;nil&#8217; has to be a valid NSNumber *, you are allowed to pass NO as a NSNumber * parameter. If object &#8216;foo&#8217; has a method &#8217;setBarOn&#8217; with a declaration of 
<pre class="code">
- (void) setBarOn:(NSNumber *)aBooleanAsANumber;
- (NSNumber *) barOn;
</pre></p>

<p>You need to make sure you never call that method with NO, as in:</p>

<p><pre class="code">
[foo setBarOn:NO]; 
</pre></p>

<p>If you were to try to read the boolValue by hand you&#8217;d be <em>OK</em>. Calling &#8216;boolValue&#8217; on a nil object seems to return 0, which is NO, so you wouldn&#8217;t notice the problem. The problem comes in when you use predicates.</p>

<p>I had a predicate that looked like:</p>

<p><pre>
â€œisBarOn == 0â€
</pre></p>

<p>If you setBarOn:NO instead of setBarOn:[NSNumber numberWithBool:NO] the instance in question will not be returned by this predicate. Ouch. Fortunately if you were to look at the attribute that had been set to :NO you&#8217;ll see it reported as (null), which is a good hint your Boolean got set wrong.</p>

<p>I&#8217;m not sure how common this is or not, but it seemed worthy of pointing out. Hopefully it made some sense to someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2006/05/30/you-can-pass-no-as-a-nsnumber-but-you-probably-dont-want-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secret Core Data Reserved Keywords</title>
		<link>http://roobasoft.com/blog/2006/04/25/secret-core-data-reserved-keywords/</link>
		<comments>http://roobasoft.com/blog/2006/04/25/secret-core-data-reserved-keywords/#comments</comments>
		<pubDate>Tue, 25 Apr 2006 20:23:30 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/2006/04/25/secret-core-data-reserved-keywords/</guid>
		<description><![CDATA[Somewhere there exists a list of words you shouldn&#8217;t assign as attributes within Core Data.  I don&#8217;t know where that list is, and today I got bit by not knowing.  I tried to use the word &#8220;deleted&#8221; as an attribute.  No matter how hard I tried to set the &#8220;deleted&#8221; value and [...]]]></description>
			<content:encoded><![CDATA[<p>Somewhere there exists a list of words you shouldn&#8217;t assign as attributes within Core Data.  I don&#8217;t know where that list is, and today I got bit by not knowing.  I tried to use the word &#8220;deleted&#8221; as an attribute.  No matter how hard I tried to set the &#8220;deleted&#8221; value and regardless of what I saw in the XML, querying &#8220;deleted&#8221; returned NO.  Actually, that&#8217;s an interesting point.  I was able to setValue: &#8220;deleted&#8221; but not &#8220;valueForKey:&#8221; it.  Odd.</p>

<p>The other funny thing about this is that if you try to use the name &#8220;isDeleted&#8221;, Xcode squawks up and makes it clear that &#8220;isDeleted&#8221; is a no no.  See image of squawking:</p>

<p><img src="http://roobasoft.com/blog/wp-content/uploads/xcodeSqwuak.png" height="162" width="429" border="0" align="middle" hspace="4" vspace="4" alt="Xcodesqwuak" />
I settled on &#8220;isProfileDeleted&#8221;.  Redundant, but it works a heck of a lot better now (reads and writes!).  Why the &#8220;name clash&#8221; code in Xcode isn&#8217;t catching &#8220;deleted&#8221; I don&#8217;t know.</p>

<p>I did some searching and couldn&#8217;t find a list of reserved words.  If you know of one, please share.</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2006/04/25/secret-core-data-reserved-keywords/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>See Build Transcripts</title>
		<link>http://roobasoft.com/blog/2006/04/17/see-build-transcripts/</link>
		<comments>http://roobasoft.com/blog/2006/04/17/see-build-transcripts/#comments</comments>
		<pubDate>Mon, 17 Apr 2006 07:39:32 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/2006/04/17/see-build-transcripts/</guid>
		<description><![CDATA[

I&#8217;m spending some time working on a new project (sorry, not quite ready to explain what it is) and have spent the time to write some unit tests[1].  The tests run in a script and one problem I had was that there seemed to be no way to debug the tests if things went [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://roobasoft.com/blog/wp-content/uploads/showOrHide.png" height="204" width="345" border="1" hspace="4" vspace="4" alt="Showorhide" /><span style="font-size:12pt;"></span></p>

<p>I&#8217;m spending some time working on a new project (sorry, not <em>quite</em> ready to explain what it is) and have spent the time to write some unit tests[1].  The tests run in a script and one problem I had was that there seemed to be no way to debug the tests if things went wrong.  I couldn&#8217;t even figure out how to show the NSLog calls that were surely being made.  This drove me nuts.  Then I found the little &#8220;show or hide build transcript&#8221; button under the normal &#8216;build&#8217; view.  This shows the build output as Xcode compiles the files as well as any shell scripts run during the build process.  Showing the transcript showed me the NSLog&#8217;s I needed to see and all was well again.</p>

<p>It would be a lot nicer if I could step through the code when the unit tests ran.  If anyone knows how to do this I&#8217;d greatly appreciate the knowledge.</p>

<p>[1] &#8211; thanks to <a href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/UnitTesting/UnitTesting.html">http://developer.apple.com/documentation/DeveloperTools/Conceptual/UnitTesting/UnitTesting.html</a> and <a href="http://www.supermegaultragroovy.com/Software%20Development/xcode_code_coverage_howto">http://www.supermegaultragroovy.com/Software%20Development/xcode_code_coverage_howto</a></p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2006/04/17/see-build-transcripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[NSString propertyList]</title>
		<link>http://roobasoft.com/blog/2006/03/27/nsstring-propertylist/</link>
		<comments>http://roobasoft.com/blog/2006/03/27/nsstring-propertylist/#comments</comments>
		<pubDate>Mon, 27 Mar 2006 08:44:22 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/2006/03/27/nsstring-propertylist/</guid>
		<description><![CDATA[NSString has a great little method prototyped as




- (id)propertyList


What does it do?  To quote the docs:


Parses the receiver as a text representation of a property list, returning an NSString, NSData, NSArray, or NSDictionary object, according to the topmost element.


If you started staring at CFPropertyList(&#8230;) functions, just trying to figure out how to read a [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://roobasoft.com/blog/wp-content/uploads//plisthover.png" border="1" height="67" width="197" alt="plisthover.png" align="right" />NSString has a great little method prototyped as</p>

<p></p>

<p><pre class="code">
- (id)propertyList
</pre></p>

<p>What does it do?  To quote the docs:</p>

<blockquote>
Parses the receiver as a text representation of a property list, returning an NSString, NSData, NSArray, or NSDictionary object, according to the topmost element.
</blockquote>

<p>If you started staring at CFPropertyList(&#8230;) functions, just trying to figure out how to read a plist file, the &#8216;propertyList&#8217; method of NSString is tums for your heart burn.</p>

<p>Also, I&#8217;m loving the developer doc&#8217;s new &#8220;hover over a method to see the short description&#8221; as pictured above.  If you don&#8217;t see this, grab the March ADC Reference Library Update.</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2006/03/27/nsstring-propertylist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xcode External Editors</title>
		<link>http://roobasoft.com/blog/2006/03/23/xcode-external-editors/</link>
		<comments>http://roobasoft.com/blog/2006/03/23/xcode-external-editors/#comments</comments>
		<pubDate>Thu, 23 Mar 2006 11:00:17 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[3rd Party Apps]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/2006/03/23/xcode-external-editors/</guid>
		<description><![CDATA[
My curiosity often costs me a lot of time.  My most recent expense started when I subscribed to the coding monkeys blog and read their post about how SubEthaEdit (what a great icon) fully supports being an external editor for Xcode.  I don&#8217;t plan to collaborate, but I had to try it.  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://roobasoft.com/blog/wp-content/uploads/Subetha.jpg" onclick="window.open('http://roobasoft.com/blog/wp-content/uploads/Subetha.jpg','popup','width=96,height=64,scrollbars=no,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=yes,left=0,top=0');return false"><img src="http://roobasoft.com/blog/wp-content/uploads/Subetha-tm.jpg" height="100" width="150" border="0" align="right" hspace="4" vspace="4" alt="Subetha" /></a><a href="http://roobasoft.com/blog/wp-content/uploads/AllWithSubetha.jpg" onclick="window.open('http://roobasoft.com/blog/wp-content/uploads/AllWithSubetha.jpg','popup','width=96,height=64,scrollbars=no,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=yes,left=0,top=0');return false"><img src="http://roobasoft.com/blog/wp-content/uploads/AllWithSubetha-tm.jpg" height="100" width="150" border="0" align="right" hspace="4" vspace="4" alt="Allwithsubetha" /></a>
My curiosity often costs me a lot of time.  My most recent expense started when I subscribed to the <a href="http://codingmonkeys.de/">coding monkeys</a> <a href="http://codingmonkeys.de/blog/">blog</a> and read their <a href="http://codingmonkeys.de/blog/articles/2006/03/20/subethaedit-and-xcode">post</a> about how <a href="http://codingmonkeys.de/subethaedit/index.html">SubEthaEdit</a> (what a great icon) fully supports being an external editor for Xcode.  I don&#8217;t plan to collaborate, but I had to try it.  It&#8217;s kind of neat, but as you can see in the images above, I wish I could open multiple documents in one window.</p>

<p>I&#8217;m still trying to figure out how I best work in Xcode.  For most of rooVid Lite I was running in the &#8220;All-In-One&#8221; layout using Xcode&#8217;s editor.  I&#8217;m now on the default layout + SubEthaEdit, but I&#8217;m guessing I&#8217;ll be back to &#8220;All-In-One&#8221; + Xcode&#8217;s editor before too long (it takes me a while to admit that the way I was previously working was a better way of working (for me) &#8211; I might be addicted to change).  My biggest fear is that I&#8217;ll download and give every editor known to OS X a chance as my Xcode external editor.</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2006/03/23/xcode-external-editors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>__MyCompanyName__</title>
		<link>http://roobasoft.com/blog/2006/03/23/__mycompanyname__/</link>
		<comments>http://roobasoft.com/blog/2006/03/23/__mycompanyname__/#comments</comments>
		<pubDate>Thu, 23 Mar 2006 10:06:18 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/2006/03/23/__mycompanyname__/</guid>
		<description><![CDATA[I finally got sick of changing MyCompanyName in my new source files.  To change MyCompanyName to something useful, you need to edit the ORGANIZATIONNAME in the com.apple.Xcode prefs.  I used the &#8216;defaults write&#8217; method described here, which looks like this:
defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions \
'{ "ORGANIZATIONNAME" = "YourCompanyName";}'
Surprisingly, I had to quit and reopen [...]]]></description>
			<content:encoded><![CDATA[<p>I <em>finally</em> got sick of changing <strong>MyCompanyName</strong> in my new source files.  To change <strong>MyCompanyName</strong> to something useful, you need to edit the ORGANIZATIONNAME in the com.apple.Xcode prefs.  I used the &#8216;defaults write&#8217; method described <a href="http://www.cocoadev.com/index.pl?XcodeProjectTemplates">here</a>, which looks like this:
<pre class="code">defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions \
'{ "ORGANIZATIONNAME" = "<strong>YourCompanyName</strong>";}'
</pre>Surprisingly, I had to quit and reopen Xcode before the change took effect.</p>

<p>To change more of the template, find and edit the template file in &#8220;/Library/Application Support/Apple/Developer Tools/File Templates&#8221;</p>

<p>I&#8217;m a
<pre class="code">foo
{
}
</pre>kind of guy, vs. the default templates
<pre class="code">foo {
}
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2006/03/23/__mycompanyname__/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Give Me a Break</title>
		<link>http://roobasoft.com/blog/2006/02/07/give-me-a-break/</link>
		<comments>http://roobasoft.com/blog/2006/02/07/give-me-a-break/#comments</comments>
		<pubDate>Wed, 08 Feb 2006 04:23:00 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Complaints]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/2006/02/07/give-me-a-break/</guid>
		<description><![CDATA[I&#8217;m trying to debug a problem using Xcode&#8217;s debugger.  All should be well, except the dang thing won&#8217;t break for me!?  I have an NSLog statement and a breakpoint set on the line of code just before that NSLog.  I see the log entry[1] but no break.  ugh.  I&#8217;ve sprinkled [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m trying to debug a problem using Xcode&#8217;s debugger.  All should be well, except the dang thing won&#8217;t break for me!?  I have an NSLog statement and a breakpoint set on the line of code just before that NSLog.  I see the log entry[1] but no break.  ugh.  I&#8217;ve sprinkled breakpoints throughout my code and haven&#8217;t hit any of them.  Oh well, the day is over, time to shutdown and hope Xcode breaks in the morning.</p>

<p><b>update after a nice nights sleep:</b><br />
I haven&#8217;t felt this stupid in a while.  The problem was that I was building and attempting to debug in the &#8220;Release&#8221; build configuration.  Doh.  Breakpoints don&#8217;t work when debugging release.  I&#8217;m sure this burns a handful of people.  Too bad Xcode couldn&#8217;t see me loading a release built binary into gdb and popup a nice &#8220;hey bozo, you sure?&#8221; message.  Oh well, all is better now that I switched back to debug.  I&#8217;m not sure how I switched to release to begin with.  I have a separate sandbox for doing those tests.</p>

<p>[1] I guess I should be happy that NSLog is working</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2006/02/07/give-me-a-break/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Really, you want Intel</title>
		<link>http://roobasoft.com/blog/2006/01/07/really-you-want-intel/</link>
		<comments>http://roobasoft.com/blog/2006/01/07/really-you-want-intel/#comments</comments>
		<pubDate>Sat, 07 Jan 2006 14:55:53 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Complaints]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/?p=32</guid>
		<description><![CDATA[
Short version:
Xcode is secretly building my release builds as universal binaries.  Editing the pbxproj to remove the reference to i386 fixed things for me.
update:It&#8217;s something with my environment causing this.

Longer version:
I recently added Growl support to my app.  It was super easy.  I snagged the Growl source, built the Growl.framework and followed [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/blog/wp-content//arch_setting.png" border="0" height="99" width="266" alt="arch_setting.png" align="right" />
<b>Short version</b>:<br />
Xcode is secretly building my release builds as universal binaries.  Editing the pbxproj to remove the reference to i386 fixed things for me.<br />
<b>update:</b>It&#8217;s something with my environment causing this.</p>

<p><b>Longer version</b>:<br />
I recently added <a href="http://growl.info">Growl</a> support to my app.  It was super easy.  I snagged the Growl source, built the Growl.framework and followed the <a href="http://growl.info/documentation/developer/implementing-growl.php?lang=cocoa">online dev docs for cocoa</a>.  Fifteen minutes later and I was done (seriously).  Little did I know, I was being deceived.  This morning I did a release build for the first time and ran into some issues.  The first problem was easy, I wasn&#8217;t linking with Quicktime.framework.  I&#8217;m not sure how debug builds got away with this, but oh well.  The second issue was slightly more interesting.  I got this error message from the linker:</p>

<p><pre class='code'>
/usr/bin/ld: warning ../build/Deployment/Growl.framework/Growl 
    cputype (18, architecture ppc) does not match cputype (7) 
    for specified -arch flag: i386 (file not loaded)
</pre></p>

<p>Wah!?  I&#8217;m pretty sure I hadn&#8217;t built Growl or my app as a universal binary, but I double checked.  Both project&#8217;s architectures were set to $(NATIVE_ARCH).  I couldn&#8217;t figure it out.</p>

<p>After some grep&#8217;ing for i386 in my project directory I found my apps release configuration was being compiled for i386, regardless of the project settings shown in Xcode.  I triple checked the xcode project settings for all configurations and even explicitly set &#8216;ppc&#8217;.  Regardless of the setting, i386 was always in my .pbxproj file.  What&#8217;s one to do?  I closed my project in Xcode and removed the i386 by hand.  Re-open in Xcode and all was well.  My app linked as release with Growl just fine.</p>

<p>To confirm what I was seeing I created a new Cocoa application in Xcode.  I confirmed the project settings for both release and debug were set to only build for $(NATIVE_ARCH) and did a release build.  All went well.  Now I checked the .app file in Finder and sure enough, it was built for Intel, PowerPC.  Weird.  Is this a bug?  Is Apple trying to trick us into building new apps as universal binaries?  My guess is it&#8217;s a bug, and potentially just a bug in my environment.  I did a little digging, but couldn&#8217;t find anyone else complaining about this.  Oh well, at least now I know.</p>

<p><b>update:</b>  <a href="http://luisdelarosa.com">Luis de la Rosa</a> of <a href="http://www.happyapps.com/webnotehappy/">WebnoteHappy</a> fame was kind enough to try to reproduce this for me.  His results were better.  Although release was building Intel by default, the architecture setting for the project made it clear that that&#8217;s what was going on.  When he unchecked i386 it stopped compiling for i386 (how nice).  So, one has to assume it&#8217;s something in my environment somewhere causing this.</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2006/01/07/really-you-want-intel/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
