<?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>dev.enekoalonso.com &#187; iphone</title>
	<atom:link href="http://dev.enekoalonso.com/tag/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.enekoalonso.com</link>
	<description>having fun with code</description>
	<lastBuildDate>Wed, 12 Oct 2011 21:40:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Titanium Studio and Titanium Mobile 1.7</title>
		<link>http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/</link>
		<comments>http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 20:52:24 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[appcelerator]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[debugger]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[objc]]></category>
		<category><![CDATA[studio]]></category>
		<category><![CDATA[titanium]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=706</guid>
		<description><![CDATA[Titanium Studio: will this change anything? It is a big step, and offers something I really missed while working with Titanium in the past: integrated debugging. I think I will rather stay with XCode and code native Objective-C. Link: Introducing Titanium Studio and Titanium Mobile 1.7. Related Posts:August 18, 2010 -- Titanium Developer: love and hate (Part [...]]]></description>
			<content:encoded><![CDATA[<p>Titanium Studio: will this change anything? It is a big step, and offers something I really missed while working with Titanium in the past: integrated debugging. I think I will rather stay with XCode and code native Objective-C.</p>
<p>Link: <a href="http://developer.appcelerator.com/blog/2011/06/introducing-titanium-studio.html">Introducing Titanium Studio and Titanium Mobile 1.7</a>.</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>August 18, 2010 -- <a href="http://dev.enekoalonso.com/2010/08/18/titanium-developer-love-and-hate-part-ii/" title="Titanium Developer: love and hate (Part II)">Titanium Developer: love and hate (Part II)</a> (0)</li><li>September 17, 2010 -- <a href="http://dev.enekoalonso.com/2010/09/17/mootools-core-for-server-and-mobile-development/" title="MooTools Core for Server and Mobile Development">MooTools Core for Server and Mobile Development</a> (1)</li><li>July 30, 2010 -- <a href="http://dev.enekoalonso.com/2010/07/30/titanium-developer-love-and-hate/" title="Titanium Developer: love and hate">Titanium Developer: love and hate</a> (3)</li><li>August 3, 2010 -- <a href="http://dev.enekoalonso.com/2010/08/03/iphone-sdk-old-versions/" title="List of iPhone SDK &#038; XCode packages">List of iPhone SDK &#038; XCode packages</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MooTools Core for Server and Mobile Development</title>
		<link>http://dev.enekoalonso.com/2010/09/17/mootools-core-for-server-and-mobile-development/</link>
		<comments>http://dev.enekoalonso.com/2010/09/17/mootools-core-for-server-and-mobile-development/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 17:50:30 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[appcelerator]]></category>
		<category><![CDATA[core]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[device]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[titanium]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=655</guid>
		<description><![CDATA[One of the best things of MooTools is that it is very modular, from the core itself. This means you don&#8217;t need to include all core elements in your projects if you don&#8217;t want or don&#8217;t need some modules. For example, you may not want to include Array or Function, if you don&#8217;t need any [...]]]></description>
			<content:encoded><![CDATA[<p>One of the best things of MooTools is that it is very modular, from the core itself. This means you don&#8217;t need to include all core elements in your projects if you don&#8217;t want or don&#8217;t need some modules. For example, you may not want to include Array or Function, if you don&#8217;t need any enhancements of such objects.</p>
<p>In the case of server side or mobile applications (<a href="http://www.appcelerator.com/">Titanium Developer</a> and other Javascript based mobile frameworks), there is no browser involved which means there is no DOM. Thus, we can removed any kind of module that depend or are designed to work with this elements: Browser, Element, Selectors, Cookie&#8230; all those modules have no value for server side or mobile applications.</p>
<p>I found this page which summarizes the modules you should need for server or mobile development:</p>
<blockquote><p>
<strong><a href="http://mootools.net/core">MooTools Core</a></strong><br />
Core: core<br />
Native: Array, Function, Number, String, Hash<br />
Class: Class, Class.Extras</p>
<p><strong><a href="http://mootools.net/more">MooTools More</a></strong><br />
Core: More<br />
Class: Class.Refactor, Class.Binds, Class.Occludes
</p></blockquote>
<p><a href="http://onecrayon.com/spice/docs/mootools-server/">http://onecrayon.com/spice/docs/mootools-server/</a></p>
<p>Personally, I don&#8217;t find the MooTools More modules very useful, so I&#8217;m not including them in my projects. Maybe Binds would be a good addition, but it is not critical.</p>
<p>Having MooTools in a Javascript application makes it easier to develop and brings you all the power of Object Oriented programming with classes, inheritance and more.</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>July 30, 2010 -- <a href="http://dev.enekoalonso.com/2010/07/30/titanium-developer-love-and-hate/" title="Titanium Developer: love and hate">Titanium Developer: love and hate</a> (3)</li><li>June 14, 2011 -- <a href="http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/" title="Titanium Studio and Titanium Mobile 1.7">Titanium Studio and Titanium Mobile 1.7</a> (0)</li><li>August 18, 2010 -- <a href="http://dev.enekoalonso.com/2010/08/18/titanium-developer-love-and-hate-part-ii/" title="Titanium Developer: love and hate (Part II)">Titanium Developer: love and hate (Part II)</a> (0)</li><li>September 21, 2010 -- <a href="http://dev.enekoalonso.com/2010/09/21/date-from-iso-8601-string/" title="Date from ISO 8601 string">Date from ISO 8601 string</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2010/09/17/mootools-core-for-server-and-mobile-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>List of iPhone ipsw firmware files (yes, downgrading from iOS 4.0.1 to 3.1.3)</title>
		<link>http://dev.enekoalonso.com/2010/08/22/list-of-iphone-ipsw-firmware-files/</link>
		<comments>http://dev.enekoalonso.com/2010/08/22/list-of-iphone-ipsw-firmware-files/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 04:01:03 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[3.1.3]]></category>
		<category><![CDATA[4]]></category>
		<category><![CDATA[4.0.1]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[downgrade]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ios4]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphoneos]]></category>
		<category><![CDATA[ipsw]]></category>
		<category><![CDATA[recboot]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=646</guid>
		<description><![CDATA[So I finally decided to downgrade my iPhone 3G from iOS 4.0.1 to iPhone OS 3.1.3. For some reason, Apple does not keep the old ipsw restore files easy to find and most posts on Internet are missing a link to them. Here is a list of some of them: iPhone 3.1.3 firmware for iPhone [...]]]></description>
			<content:encoded><![CDATA[<p>So I finally decided to downgrade my iPhone 3G from iOS 4.0.1 to iPhone OS 3.1.3. For some reason, Apple does not keep the old ipsw restore files easy to find and most posts on Internet are missing a link to them. Here is a list of some of them:<br />
<a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-7481.20100202.4orot/iPhone1,1_3.1.3_7E18_Restore.ipsw" target="_blank">iPhone 3.1.3 firmware for iPhone 2G</a><br />
<a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-7468.20100202.pbnrt/iPhone1,2_3.1.3_7E18_Restore.ipsw" target="_blank">iPhone 3.1.3 firmware for iPhone 3G</a><br />
<a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-7472.20100202.8tugj/iPhone2,1_3.1.3_7E18_Restore.ipsw" target="_blank">iPhone 3.1.3 firmware for iPhone 3GS</a></p>
<p>I have downgraded my phone following this article: <a href="http://www.redmondpie.com/downgrade-ios-4.1-to-ios-4-3.1.3-3.1.2-how-to-guide/">Downgrade iOS 4.1 iPhone 4, 3GS, 3G and iPod touch to iOS 4 / iPhone 3.1.3 / 3.1.2 [How to Guide]</a></p>
<p>The process is super simple, I couldn&#8217;t believe it was so easy, specially, since RecBoot runs so clean and fast. What the tutorials don&#8217;t say, although I expected it, is that you will lost all your data (as every time you recover). The problem is the next time you connect to iTunes, you wont be able to restore from your latest backup since it would be for a newer OS version.</p>
<p>Luckily, iTunes keeps track of old backups. I&#8217;m currently restoring from a backup I have from April 2010, probably the last one before I updated to the back then beta version of iOS 4.</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>August 3, 2010 -- <a href="http://dev.enekoalonso.com/2010/08/03/iphone-sdk-old-versions/" title="List of iPhone SDK &#038; XCode packages">List of iPhone SDK &#038; XCode packages</a> (1)</li><li>February 7, 2010 -- <a href="http://dev.enekoalonso.com/2010/02/07/my-current-svn-setup/" title="My current SVN setup">My current SVN setup</a> (0)</li><li>June 14, 2011 -- <a href="http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/" title="Titanium Studio and Titanium Mobile 1.7">Titanium Studio and Titanium Mobile 1.7</a> (0)</li><li>June 3, 2011 -- <a href="http://dev.enekoalonso.com/2011/06/03/step-back-and-watch-what-the-%e2%80%9cnormals%e2%80%9d-do/" title="Step back and watch what the “normals” do">Step back and watch what the “normals” do</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2010/08/22/list-of-iphone-ipsw-firmware-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Titanium Developer: love and hate (Part II)</title>
		<link>http://dev.enekoalonso.com/2010/08/18/titanium-developer-love-and-hate-part-ii/</link>
		<comments>http://dev.enekoalonso.com/2010/08/18/titanium-developer-love-and-hate-part-ii/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 19:58:52 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[appcelerator]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[compiled]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[generated]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[native]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[objc]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[scrollview]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[titanium]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=644</guid>
		<description><![CDATA[For the last four weeks and despite other projects and deadlines, I&#8217;ve been working on a mobile app for iPhone and Android, using Titanium Developer from Appcelerator. I still hate it. And I still love it. More to come&#8230; Related Posts:June 14, 2011 -- Titanium Studio and Titanium Mobile 1.7 (0)July 30, 2010 -- Titanium [...]]]></description>
			<content:encoded><![CDATA[<p>For the last <a href="http://dev.enekoalonso.com/2010/07/30/titanium-developer-love-and-hate/">four weeks</a> and despite other projects and deadlines, I&#8217;ve been working on a mobile app for iPhone and Android, using Titanium Developer from <a href="http://appcelerator.com">Appcelerator</a>.</p>
<p>I still hate it. And I still love it.</p>
<p>More to come&#8230;</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>June 14, 2011 -- <a href="http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/" title="Titanium Studio and Titanium Mobile 1.7">Titanium Studio and Titanium Mobile 1.7</a> (0)</li><li>July 30, 2010 -- <a href="http://dev.enekoalonso.com/2010/07/30/titanium-developer-love-and-hate/" title="Titanium Developer: love and hate">Titanium Developer: love and hate</a> (3)</li><li>September 17, 2010 -- <a href="http://dev.enekoalonso.com/2010/09/17/mootools-core-for-server-and-mobile-development/" title="MooTools Core for Server and Mobile Development">MooTools Core for Server and Mobile Development</a> (1)</li><li>August 3, 2010 -- <a href="http://dev.enekoalonso.com/2010/08/03/iphone-sdk-old-versions/" title="List of iPhone SDK &#038; XCode packages">List of iPhone SDK &#038; XCode packages</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2010/08/18/titanium-developer-love-and-hate-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List of iPhone SDK &amp; XCode packages</title>
		<link>http://dev.enekoalonso.com/2010/08/03/iphone-sdk-old-versions/</link>
		<comments>http://dev.enekoalonso.com/2010/08/03/iphone-sdk-old-versions/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 22:21:04 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[titanium]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=623</guid>
		<description><![CDATA[Lately I&#8217;ve been developing Android and iPhone apps with Titanium Developer and also switching from on Mac to another. At the end I ended up with a computer that only had the latest iOS 4 SDK. Thus, I couldn&#8217;t compile anymore apps for my 3G iPhone with OS 3.1.3. Fortunately, the old versions of XCode [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve been developing Android and iPhone apps with Titanium Developer and also switching from on Mac to another. At the end I ended up with a computer that only had the latest iOS 4 SDK. Thus, I couldn&#8217;t compile anymore apps for my 3G iPhone with OS 3.1.3.</p>
<p>Fortunately, the old versions of XCode and iPhone SDKs are still available for download, although they don&#8217;t show up in the Downloads section of the Apple Developer Connection site.</p>
<p>Here is a list of versions and links:<br />
<a href="http://developer.apple.com/iphone/download.action?path=/iphone/iphone_sdk_3.1__final/iphone_sdk_3.1_with_xcode_3.2_final__snow_leopard__10a432.dmg">iPhone SDK 3.1 with XCode 3.2.1 for Snow Leopard (10.6.0)</a><br />
<a href="http://developer.apple.com/iphone/download.action?path=/iphone/iphone_sdk_3.1.3__final/iphone_sdk_3.1.3_with_xcode_3.2.1__snow_leopard__10m2003a.dmg">iPhone SDK 3.1.3 with XCode 3.2.1 for Snow Leopard (10.6.0)</a><br />
<a href="http://developer.apple.com/iphone/download.action?path=/iphone/iphone_sdk_3.2__final/xcode_3.2.2_and_iphone_sdk_3.2_final.dmg">iPhone SDK 3.2 Final with Xcode 3.2.2 for Snow Leopard (10.6.0)</a><br />
<a href="http://developer.apple.com/iphone/download.action?path=/iphone/iphone_sdk_4_gm_seed/xcode_3.2.3_and_iphone_sdk_4_gm_seed.dmg">Xcode 3.2.3 and iPhone SDK 4 GM seed for Snow Leopard (10.6.2)</a><br />
<a href="http://developer.apple.com/iphone/download.action?path=%2Fios%2Fios_sdk_4.0.1__final%2Fxcode_3.2.3_and_ios_sdk_4.0.1.dmg">Xcode 3.2.3 and iOS SDK 4.0.1 for Snow Leopard</a><br />
<a href="http://developer.apple.com/iphone/download.action?path=%2Fios%2Fios_sdk_4.0.2__final%2Fxcode_3.2.3_and_ios_sdk_4.0.2.dmg">Xcode 3.2.3 and iOS SDK 4.0.2 for Snow Leopard</a></p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>June 14, 2011 -- <a href="http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/" title="Titanium Studio and Titanium Mobile 1.7">Titanium Studio and Titanium Mobile 1.7</a> (0)</li><li>August 18, 2010 -- <a href="http://dev.enekoalonso.com/2010/08/18/titanium-developer-love-and-hate-part-ii/" title="Titanium Developer: love and hate (Part II)">Titanium Developer: love and hate (Part II)</a> (0)</li><li>July 30, 2010 -- <a href="http://dev.enekoalonso.com/2010/07/30/titanium-developer-love-and-hate/" title="Titanium Developer: love and hate">Titanium Developer: love and hate</a> (3)</li><li>September 17, 2010 -- <a href="http://dev.enekoalonso.com/2010/09/17/mootools-core-for-server-and-mobile-development/" title="MooTools Core for Server and Mobile Development">MooTools Core for Server and Mobile Development</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2010/08/03/iphone-sdk-old-versions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Titanium Developer: love and hate</title>
		<link>http://dev.enekoalonso.com/2010/07/30/titanium-developer-love-and-hate/</link>
		<comments>http://dev.enekoalonso.com/2010/07/30/titanium-developer-love-and-hate/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 04:57:16 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[appcelerator]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[pc]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[titanium]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=615</guid>
		<description><![CDATA[I&#8217;ve been using Titanium Developer for a while now, since I installed it to do some mobile app research one or two months ago. But up until now I barely used it again other than to maintain a desktop app I created for a game, which thanks to Titanium runs in both Mac and PC. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://www.appcelerator.com/products/titanium-mobile-application-development/">Titanium Developer</a> for a while now, since I installed it to do some mobile app research one or two months ago. But up until now I barely used it again other than to maintain a desktop app I created for a game, which thanks to Titanium runs in both Mac and PC. Thus, up until this week, I hadn&#8217;t really get in depth with it.</p>
<h3>The good things</h3>
<p>Nice, easy and fast. Creating apps is piece of cake, loading JSON feeds from Internet, using local storage, placing buttons and labels on the screen&#8230; it&#8217;s all easy and it works on both iPhone and Android right away.</p>
<h3>The bad things</h3>
<p>Titanium Developer looks like an unfinished app. It shouldn&#8217;t be version 1.X, not even 0.X. Looks like an alpha, buggy and very easy to get screwed up, specially if you share your projects between Windows and Mac. This time it launches the emulator, this time it does not. This time your project does not load properly. Next time, you try to create a new project and it fails. And the errors are totally useless. Not very helpful.</p>
<h3>Conclusion</h3>
<p>The idea is great, awesome. The code is clean and using Javascript for development makes it easy for web developers to get easily involved into mobile app development. If only the <a href="http://twitter.com/appcelerator">Appcelerator</a> team could improve their app, we would save a lot of headaches.</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>September 17, 2010 -- <a href="http://dev.enekoalonso.com/2010/09/17/mootools-core-for-server-and-mobile-development/" title="MooTools Core for Server and Mobile Development">MooTools Core for Server and Mobile Development</a> (1)</li><li>August 18, 2010 -- <a href="http://dev.enekoalonso.com/2010/08/18/titanium-developer-love-and-hate-part-ii/" title="Titanium Developer: love and hate (Part II)">Titanium Developer: love and hate (Part II)</a> (0)</li><li>June 14, 2011 -- <a href="http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/" title="Titanium Studio and Titanium Mobile 1.7">Titanium Studio and Titanium Mobile 1.7</a> (0)</li><li>August 3, 2010 -- <a href="http://dev.enekoalonso.com/2010/08/03/iphone-sdk-old-versions/" title="List of iPhone SDK &#038; XCode packages">List of iPhone SDK &#038; XCode packages</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2010/07/30/titanium-developer-love-and-hate/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Things to do</title>
		<link>http://dev.enekoalonso.com/2010/01/28/things-to-do/</link>
		<comments>http://dev.enekoalonso.com/2010/01/28/things-to-do/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 04:15:44 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[appcelerator]]></category>
		<category><![CDATA[closure]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[yql]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=418</guid>
		<description><![CDATA[To do list: Try Appcelerator (downloaded.. don&#8217;t like it very much, have to spend more time with it) Install iPhone SDK 3.2 (downloading installing&#8230;) Study LinkedIn API Study Twitter API Take a look at YQL Play with Google Closure JS library Play with Dojo JS library That&#8217;s it for now. Let&#8217;s see if I can [...]]]></description>
			<content:encoded><![CDATA[<p>To do list:</p>
<ul>
<li><del datetime="2010-01-31T00:52:29+00:00">Try <a href="http://www.appcelerator.com/">Appcelerator</a></del> (downloaded.. don&#8217;t like it very much, have to spend more time with it)</li>
<li><del datetime="2010-01-31T01:29:38+00:00">Install <a href="http://developer.apple.com/iphone">iPhone SDK 3.2</a> (<del datetime="2010-01-31T00:52:29+00:00">downloading</del> installing&#8230;)</del></li>
<li>Study <a href="http://developer.linkedin.com/community/apis">LinkedIn API</a></li>
<li>Study <a href="http://apiwiki.twitter.com/">Twitter API</a></li>
<li>Take a look at <a href="http://developer.yahoo.com/yql/">YQL</a></li>
<li>Play with <a href="http://code.google.com/closure/library">Google Closure</a> JS library</li>
<li>Play with <a href="http://dojotoolkit.org/">Dojo</a> JS library</li>
</ul>
<p>That&#8217;s it for now. Let&#8217;s see if I can find time to do all those.</p>
<h4>Updated</h4>
<p><a href="http://dev.enekoalonso.com/wp-content/uploads/2010/01/Screen-shot-2010-01-30-at-5.37.52-PM.png"><img src="http://dev.enekoalonso.com/wp-content/uploads/2010/01/Screen-shot-2010-01-30-at-5.37.52-PM-396x300.png" alt="" title="XCode with SDK 3.2 for iPad" width="396" height="300" class="aligncenter size-medium wp-image-439" /></a></p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>May 6, 2010 -- <a href="http://dev.enekoalonso.com/2010/05/06/tech-talks-at-level-studios/" title="Tech talks at LEVEL Studios">Tech talks at LEVEL Studios</a> (0)</li><li>January 28, 2010 -- <a href="http://dev.enekoalonso.com/2010/01/28/dojo-y-yo/" title="Dojo y yo">Dojo y yo</a> (0)</li><li>June 30, 2009 -- <a href="http://dev.enekoalonso.com/2009/06/30/iphone-3-0-geolocation-with-javascript/" title="iPhone 3.0 geolocation with Javascript">iPhone 3.0 geolocation with Javascript</a> (1)</li><li>June 14, 2011 -- <a href="http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/" title="Titanium Studio and Titanium Mobile 1.7">Titanium Studio and Titanium Mobile 1.7</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2010/01/28/things-to-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spaniards for iPhone available now</title>
		<link>http://dev.enekoalonso.com/2009/08/29/spaniards-for-iphone-available-now/</link>
		<comments>http://dev.enekoalonso.com/2009/08/29/spaniards-for-iphone-available-now/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 22:43:09 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[appstore]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[spaniards]]></category>
		<category><![CDATA[spaniards.es]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=373</guid>
		<description><![CDATA[Finally, the first release of Spaniards Mobile got released just today and it is available for download on the App Store for FREE. More info: http://www.spaniards.es/noticias/2009/08/29/spaniards-10-para-iphone-ya-disponible Related Posts:July 30, 2010 -- Titanium Developer: love and hate (3)June 14, 2011 -- Titanium Studio and Titanium Mobile 1.7 (0)May 12, 2011 -- Angry Birds as a Web [...]]]></description>
			<content:encoded><![CDATA[<p>Finally, the first release of Spaniards Mobile got released just today and it is available for download on the App Store for FREE.</p>
<p>More info:<br />
<a href="http://www.spaniards.es/noticias/2009/08/29/spaniards-10-para-iphone-ya-disponible">http://www.spaniards.es/noticias/2009/08/29/spaniards-10-para-iphone-ya-disponible</a></p>
<p align="center"><img src="http://www.spaniards.es/archivos/IMG_0627.PNG" alt="Spaniards for iPhone" /></p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>July 30, 2010 -- <a href="http://dev.enekoalonso.com/2010/07/30/titanium-developer-love-and-hate/" title="Titanium Developer: love and hate">Titanium Developer: love and hate</a> (3)</li><li>June 14, 2011 -- <a href="http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/" title="Titanium Studio and Titanium Mobile 1.7">Titanium Studio and Titanium Mobile 1.7</a> (0)</li><li>May 12, 2011 -- <a href="http://dev.enekoalonso.com/2011/05/12/angry-birds-as-a-web-app/" title="Angry Birds as a Web App">Angry Birds as a Web App</a> (0)</li><li>September 17, 2010 -- <a href="http://dev.enekoalonso.com/2010/09/17/mootools-core-for-server-and-mobile-development/" title="MooTools Core for Server and Mobile Development">MooTools Core for Server and Mobile Development</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2009/08/29/spaniards-for-iphone-available-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Placing a UIActivityIndicartorView on a UIBarButtonItem</title>
		<link>http://dev.enekoalonso.com/2009/07/26/placing-a-uiactivityindicartorview-on-a-uibarbuttonitem/</link>
		<comments>http://dev.enekoalonso.com/2009/07/26/placing-a-uiactivityindicartorview-on-a-uibarbuttonitem/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 21:36:39 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[reload]]></category>
		<category><![CDATA[UIActivityIndicatorView]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=347</guid>
		<description><![CDATA[Have you seen those iPhone apps with a reload button that switches itself to an animated activity indicator while the reload action is being performed? Here is how to do that. Place this code on your ViewController: - &#40;void&#41;showReloadButton &#123; &#160; UIBarButtonItem *refreshItem = &#91;&#91;UIBarButtonItem alloc&#93; &#160; &#160; initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh &#160; &#160; &#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Have you seen those iPhone apps with a reload button that switches itself to an animated activity indicator while the reload action is being performed? </p>
<p>Here is how to do that. Place this code on your ViewController:</p>
<div class="geshi no objc">
<ol>
<li class="li1">
<div class="de1"><span class="sy0">-</span> <span class="br0">&#40;</span><span class="kw4">void</span><span class="br0">&#41;</span>showReloadButton <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; UIBarButtonItem <span class="sy0">*</span>refreshItem <span class="sy0">=</span> <span class="br0">&#91;</span><span class="br0">&#91;</span>UIBarButtonItem alloc<span class="br0">&#93;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; initWithBarButtonSystemItem<span class="sy0">:</span>UIBarButtonSystemItemRefresh </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; target<span class="sy0">:</span>self</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; action<span class="sy0">:</span><span class="kw4">@selector</span><span class="br0">&#40;</span>reload<span class="sy0">:</span><span class="br0">&#41;</span><span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; self.navigationItem.rightBarButtonItem <span class="sy0">=</span> refreshItem;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#91;</span>refreshItem release<span class="br0">&#93;</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">-</span> <span class="br0">&#40;</span><span class="kw4">void</span><span class="br0">&#41;</span>showActivityIndicator <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; UIActivityIndicatorView <span class="sy0">*</span>activityIndicator <span class="sy0">=</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#91;</span><span class="br0">&#91;</span>UIActivityIndicatorView alloc<span class="br0">&#93;</span> initWithFrame<span class="sy0">:</span>CGRectMake<span class="br0">&#40;</span><span class="nu0">0</span>, <span class="nu0">0</span>, <span class="nu0">20</span>, <span class="nu0">20</span><span class="br0">&#41;</span><span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#91;</span>activityIndicator startAnimating<span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; UIBarButtonItem <span class="sy0">*</span>activityItem <span class="sy0">=</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#91;</span><span class="br0">&#91;</span>UIBarButtonItem alloc<span class="br0">&#93;</span> initWithCustomView<span class="sy0">:</span>activityIndicator<span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#91;</span>activityIndicator release<span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; self.navigationItem.rightBarButtonItem <span class="sy0">=</span> activityItem;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#91;</span>activityItem release<span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">-</span> <span class="br0">&#40;</span>IBAction<span class="br0">&#41;</span> reload <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="co1">// Do your reload stuff</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>Seen <a href="http://www.leegillen.com/Public/Blog/Entries/2008/10/26_How_to_use_a_custom_UIBarButtonItem_to_display_a_UIActivityIndicatorView.html">here</a>.</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>August 18, 2010 -- <a href="http://dev.enekoalonso.com/2010/08/18/titanium-developer-love-and-hate-part-ii/" title="Titanium Developer: love and hate (Part II)">Titanium Developer: love and hate (Part II)</a> (0)</li><li>June 14, 2011 -- <a href="http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/" title="Titanium Studio and Titanium Mobile 1.7">Titanium Studio and Titanium Mobile 1.7</a> (0)</li><li>July 30, 2009 -- <a href="http://dev.enekoalonso.com/2009/07/30/trimming-strings-objective-c-cocoa/" title="Trimming strings in Objective-C / Cocoa">Trimming strings in Objective-C / Cocoa</a> (1)</li><li>November 28, 2008 -- <a href="http://dev.enekoalonso.com/2008/11/28/mygameoflife-source-code/" title="MyGameOfLife source code">MyGameOfLife source code</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2009/07/26/placing-a-uiactivityindicartorview-on-a-uibarbuttonitem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone 3.0 geolocation with Javascript</title>
		<link>http://dev.enekoalonso.com/2009/06/30/iphone-3-0-geolocation-with-javascript/</link>
		<comments>http://dev.enekoalonso.com/2009/06/30/iphone-3-0-geolocation-with-javascript/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 16:13:43 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[safari]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=338</guid>
		<description><![CDATA[I was watching one of the video tutorials from Apple last night about some custom JS available on Safari, only on the iPhone 3.0, that let’s you interact with the phone and obtain data like the current location, etc. So I built a little page to see how it works. I included Mootools 1.2.3 from [...]]]></description>
			<content:encoded><![CDATA[<p>I was watching one of the video tutorials from Apple last night about some custom JS available on Safari, only on the iPhone 3.0, that let’s you interact with the phone and obtain data like the current location, etc.</p>
<p>So I built a little page to see how it works. I included Mootools 1.2.3 from Google servers and the Google Maps API. And voilá, with a few lines of code we have a totally functional web based GSP navigation system. A little bit ugly, but functional. Currenlty it only centers the map on the coordinates given by the phone, and also does a reverse geolocation to obtain the address (actually city, state and country). But it could be easily extended to add markers to the map, or even paths to track the movement.</p>
<p>If you have an iPhone (or an iPhone simulator) go to:<br />
<a href="http://enekoalonso.com/research/iphone/geolocation.html">http://enekoalonso.com/research/iphone/geolocation.html</a></p>
<p>The source code:</p>
<div class="geshi no javascript">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> Navigator = <span class="kw2">new</span> <span class="kw2">Class</span><span class="br0">&#40;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; initialize: <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">// Listen for position changes</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">watchId</span> = navigator.<span class="me1">geolocation</span>.<span class="me1">watchPosition</span><span class="br0">&#40;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="kw2">function</span><span class="br0">&#40;</span>position<span class="br0">&#41;</span><span class="br0">&#123;</span> <span class="kw1">this</span>.<span class="me1">position</span><span class="br0">&#40;</span>position<span class="br0">&#41;</span> <span class="br0">&#125;</span>.<span class="me1">bind</span><span class="br0">&#40;</span><span class="kw1">this</span><span class="br0">&#41;</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><span class="br0">&#125;</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span> enableHighAccuracy: <span class="kw2">true</span>, timeout: <span class="nu0">1000</span>, maximumAge: <span class="nu0">10000</span> <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">infoPanel</span> = $<span class="br0">&#40;</span><span class="st0">&#39;info&#39;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">// Create the Geocoder and the Map</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">geocoder</span> = <span class="kw2">new</span> google.<span class="me1">maps</span>.<span class="me1">Geocoder</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">map</span> = <span class="kw2">new</span> google.<span class="me1">maps</span>.<span class="me1">Map</span><span class="br0">&#40;</span>$<span class="br0">&#40;</span><span class="st0">&#39;map&#39;</span><span class="br0">&#41;</span>, <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; zoom: <span class="nu0">12</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; mapTypeId: google.<span class="me1">maps</span>.<span class="me1">MapTypeId</span>.<span class="me1">ROADMAP</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; position: <span class="kw2">function</span><span class="br0">&#40;</span>position<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">// Update labels</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">infoPanel</span>.<span class="me1">getElement</span><span class="br0">&#40;</span><span class="st0">&#39;p.date&#39;</span><span class="br0">&#41;</span>.<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&#39;text&#39;</span>, position.<span class="me1">timestamp</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">infoPanel</span>.<span class="me1">getElement</span><span class="br0">&#40;</span><span class="st0">&#39;p.coords&#39;</span><span class="br0">&#41;</span>.<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&#39;text&#39;</span>, position.<span class="me1">coords</span>.<span class="me1">latitude</span> + <span class="st0">&#39;, &#39;</span> + position.<span class="me1">coords</span>.<span class="me1">longitude</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">infoPanel</span>.<span class="me1">getElement</span><span class="br0">&#40;</span><span class="st0">&#39;p.altitude&#39;</span><span class="br0">&#41;</span>.<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&#39;text&#39;</span>, position.<span class="me1">coords</span>.<span class="me1">altitude</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">infoPanel</span>.<span class="me1">getElement</span><span class="br0">&#40;</span><span class="st0">&#39;p.heading&#39;</span><span class="br0">&#41;</span>.<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&#39;text&#39;</span>, position.<span class="me1">coords</span>.<span class="me1">heading</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">infoPanel</span>.<span class="me1">getElement</span><span class="br0">&#40;</span><span class="st0">&#39;p.speed&#39;</span><span class="br0">&#41;</span>.<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&#39;text&#39;</span>, position.<span class="me1">coords</span>.<span class="me1">speed</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">// Center map</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">var</span> latLng = <span class="kw2">new</span> google.<span class="me1">maps</span>.<span class="me1">LatLng</span><span class="br0">&#40;</span>position.<span class="me1">coords</span>.<span class="me1">latitude</span>, position.<span class="me1">coords</span>.<span class="me1">longitude</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">map</span>.<span class="me1">set_center</span><span class="br0">&#40;</span>latLng<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">// Reverse geolocation (get current address)</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">geocoder</span>.<span class="me1">geocode</span><span class="br0">&#40;</span><span class="br0">&#123;</span><span class="st0">&#39;latLng&#39;</span>: latLng<span class="br0">&#125;</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="kw2">function</span><span class="br0">&#40;</span>results, <span class="kw3">status</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>google.<span class="me1">maps</span>.<span class="me1">GeocoderStatus</span>.<span class="me1">OK</span><span class="br0">&#41;</span> <span class="kw1">this</span>.<span class="me1">showAddress</span><span class="br0">&#40;</span>results<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span>.<span class="me1">bind</span><span class="br0">&#40;</span><span class="kw1">this</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; showAddress: <span class="kw2">function</span><span class="br0">&#40;</span>results<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">// console.dir(response);</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>results<span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">infoPanel</span>.<span class="me1">getElement</span><span class="br0">&#40;</span><span class="st0">&#39;p.location&#39;</span><span class="br0">&#41;</span>.<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&#39;text&#39;</span>, results<span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>.<span class="me1">formatted_address</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">window.<span class="me1">addEvent</span><span class="br0">&#40;</span><span class="st0">&#39;load&#39;</span>, <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw2">new</span> Navigator<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>Enjoy.</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>September 17, 2010 -- <a href="http://dev.enekoalonso.com/2010/09/17/mootools-core-for-server-and-mobile-development/" title="MooTools Core for Server and Mobile Development">MooTools Core for Server and Mobile Development</a> (1)</li><li>February 19, 2010 -- <a href="http://dev.enekoalonso.com/2010/02/19/having-fun-with-mooml-and-twitter/" title="Having fun with Mooml &#038; Twitter">Having fun with Mooml &#038; Twitter</a> (0)</li><li>January 28, 2010 -- <a href="http://dev.enekoalonso.com/2010/01/28/things-to-do/" title="Things to do">Things to do</a> (0)</li><li>February 28, 2009 -- <a href="http://dev.enekoalonso.com/2009/02/28/kyte-rest-api/" title="Kyte&#8217;s REST API">Kyte&#8217;s REST API</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2009/06/30/iphone-3-0-geolocation-with-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Handling events on iPhone webapps</title>
		<link>http://dev.enekoalonso.com/2008/12/05/handling-events-on-iphone-webapps/</link>
		<comments>http://dev.enekoalonso.com/2008/12/05/handling-events-on-iphone-webapps/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 22:02:29 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[webapp]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=82</guid>
		<description><![CDATA[This week I have been working on a website for iPhone phones and I have discovered some interesting things about events. I am using plain Javascript, with no third party libraries, so I don&#8217;t know if they have any fix for these issues or if they affect them. For example, a couple of days ago [...]]]></description>
			<content:encoded><![CDATA[<p>This week I have been working on a website for iPhone phones and I have discovered some interesting things about events. I am using plain Javascript, with no third party libraries, so I don&#8217;t know if they have any fix for these issues or if they affect them.</p>
<p>For example, a couple of days ago I was posting <a href="http://dev.enekoalonso.com/2008/12/02/detecting-iphones-orientation/">how to detect the iPhone&#8217;s orientation</a>. The problem with the method I used is that I am assigning explicitly the function to handle the event, which means only that function will handle the event. If I wanted to add a second function to handle the same event, for example inside an object, I would have to use the window.addEventListener method. But apparently <strong>addEventListener does not work on the iPhone for some events</strong>.</p>
<p>The following code wont work on the iPhone (although it works on the iPhone simulator)</p>
<div class="geshi no javascript">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">function</span> updateLayout<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>window.<span class="me1">orientation</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; document.<span class="me1">body</span>.<span class="me1">setAttribute</span><span class="br0">&#40;</span><span class="st0">&#39;class&#39;</span>, <span class="st0">&#39;landscape&#39;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">else</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; document.<span class="me1">body</span>.<span class="me1">setAttribute</span><span class="br0">&#40;</span><span class="st0">&#39;class&#39;</span>, <span class="st0">&#39;portrait&#39;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">window.<span class="me1">addEventListener</span><span class="br0">&#40;</span><span class="st0">&#39;orientationchange&#39;</span>, <span class="kw2">function</span><span class="br0">&#40;</span>event<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; updateLayout<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span>, <span class="kw2">false</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">window.<span class="me1">addEventListener</span><span class="br0">&#40;</span><span class="st0">&#39;load&#39;</span>, <span class="kw2">function</span><span class="br0">&#40;</span>event<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; updateLayout<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span>, <span class="kw2">false</span><span class="br0">&#41;</span>;</div>
</li>
</ol>
</div>
<p>I have found the addEventListener function works with input fields (focus and blur events), with links (click event) and with window (load event). I have found it doesn&#8217;t work on forms (submit event) neither with the custom onorientationchange event as shown avobe. I haven&#8217;t tested other events yet.</p>
<p>It may be that all these issues have been fixed in newer versions of the iPhone OS X &#8211; the one I have for testing is 1.1.4 (4A102).</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>May 12, 2011 -- <a href="http://dev.enekoalonso.com/2011/05/12/angry-birds-as-a-web-app/" title="Angry Birds as a Web App">Angry Birds as a Web App</a> (0)</li><li>June 14, 2011 -- <a href="http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/" title="Titanium Studio and Titanium Mobile 1.7">Titanium Studio and Titanium Mobile 1.7</a> (0)</li><li>May 6, 2011 -- <a href="http://dev.enekoalonso.com/2011/05/06/finding-duplicate-ids-on-an-html-page/" title="Finding duplicate ID&#8217;s on an HTML page">Finding duplicate ID&#8217;s on an HTML page</a> (0)</li><li>September 17, 2010 -- <a href="http://dev.enekoalonso.com/2010/09/17/mootools-core-for-server-and-mobile-development/" title="MooTools Core for Server and Mobile Development">MooTools Core for Server and Mobile Development</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2008/12/05/handling-events-on-iphone-webapps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detecting iPhone&#8217;s orientation</title>
		<link>http://dev.enekoalonso.com/2008/12/02/detecting-iphones-orientation/</link>
		<comments>http://dev.enekoalonso.com/2008/12/02/detecting-iphones-orientation/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 16:59:23 +0000</pubDate>
		<dc:creator>Eneko Alonso</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[landscape]]></category>
		<category><![CDATA[orientation]]></category>
		<category><![CDATA[portrait]]></category>

		<guid isPermaLink="false">http://dev.enekoalonso.com/?p=70</guid>
		<description><![CDATA[Detecting the iPhone&#8217;s orientation on a website is very easy: the only thing needed is a little bit of Javascript to listen to the onorientationchange event: window.onorientationchange = function&#40;&#41; &#123; &#160; if &#40;window.orientation&#41; &#160; &#160; document.body.setAttribute&#40;&#39;class&#39;, &#39;landscape&#39;&#41;; &#160; else &#160; &#160; document.body.setAttribute&#40;&#39;class&#39;, &#39;portrait&#39;&#41;; &#125; window.onload = function&#40;&#41; &#123; &#160; window.onorientationchange&#40;&#41;; &#125; The window.orientation variable can [...]]]></description>
			<content:encoded><![CDATA[<p>Detecting the iPhone&#8217;s orientation on a website is very easy: the only thing needed is a little bit of Javascript to listen to the <code>onorientationchange</code> event: </p>
<div class="geshi no javascript">
<ol>
<li class="li1">
<div class="de1">window.<span class="me1">onorientationchange</span> = <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>window.<span class="me1">orientation</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; document.<span class="me1">body</span>.<span class="me1">setAttribute</span><span class="br0">&#40;</span><span class="st0">&#39;class&#39;</span>, <span class="st0">&#39;landscape&#39;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">else</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; document.<span class="me1">body</span>.<span class="me1">setAttribute</span><span class="br0">&#40;</span><span class="st0">&#39;class&#39;</span>, <span class="st0">&#39;portrait&#39;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">window.<span class="kw3">onload</span> = <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; window.<span class="me1">onorientationchange</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>The <code>window.orientation</code> variable can have three different values: 0, 90 and -90. In most cases we wont mind if its 90 or -90, since both are landscape, so I have ignored this on the code above. Adding a CSS class to the body is the cleanest way to handle iPhone&#8217;s orientation. Now it&#8217;s up to you to set up the CSS for both layouts.</p>
<p>The resolution of the visible screen (viewport) changes drastically from portrait to layout, so be aware of this:</p>
<ul>
<li>Portrait visible screen: 320 x 356 px</li>
<li>Landscape visible screen: 480 x 196 px</li>
</ul>
<p>Source: <a href="https://developer.apple.com/webapps/docs/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/chapter_7_section_9.html">Web Apps Reference Library &#8211; Handling Orientation Events</a> (needs registration)</p>
<h3  class="related_post_title">Related Posts:</h3><ul class="related_post"><li>June 14, 2011 -- <a href="http://dev.enekoalonso.com/2011/06/14/titanium-studio-and-titanium-mobile-1-7/" title="Titanium Studio and Titanium Mobile 1.7">Titanium Studio and Titanium Mobile 1.7</a> (0)</li><li>September 17, 2010 -- <a href="http://dev.enekoalonso.com/2010/09/17/mootools-core-for-server-and-mobile-development/" title="MooTools Core for Server and Mobile Development">MooTools Core for Server and Mobile Development</a> (1)</li><li>August 22, 2010 -- <a href="http://dev.enekoalonso.com/2010/08/22/list-of-iphone-ipsw-firmware-files/" title="List of iPhone ipsw firmware files (yes, downgrading from iOS 4.0.1 to 3.1.3)">List of iPhone ipsw firmware files (yes, downgrading from iOS 4.0.1 to 3.1.3)</a> (2)</li><li>August 18, 2010 -- <a href="http://dev.enekoalonso.com/2010/08/18/titanium-developer-love-and-hate-part-ii/" title="Titanium Developer: love and hate (Part II)">Titanium Developer: love and hate (Part II)</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://dev.enekoalonso.com/2008/12/02/detecting-iphones-orientation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

