<?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>b&#124;tw&#124;se &#187; Dan</title>
	<atom:link href="http://danwright.info/blog/author/dan/feed/" rel="self" type="application/rss+xml" />
	<link>http://danwright.info/blog</link>
	<description>by Dan Wright</description>
	<lastBuildDate>Tue, 29 Nov 2011 07:56:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Web site browser agents (2011 edition)</title>
		<link>http://danwright.info/blog/2011/06/web-site-browser-agents-2011-edition/</link>
		<comments>http://danwright.info/blog/2011/06/web-site-browser-agents-2011-edition/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 23:00:02 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[useragents]]></category>

		<guid isPermaLink="false">http://danwright.info/blog/?p=259</guid>
		<description><![CDATA[It is time once again to take stock of web browser statistics for my various sites, and see how they have changed since last time, back in March of 2010. Here are the overall shares for March 2010 to June 2011: 45% MSIE 24% Firefox 13% Chrome (WebKit) 13% Safari (WebKit) 5% Others (1% Opera) [...]]]></description>
			<content:encoded><![CDATA[<p>It is time once again to take stock of web browser statistics for my various sites, and see how they have changed since last time, <a href="/blog/2010/03/web-site-browser-agents-2010-edition">back in March of 2010</a>.</p>
<p>Here are the overall shares for March 2010 to June 2011:</p>
<ul>
<li>45% MSIE</li>
<li>24% Firefox</li>
<li>13% Chrome (WebKit)</li>
<li>13% Safari (WebKit)</li>
<li>5% Others (1% Opera)</li>
</ul>
<p>So for the past year, MSIE usage fell significantly (from <strong>64%</strong>!), Firefox and Safari rose slightly, and Chrome rose significantly (out of the &#8220;Other&#8221; category). Since both Safari and Chrome use WebKit, WebKit has now passed Firefox&apos;s Gecko engine to become the second most widely used browser engine.</p>
<p>The Internet Explorer breakdown:</p>
<ul>
<li>50% MSIE 8.0</li>
<li>31% MSIE 7.0</li>
<li>18% MSIE 6.0</li>
<li>2% MSIE 9.0</li>
</ul>
<p>Firefox:</p>
<ul>
<li>68% Firefox 3.6</li>
<li>18% Firefox 3.5</li>
<li>6% Firefox 4.0</li>
<li>5% Firefox 3.0</li>
<li>2% Firefox 2.0</li>
<li>2% Firefox 5.0</li>
</ul>
<p>Firefox 2.0 and 3.0 have now all but disappeared. Both 4.0 <em>and</em> 5.0 are simply too new to have garnered much share. It remains to be seen if 4.0 <em>ever</em> garners much share, or if users got directly to 5.0 (or 6.0, or&#8230;).</p>
<p>Safari:</p>
<ul>
<li>40% Safari 5.0</li>
<li>18% Safari 4.0</li>
<li>17% Safari 4.0 Mobile</li>
<li>12% Safari 5.0 Mobile</li>
<li>5% Safari 4.1</li>
<li>4% Safari 5.1</li>
<li>5% Safari 3.0&ndash;3.2</li>
</ul>
<p>The total mobile share has jumped from 20% last year to 29% this year. Safari 5.0 did not appear on last year&apos;s chart at all.</p>
<p>I did not include a by-version breakdown of Chrome share this year; maybe next year. Because Chrome self-updates in the background, I would expect that the latest couple of versions to dominate.</p>
]]></content:encoded>
			<wfw:commentRss>http://danwright.info/blog/2011/06/web-site-browser-agents-2011-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Photos of Carl</title>
		<link>http://danwright.info/blog/2011/01/carl-holidays-2010/</link>
		<comments>http://danwright.info/blog/2011/01/carl-holidays-2010/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 01:56:37 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[family]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[Carl]]></category>
		<category><![CDATA[photos]]></category>

		<guid isPermaLink="false">http://danwright.info/blog/?p=255</guid>
		<description><![CDATA[New photos of Carl from his first Christmas are now up on Flickr.]]></description>
			<content:encoded><![CDATA[<p>New photos of Carl from his first Christmas are now <a href="http://www.flickr.com/photos/80168386@N00/sets/72157625892294328/show/">up on Flickr</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://danwright.info/blog/2011/01/carl-holidays-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xcode project object UUIDs</title>
		<link>http://danwright.info/blog/2010/10/xcode-pbxproject-files-3/</link>
		<comments>http://danwright.info/blog/2010/10/xcode-pbxproject-files-3/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 20:09:14 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[Xcode pbxproject]]></category>

		<guid isPermaLink="false">http://danwright.info/blog/?p=239</guid>
		<description><![CDATA[Continuing our discussion of the Xcode project file format&#8230; Unique Xcode object IDs using Ruby The &#8220;UUIDs&#8221; used in project files are shorter than true UUIDs (only 12 bytes/16 characters), and have no punctuation. We can&#8217;t just use system UUID services to generate new ones, then. In practice, our UUIDs usually do not need to [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing our <a href="xcode-pbxproject-files">discussion</a> of the <a href="xcode-pbxproject-files-2">Xcode project file format</a>&#8230;</p>
<h3>Unique Xcode object IDs using Ruby</h3>
<p>The &#8220;UUIDs&#8221; used in project files are shorter than true UUIDs (only 12 bytes/16 characters), and have no punctuation. We can&rsquo;t just use system UUID services to generate new ones, then. In practice, our UUIDs usually do not need to be <em>universally</em> unique; they must be unique within a project file, and ideally would be unique across all projects built or opened on a given machine. Here, nonetheless, is a quickie ruby class that generates Xcode project UUIDs:</p>
<pre><code class="code">
class XcodeUUIDGenerator

    def initialize
        @num = [Time.now.to_i, Process.pid, getMAC]
    end

    # Get the ethernet hardware address ("MAC"). This version
    # works on Mac OS X 10.6 (Snow Leopard); it has not been tested
    # on other versions.

    def getMAC(interface='en0')
        addrMAC = `ifconfig #{interface} ether`.split("\n")[1]
        addrMAC ? addrMAC.strip.split[1].gsub(':','').to_i(16) : 0
    end

    def generate
        @num[0] += 1
        self
    end

    def to_s
        "%08X%04X%012X" % @num
    end
end
</code></pre>
<p>Usage is simple:</p>
<pre><code class="code">    gen = XcodeUUIDGenerator.new
    id1 = gen.generate.to_s
    id2 = gen.generate.to_s
    id3 = gen.generate.to_s
</code></pre>
<h3>PBXFileReference</h3>
<p>A <code>PBXFileReference</code> is used to track every external file referenced by the project: source files, resource files, libraries, generated application files, and so on. A source file might look like this:</p>
<pre><code>
 29B97316FDCFA39411CA2CEA /* main.m */ = {
	isa = PBXFileReference;
	fileEncoding = 4;
	lastKnownFileType = sourcecode.c.objc;
	path = main.m;
	sourceTree = "<group>";
 };
</code></pre>
<p>The values for <code>lastKnownFileType</code> may be found within Xcode itself, by selecting the file and choosing &#8220;Get Info&#8221;. A sourceTree of &#8220;<group>&#8221; corresponds to &#8220;Relative to Enclosing Group&#8221;. A fileEncoding value of &#8220;4&#8243; is UTF-8. Here, the path is only a file name, however it can be a (longer) relative path or an absolute path (sourceTree = &#8220;<absolute>&#8220;). Relative paths may also be relative to the chosen SDK, the Xcode application (rare), the project file (that is, the .xcodeproj bundle), or the built product.</p>
<pre><code>
 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {
	isa = PBXFileReference;
	lastKnownFileType = wrapper.framework;
	name = Cocoa.framework;
	path = /System/Library/Frameworks/Cocoa.framework;
	sourceTree = "<absolute>";
 };
</code></pre>
<p>Some Xcode templates contain absolute paths to some frameworks (as in the above example), however this is, arguably, &#8220;wrong&#8221;&mdash;SDK files should always use SDK-relative paths (as, indeed, Xcode 3.2.x will do if you add a framework to a project manually):</p>
<pre><code>
 2D04AF89126B8A7A00073224 /* AppleScriptObjC.framework */ = {
	isa = PBXFileReference;
	lastKnownFileType = wrapper.framework;
	name = AppleScriptObjC.framework;
	path = System/Library/Frameworks/AppleScriptObjC.framework;
	sourceTree = SDKROOT;
 };
</code></pre>
<p>Finally, the final output of your target also has a PBXFileReference. It looks slightly different:</p>
<pre><code>
 8D1107320486CEB800E47090 /* MyProject.app */ = {
	isa = PBXFileReference;
	explicitFileType = wrapper.application;
	includeInIndex = 0;
	path = MyProject.app;
	sourceTree = BUILT_PRODUCTS_DIR;
 };
</code></pre>
<p>Instead of <code>lastKnownFileType</code>, it has an <code>explicitFileType</code>; it also has a property <code>includeInIndex</code>, set to 0 (FALSE).</p>
<p>You can add comment to files; these are stored as a <code>comments</code> property on the PBXFileReference.</p>
<h3>PBXBuildFile</h3>
<p>Files that need to be processed in the build (for example compiled, linked, or copied) also have a <code>PBXBuildFile</code>. These are <em>very</em> simple:</p>
<pre><code> 8D11072D0486CEB800E47090 /* main.m in Sources */ = {
	isa = PBXBuildFile;
	fileRef = 29B97316FDCFA39411CA2CEA /* main.m */;
	settings = {ATTRIBUTES = (); };
};
</code></pre>
<p>The fileRef is the id of the <code>PBXFileReference</code>. The <code>settings</code> property is usually omitted entirely. If you specify per-file compiler flags, they will be stored in the <code>COMPILER_FLAGS</code> property of the <code>settings</code> property.</p>
<h3>PBXSourcesBuildPhase</h3>
<p>Projects commonly have several build phases: compiling, linking, copying resources, copying other files, and perhaps running shell scripts. <code>PBXSourcesBuildPhase</code> describes the compiling phase for a target.</p>
<pre><code> 8D11072C0486CEB800E47090 /* Sources */ = {
    isa = PBXSourcesBuildPhase;
    buildActionMask = 2147483647;
    files = (
      8D11072D0486CEB800E47090 /* main.m in Sources */,
      256AC3DA0F4B6AC300CF3369 /* MyProjectAppDelegate.m in Sources */,
    );
    runOnlyForDeploymentPostprocessing = 0;
 };
</code></pre>
<p>The <code>files</code> property contains an array of <code>PBXBuildFile</code> references. <code>buildActionMask</code> is usually 2147483647 (that&rsquo;s 0x7FFFFFFF in hexadecimal). The <code>runOnlyForDeploymentPostprocessing</code> property is normally 0 (FALSE).</p>
<h3>Until next time&#8230;</h3>
<p>That&rsquo;s it for this week! Next time, we&rsquo;ll look at the other build phases.</p>
<p>¶</p>
]]></content:encoded>
			<wfw:commentRss>http://danwright.info/blog/2010/10/xcode-pbxproject-files-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More on the Xcode project format</title>
		<link>http://danwright.info/blog/2010/10/xcode-pbxproject-files-2/</link>
		<comments>http://danwright.info/blog/2010/10/xcode-pbxproject-files-2/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 00:04:16 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[Xcode pbxproject]]></category>

		<guid isPermaLink="false">http://danwright.info/blog/?p=225</guid>
		<description><![CDATA[A 90-Second Project Parser in Ruby Last week we looked at the overall format of Xcode project files. Here&#8217;s an easy parser written in Ruby; this one will only run on Mac OS X, because it uses Foundation from Ruby: #!/usr/bin/ruby # http://danwright.info/blog/xcode-pbxproject-files-2 require 'osx/cocoa' xcodeproj = "/Users/danwr/Documents/MyProject/MyProject.xcodeproj" projectpbxproj = "#{xcodeproj}/project.pbxproj" data = OSX::NSData.dataWithContentsOfFile(projectpbxproj) plist [...]]]></description>
			<content:encoded><![CDATA[<h3>A 90-Second Project Parser in Ruby</h3>
<p><a href="xcode-pbxproject-files">Last week</a> we looked at the overall format of Xcode project files. Here&rsquo;s an easy parser written in Ruby; this one will only run on Mac OS X, because it uses Foundation from Ruby:
<pre><code class="code" style="font-size: 9px;">
#!/usr/bin/ruby
# http://danwright.info/blog/xcode-pbxproject-files-2

require 'osx/cocoa'

xcodeproj = "/Users/danwr/Documents/MyProject/MyProject.xcodeproj"

projectpbxproj = "#{xcodeproj}/project.pbxproj"
data = OSX::NSData.dataWithContentsOfFile(projectpbxproj)
plist = OSX::NSPropertyListSerialization.propertyListFromData_mutabilityOption_format_errorDescription(data, 0, nil, nil)

rootObject = plist['rootObject']
objects    = plist['objects']

if ARGV.length == 0
	puts "rootObject = #{objects[rootObject]}"
else
	what = ARGV.shift
	if /^[0-9a-fA-F]{24}$/ =~ what
		puts "object #{what} = #{objects[what]}"
	else
		results = objects.keys.find_all {|key| objects[key]['isa'] == what }
		puts "isa '#{what}': #{results}"
	end
end
</code></pre>
<p>If you run this command without any arguments, it will show you the root object (PBXProject). If you run it with a UUID, it will display the corresponding object; if you provide it with an object class (&#8216;isa&#8217;), it will display the UUIDs for all matching objects. For purposes of this article, I&rsquo;ve hard-coded the path to a project; you can edit that to point to your own project, or modify the script to allow a path to be specified as an argument.</p>
<p>Wow, that&rsquo;s silly-easy. If you want your script to run on another platform&mdash;Windows or Linux&mdash;you would need another solution (but it isn&rsquo;t exactly difficult to write a custom parser in a modern scripting language such as Ruby, Python, or even Old Man Perl.</p>
<h3>XCConfigurationList</h3>
<p>An <code>XCConfigurationList</code> is simply a list of configurations. A <em>configuration</em> refers to a group of settings, and commonly we have at least two: Debug and Release, the former for debugging the project, the latter optimized for customers.</p>
<pre><code class="code" style="font-size: 10px;">
C01FCF4E08A954540054247B = {
    buildConfigurations =     (
        C01FCF4F08A954540054247B,
        C01FCF5008A954540054247B
    );
    defaultConfigurationIsVisible = 0;
    defaultConfigurationName = Release;
    isa = XCConfigurationList;
}</code></pre>
<p>The <code>defaultConfigurationName</code> and <code>defaultConfigurationIsVisible</code> properties indicate which configuration is the default when building with the <code>xcodebuild</code> tool, as well as whether this information should be exposed in the Xcode user interface. The <code>buildConfigurations</code> array contains references to objects of type <code>XCBuildConfiguration</code>.</p>
<h3>XCBuildConfiguration</h3>
<p>An <code>XCBuildConfiguration</code> is a collection of build settings, like so:</p>
<pre><code class="code" style="font-size:10px;">
C01FCF4F08A954540054247B = {
    buildSettings =     {
        ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
        "GCC_C_LANGUAGE_STANDARD" = gnu99;
        "GCC_OPTIMIZATION_LEVEL" = 0;
        "GCC_WARN_ABOUT_RETURN_TYPE" = YES;
        "GCC_WARN_UNUSED_VARIABLE" = YES;
        "ONLY_ACTIVE_ARCH" = YES;
        PREBINDING = NO;
        SDKROOT = "macosx10.6";
    };
    isa = XCBuildConfiguration;
    name = Debug;
}</code></pre>
<p>The <code>buildSettings</code> property is the heart of an XCBuildConfiguration. Each build setting should look familiar: these are the same names and settings you would use in an <code>.xcconfig</code> file. Of course, <code>buildSettings</code> can be empty, as it often will be when you have an .xcconfig file specified instead.</p>
<h3>PBXVariantGroup</h3>
<p>A <code>PBXVariantGroup</code> describes a group of files that act like one; this is used to described localized files (strings and xibs).</p>
<pre><code class="code" style="font-size:10px;">
1DDD58140DA1D0A300B32029 = {
    children =     (
        1DDD58150DA1D0A300B32029
    );
    isa = PBXVariantGroup;
    name = "MainMenu.xib";
    sourceTree = "<group>";
}
</code></pre>
<p>This one describes the application&rsquo;s main xib (describing the menu bar and main window). The <strong>name</strong> is the name of the file. The <strong>children</strong> contains a list of localizations; here, there is just one, for the English version. Let&rsquo;s look at that child:</p>
<pre><code class="code" style="font-size:10px;">
1DDD58150DA1D0A300B32029 = {
    isa = PBXFileReference;
    lastKnownFileType = "file.xib";
    name = English;
    path = "English.lproj/MainMenu.xib";
    sourceTree = "<group>";
}
</code></pre>
<p>The path is the path of the actual .xib file (relative to the encoding group). <code>lastKnownFileType</code> indicates the file type.</p>
<h3>Next time&#8230;</h3>
<p>Next time, a look at <code>PBXFileReference</code>, <code>PBXBuildFile</code>, and <code>PBXSourcesBuildPhase</code>.</p>
<p>&para;</p>
]]></content:encoded>
			<wfw:commentRss>http://danwright.info/blog/2010/10/xcode-pbxproject-files-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stephen Fry on the iPad</title>
		<link>http://danwright.info/blog/2010/04/stephen-fry-on-the-ipad/</link>
		<comments>http://danwright.info/blog/2010/04/stephen-fry-on-the-ipad/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 02:05:34 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://danwright.info/blog/?p=162</guid>
		<description><![CDATA[&#8220;One melancholy thought occurs as my fingers glide and flow over the surface of this astonishing object: Douglas Adams is not alive to see the closest thing to his Hitchhiker&#8217;s Guide [to the Galaxy] that humankind has yet devised.&#8221; &#8211; Stephen Fry Read more]]></description>
			<content:encoded><![CDATA[<blockquote><p>&ldquo;One melancholy thought occurs as my fingers glide and flow over the surface of this astonishing object: Douglas Adams is not alive to see the closest thing to his <em>Hitchhiker&rsquo;s Guide [to the Galaxy]</em> that humankind has yet devised.&rdquo; <br /><em>&ndash; Stephen Fry</em></p></blockquote>
<p><a href="http://bit.ly/9RISNd" target="_blank">Read more</a></p>
]]></content:encoded>
			<wfw:commentRss>http://danwright.info/blog/2010/04/stephen-fry-on-the-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web site browser agents (2010 edition)</title>
		<link>http://danwright.info/blog/2010/03/web-site-browser-agents-2010-edition/</link>
		<comments>http://danwright.info/blog/2010/03/web-site-browser-agents-2010-edition/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 19:46:29 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://danwright.info/blog/?p=155</guid>
		<description><![CDATA[Okay, it has now been a year since I published web browser statistics for my various sites, so this seems like a good time to take stock of how things have changed over the past year. Take Internet Explorer 6 users (please!), for instance. Surely their numbers have fallen? Here are my overall numbers for [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, it has now been a year since I published <a href="/blog/2009/03/web-site-browser-agents/">web browser statistics for my various sites</a>, so this seems like a good time to take stock of how things have changed over the past year.</p>
<p>Take Internet Explorer 6 users (<em>please!</em>), for instance. Surely their numbers have fallen?</p>
<p>Here are my overall numbers for March 2009 to March 2010:</p>
<ul>
<li>64% MSIE</li>
<li>20% Firefox</li>
<li>10% Safari</li>
<li>6% Others (3% Chrome, 2% Opera)</li>
</ul>
<p>So for the past year, MSIE usage actually <em>increased</em>, Firefox and Safari fell; Others held their own.</p>
<p>The Internet Explorer breakdown:</p>
<ul>
<li><strong>38% MSIE 6.0</strong></li>
<li>36% MSIE 7.0</li>
<li>26% MSIE 8.0</li>
</ul>
<p>MSIE 8 has now been released for just over 12 months; and yet, it is only the third most popular version of Internet Explorer. Internet Explorer is the <em>only</em> browser with an upside-down adoption rate. Last year, MSIE 7 was the most popular version; this year, perversely, it is MSIE 6. MSIE 6 went up six points compared to last year.</p>
<p><em>Sigh.</em></p>
<p>Firefox:</p>
<ul>
<li>42% Firefox 3.5</li>
<li>42% Firefox 3.0</li>
<li>8% Firefox 2.0</li>
<li>7% Firefox 3.6</li>
</ul>
<p>Firefox 3.6 has only been out for about two months, so it&rsquo;s on track for a 42% share of the Firefox segment. Firefox 2.0 had the most share last year, at 48%. Quite a contrast with MSIE.</p>
<p>Safari:</p>
<ul>
<li>57% Safari 4.0</li>
<li>15% Safari 4.0 (mobile &#8211; iPhone/iPod Touch)</li>
<li>10% Safari 3.2</li>
<li>6% Safari 3.1</li>
<li>5% Safari 3.1 (mobile)</li>
<li>7% Safari 3.0, 4.1, and 2.x</li>
</ul>
<p>iPhone/iPod share has increased slightly, from 15 to 20%. A year ago, 3.2 was new, and version 3.1 had the largest share.</p>
]]></content:encoded>
			<wfw:commentRss>http://danwright.info/blog/2010/03/web-site-browser-agents-2010-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xcode Run Script Build Phase error reporting</title>
		<link>http://danwright.info/blog/2010/03/xcode-run-script-build-phase-error-reporting/</link>
		<comments>http://danwright.info/blog/2010/03/xcode-run-script-build-phase-error-reporting/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 17:14:35 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://danwright.info/blog/?p=151</guid>
		<description><![CDATA[I thought about blogging about this several months ago, but never got around to it. And don&#8217;t skip reading the comments.]]></description>
			<content:encoded><![CDATA[<p>I thought about blogging about <a href="http://briksoftware.com/blog/?p=120" target="_blank">this</a> several months ago, but never got around to it. And don&rsquo;t skip reading the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://danwright.info/blog/2010/03/xcode-run-script-build-phase-error-reporting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bypassing the Safari/WebKit caching bug</title>
		<link>http://danwright.info/blog/2010/03/bypassing-the-safariwebkit-caching-bug/</link>
		<comments>http://danwright.info/blog/2010/03/bypassing-the-safariwebkit-caching-bug/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 21:30:33 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://danwright.info/blog/?p=143</guid>
		<description><![CDATA[Anyone who has used Safari (or any other WebKit-based browser) to debug javascript has encountered the annoying &#8220;Resource interpreted as other but transferred with MIME type application/x-javascript&#8221; bug. When this happens, the source of the javascript file appears blank in the debugger, and various other things may go wrong (sometimes code isn&#8217;t executed, for example). [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone who has used Safari (or any other WebKit-based browser) to debug javascript has encountered the annoying &ldquo;Resource interpreted as other but transferred with MIME type application/x-javascript&rdquo; bug. When this happens, the source of the javascript file appears blank in the debugger, and various other things may go wrong (sometimes code isn&rsquo;t executed, for example).</p>
<p><a href="http://img.ly/images/161379/full" target="_blank"><img src="http://img.ly/system/uploads/000/161/379/original_ScreenShotResourceInterpretedAsOther.png" alt="screen shot" width="405" height="44"></a></p>
<p>This problem is caused by a WebKit bug, triggered when files are taken from the browser&rsquo;s cache rather than from your server. The simple workaround is to force WebKit not to cache your javascript files while you&rsquo;re debugging them. This is easy if you server supports PHP (it almost certainly does). Create a php file to serve your javascript, and have your test page include that instead of your javascript:</p>
<p>Before:<br /><code><<!---->script src="testing.js" type="text/javascript"><<!---->/script></code></p>
<p>After:<br /><code><<!---->script src="debug.php/testing.js" type="text/javascript"><<!---->/script></code></p>
<p>Where debug.php has:</p>
<p><code><br />
<<!---->?php<br />
header('Content-Type: application/x-javascript');<br />
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');<br />
header('Cache-Control: no-cache, must-revalidate, max-age=0');<br />
header('Pragma: no-cache');<br />
readfile(dirname(__FILE__).'/testing.js');<br />
?<!---->><br />
</code></p>
<p>Or, more generally:</p>
<p><code><br />
<<!---->?php<br />
header('Content-Type: application/x-javascript');<br />
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');<br />
header('Cache-Control: no-cache, must-revalidate, max-age=0');<br />
header('Pragma: no-cache');<br />
$file = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '/testing.js';<br />
readfile(dirname(__FILE__).$file);<br />
?<!---->><br />
</code></p>
<p>If you use the general version, you may wish to include some security checks on the input (PATH_INFO) to protect against potential exploits. That is left as an exercise for the reader.</p>
<p>Of course, before you deploy, remember to change the script include back to the original form!</p>
]]></content:encoded>
			<wfw:commentRss>http://danwright.info/blog/2010/03/bypassing-the-safariwebkit-caching-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photoluna 1.1</title>
		<link>http://danwright.info/blog/2010/01/photoluna-1-1/</link>
		<comments>http://danwright.info/blog/2010/01/photoluna-1-1/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 05:14:34 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[banasmoo-news]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://danwright.info/blog/?p=141</guid>
		<description><![CDATA[Photoluna 1.1 was released a few weeks ago, and is now available on the iTunes App Store. If you purchased version 1.0, you&#8217;ll be happy to know that this upgrade is free, and many of you have already updated to the new version. Regrettably, I&#8217;ve been a bit behind the curve updating the Photoluna web [...]]]></description>
			<content:encoded><![CDATA[<p>Photoluna 1.1 was released a few weeks ago, and is now available on the iTunes App Store. If you purchased version 1.0, you&#8217;ll be happy to know that this upgrade is free, and many of you have already updated to the new version.</p>
<p>Regrettably, I&#8217;ve been a bit behind the curve updating the <a href="http://banasmoo.com/goto?photoluna">Photoluna web site</a>; most of the screen shots are from version 1.0. I was off on a two-week stint of jury duty just as 1.1 hit the store, followed by a bad cold that led straight into the holidays! The page should be updated soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://danwright.info/blog/2010/01/photoluna-1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photoluna 1.1 is (almost) here</title>
		<link>http://danwright.info/blog/2009/12/photoluna-1-1-is-almost-here/</link>
		<comments>http://danwright.info/blog/2009/12/photoluna-1-1-is-almost-here/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 00:46:01 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[banasmoo-news]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://danwright.info/blog/?p=139</guid>
		<description><![CDATA[Good news for those of you waiting for the next version of Photoluna! We finished and submitted version 1.1 last week, and it is currently under review by Apple. If all goes well it should be available within the next week. We have our fingers crossed. â€œBut how much will the upgrade cost,â€ you ask? [...]]]></description>
			<content:encoded><![CDATA[<p>Good news for those of you waiting for the next version of Photoluna! We finished and submitted version 1.1 last week, and it is currently under review by Apple. If all goes well it should be available within the next week. We have our fingers crossed.</p>
<p>â€œBut how much will the upgrade cost,â€ you ask? Nothing! This upgrade will be free to all current customers.</p>
<p>â€œWhatâ€™s <em>in</em> the upgrade?â€ Ah, for that, youâ€™ll have to wait a little longer&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://danwright.info/blog/2009/12/photoluna-1-1-is-almost-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

