<?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>dougt&#039;s blog &#187; CoreLocation</title>
	<atom:link href="http://dougt.org/wordpress/tag/corelocation/feed/" rel="self" type="application/rss+xml" />
	<link>http://dougt.org/wordpress</link>
	<description>best. tagline. ever.</description>
	<lastBuildDate>Mon, 26 Jul 2010 03:18:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>CoreLocation in 10.6</title>
		<link>http://dougt.org/wordpress/2009/09/corelocation/</link>
		<comments>http://dougt.org/wordpress/2009/09/corelocation/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 17:56:43 +0000</pubDate>
		<dc:creator>dougt</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[10.6]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[CoreLocation]]></category>
		<category><![CDATA[geolocation]]></category>

		<guid isPermaLink="false">http://dougt.org/wordpress/?p=488</guid>
		<description><![CDATA[I took a really quick look at the built-in location services on Mac 10.6.  I wanted to determine what sort of accuracy the feature had out-of-the-box, and what the API looked like. The code is pretty simple.  Just something like: CLLocationManager* locationManager = [[CLLocationManager alloc] init]; locationManager.delegate                = self; locationManager.desiredAccuracy = kCLLocationAccuracyBest; [locationManager startUpdatingLocation]; The [...]]]></description>
			<content:encoded><![CDATA[<p>I took a really quick look at the built-in location services on Mac 10.6.  I wanted to determine what sort of accuracy the feature had out-of-the-box, and what the API looked like.</p>
<p>The code is pretty simple.  Just something like:</p>
<blockquote><p>CLLocationManager* locationManager = [[CLLocationManager alloc] init];<br />
locationManager.delegate                = self;<br />
locationManager.desiredAccuracy = kCLLocationAccuracyBest;<br />
[locationManager startUpdatingLocation];</p></blockquote>
<p>The delagate is just two functions:</p>
<blockquote><p>- (void)locationManager: (CLLocationManager *)manager<br />
didUpdateToLocation: (CLLocation *)newLocation<br />
fromLocation: (CLLocation *)oldLocation<br />
{<br />
}</p>
<p>- (void)locationManager: (CLLocationManager *)manager<br />
didFailWithError: (NSError *)error<br />
{<br />
}</p></blockquote>
<p>If you put this in your code, you magically get a prompt that looks like this.  &#8220;Untitled&#8221; is the name of my application.</p>
<div id="attachment_486" class="wp-caption aligncenter" style="width: 439px"><a rel="attachment wp-att-486" href="http://dougt.org/wordpress/2009/09/corelocation/screen-shot-2009-09-21-at-10-23-19-am/"><img class="size-full wp-image-486" title="Location Request for &quot;Untitled&quot; application" src="http://dougt.org/wordpress/wp-content/uploads/Screen-shot-2009-09-21-at-10.23.19-AM.png" alt="Location Request for &quot;Untitled&quot; application" width="429" height="188" /></a><p class="wp-caption-text">Location Request for &quot;Untitled&quot; application</p></div>
<p>Clicking on the Help icon, you get the following:</p>
<div id="attachment_487" class="wp-caption aligncenter" style="width: 749px"><a rel="attachment wp-att-487" href="http://dougt.org/wordpress/2009/09/corelocation/screen-shot-2009-09-21-at-10-23-38-am/"><img class="size-full wp-image-487" title="Help screenshot" src="http://dougt.org/wordpress/wp-content/uploads/Screen-shot-2009-09-21-at-10.23.38-AM.png" alt="Help screenshot" width="739" height="234" /></a><p class="wp-caption-text">Help screenshot</p></div>
<p>The network requests goes to mac-services.apple.com.  The good news is that it is over a secure network channel.  The bad news is that the content is also hidden from inspection.  (eg.  since this is close source, Apple could be passing anything.  The thing that worries me is that it might be passing the application name which would give unfair Apple insight into what applications are popular).</p>
<p>The accuracy is pretty good &#8212; it places me at the building I am working from.  Now where is the support for Geolocation in Safari?  <img src='http://dougt.org/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://dougt.org/wordpress/2009/09/corelocation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
