<?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>Jeff Kelley’s Blog &#187; Miscellania</title>
	<atom:link href="http://blog.slaunchaman.com/category/miscellania/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.slaunchaman.com</link>
	<description>Mac tips, iPhone applications, and the like</description>
	<lastBuildDate>Fri, 02 Dec 2011 04:51:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Steve Jobs</title>
		<link>http://blog.slaunchaman.com/2011/10/05/steve-jobs/</link>
		<comments>http://blog.slaunchaman.com/2011/10/05/steve-jobs/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 02:04:49 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Miscellania]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=471</guid>
		<description><![CDATA[Without Steve Jobs, I wouldn’t be doing what I am today. Who knows what it would be, but chances are that I wouldn’t be nearly as fulfilled as I am. He brought about several technological revolutions, and his vision may never be matched. Here’s one of my favorite Steve Jobs quotes: When you’re young, you [...]]]></description>
			<content:encoded><![CDATA[<p>Without Steve Jobs, I wouldn’t be doing what I am today. Who knows what it would be, but chances are that I wouldn’t be nearly as fulfilled as I am. He brought about several technological revolutions, and his vision may never be matched. Here’s one of my favorite Steve Jobs quotes:</p>
<blockquote><p><em>When you’re young, you look at television and think, There’s a conspiracy. The networks have conspired to dumb us down. But when you get a little older, you realize that’s not true. The networks are in business to give people exactly what they want. That’s a far more depressing thought.</em></p></blockquote>
<p>Rest in peace, Steve.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2011/10/05/steve-jobs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MobiDevDay Presentation Slides</title>
		<link>http://blog.slaunchaman.com/2011/02/19/mobidevday-presentation-slides/</link>
		<comments>http://blog.slaunchaman.com/2011/02/19/mobidevday-presentation-slides/#comments</comments>
		<pubDate>Sat, 19 Feb 2011 19:39:06 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Mac Programming]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Blocks]]></category>
		<category><![CDATA[Grand Central Dispatch]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=394</guid>
		<description><![CDATA[I gave a presentation on blocks and Grand Central Dispatch today at MobiDevDay. You can download the slides at SlideShare. Looking for more reading about blocks? Here are some more resources: Programming with C Blocks by Joachim Bengtsson Introducting Blocks and Grand Central Dispatch by Apple Blocks Programming Topics by Apple Also, as we saw [...]]]></description>
			<content:encoded><![CDATA[<p>I gave a presentation on blocks and Grand Central Dispatch today at MobiDevDay. You can download the slides <a href="http://slidesha.re/dTeoXj">at SlideShare</a>.</p>
<p>Looking for more reading about blocks? Here are some more resources:</p>
<ul>
<li><a href="http://thirdcog.eu/pwcblocks/">Programming with C Blocks by Joachim Bengtsson</a></li>
<li><a href="https://developer.apple.com/library/mac/#featuredarticles/BlocksGCD/">Introducting Blocks and Grand Central Dispatch by Apple</a></li>
<li><a href="https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/Blocks/Articles/00_Introduction.html">Blocks Programming Topics by Apple</a></li>
</ul>
<p>Also, as we saw in the presentation, check out <a href="http://www.cdecl.org">cdecl.org</a> to cheat!</p>
<p><strong>UPDATE:</strong> Looking for example code? I’ve put some of the code that went into the slides <a href="https://github.com/SlaunchaMan/iOSBlocksPresentation">up on GitHub</a>. It’s light, but it also includes a .PDF version of the presentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2011/02/19/mobidevday-presentation-slides/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iPhone Programming: Hard Mode</title>
		<link>http://blog.slaunchaman.com/2011/02/05/iphone-programming-hard-mode/</link>
		<comments>http://blog.slaunchaman.com/2011/02/05/iphone-programming-hard-mode/#comments</comments>
		<pubDate>Sat, 05 Feb 2011 16:14:19 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Programming Tips]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Cocoa Touch]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Objective-C Runtime]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=375</guid>
		<description><![CDATA[After a conversation with some co-workers, I discussed how it would be technically possible to write an iPhone app using only a main.m file—no separate class files. This post is the result of that. It’s definitely doable, but not something I’d ever recommend for shipping code. The code is explained below, but you can get [...]]]></description>
			<content:encoded><![CDATA[<p>After a conversation with some co-workers, I discussed how it would be technically possible to write an iPhone app using only a <tt>main.m</tt> file—no separate class files. This post is the result of that. It’s definitely doable, but not something I’d ever recommend for shipping code.<br />
The code is explained below, but you can get the full source in <a href="https://github.com/SlaunchaMan/iPhoneHardMode">my public GitHub repository</a>.</p>
<h2>Getting Started</h2>
<p>By default, an iPhone application template gives you a <tt>main.m</tt> file, but it’s pretty basic:</p>
<pre class="brush: objc; first-line: 9; title: ; notranslate">#import &lt;UIKit/UIKit.h&gt;

int main(int argc, char *argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, nil);
    [pool release];
    return retVal;
}</pre>
<p>To go from that code to running your application, a few things happen, mostly in <code>UIApplicationMain</code>. Its last argument, typically <code>nil</code>, is a pointer to an <code>NSString</code> that specifies the class name of the application delegate. Normally, your <tt>Info.plist</tt> file specifies a nib file (the keys <code>NSMainNibFile</code> or <code>NSMainNibFile~ipad</code>), which in turn specifies the application delegate, instantiates it, etc.</p>
<p>So, first, delete the <tt>MainWindow.xib</tt> file, then all other class files (<tt>MyCoolAppDelegate.h</tt> and <tt>MyCoolAppDelegate.m</tt>, for instance). There should be three files left in the iPhone application: your <tt>Prefix.pch</tt> file (which we could technically do without), <tt>main.m</tt>, and your <tt>Info.plist</tt> file.</p>
<h2>The Fun Begins</h2>
<h3>Administrivia: Creating Strings</h3>
<p>Since, as a part of the exercise, we don’t want to use Objective-C, I also decided against using any constant <code>NSString</code>s (<code>@"Hello, World!"</code> and the like). To create a string, then, we’ll use <code>CFString</code>s. I created a macro to create one from a C string using ASCII encoding:</p>
<pre class="brush: objc; first-line: 16; title: ; notranslate">#define JK_EasyCFString(X)
(CFStringCreateWithCString(kCFAllocatorDefault, (X), kCFStringEncodingASCII))</pre>
<p>Don’t forget to call <code>CFRelease()</code> when you’re done with it, though.</p>
<h3>Creating a Class</h3>
<p>We need to modify the call to <code>UIApplicationMain</code> to include our application delegate class if we want this app to be anything more than a blank screen. What class name can we give it, though? We’ll need to create a class, and we’ll call it “<code>HardModeAppDelegate</code>.”</p>
<pre class="brush: objc; first-line: 41; highlight: [42]; title: ; notranslate">	// Create a class to serve as our application delegate.
	Class appDelegate = objc_allocateClassPair(NSClassFromString((id)NSObjectString), &quot;HardModeAppDelegate&quot;, 0);</pre>
<p>The first argument is a toll-free bridged <code>CFString</code> that specifies <code>NSObject</code> as the superclass, then we pass in the name of the class as a C string and 0 for the number of extra bytes we want (which is nearly always zero). Now let’s set it up a bit:</p>
<pre class="brush: objc; first-line: 44; highlight: [46,49,50,51,52,65]; title: ; notranslate">	// Conform to the UIApplciationDelegate protocol.
	Protocol *appDelegateProto = NSProtocolFromString((id)UIApplicationDelegateString);
	class_addProtocol(appDelegate, appDelegateProto);

	// Add methods.
	SEL applicationDidFinishLaunchingWithOptions = NSSelectorFromString((id)appDidFinishLaunchingOptionsString);
	class_addMethod(appDelegate,
					applicationDidFinishLaunchingWithOptions,
					(IMP)UIApplicationDelegate_ApplicationDidFinishLaunchingWithOptions,
					&quot;v@:@@&quot;);

	SEL dealloc = NSSelectorFromString((id)deallocString);
	class_addMethod(appDelegate,
					dealloc,
					(IMP)appDelegate_dealloc,
					&quot;v@:&quot;);

	// Add an instance variable for the window.
	class_addIvar(appDelegate,
				  &quot;window&quot;,
				  sizeof(id),
				  log2(sizeof(id)),
				  &quot;@&quot;);

	// Now that we’ve added ivars, we can register the class.
	objc_registerClassPair(appDelegate);</pre>
<p>That code is the same as writing an <code>@interface</code> block for a new class, setting up ivars, conforming to protocols, and defining instance methods, but done using the runtime calls instead. Methods are actually C functions, but with two arguments prepended to the argument list: <code>id self</code> and <code>SEL _cmd</code>. Those arguments are actually passed to <em>every</em> Objective-C method, but usually hidden.</p>
<h3>Custom Message Sending</h3>
<p>The rest of the application is more of this bootstrapped Objective-C in C, but there are a few wrinkles worth discussing, most notably the use of <code>objc_msgSend</code> with methods that return other than <code>id</code> and/or have additional arguments beyond <code>self</code> and <code>_cmd</code>. For instance, to call <code>-bounds</code> on a <code>UIScreen</code> object, I had to cast the return type of <code>objc_msgSend</code> to <code>CGRect</code>:</p>
<pre class="brush: objc; first-line: 134; highlight: [135]; title: ; notranslate">CGRect (*msgSendBounds)(id self, SEL _cmd);
  msgSendBounds = (CGRect(*)(id, SEL))objc_msgSend_stret;</pre>
<p>Similarly, when calling <code>-initWithFrame:</code> on a <code>UIWindow</code> or <code>UILabel</code>, I casted it to take in a <code>CGRect</code> argument:</p>
<pre class="brush: objc; first-line: 141; highlight: [142]; title: ; notranslate">id (*msgSendCGRect)(id self, SEL _cmd, CGRect rect);
msgSendCGRect = (id(*)(id, SEL, CGRect))objc_msgSend;</pre>
<h3>Accessing Instance Variables</h3>
<p>In my implementation of the <code>HardModeAppDelegate</code> class’s <code>-dealloc</code> method, I need to access the <code>window</code> instance variable to send it a <code>-release</code> message. Using the <code>Ivar</code> type and the <code>object_getIvar</code> function, it becomes easy:</p>
<pre class="brush: objc; first-line: 196; title: ; notranslate">Ivar windowIvar = class_getInstanceVariable(self-&gt;isa, &quot;window&quot;);
id window = object_getIvar(self, windowIvar);</pre>
<h2>So what do we have?</h2>
<p>To be clear, this is <em>not</em> writing an iPhone app without using Objective-C, per se. The runtime is still being used, messages are being sent, all that. But it <em>is</em> an illustration of some of the heavy lifting that the runtime does for you. I would caution against adopting this practice for real, shipping apps.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2011/02/05/iphone-programming-hard-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple Doesn’t Like “Die, You Gravy-Sucking Pig-Dog!”</title>
		<link>http://blog.slaunchaman.com/2010/08/19/apple-doesn%e2%80%99t-like-%e2%80%9cdie-you-gravy-sucking-pig-dog%e2%80%9d/</link>
		<comments>http://blog.slaunchaman.com/2010/08/19/apple-doesn%e2%80%99t-like-%e2%80%9cdie-you-gravy-sucking-pig-dog%e2%80%9d/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 21:14:12 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[BSD]]></category>
		<category><![CDATA[Easter eggs]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[UNIX beard]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=328</guid>
		<description><![CDATA[There’s a relatively well-known Easter egg in BSD’s shutdown.c: a function named die_you_gravy_sucking_pig_dog (side note: I’ve got three-to-one odds that say whoever wrote that has a huge UNIX beard). It turns out that Apple doesn’t care to have such uncouth function names floating around, so they re-defined it: #ifdef __APPLE__ void log_and_exec_reboot_or_halt(void); #else void die_you_gravy_sucking_pig_dog(void); [...]]]></description>
			<content:encoded><![CDATA[<p>There’s a <a href="http://www.codinghorror.com/blog/2009/01/die-you-gravy-sucking-pig-dog.html">relatively well-known</a> Easter egg in BSD’s <code>shutdown.c</code>: a function named <code>die_you_gravy_sucking_pig_dog</code> (side note: I’ve got three-to-one odds that say whoever wrote that has a huge UNIX beard). It turns out that Apple doesn’t care to have such uncouth function names floating around, so <a href="http://opensource.apple.com/source/system_cmds/system_cmds-498.2/shutdown.tproj/shutdown.c">they re-defined it</a>:</p>
<blockquote><p><code>#ifdef __APPLE__<br />
void log_and_exec_reboot_or_halt(void);<br />
#else<br />
void die_you_gravy_sucking_pig_dog(void);<br />
#endif</code></p></blockquote>
<p>Sure, it does the same thing, but I don’t think <code>log_and_exec_reboot_or_halt</code> has the same panache.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2010/08/19/apple-doesn%e2%80%99t-like-%e2%80%9cdie-you-gravy-sucking-pig-dog%e2%80%9d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 3.0</title>
		<link>http://blog.slaunchaman.com/2010/06/18/wordpress-3-0/</link>
		<comments>http://blog.slaunchaman.com/2010/06/18/wordpress-3-0/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 15:38:23 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Miscellania]]></category>
		<category><![CDATA[meta]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=293</guid>
		<description><![CDATA[I&#8217;ve updated the site to WordPress 3.0. So far all is well; I&#8217;ll likely create a new post type (excellent new feature) for software once I have more software to be creating posts about.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated the site to WordPress 3.0. So far all is well; I&#8217;ll likely create a new post type (excellent new feature) for software once I have more software to be creating posts about.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2010/06/18/wordpress-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Big Nerd Ranch</title>
		<link>http://blog.slaunchaman.com/2010/05/09/big-nerd-ranch/</link>
		<comments>http://blog.slaunchaman.com/2010/05/09/big-nerd-ranch/#comments</comments>
		<pubDate>Mon, 10 May 2010 01:23:12 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Miscellania]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=260</guid>
		<description><![CDATA[Hopefully, I will continue to improve the content of this site in the months to come. To that end&#8212;among others&#8212;I&#8217;m at the Big Nerd Ranch in Atlanta, Georgia for their Advanced Mac OS X Programming course this week. I&#8217;m very excited and hope to learn as much as I can possibly fit into my brain.]]></description>
			<content:encoded><![CDATA[<div id="attachment_261" class="wp-caption alignright" style="width: 310px"><a href="http://blog.slaunchaman.com/wp-content/uploads/2010/05/IMG_0012.jpg"><img class="size-medium wp-image-261" title="BNR Cabin" src="http://blog.slaunchaman.com/wp-content/uploads/2010/05/IMG_0012-300x225.jpg" alt="Big Nerd Ranch Cabin" width="300" height="225" /></a><p class="wp-caption-text">My cabin at the Big Nerd Ranch.</p></div>
<p>Hopefully, I will continue to improve the content of this site in the months to come. To that end&mdash;among others&mdash;I&rsquo;m at the <a href="http://www.bignerdranch.com">Big Nerd Ranch</a> in Atlanta, Georgia for their Advanced Mac OS X Programming course this week. I&rsquo;m very excited and hope to learn as much as I can possibly fit into my brain.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2010/05/09/big-nerd-ranch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>User Accounts Disabled</title>
		<link>http://blog.slaunchaman.com/2010/02/21/user-accounts-disabled/</link>
		<comments>http://blog.slaunchaman.com/2010/02/21/user-accounts-disabled/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 01:56:24 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Miscellania]]></category>
		<category><![CDATA[admin]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=208</guid>
		<description><![CDATA[To help fight spam, I&#8217;ve disabled user account registration on this blog and deleted all subscribers. I apologize if anyone actually used that feature; if RSS isn&#8217;t enough for you, e-mail me and I&#8217;ll make you an account. Unless you try to sell me Viagra.]]></description>
			<content:encoded><![CDATA[<p>To help fight spam, I&#8217;ve disabled user account registration on this blog and deleted all subscribers. I apologize if anyone actually used that feature; if RSS isn&#8217;t enough for you, e-mail me and I&#8217;ll make you an account. Unless you try to sell me Viagra.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2010/02/21/user-accounts-disabled/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatically get the latest Chromium snapshot with launchd</title>
		<link>http://blog.slaunchaman.com/2009/05/19/automatically-get-the-latest-chromium-snapshot-with-launchd/</link>
		<comments>http://blog.slaunchaman.com/2009/05/19/automatically-get-the-latest-chromium-snapshot-with-launchd/#comments</comments>
		<pubDate>Wed, 20 May 2009 04:24:08 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Miscellania]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[Chromium]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[launchd]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=183</guid>
		<description><![CDATA[I’ve been checking out the snapshots of Chromium recently, and they’re coming quicker than you can say “multithreaded web browser.” To facilitate always having the latest version, I wrote a quick LaunchAgent that takes care of it on Mac OS X. First, I have a script named ~/bin/chromiupdate: #!/bin/bash # Downloads the latest version of [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been checking out the <a href="http://build.chromium.org/buildbot/snapshots/sub-rel-mac">snapshots</a> of <a href="http://www.chromium.org">Chromium</a> recently, and they’re coming quicker than you can say “multithreaded web browser.” To facilitate always having the latest version, I wrote a quick LaunchAgent that takes care of it on Mac OS X. First, I have a script named <strong>~/bin/chromiupdate</strong>:<br />
<code><br />
<blockquote>
<pre>#!/bin/bash

# Downloads the latest version of Chromium.

remove_working_dir()
{
    rm -rf "${WORKING_DIR}"
    exit 0
}

USER_DIR=$(dscl . -read /Users/$(whoami) NFSHomeDirectory | awk '{ print $2 }')
USER_APP_DIR="${USER_DIR}/Applications"
CHROMIUM_DIR="${USER_APP_DIR}/Chromium.app"
LATEST_URL="http://build.chromium.org/buildbot/snapshots/sub-rel-mac/LATEST"
TMP_DIR="/private/tmp"
WORKING_DIR="${TMP_DIR}/.chromium_launchd"
URL_BEGIN="http://build.chromium.org/buildbot/snapshots/sub-rel-mac"

if [ ! -d "${CHROMIUM_DIR}" ]; then
    mkdir -p "${CHROMIUM_DIR}"
fi

INSTALLED_VERSION="$(defaults read "${CHROMIUM_DIR}/Contents/Info" SVNRevision)"
VERSION=$(curl "${LATEST_URL}")

if [ "${VERSION}" != "${INSTALLED_VERSION}" ]; then
    logger Installed Chromium version \(${INSTALLED_VERSION}\) does not equal \
            latest version \(${VERSION}\), updating now...
    mkdir "${WORKING_DIR}" || exit 1
    trap remove_working_dir 1 2 3 6 15
    cd "${WORKING_DIR}" || exit 1
    curl -O "${URL_BEGIN}/${VERSION}/chrome-mac.zip"
    unzip chrome-mac.zip
    rsync -HavP --exclude="Contents/MacOS/chrome_debug.log" \
          "${WORKING_DIR}/chrome-mac/Chromium.app/" "${CHROMIUM_DIR}/"

    if [ "$(ps -aef | grep -i chromium | grep -v grep)" != "" ]; then
        open "${USER_DIR}/Library/Scripts/Chromium Update Dialog.app"
    fi

    logger "Chromium update complete. Version ${VERSION} installed."

    remove_working_dir
else
    logger Installed Chromium version \(${INSTALLED_VERSION}\) is up-to-date. \
           No action needed.
fi

exit 0</pre>
</blockquote>
<p></code><br />
Next, I have a property list named <strong>~/Library/LaunchAgents/com.slaunchaman.chromium.plist</strong>:<br />
<code><br />
<blockquote>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd &gt;
&lt;plist version="1.0"&gt;
    &lt;dict&gt;
        &lt;key&gt;Label&lt;/key&gt;
        &lt;string&gt;com.slaunchaman.chromium&lt;/string&gt;
        &lt;key&gt;Program&lt;/key&gt;
        &lt;string&gt;/Users/slauncha/bin/chromiupdate&lt;/string&gt;
        &lt;key&gt;KeepAlive&lt;/key&gt;
        &lt;false/&gt;
        &lt;key&gt;StartInterval&lt;/key&gt;
        &lt;integer&gt;3600&lt;/integer&gt;
        &lt;key&gt;RunAtLoad&lt;/key&gt;
        &lt;true/&gt;
        &lt;key&gt;StandardOutPath&lt;/key&gt;
        &lt;string&gt;/dev/null&lt;/string&gt;
        &lt;key&gt;StandardErrorPath&lt;/key&gt;
        &lt;string&gt;/dev/null&lt;/string&gt;
    &lt;/dict&gt;
&lt;/plist&gt;</pre>
</blockquote>
<p></code></p>
<p>Finally, I have an AppleScript at <strong>~/Library/Scripts/Chromium Update Dialog.app</strong>:<br />
<code><br />
<blockquote>
<pre>display dialog "Chromium was just updated. You should restart it."</pre>
</blockquote>
<p></code></p>
<p>The LaunchAgent runs once an hour, checking to see if the installed version of Chromium is older than the latest snapshot. If so, it downloads it and uses <strong>rsync</strong> to copy the changes. The script places Chromium in <strong>~/Applications</strong>, but it shouldn’t be hard to modify to put it into /Applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2009/05/19/automatically-get-the-latest-chromium-snapshot-with-launchd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Take Me Home 1.0.1 Rejected</title>
		<link>http://blog.slaunchaman.com/2008/12/11/take-me-home-101-rejected/</link>
		<comments>http://blog.slaunchaman.com/2008/12/11/take-me-home-101-rejected/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 03:31:08 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Miscellania]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[Take Me Home]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/2008/12/11/take-me-home-101-rejected/</guid>
		<description><![CDATA[Apple rejected Take Me Home 1.0.1 for a small issue, so I’ll have to hurry up and finish 1.1 to get that issue fixed. Rest assured it’s being worked on.]]></description>
			<content:encoded><![CDATA[<p>Apple rejected <a href="http://blog.slaunchaman.com/take-me-home/">Take Me Home</a> 1.0.1 for a small issue, so I’ll have to hurry up and finish 1.1 to get that issue fixed.  Rest assured it’s being worked on.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2008/12/11/take-me-home-101-rejected/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Update</title>
		<link>http://blog.slaunchaman.com/2008/12/11/site-update/</link>
		<comments>http://blog.slaunchaman.com/2008/12/11/site-update/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 18:33:22 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Miscellania]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=143</guid>
		<description><![CDATA[I’ve updated this site to WordPress 2.7.  Wahoo!  I also cleaned up some old posts, re-did some tags, and cleaned out old tags.  Posts are also now sorted into categories.]]></description>
			<content:encoded><![CDATA[<p>I’ve updated this site to WordPress 2.7.  Wahoo!  I also cleaned up some old posts, re-did some tags, and cleaned out old tags.  Posts are also now sorted into categories.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2008/12/11/site-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

