<?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>Tewha &#187; Xcode</title>
	<atom:link href="http://tewha.net/tag/xcode/feed/" rel="self" type="application/rss+xml" />
	<link>http://tewha.net</link>
	<description>Writings and links on iPhone and iPad programming</description>
	<lastBuildDate>Wed, 18 Apr 2012 20:26:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Use a Build Phase to validate XML</title>
		<link>http://tewha.net/2012/04/use-a-build-phase-to-validate-xml/</link>
		<comments>http://tewha.net/2012/04/use-a-build-phase-to-validate-xml/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 06:34:53 +0000</pubDate>
		<dc:creator>Steven Fisher</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://tewha.net/?p=1250</guid>
		<description><![CDATA[My application includes some XML files that are used while running to map data from a web service. This has drastically simplified the code I needed to write to parse data from the web service, since I can describe how &#8230; <a href="http://tewha.net/2012/04/use-a-build-phase-to-validate-xml/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My application includes some XML files that are used while running to map data from a web service. This has drastically simplified the code I needed to write to parse data from the web service, since I can describe how to decode all of the types of object the web service interacts with simply.</p>

<p>If I accidentally provide bad XML, I don&#8217;t know until my app tries to parse it. That may be some time into its run. If the XML is processed because of a specific user action, I&#8217;ve broken that specific user action.</p>

<p>Obviously, I want to test everything in my app before I post it to the iTunes Store. But finding this problem even <em>hours</em> later makes it harder to diagnose and fix. I can detect this error immediately (and fix it right away) by adding a build phase to validate my XML.</p>

<p>I added a run script to my target that does this:</p>

<pre><code>find "${PROJECT_DIR}" -name *.xml -exec xmllint {} \;
</code></pre>

<p><em>See update below.</em></p>

<p><a href="http://tewha.net/wp-content/uploads/2012/04/Screen-Shot-2012-04-18-at-12.16.28-AM.png"><img src="http://tewha.net/wp-content/uploads/2012/04/Screen-Shot-2012-04-18-at-12.16.28-AM-300x214.png" alt="" title="Run Script build phase" width="300" height="214" class="alignnone size-medium wp-image-1253"></a></p>

<p>Xcode will run this script when building my target. It will find all XML files in my project directory, and run <code>xmllint</code> on them. <code>xmllint</code> returns an error if the document is malformed.</p>

<p>I gave this build phase a good name so I can find it easily later, then dragged the script as high in my build phase order as possible to get the results early. This may not actually prevent the project from building, but at least I get a big red error.</p>

<p>This validates <strong>all</strong> the XML in my project directory. If you have XML you don&#8217;t need, you&#8217;ll have to do something more complicated:</p>

<ul>
<li>Provide a more specific starting path</li>
<li>Use one of the other variables validate the built .app package instead, or</li>
<li>Hard code each XML file&#8217;s path</li>
</ul>

<h2>Update</h2>

<p>This command works better:</p>

<pre><code>find "${PROJECT_DIR}" -name *.xml -print0 | xargs -n 1 -0 xmllint
</code></pre>

<p>With this command, the error not only stops Xcode, but Xcode highlights the line that xmllint reports as the offender.</p>
]]></content:encoded>
			<wfw:commentRss>http://tewha.net/2012/04/use-a-build-phase-to-validate-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;ve changed my mind about Xcode snapshots</title>
		<link>http://tewha.net/2012/01/ive-changed-my-mind-about-xcode-snapshots/</link>
		<comments>http://tewha.net/2012/01/ive-changed-my-mind-about-xcode-snapshots/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 05:08:13 +0000</pubDate>
		<dc:creator>Steven Fisher</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[hubris]]></category>
		<category><![CDATA[snapshots]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://tewha.net/?p=1244</guid>
		<description><![CDATA[In the recent past, I&#8217;ve mocked Xcode&#8217;s snapshots. They were sluggish and not especially reliable. I&#8217;d like to say they were inefficient, too, but the truth is that they were so slow and so unreliable I never bothered to find &#8230; <a href="http://tewha.net/2012/01/ive-changed-my-mind-about-xcode-snapshots/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In the recent past, <a href="/2011/09/an-imaginary-conversation-with-xcode-4-regarding-snapshots">I&#8217;ve mocked Xcode&#8217;s snapshots</a>. They were sluggish and not especially reliable. I&#8217;d like to say they were inefficient, too, but the truth is that they were so slow and so unreliable I never bothered to find out.</p>

<p>Recent versions of Xcode have been a lot better. I&#8217;m not sure when they really improved, but in the most recent build of Xcode they take only a split second. So far, they seem reliable. And they work by storing the source in a private <code>git</code> repository, so they&#8217;re pretty efficient, too. This does <strong>not</strong> affect your real <code>git</code> repository, even if you&#8217;re using <code>git</code>. This is entirely separate, deep in Xcode&#8217;s private directory tree deep in your home folder.</p>

<p>Xcode can run a behaviour when a build succeeds. I noticed a few days ago that there&#8217;s also an option to <strong>Create snapshot</strong>.</p>

<p><a href="http://tewha.net/wp-content/uploads/2012/01/Screen-Shot-2012-04-18-at-12.11.46-AM.png"><img src="http://tewha.net/wp-content/uploads/2012/01/Screen-Shot-2012-04-18-at-12.11.46-AM-300x222.png" alt="" title="Screen Shot 2012-04-18 at 12.11.46 AM" width="300" height="222" class="alignnone size-medium wp-image-1251"></a></p>

<p>You may need to scroll down to see the <strong>Create snapshot</strong> option.</p>

<p>This means that every time my project builds successfully, a snapshot is created. The snapshots are small, basically containing only the changes since the last build. I expect I can leave this on basically forever without running out of disk space.</p>

<p>I commit to <code>git</code> many times during the course of the day, but occasionally I&#8217;ll be in a refactor and I won&#8217;t be committing every time the project builds. I&#8217;ll make a few changes, build and fix any errors, make a few more changes. I&#8217;ll keep this up several times, until I&#8217;ve made the full refactor I want. Only then will I fully test what I&#8217;ve done and commit.</p>

<p>Sometimes I&#8217;ll make the wrong change, and break the build in ways I can&#8217;t easily fix. At that point, I either need to struggle my way out of the errors I&#8217;ve introduced or abandon all the changes I&#8217;ve made. Yes, I could commit to <code>git</code> every time. But the smaller each individual change is, the less likely I am to bother.</p>

<p>In my defence, I still think the way Xcode uses snapshots by default is useless. They&#8217;re offered before major but atomic changes, which is right after I&#8217;ve committed to my source control repository manually.</p>

<p>But these continuous snapshots are another matter. This means I can back out of any particular change back to the previous working code without losing all the changes so far in what I consider the full, atomic refactor.</p>

<p>I&#8217;m thrilled this feature exists, and I&#8217;ll be using it from now on. I think you should give it a try, too. Even if you commit to your source control system constantly, this will make commits you won&#8217;t think to, and without any action on your part.</p>
]]></content:encoded>
			<wfw:commentRss>http://tewha.net/2012/01/ive-changed-my-mind-about-xcode-snapshots/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An imaginary conversation with Xcode 4 regarding snapshots</title>
		<link>http://tewha.net/2011/09/an-imaginary-conversation-with-xcode-4-regarding-snapshots/</link>
		<comments>http://tewha.net/2011/09/an-imaginary-conversation-with-xcode-4-regarding-snapshots/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 20:05:13 +0000</pubDate>
		<dc:creator>Steven Fisher</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[venting]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://tewha.net/?p=1235</guid>
		<description><![CDATA[Xcode: Hey… Me: Yeah? Xcode: You want to enable snapshots yet? Me: No. Xcode: I&#8217;m just asking. Me: No. Xcode: They&#8217;re good for you, you know. Me: I&#8217;m sure they are, but see, I&#8217;ve already backed up my project. In &#8230; <a href="http://tewha.net/2011/09/an-imaginary-conversation-with-xcode-4-regarding-snapshots/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Xcode: Hey…</p>

<p>Me: Yeah?</p>

<p>Xcode: You want to enable snapshots yet?</p>

<p>Me: No.</p>

<p>Xcode: I&#8217;m just asking.</p>

<p>Me: No.</p>

<p>Xcode: They&#8217;re good for you, you know.</p>

<p>Me: I&#8217;m sure they are, but see, I&#8217;ve already backed up my project. In fact, I checked it all into source control. You were there, right?</p>

<p>Xcode: Yeah, but can I enable snapshots? Please?</p>

<p>Me: No. Stop asking.</p>

<p>Xcode: I&#8217;ve caught you at a bad time.</p>

<p>Me: That&#8217;s not it. I don&#8217;t actually <strong>want</strong> snapshots. They&#8217;re redundant, and frankly a bit stupid. It makes me feel like you don&#8217;t respect me enough to make my own backups, you know?</p>

<p>Xcode: Oh. I can see that. I&#8217;ll ask again later, then.</p>
]]></content:encoded>
			<wfw:commentRss>http://tewha.net/2011/09/an-imaginary-conversation-with-xcode-4-regarding-snapshots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to bring back Xcode 4&#8242;s Welcome screen</title>
		<link>http://tewha.net/2011/04/how-to-bring-back-xcode-4s-welcome-screen/</link>
		<comments>http://tewha.net/2011/04/how-to-bring-back-xcode-4s-welcome-screen/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 18:10:39 +0000</pubDate>
		<dc:creator>Steven Fisher</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://tewha.net/?p=1162</guid>
		<description><![CDATA[If you&#8217;ve turned off Xcode 4&#8242;s welcome screen, there&#8217;s two ways to turn it back on. Open Xcode. Choose Welcome to Xcode from the Window menu. Check Show this window when Xcode launches. Alternatively, you can turn it back on &#8230; <a href="http://tewha.net/2011/04/how-to-bring-back-xcode-4s-welcome-screen/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve turned off Xcode 4&#8242;s welcome screen, there&#8217;s two ways to turn it back on.</p>

<p>Open Xcode. Choose <strong>Welcome to Xcode</strong> from the <strong>Window</strong> menu. Check <strong>Show this window when Xcode launches</strong>.</p>

<p>Alternatively, you can turn it back on from Terminal with this command:
<code>defaults delete com.apple.dt.Xcode XCShowWelcomeWindow</code></p>
]]></content:encoded>
			<wfw:commentRss>http://tewha.net/2011/04/how-to-bring-back-xcode-4s-welcome-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TargetConditionals.h</title>
		<link>http://tewha.net/2011/02/targetconditionals-h/</link>
		<comments>http://tewha.net/2011/02/targetconditionals-h/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 06:35:27 +0000</pubDate>
		<dc:creator>Steven Fisher</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[iOS Development]]></category>
		<category><![CDATA[Mac OS X Development]]></category>
		<category><![CDATA[OS X Development]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://tewha.net/?p=1154</guid>
		<description><![CDATA[How to detect iOS hardware, simulator, or Mac from Greg Parker: TargetConditionals.h. (I&#8217;ve used this chart several times since it was posted, but I haven&#8217;t linked to it before.)]]></description>
			<content:encoded><![CDATA[<p>How to detect iOS hardware, simulator, or Mac from Greg Parker: <a href="http://www.sealiesoftware.com/blog/archive/2010/8/16/TargetConditionalsh.html">TargetConditionals.h</a>. (I&#8217;ve used this chart several times since it was posted, but I haven&#8217;t linked to it before.)</p>
]]></content:encoded>
			<wfw:commentRss>http://tewha.net/2011/02/targetconditionals-h/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xcode tip: Renaming files shared by projects</title>
		<link>http://tewha.net/2010/12/xcode-tip-renaming-files-shared-by-projects/</link>
		<comments>http://tewha.net/2010/12/xcode-tip-renaming-files-shared-by-projects/#comments</comments>
		<pubDate>Sat, 04 Dec 2010 00:24:45 +0000</pubDate>
		<dc:creator>Steven Fisher</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Common Sense]]></category>
		<category><![CDATA[Intuitive design]]></category>
		<category><![CDATA[iOS Development]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://tewha.net/?p=1144</guid>
		<description><![CDATA[What if you want to rename a file that&#8217;s used in multiple Xcode projects? Well, previously I&#8217;d rename the file in one project, then open each project in series and correct broken references. But I discovered today that this is &#8230; <a href="http://tewha.net/2010/12/xcode-tip-renaming-files-shared-by-projects/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>What if you want to rename a file that&#8217;s used in multiple Xcode projects? Well, previously I&#8217;d rename the file in one project, then open each project in series and correct broken references. But I discovered today that this is unnecessary. If you open all of your projects first, Xcode will fix the references across <strong>all</strong> of your open projects as you rename files in <strong>any</strong> of the projects.</p>

<p>For all I know, this has always been a feature of Xcode. But I&#8217;ve never noticed it before. So for this stunning display of common sense: Well done, Apple!</p>
]]></content:encoded>
			<wfw:commentRss>http://tewha.net/2010/12/xcode-tip-renaming-files-shared-by-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better Xcode warnings through .xcconfig files</title>
		<link>http://tewha.net/2010/11/xcode-warnings/</link>
		<comments>http://tewha.net/2010/11/xcode-warnings/#comments</comments>
		<pubDate>Sat, 27 Nov 2010 18:31:36 +0000</pubDate>
		<dc:creator>Steven Fisher</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[clang]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[warnings]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://tewha.net/?p=1145</guid>
		<description><![CDATA[Peter Hosey posted a list of warnings he turns on. Here&#8217;s the warnings I turn on. It&#8217;s mostly the same list. Rather than set these per project, I have a .xcconfig file I add to my project. I then base &#8230; <a href="http://tewha.net/2010/11/xcode-warnings/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Peter Hosey <a href="http://boredzo.org/blog/archives/2009-11-07/warnings">posted a list of warnings he turns on</a>. Here&#8217;s the warnings I turn on. It&#8217;s mostly the same list.</p>

<p>Rather than set these per project, I have a .xcconfig file I add to my project. I then base each build configuration off this file. Changing the .xcconfig file changes all projects based on it (though with the current Xcode, it&#8217;s sometimes necessary to reload the project to get the settings to take).
<pre>//
//  MoreWarnings.xcconfig
//
//  Created by Steven Fisher:
//      http://tewha.net/2010/11/xcode-warnings/
//  See also:
//      http://boredzo.org/blog/archives/2009-11-07/warnings
//</p>

<p>GCC_WARN_CHECK_SWITCH_STATEMENTS = YES
GCC_WARN_SHADOW = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_MISSING_PARENTHESES = YES
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
GCC_WARN_ABOUT_MISSING_NEWLINE = YES
GCC_WARN_SIGN_COMPARE = YES
GCC_WARN_UNDECLARED_SELECTOR = YES
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_LABEL = YES
GCC_WARN_UNUSED_VALUE = YES
GCC_WARN_UNUSED_VARIABLE = YES
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
GCC_TREAT_WARNINGS_AS_ERRORS = YES
RUN_CLANG_STATIC_ANALYZER = YES</pre>
Peter wrote a great explanation of why you&#8217;d want most of these warnings, which I&#8217;m not going to attempt. I&#8217;ve added some C++ warnings, too. They don&#8217;t do anything with clang 1.6, but might be useful in the future.</p>

<p>A few notes:</p>

<ul>
<li>Like Peter, I don&#8217;t turn on <code>GCC_WARN_UNUSED_PARAMETER</code>. Although you can add <code>__unused</code> to each parameter to disable the warning, doing so breaks Xcode&#8217;s code formatting. I use code formatting constantly, so anything that breaks it isn&#8217;t acceptable.</li>
    <li>The warnings that were the most painful to turn on were <code>GCC_WARN_64_TO_32_BIT_CONVERSION</code> and <code>GCC_WARN_SIGN_COMPARE</code>. If you use <code>int</code> and <code>NSInteger</code> interchangeably, you&#8217;re going to have a tough time with these. (I don&#8217;t, but some of the internal libraries I use do.) These are also some of the more dangerous warnings to fix; if you&#8217;ve got automated tests, you should run them after every few corrections.</li>
    <li>
<code>RUN_CLANG_STATIC_ANALYZER</code> will roughly double (or more) the time your project takes to compile. I consider this a good trade: I rarely trigger a static analyzer warning now, but when I do I want to fix it.</li>
    <li>Also note the <code>GCC_TREAT_WARNINGS_AS_ERRORS</code>. If you are applying these to an existing project, you may start with hundreds of warnings. You&#8217;ll probably want to start with this set to <code>NO</code> and change it to <code>YES</code> after you&#8217;ve fixed the warnings.</li>
    <li>Remember, too, that this changes the <em>defaults</em> for settings. You can still specify different settings in the build configuration! If the static analyzer is taking too long to run in one project, just turn it off in that one project but leave the .xcconfig file alone!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tewha.net/2010/11/xcode-warnings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The secret to enjoying Xcode</title>
		<link>http://tewha.net/2009/10/the-secret-to-enjoying-xcode/</link>
		<comments>http://tewha.net/2009/10/the-secret-to-enjoying-xcode/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 16:22:09 +0000</pubDate>
		<dc:creator>Steven Fisher</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Pain reduction]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://tewha.net/?p=1071</guid>
		<description><![CDATA[One of the things that made me like Xcode more and become more efficient with it is realizing that while all coders are insane, me and Xcode&#8217;s designers are insane in different ways. By that, I mean that aside from &#8230; <a href="http://tewha.net/2009/10/the-secret-to-enjoying-xcode/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the things that made me like Xcode more and become more efficient with it is realizing that while all coders are insane, me and Xcode&#8217;s designers are <em>insane in different ways</em>.</p>

<p>By that, I mean that aside from the standard keyboard shortcuts (Save, Copy&#8230; that sort of thing), none of the keyboard shortcuts made sense to me.</p>

<p>So I duplicated one of the keyboard shortcut profiles and deleted most of the keyboard bindings. I was brutal with it — if the combination didn&#8217;t make sense to me OR it was something I&#8217;d rarely use it was removed. Then I added keyboard shortcuts that I needed. By using about an hour to customize these settings, I ended up having keyboard shortcuts that I fully understood and rolled off my fingertips.</p>

<p>At this point — and this is where it became a useful exercise — I added my <code>~/Library/Application Support/Xcode</code> to version control so I could easily sync it between computers.  So when I find something that isn&#8217;t quite working out for me, I make a change and propagate it to my other system.</p>

<p>Am I going to share what I ended up with? No, because that&#8217;s not the point of this. Rather, I want to point out a simple fact of Xcode: <strong>Xcode will adapt to how you want to use it, and if you feel like you&#8217;re suffering at all with it you should spend the time it to takes to make it enjoyable to use.</strong></p>

<p>And when someone tells me I can do something with a particular keyboard shortcut, I switch back to the defaults and see what it&#8217;s bound to.</p>
]]></content:encoded>
			<wfw:commentRss>http://tewha.net/2009/10/the-secret-to-enjoying-xcode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xcode and iPhone OS 3.0.1</title>
		<link>http://tewha.net/2009/07/xcode-and-iphone-os-3-0-1/</link>
		<comments>http://tewha.net/2009/07/xcode-and-iphone-os-3-0-1/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 18:52:18 +0000</pubDate>
		<dc:creator>Steven Fisher</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://tewha.net/?p=1009</guid>
		<description><![CDATA[To get Xcode 3.1.3 working with iPhone OS 3.0.1, you&#8217;ll need to teach Xcode how to target iPhone OS 3.0.1. Xcode will automatically recognize iPhone OS 3.0.1 and look for a new SDK at a set path. The problem is &#8230; <a href="http://tewha.net/2009/07/xcode-and-iphone-os-3-0-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To get Xcode 3.1.3 working with iPhone OS 3.0.1, you&#8217;ll need to teach Xcode how to target iPhone OS 3.0.1.</p>

<p>Xcode will automatically recognize iPhone OS 3.0.1 and look for a new SDK at a set path. The problem is that SDK doesn&#8217;t exist. The good part is that the iPhone OS 3.0 SDK works perfectly for developing 3.0.1. The only apparent change is the SMS fix.</p>

<p>Assuming you&#8217;ve installed to /Developer, the iPhone OS 3.0 SDK is here:</p>

<p><code>/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0 (7A341)</code></p>

<p>When using Xcode with iPhone OS 3.0.1, Xcode looks for the iPhone OS 3.0.1 SDK here:</p>

<p><code>/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0.1</code></p>

<p>The trick, then, is to build a symbolic link that connects what Xcode is looking for with what it needs to find.</p>

<p>So what do you do? Assuming you&#8217;ve installed Xcode in the standard location, this is a Terminal command to fix the problem:</p>

<p><code>ln -s /Developer/Platforms/iPhoneOS.platform/DeviceSupport\</p>

<p>/3.0\ &#40;7A341&#41; /Developer/Platforms/iPhoneOS.platform/\</p>

<p>DeviceSupport/3.0.1</code></p>

<p>(I&#8217;ve split this into three lines to make it easier to copy and paste with the \ line continuation character.)</p>

<p>This will not add a SDK to Xcode&#8217;s list, it will just teach Xcode to map your device to the 3.0 SDK.</p>

<p>A few other tips:</p>

<ul>
<li>If you still can&#8217;t debug restarting your iPhone may help. Most of the iPhones I&#8217;ve tried to debug on, I&#8217;ve had to restart first.</li>

    <li>If you get an error regarding code signing, try downloading your provisioning profile again and re-installing it. Also, select it again in your build settings.</li>

</ul>

<p>Based on information from <a href="http://developer.apple.com/iphone/download.action?path=/iphone/iphone_sdk_3.0__final/iphone_os_3.0.1_advisory.pdf">iPhone OS 3.0.1 Advisory</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tewha.net/2009/07/xcode-and-iphone-os-3-0-1/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Apple&#8217;s developer documentation website is horrible</title>
		<link>http://tewha.net/2009/07/apples-developer-documentation-website-is-horrible-2/</link>
		<comments>http://tewha.net/2009/07/apples-developer-documentation-website-is-horrible-2/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 00:10:02 +0000</pubDate>
		<dc:creator>Steven Fisher</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[crashing]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[webkit]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://tewha.net/?p=939</guid>
		<description><![CDATA[Isn&#8217;t anyone at Apple even mildly embarrassed about how poor the ADC search results are? Like everyone other Mac developer (at least, those not using a seed&#8230; no comment otherwise), I&#8217;ve been bit by the Mac OS X 10.5.7 bug &#8230; <a href="http://tewha.net/2009/07/apples-developer-documentation-website-is-horrible-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Isn&#8217;t anyone at Apple even <strong>mildly</strong> embarrassed about how poor the ADC search results are?</p>

<p>Like everyone other Mac developer (at least, those not using a seed&#8230; no comment otherwise), I&#8217;ve been bit by the Mac OS X 10.5.7 bug that causes Xcode to crash almost every time the documentation viewer is used.</p>

<p>Now I&#8217;m a reasonable guy. I get that a Mac OS X update has to be thoroughly tested. I wouldn&#8217;t want it otherwise. So let me get this off my chest right away: it isn&#8217;t the bug itself that bothers me.</p>

<p>Xcode 3.1.3 shipped after Mac OS X 10.5.7. So it should have been pretty easy to add code to Xcode see if the developer has executed a <code>defaults write com.apple.xcode dontevershowthefuckingdocviewer 1</code> and then never show the documentation viewer, so I wouldn&#8217;t lose unsaved work every time I forgot and tried to open it. ((Maybe use a different identifier for it.))</p>

<p>And in the future, the documentation links should be handled via an URL type that can be handled by another application.</p>

<p>And, oh yeah:</p>

<p style="text-align: center;"><strong><span style="color: #800000; font-size: 200%;">Why is the documentation viewer embedded in the IDE?</span></strong></p>

<p>Splitting the documentation viewer into a separate application would make a lot of sense. Browsers crash! If it wasn&#8217;t this, it would be something else that crashed the documentation viewer. This was predictable. This was, dare I say, expected.</p>

<p>But what really, really makes me angry is the developer site. The content is generally pretty good, but the search engine is horrible:</p>

<ul>
<li>Fix your summary so it&#8217;s actually useful.

Apple&#8217;s summary:

<img class="aligncenter size-full wp-image-941" title="apple" src="http://tewha.net/wp-content/uploads/2009/07/apple.png" alt="apple" width="461" height="45">Google&#8217;s summary:

<img class="aligncenter size-full wp-image-942" title="google" src="http://tewha.net/wp-content/uploads/2009/07/google.png" alt="google" width="527" height="72">

There&#8217;s just no comparison. ((Google, you rock.))</li>

    <li>I don&#8217;t need to see every single empty redirect. Showing the same effective document multiple times is just random clutter.</li>

    <li>There are better ways to represent the format of documentation in search results than just including it in the URL.</li>

    <li>Add up those last two items, and you realize: I don&#8217;t need PDFs in the search results. PDF should just be linked to from the documentation itself.</li>

</ul>

<p>I&#8217;ll update this when I have more points. The bile has receded enough for me to code again.</p>
]]></content:encoded>
			<wfw:commentRss>http://tewha.net/2009/07/apples-developer-documentation-website-is-horrible-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: tewha.net @ 2012-05-23 04:55:10 -->
