<?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>Malice &#187; XCode</title>
	<atom:link href="http://malice.org.uk/tag/xcode/feed/" rel="self" type="application/rss+xml" />
	<link>http://malice.org.uk</link>
	<description>a quiet place in a loud world</description>
	<lastBuildDate>Sat, 27 Mar 2010 18:09:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Changing __MyCompanyName__ in XCode</title>
		<link>http://malice.org.uk/2009/10/04/changing-__mycompanyname__-in-xcode/</link>
		<comments>http://malice.org.uk/2009/10/04/changing-__mycompanyname__-in-xcode/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 10:56:51 +0000</pubDate>
		<dc:creator>d.</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[XCode]]></category>

		<guid isPermaLink="false">http://malice.org.uk/?p=75</guid>
		<description><![CDATA[Scenario You start a new project in XCode, and it rather cutely picks up your name from the Address Book, and attributes you as the creator of the auto-generated code. However, in a rather sterile fashion, it tells you that the code is the copyright to  __MyCompanyName__. // Created by John Doe on 04/10/2009 // [...]]]></description>
			<content:encoded><![CDATA[<h2>Scenario</h2>
<p>You start a new project in XCode, and it rather cutely picks up your name from the Address Book, and attributes you as the creator of the auto-generated code. However, in a rather sterile fashion, it tells you that the code is the copyright to <em> __MyCompanyName__</em>.</p>
<blockquote>
<pre><span style="color: #339966;">// Created by John Doe on 04/10/2009
// Copyright __MyCompanyName__ 2009. All rights reserved.</span></pre>
</blockquote>
<p>I can think of things I would rather set this to, so how can we change it, without editing every file that is created?</p>
<h2>Solutions</h2>
<p><strong>1. Changing the company name of code that you write, in Address Book</strong></p>
<p>Unsurprisingly, XCode also grabs your company information from your Address Book entry.</p>
<p>Open Address Book, and make sure you have entered a name in the Company field on your own Card.</p>
<p style="text-align: center;"><img class="size-full wp-image-86 aligncenter" title="company-name" src="http://malice.org.uk/blog/wp-content/uploads/2009/10/company-name.png" alt="Company field set in Address Book" width="179" height="59" /></p>
<p>XCode will check this field when creating new projects and files, and enter your assigned Company of the copyright owner of the work you create.</p>
<p>This may or may not be what you want to achieve.</p>
<p><strong>2. Changing the default value for company names</strong></p>
<p>If you would rather not have a company name in your Address Book, or if you don&#8217;t want the copyright of your code attributed to that company name, you can change the default value XCode uses. You might, for example,  prefer to use your own name in the copyright line.</p>
<p>Open a Terminal window, and type the following command (on a single line):</p>
<p><code>defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions -dict ORGANIZATIONNAME "Funky Monkey Futures, Inc"</code></p>
<p>This will result in all new files having your chosen company name in the copyright attribution, regardless of your Address Book entry.</p>
<blockquote>
<pre><span style="color: #339966;">// Created by John Doe on 04/10/2009
// Copyright Funky Monkey Futures, Inc 2009. All rights reserved.</span></pre>
</blockquote>
<p><span style="color: #339966;"><span style="color: #000000;">Note: This option will <em>override</em> your Address Book settings, rather than act as a default if that setting is missing.</span></span></p>
<h2><span style="color: #339966;"><span style="color: #000000;">Disclaimer</span></span></h2>
<p><span style="color: #339966;"><span style="color: #000000;">The above information is true as of XCode 3.1 running on Leopard.</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://malice.org.uk/2009/10/04/changing-__mycompanyname__-in-xcode/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
