<?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>Brit Gardner ::: Web Developer ::: Dallas, TX &#187; iphone</title>
	<atom:link href="http://britg.com/tags/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://britg.com</link>
	<description>The big yellow one&#039;s the sun.</description>
	<lastBuildDate>Sun, 10 Jan 2010 17:25:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apple Too Stupid to Understand Utility of Outside-The-Box Apps</title>
		<link>http://britg.com/2008/09/08/apple-too-stupid-to-understand-utility-of-outside-the-box-apps/</link>
		<comments>http://britg.com/2008/09/08/apple-too-stupid-to-understand-utility-of-outside-the-box-apps/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 12:29:38 +0000</pubDate>
		<dc:creator>britg</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[big five]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://britg.com/?p=435</guid>
		<description><![CDATA[
UPDATE: Apple Isn&#8217;t Stupid &#8211; They&#8217;re Just &#8220;The Man&#8221;
The problem with an application review process like the one Apple has in place is that there are humans on the reviewing end that are most likely too stupid or narrow minded to pick up on really innovative applications.
I don&#8217;t care if the reviewers are the people [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://failblog.org/"><img class="alignleft size-medium wp-image-437" title="fail-owned-hospitality-door-sign-fail" src="http://britg.com/wordpress/wp-content/uploads/2008/09/fail-owned-hospitality-door-sign-fail-199x300.jpg" alt="" width="199" height="300" /></a></p>
<p><strong>UPDATE: </strong><a href="http://britg.com/2008/09/09/ok-apple-not-stupid-the-have-just-turned-into-the-man/">Apple Isn&#8217;t Stupid &#8211; They&#8217;re Just &#8220;The Man&#8221;</a></p>
<p>The problem with an application review process like the one Apple has in place is that there are humans on the reviewing end that are most likely too stupid or narrow minded to pick up on really innovative applications.</p>
<p>I don&#8217;t care if the reviewers are the people who built the platform and think they know what it can do like the back of their hand.  They will not immediately understand the usefulness of some applications, and those applications may be game changers.  Instead of being introduced to the public and living or dying by a meritocracy, they will probably get a message like this:</p>
<blockquote><p>Dear Developer,</p>
<p>We&#8217;ve reviewed your application Big Five.   We have determined that this<br />
application is of limited utility to the broad iPhone and iPod touch<br />
user community, and will not be published to the App Store.</p></blockquote>
<blockquote><p>Sincerely,</p></blockquote>
<p>What is <a href="http://www.big5apps.com/">Big Five</a>?  A very useful application developed by Dirk Holtwick.  It&#8217;s an alternative web browser for the iphone that enables websites to use the native iphone APIs.  So, as a web developer if I knew that visitors where visiting through Big Five, I could offer special functionality, like integrated location using their iphone&#8217;s GPS, or accelerometer functionality, etc.  Oh, and I could do all this without ever having to know Objective C or Cocoa Touch &#8211; I could use the javascript I already know and love!</p>
<p><em>(Big Five is built on the phonegap project which I talked <a href="http://britg.com/2008/08/21/phonegap-native-iphone-apps-running-your-html-css-javascript-code/">here</a> about and contributed to <a href="http://britg.com/2008/08/23/fixing-the-keyboard-issue-on-the-current-version-of-phonegap/">here</a> and <a href="http://britg.com/2008/08/22/extending-phonegap-to-return-the-iphones-unique-identifier/">here</a>.)<br />
</em></p>
<p>It&#8217;s really a very interesting application that opens up game changing possibilities for the browsing experience!  But, alas Joe Q Reviewer has decided that this is of limited functionality to the public.</p>
<p>Why does apple think this application is of limited use to the public?  Here are two possible justifications (albeit bad ones) that I can think the reviewer may have.  (Oh, by the way they did not offer any of these justifications, just the short and incredibly useless message I posted above).</p>
<p>&#8220;Well, it is of limited use because there are no websites out there that take advantage of big5 yet.&#8221;  Huh?  The logic behind that is so incredibly stupid that I don&#8217;t know where to begin.</p>
<p>&#8220;This application is targetting developers more than it is targetting the public.&#8221;  It targets developers in order to provide a richer experience for end-users!  If Apple would provide phone-gap like functionality in Safari itself, then maybe we wouldn&#8217;t need Big Five, but alas they have not.</p>
<p>The bottom line is that the application review process is tedious, narrow minded, and broken.  I wish at the very least Apple would provide a reason or some pointers to why Big Five isn&#8217;t considered useful.  I also wonder if I should not waste any time developing phonegap enabled applications because Apple is too dense to understand the possibilities it opens up?</p>
]]></content:encoded>
			<wfw:commentRss>http://britg.com/2008/09/08/apple-too-stupid-to-understand-utility-of-outside-the-box-apps/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>Fixing the Keyboard Issue on the Current Version of PhoneGap</title>
		<link>http://britg.com/2008/08/23/fixing-the-keyboard-issue-on-the-current-version-of-phonegap/</link>
		<comments>http://britg.com/2008/08/23/fixing-the-keyboard-issue-on-the-current-version-of-phonegap/#comments</comments>
		<pubDate>Sat, 23 Aug 2008 14:44:16 +0000</pubDate>
		<dc:creator>britg</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://britg.com/?p=367</guid>
		<description><![CDATA[PhoneGap currently has an issue with the keyboard not appearing whenever a form input is selected on a web site.  The key here is that the keyboard IS actually showing up, but it is being drawn behind the UIWebView used to render the webpage.
Here&#8217;s the solution I came up with.  I don&#8217;t understand enough about [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://phonegap.com">PhoneGap</a> currently has an issue with the keyboard not appearing whenever a form input is selected on a web site.  The key here is that the keyboard <em>IS</em> actually showing up, but it is being drawn behind the UIWebView used to render the webpage.</p>
<p>Here&#8217;s the solution I came up with.  I don&#8217;t understand enough about the rendering heirarchy to explain the why, but here&#8217;s the how:</p>
<p>In the GlassAppDelegate.m source file you should see a block of code that looks like the following:</p>
<pre lang="c++"> // Set up the image picker controller and add it to the view
	imagePickerController = [[UIImagePickerController alloc] init];

	// Im not sure why the next line was giving me a warning... any ideas?
	// when this is commented out, the cancel button no longer works.
	imagePickerController.delegate = self;
	imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
	[window addSubview:imagePickerController.view];</pre>
<p>Simply move this block of code <em>BELOW</em> the following line. This renders the imagePicker object after the web view.</p>
<pre lang="c++">webView.delegate = self;</pre>
<p>Problem &#8211; the imagePicker is obscuring the web view!  Simply add the statment <code>imagePickerController.view.hidden = YES;</code> to the above block of code so that the entire block looks like:</p>
<pre lang="c++"> // Set up the image picker controller and add it to the view
	imagePickerController = [[UIImagePickerController alloc] init];

	// Im not sure why the next line was giving me a warning... any ideas?
	// when this is commented out, the cancel button no longer works.
	imagePickerController.delegate = self;
	imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
        imagePickerController.view.hidden = YES;
	[window addSubview:imagePickerController.view];</pre>
<p>As it sounds like, we are just hiding the imagePickerController&#8217;s view &#8211; we don&#8217;t need it when the application starts anyways.  But, we do need it when we access the images API through javascript, so find the block:</p>
<pre lang="c++">else if([(NSString *)[parts objectAtIndex:1] isEqualToString:@"getphoto"]){
				NSLog(@"Photo request!");
				NSLog([parts objectAtIndex:2]);

				webView.hidden = YES;
        [window bringSubviewToFront:imagePickerController.view];
				NSLog(@"photo dialog open now!");
}</pre>
<p>and add the line <code>imagePickerController.view.hidden = NO;</code> above <code>webView.hidden = YES;</code> so that the entire block looks like:</p>
<pre lang="c++">else if([(NSString *)[parts objectAtIndex:1] isEqualToString:@"getphoto"]){
				NSLog(@"Photo request!");
				NSLog([parts objectAtIndex:2]);
        imagePickerController.view.hidden = NO;
				webView.hidden = YES;
        [window bringSubviewToFront:imagePickerController.view];
				NSLog(@"photo dialog open now!");
}</pre>
<p>Voila!  Compile and run the app and the keyboard should now appear when a form input is pressed on your iphone.</p>
]]></content:encoded>
			<wfw:commentRss>http://britg.com/2008/08/23/fixing-the-keyboard-issue-on-the-current-version-of-phonegap/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Extending PhoneGap to Return the iPhone&#8217;s Unique Identifier</title>
		<link>http://britg.com/2008/08/22/extending-phonegap-to-return-the-iphones-unique-identifier/</link>
		<comments>http://britg.com/2008/08/22/extending-phonegap-to-return-the-iphones-unique-identifier/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 15:57:14 +0000</pubDate>
		<dc:creator>britg</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://britg.com/?p=359</guid>
		<description><![CDATA[Yesterday I wrote about the nascent project, PhoneGap, that acts as a Cocoa Touch-native wrapper to your web-based application.  I&#8217;ve been playing with it non-stop since I stumbled accross it and it works like a charm!
When phonegap initializes, it loads a few parameters from the client iPhone into your javascript environment.  By default these include [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday <a href="http://britg.com/2008/08/21/phonegap-native-iphone-apps-running-your-html-css-javascript-code/">I wrote about the nascent project,</a> <a href="http://www.phonegap.com">PhoneGap</a>, that acts as a Cocoa Touch-native wrapper to your web-based application.  I&#8217;ve been playing with it non-stop since I stumbled accross it and it works like a charm!</p>
<p>When phonegap initializes, it loads a few parameters from the client iPhone into your javascript environment.  By default these include the phone model, version, and gap version.  For my specific application, I wanted to load the iPhone&#8217;s unique identifier.</p>
<p>To add this uniqueIdentifier parameter is simple &#8211; looking in the phonegap sources, Find the <code>GlassAppDelegate.m</code> script in the <code>Classes</code> folder.  Using Xcode&#8217;s method-finder bar, navigate to the <code>(void)webViewDidStartLoad:(UIWebView *)</code> method and replace it with the following:</p>
<pre lang="c++">- (void)webViewDidStartLoad:(UIWebView *)webViewLocal {
	NSLog(@"Page loaded");
	NSString *jsCallBack = nil;
	jsCallBack = [[NSString alloc] initWithFormat:@"\
				  __gap = true; \
				  __gap_version='0.1'; \
				  __gap_device_model='%s'; \
				  __gap_device_version='%s'; \
				  __gap_device_uniqueid='%s';",
				  [[[UIDevice currentDevice] model] UTF8String],
				  [[[UIDevice currentDevice] systemVersion] UTF8String],
				  [[[UIDevice currentDevice] uniqueIdentifier] UTF8String]
				  ];
	//NSLog(jsCallBack);
	[webViewLocal stringByEvaluatingJavaScriptFromString:jsCallBack];
	[jsCallBack release];

}</pre>
<p>I&#8217;m simply access the <code>uniqueIdentifier</code> property of Cocoa&#8217;s UIDevice class.</p>
<p>To be able to access this paramter in your javascript, jump into the <code>gap.js</code> that you should be loading in your iphone web app, find the <code>Device.init</code> function, and replace with:</p>
<pre lang="javascript">    init: function(model, version) {
        try {
            Device.available = __gap;
            Device.model = __gap_device_model;
            Device.version = __gap_device_version;
            Device.gapVersion = __gap_version;
			Device.uniqueIdentifier = __gap_device_uniqueid;
        } catch(e) {
            alert("GAP is not supported!")
        }
    },</pre>
<p>Voila!  You can now access the client iphone&#8217;s unique identifier via <code>Device.uniqueIdentifier</code> in your javascript.</p>
<p>Next up &#8211; figuring out how to access the keyboard through the UIWebView :X</p>
]]></content:encoded>
			<wfw:commentRss>http://britg.com/2008/08/22/extending-phonegap-to-return-the-iphones-unique-identifier/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>PhoneGap &#8211; Native iPhone Apps Running your HTML, CSS, JavaScript Code</title>
		<link>http://britg.com/2008/08/21/phonegap-native-iphone-apps-running-your-html-css-javascript-code/</link>
		<comments>http://britg.com/2008/08/21/phonegap-native-iphone-apps-running-your-html-css-javascript-code/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 16:59:27 +0000</pubDate>
		<dc:creator>britg</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://britg.com/?p=355</guid>
		<description><![CDATA[Stumbled across phonegap &#8211; a project that allows you to publish a native iPhone app that simply acts as a pass-through to your web application of choice.  The best part is, you can tap into some of the core frameworks of the iphone SDK via javascript, i.e. you can tap into the Core Location framework, [...]]]></description>
			<content:encoded><![CDATA[<p>Stumbled across <a href="http://phonegap.com/">phonegap</a> &#8211; a project that allows you to publish a native iPhone app that simply acts as a pass-through to your web application of choice.  The best part is, you can tap into some of the core frameworks of the iphone SDK via javascript, i.e. you can tap into the Core Location framework, Acceleration, etc, etc!  Hats off to the developers of this project.  It&#8217;ll make my life a whole lot easier.</p>
<p><strong>Step 1: </strong>Develop a website on the stack of your choice. Better yet, use the <a href="http://code.google.com/p/iui/">iUI library</a> to develop a website that looks and feels like a native iphone app.</p>
<p><strong>Step 2: </strong>Download <a href="http://github.com/sintaxi/gap">phonegap</a> from github and open the project in Xcode.  Simply edit the file called <code>url.txt</code> in the Resources folder to point to the URL of your iphone app.  Compile and run and you should see your website appear.</p>
<p><strong>Step 3</strong>: To access the SDK libs, simply use their function calls:</p>
<pre lang="javascript">     getLocation();

     // automatically calls this callback
     gotLocation(lat,lon) {
          // do awesome stuff with google maps, etc, etc.
     }</pre>
<p>Check out more information on their <a href="http://groups.google.com/group/phonegap">google group</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://britg.com/2008/08/21/phonegap-native-iphone-apps-running-your-html-css-javascript-code/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Location Based Gaming and the iPhone</title>
		<link>http://britg.com/2008/07/05/location-based-gaming-and-the-iphone/</link>
		<comments>http://britg.com/2008/07/05/location-based-gaming-and-the-iphone/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 12:13:19 +0000</pubDate>
		<dc:creator>britg</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[location based gaming]]></category>

		<guid isPermaLink="false">http://britg.com/?p=231</guid>
		<description><![CDATA[Location based gaming isn&#8217;t anything new.  Take a look at the wikipedia page for location-based game to see a wide variety of games dating back to around the turn of this century.  But, what are all these games missing?  Hint: it starts with an i and rhymes with dry scone.

I honestly think the iPhone, with [...]]]></description>
			<content:encoded><![CDATA[<p>Location based gaming isn&#8217;t anything new.  Take a look at the wikipedia page for <a href="http://en.wikipedia.org/wiki/Location-based_game">location-based game</a> to see a wide variety of games dating back to around the turn of this century.  But, what are all these games missing?  Hint: it starts with an <em>i</em> and rhymes with <em>dry scone</em>.</p>
<p><span id="more-231"></span></p>
<p>I honestly think the iPhone, with it&#8217;s GPS enabled functionality combined with it&#8217;s google maps app, may revolutionize the location-based gaming genre, and even bring it into the mainstream.  The barrier to entry for these games is that you need 1) a GPS device and another device or format for interacting with the game or 2) a business-class phone running Windows Mobile or Symbian-OS.  The types of people that fit these two scenarios are a small fraction of the types of people that want/have an iphone.</p>
<p>Here&#8217;s a braindump of silly/fun generic location-based game for the iphone that&#8217;s been swirling around my head for the past few weeks.</p>
<ul>
<li>The iphone user downloads an app from the app store.</li>
<li>They register and sign up for a team.</li>
<li>There are two teams &#8211; doesn&#8217;t matter what they are.</li>
<li>Players simply go to different locations and &#8216;capture&#8217; them for their team.</li>
<li>Capturing could be as simple as pressing a button, sending GPS coordinates to a server, reverse geo-locating that address and storing it in a database.</li>
<li>Opposing teams can capture each other&#8217;s locations.</li>
<li>First team to 500,000 locations wins</li>
<li>There is a companion website for the game that shows activity, history, a map with the team&#8217;s locations, etc.</li>
</ul>
<p>Obviously, there are some quirks that would have to be worked out.  A location would have to have a more specific and larger definition than &#8216;any GPS coordinate.&#8217;   There may have to be a cooldown on a location to prevent high-traffic locations from continuously changing hands.</p>
<p>Also, this provides the foundation for more complex and interactive location-based games.  There could be more than just 2 teams, or an infinite number of teams that players define.  There could be more complex rules for capturing a location.  A location may have to be &#8216;won&#8217; by a game of tic-tac-toe or chess against a live person or a computer.  The game could have a theme or be branded as a fun compliment to a mainstream console or PC game.</p>
<p>Really, the possibilities are endless!  I&#8217;ll have another post in the near future with more details on an iphone location-based game we may or may not be working on at <a href="http://figarointeractive.com">Figaro</a> <img src='http://britg.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://britg.com/2008/07/05/location-based-gaming-and-the-iphone/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Iphone Web Is Not The Real Web&#8230;</title>
		<link>http://britg.com/2008/06/18/iphone-web-is-not-the-real-web/</link>
		<comments>http://britg.com/2008/06/18/iphone-web-is-not-the-real-web/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 23:27:12 +0000</pubDate>
		<dc:creator>britg</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://britg.com/?p=201</guid>
		<description><![CDATA[&#8230; until they add support for flash.  Period. The recent news about the whole SproutCore framework for iphone web apps just doesn&#8217;t do it for me.  Venture Beat puts it well when they say:
Do you want a browser that lets you use hypothetical “open” applications that will be developed in the future, or one that [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230; until they add support for flash.  Period. The recent news about the whole <a href="http://www.sproutcore.com/">SproutCore </a>framework for iphone web apps just doesn&#8217;t do it for me.  Venture Beat puts it well when they <a href="http://venturebeat.com/2008/06/17/iphone-rumors-could-adobe-lose-out-on-its-slice-of-the-apple-pie/">say</a>:</p>
<blockquote><p>Do you want a browser that lets you use hypothetical “open” applications that will be developed in the future, or one that lets you browse the web as it exists right now? You know, the web where many popular sites are built on Flash technology? Yeah, me too.</p></blockquote>
<p>Someone should write a dystopian story about what would/will happen when Apple creates their own little sterile corner of the web where only apps built for their framework/libraries/safari javascript engine work properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://britg.com/2008/06/18/iphone-web-is-not-the-real-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
