<?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>Ramblings of a Geek - Jeremy Johnstone &#187; iPhone</title>
	<atom:link href="http://www.jeremyjohnstone.com/tag/iphone/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jeremyjohnstone.com</link>
	<description>Ramblings of a Geek</description>
	<lastBuildDate>Wed, 28 Jul 2010 18:33:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>iOS DRM&#8217;d video playback failure</title>
		<link>http://www.jeremyjohnstone.com/blog/2010-07-16-ios-drmd-video-playback-failure.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2010-07-16-ios-drmd-video-playback-failure.html#comments</comments>
		<pubDate>Fri, 16 Jul 2010 07:44:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DRM]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/2010-07-16-ios-drmd-video-playback-failure.html</guid>
		<description><![CDATA[I&#8217;ve long been looking for a solution for playing back iTunes movies on my iPad/iPhone without having to sync the content to the device over USB. By luck, a friend tipped me off to the fact that MobileSafari would allow you to playback DRM&#8217;d content served over HTTP. From that news, I quickly SSH&#8217;d into [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve long been looking for a solution for playing back iTunes movies on my iPad/iPhone without having to sync the content to the device over USB. By luck, a friend tipped me off to the fact that MobileSafari would allow you to playback DRM&#8217;d content served over HTTP. From that news, I quickly SSH&#8217;d into my home machine and setup an HTTP server pointing at my iTunes Media folder. Much to my amazement, not only did the content play, but my AT&#038;T U-verse account had more than enough bandwidth to stream even HD content!</p>
<p>This of course set my wheels spinning and made me wonder why apps like AirVideo couldn&#8217;t do the same. Being friends with several well respected iOS devs, I asked them what they thought. One (who will remain nameless) emphatically stated that AirVideo didn&#8217;t work because they &#8220;were doing it wrong&#8221; in his own typical cocky style response. I asked how he would suggest doing it, to which I got a rundown of different video frameworks on the platform with no specific details (again, typical). Being suspicious it couldn&#8217;t be that easy, I set off to ask a few more developers. Everyone I spoke to seemed to think it would be possible somehow. Sadly, they were all mistaken.</p>
<p>My first course of action was to try the MediaPlayer framework, as it&#8217;s the older API and thus had better sample code. After going through the motions to get an MPMoviePlayerController instance, I found that on my iPad the same thing happened as does in AirVideo, complete blackness. Wondering if it might be an iOS version thing, I then tested on three other devices ranging from an iPhone 4 down to a 3G still on 3.0 and still no dice.</p>
<p>My next thought was to use AVFoundation. Unfortunately this is limited to iOS 4, so it ruled out playback on my iPad which is where I wanted it most. Despite that, I set out to learn how to use it.  Freaking A did I not expect how hard that would be! Not only are the docs extremely lacking on how to use AVPlayer, there isn&#8217;t any sample code available either from Apple. Searching the web, apparently nobody had ever thought to write a blog post on it either. Apple&#8217;s developer forums were a bit of help, but just barely. After a bit of trial and error getting a CALayer to render properly in my rudimentary test app, I was up and running with a basic video clip. Then upon switching to an iTunes DRM video, I was back at a black screen again. All that effort, still no dice! <img src='http://www.jeremyjohnstone.com/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Feeling mighty dejected at this point, I decided to see if it working was a browser only thing somehow. My first test was to fire up iCabMobile (a custom Safari implementation). Not to my surprise at this point, it shot up an error immediately about unsupported content type. On a long shot, I decided to test out a UIWebView. Again, still no luck as it errored out too.</p>
<p>At this point, it seems the only way to play DRM&#8217;d iTunes content is either via syncing it in iTunes or via MobileSafari over HTTP. With the later being supported, that&#8217;s still a big win, but I&#8217;m very disappointed there doesn&#8217;t seem to be anyway to do it in a custom app. I&#8217;m going to keep digging to see if there is a way to do it in a jail broke app, but I doubt it.</p>
<p>If anyone has any tips here, I&#8217;m definitely all ears!</p>
<p>-Jeremy</p>
<p>P.S. &#8211; after I get a little sleep, I&#8217;ll write up a blog post on using AVPlayer &#038; AVPlayerLayer so others don&#8217;t endure the same pain I did.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2010-07-16-ios-drmd-video-playback-failure.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad Geo Location Accuracy</title>
		<link>http://www.jeremyjohnstone.com/blog/2010-04-08-ipad-geo-location-accuracy.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2010-04-08-ipad-geo-location-accuracy.html#comments</comments>
		<pubDate>Thu, 08 Apr 2010 07:20:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[MyWi]]></category>
		<category><![CDATA[tethering]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/?p=1668</guid>
		<description><![CDATA[On Monday while riding into the city (the city = San Francisco for those not from this area), I took the opportunity to play with my iPad. Needing an internet connection and not having a 3G model yet, I used my iPhone + MyWi to get online. Randomly, I decided to open up the maps [...]]]></description>
			<content:encoded><![CDATA[<p>On Monday while riding into the city (the city = San Francisco for those not from this area), I took the opportunity to play with my iPad. Needing an internet connection and not having a 3G model yet, I used my iPhone + MyWi to get online. Randomly, I decided to open up the maps app and hit the location finder button. Much to my amazement, not only did it find me, it did so with amazing accuracy and even roughly tracked the progress of my movement. Being impressed, I <a href="http://twitter.com/jsjohnst/status/11668088394">tweeted</a> about it and people had a number of theories why it worked.</p>
<p>One of the leading theories people had was that the iPad was using <a href="http://www.skyhookwireless.com">SkyHook</a> to do a lookup based on cell tower triangulation. I knew this was an immediately flawed concept based on prior knowledge of how it works. What Skyhook and similar services do is interface with the gsm modem to get the towers in the area. It&#8217;s not even really triangulation, basically they get the cell tower ID from the modem and then lookup that in their database. This is why you see a relatively big circle on 1st gen iPhones, as it&#8217;s not a very precise lookup since towers cover a several square mile area each. Not only was my location being shown with pinpoint accuracy, since my iPad was talking to my iPhone via wifi there is no possible way for it to have gathered the gsm data directly.</p>
<p>Another theory was that the iPad was doing a lookup on the IP address. While this method is a last ditch fallback employed by SkyHook, this is also flawed because one can drive a long way and still retain the same IP. As previously indicated, the location pinpointed me following a curve in the road, something even triangulation couldn&#8217;t do let alone IP lookup.</p>
<p>Not having an explanation which seemed plausible, I decided to do some experimentation this evening with the help of a friend. Over dinner, we found the location was perfectly spot on (see second photo below). Firing up an app which showed the location data directly, I observed a couple curious things. The first thing was that altitude data wasn&#8217;t being reported. Based on this, our assumption was that it wasn&#8217;t getting actual gps data from the phone via some &#8220;magical&#8221; method. The second thing was that the location accuracy was <300ft (see the first photo below). This further confirmed the hypothesis that tower data was not being used.</p>
<p>Still stumped, we decided to drive around and see if any patterns emerged. Driving around, the accuracy wasn't as accurate as before and would jump every few seconds to where we were. When it did track the road, updating in virtual realtime, we were in densely residential areas. The farther we were from any homes or buildings, the less accurate it was, leading up to a total loss of location when we were on the 280 heading north. </p>
<p>That's when it dawned on me how it worked and I was embarrassed to have not immediately thought of it before. Just because I was associated to the wifi access point created by MyWi running on my phone, doesn't mean the iPad can't see the numerous other access points in the area. One of Skyhook's differentiating features is that they have one of the largest databases in the world mapping wifi access points to their geo location. Using technology they call WPS (short for "wifi position system"), it can then triangulate my location with much greater accuracy (since wifi aps have a very small coverage area compared to a cell tower) than any other non-gps based solution and hence what I was observing.</p>
<p>All in all nothing extraordinary or new, but still a nice unexpected surprise none the less!</p>
<p>-Jeremy</p>
<p>P.S. This blog post 100% penned via the Wordpress app running on my iPad using the onscreen keyboard. Surprisingly easy to do even without a physical keyboard.   </p>
<p><a href="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/04/p_640_427_8B2947E8-4F2B-42EC-8F1E-E1767CE2D2B2.jpeg"><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/04/p_640_427_8B2947E8-4F2B-42EC-8F1E-E1767CE2D2B2.jpeg" alt="" class="alignnone size-full" /></a></p>
<p><a href="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/04/p_1024_768_F30D77AD-A6AE-4114-8B00-AA12A009D38A.jpeg"><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/04/p_1024_768_F30D77AD-A6AE-4114-8B00-AA12A009D38A.jpeg" alt="" class="alignnone size-full" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2010-04-08-ipad-geo-location-accuracy.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>First drawing using Brushes.app on the iPhone</title>
		<link>http://www.jeremyjohnstone.com/blog/2009-05-25-first-drawing-using-brushesapp-on-the-iphone.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2009-05-25-first-drawing-using-brushesapp-on-the-iphone.html#comments</comments>
		<pubDate>Tue, 26 May 2009 03:37:56 +0000</pubDate>
		<dc:creator>flickr</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[drawing]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[trouser mac]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/2009-05-25-first-drawing-using-brushesapp-on-the-iphone.html</guid>
		<description><![CDATA[


First drawing using Brushes, originally uploaded by Jeremy Johnstone.



Today I spent most of the day catching up on my blog reading and I stumbled across an article about a guy using an iPhone app named Brushes to design this month&#8217;s cover of The New Yorker. Highly impressed by the output and the video of it [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding: 3px;">
<a href="http://www.flickr.com/photos/jeremyjohnstone/3564935176/" title="photo sharing"><img src="http://farm4.static.flickr.com/3398/3564935176_5ebb97e93c.jpg" style="border: solid 2px #000000;" alt=""  class="aligncenter"/></a><br />
<br />
<span style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/jeremyjohnstone/3564935176/">First drawing using Brushes</a>, originally uploaded by <a href="http://www.flickr.com/people/jeremyjohnstone/">Jeremy Johnstone</a>.</span>
</div>
<p><br/></p>
<p>
Today I spent most of the day catching up on my blog reading and I stumbled across an <a href="http://www.newyorker.com/online/blogs/tny/2009/05/jorge-colombo-iphone-cover.html">article</a> about a guy using an iPhone app named <a href="http://brushesapp.com/">Brushes</a> to design this month&#8217;s cover of <a href="http://www.newyorker.com/">The New Yorker</a>. Highly impressed by the output and the video of it being created, I decided to give it a shot.</p>
<p>Realizing of course that I am definitely not an artist and that using just a finger on the iPhone screen isn&#8217;t the most precise way to dry, I don&#8217;t think my first work is too bad considering. I&#8217;ve done a lot of sketches in the past with various pen tablets and while the experience wasn&#8217;t anywhere near as easy as with them, it was pretty fun and rewarding that such a feat could be accomplished on my iPhone. A company named <a href="http://www.tenonedesign.com/">Ten One Design</a> seems to make a stylus for the iPhone for a very reasonable price ($14.95) and I think I might pick one up not just for this purpose.</p>
<p>I think what impressed me the most is that all this was possible using a $199 &#8220;smartphone&#8221;. Times are changing and when we step back and think about what was possible with a cell phone not even 10 years ago, it simply is amazing, IMHO.</p>
<p>The above image was modified after creation in Brushes to add in the frame and thought bubble. The additional elements were added using Photogene and then the image was uploaded to Flickr via Mobile Foto (both also iPhone apps). See below for a time-lapse video of the creation of the coke zero image created using the Brushes Viewer desktop companion app.</p>
<p><object type="application/x-shockwave-flash" width="267" height="400" data="http://www.flickr.com/apps/video/stewart.swf?v=71377" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  class="aligncenter"><param name="flashvars" value="intl_lang=en-us&#038;photo_secret=d297acfdaa&#038;photo_id=3564482213"></param><param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=71377"></param><param name="bgcolor" value="#000000"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=71377" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&#038;photo_secret=d297acfdaa&#038;photo_id=3564482213" height="400" width="267"  class="aligncenter"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2009-05-25-first-drawing-using-brushesapp-on-the-iphone.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Trouble With Email</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-07-29-the-trouble-with-email.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2008-07-29-the-trouble-with-email.html#comments</comments>
		<pubDate>Wed, 30 Jul 2008 06:29:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=380</guid>
		<description><![CDATA[Ok, so I have a problem. One which keeps me up at night and annoys me greatly, but I can&#8217;t seem to find a solution to fix. So what is this problem? Email SUCKS, that&#8217;s the problem! Ok Ok, I am sure you are thinking &#8220;great, and?&#8221; as it&#8217;s a common rant. Here&#8217;s my needs:

 [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so I have a problem. One which <span class="afterthought" title="really">keeps me up at night</span> and annoys me greatly, but I can&#8217;t seem to find a solution to fix. So what is this problem? Email SUCKS, that&#8217;s the problem! Ok Ok, I am sure you are thinking &#8220;great, and?&#8221; as it&#8217;s a common rant. Here&#8217;s my needs:</p>
<ol>
<li> I want my email everywhere at every time, with or without network access, on a range of devices. Sitting at my desk with my main desktop? Sitting in a meeting with my laptop? Sipping a coffee with my iPhone in my hand? On a plane flight to some far away place? All of those should be no challenge to doing something as simple as reading an email, right?</li>
<li>I like to organize my email, especially mailing lists which I subscribe to hundreds of at last count. Some lists are important, others less so and should be organized accordingly. As having things &#8220;in view&#8221; can be distracting when I don&#8217;t need to see them, I need the ability to have a <span class="afterthought" title="aka subfolders">nesting system</span> or some other way to have multiple views into my mail. These &#8220;views&#8221; should be synchronized across all devices and possibly have the ability to be <span class="afterthought" title="maybe I don't want some things to show on the iPhone for example">device specific</span>.</li>
<li>When someone sends me an email, it should show up instantly in every client, not five minutes later, not an hour later, certainly not forcing me to <span class="afterthought" title="yeah, I am talking about you damn Mail.app">restart the app just to see the email</span>. The system should also support some type of push system as constantly &#8220;polling&#8221; puts excessive load on the server and sucks up precious power reserves in the case of mobile devices.</li>
<li>I need the ability to find old stuff quickly and painlessly, again on any device. We can have Yahoo! search teh net in under 100ms for anything I could dream up for a search term but even my quad core Xeon can&#8217;t accomplish a similar search across an infinitely smaller dataset in under five minutes? Huh? You&#8217;re kidding right? Guess I won&#8217;t even try it on my iPhone then as I know my battery will then run dead before the search finishes in that case.</li>
</ol>
<p>Seems like fairly modest needs right? Should be doable? Well, I am amazed to say it seems to be about as simple as sending a man in a balloon to the moon.</p>
<p>Currently I am running my own Courier IMAP server, using Procmail and all it&#8217;s powerful mojo to sort my mail, and using Mail.app as the actual MUA. The problems I run into are as follows, in no special order and certainly not all inclusive:</p>
<ol>
<li>My mail server is constantly thrashing the disk. Despite being on a dual G5 w/ plenty of memory and decently fast I/O, it seems the combination of commands Mail.app sends to Courier seems to give it fits. Have two clients hitting it at once and the machine drops to a snail crawl. Heaven forbid you add that third client and the <span class="afterthought" title="I shit you not, true story">machine starts sparking and flames shoot out the back</span>. Of course running it on another OS would probably help as OSX doesn&#8217;t have the best kernel support for things like this, but that&#8217;s not the point. I&#8217;ve also thought about moving over to another IMAP server implementation, but as yet I haven&#8217;t found one which I feel confident will be better performing without enough negative aspects to scare me away.</li>
<li>Mail.app seems to not like to pull subfolders with consistency. It&#8217;s extremely common for me to restart the app and suddenly have hundreds of unread emails suddenly appear across folders. This definitely is a problem no matter how you look at it. Of course there are multiple possible causes to blame, but that&#8217;s irrelevant. I don&#8217;t care if the IMAP spec is brain dead in how it specifies IDLE support, that&#8217;s not my problem. Having a mail client which shows new mail without fail should be one of it&#8217;s developer&#8217;s top priorities.</li>
<li>Procmail while very powerful is extremely error prone. I&#8217;ve had several occasions where things backfired. My dream would be to someday have something which said &#8220;hey, you moved this email into this place, would you like me to move emails like it in the future for you?&#8221;, but then I snap back to reality and realize that&#8217;s a geek&#8217;s wet dream and not anything which will really work as you would expect any time soon.</li>
<li>Keeping multiple devices and offline copies of emails in sync seems to be error prone at best. Isn&#8217;t this exactly the problem IMAP is supposed to solve? Tell me again why there is not a single IMAP client which handles this painlessly? Oh, right, that&#8217;s because the IMAP spec is crap. Please fix, ok? KTHXBAI!
</li>
</ol>
<p>So my question is, is there something I have missed? If you have a solution I am more than ready to apply my hand to my forehead and yell &#8220;Do&#8217;t&#8221; with enthusiasm. Sound off in the comments with what works for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2008-07-29-the-trouble-with-email.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
