<?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>Night Blue Fruit Technology</title>
	<atom:link href="http://www.nightbluefruit.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nightbluefruit.com/blog</link>
	<description>Internet Technology Consultancy Services</description>
	<lastBuildDate>Mon, 30 Apr 2012 07:08:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>X-Servet/Xproxy and mobile web applications</title>
		<link>http://www.nightbluefruit.com/blog/2012/04/x-servetxproxy-and-mobile-web-applications/</link>
		<comments>http://www.nightbluefruit.com/blog/2012/04/x-servetxproxy-and-mobile-web-applications/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 13:28:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=193</guid>
		<description><![CDATA[I recently worked on the setup of a mobile web application aimed at customers in Japan.
Unlike in Europe and the US, and indeed in many other parts of Asia, Japanese mobile users have been slow to join the Smart Phone revolution, and many remain wedded to a family of handsets that are built around i-mode [...]]]></description>
			<content:encoded><![CDATA[<p>I recently worked on the setup of a mobile web application aimed at customers in Japan.</p>
<p>Unlike in Europe and the US, and indeed in many other parts of Asia, Japanese mobile users have been slow to join the Smart Phone revolution, and many remain wedded to a family of handsets that are built around <a href="http://en.wikipedia.org/wiki/I-mode" target="_blank">i-mode</a> technology, which was supposed to be the future of mobile internet, but which became largely redundant when Apple and others started handing out Smart phones that had fully featured browsers and which were capable of WIFI.</p>
<p>The Japanese mobile market is therefore peppered with lots of unusual handsets which have varying degrees of capability in terms of displaying mobile content, which presents a particular challenge in terms of the development of mobile content.</p>
<p>To address this, a Japanese company called <a href="http://www.flexfirm.jp/" target="_blank">FlexFirm</a> has produced a Proxy Server called <a href="http://x-servlet.com/" target="_blank">X-Servlet</a> (sometimes referred to as xproxy) which sits between user handsets and web applications and alters the content delivered to the handset based on what it knows about the handset being used.</p>
<p>The company itself maintains a database of handsets in use in the Japanese market, and allows X-Servlet installations to import this on the fly on regular intervals.</p>
<p>The software itself is supported by documentation that is only available in Japanese, but once you&#8217;ve used Google Translate to give you at least some insight into what&#8217;s involved, setup and configuration is relatively straightforward. The server is written entirely in Java, so like most Java applications, stopping/starting/running it is simply a matter of managing single process, and combined with something like <a href="http://cr.yp.to/daemontools.html" target="_blank">daemontools</a> to maintain stability, its a pretty robust solution.</p>
<p>More generally, this availability of such software, and the unusual nature of the Japanese mobile market ( as well as several others ) highlights again how elusive standardization is in the mobile internet, and how much of a relief it will be to everyone in  the development community when HTML5 asserts itself as the dominant and pervasive standard.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2012/04/x-servetxproxy-and-mobile-web-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to clone an Amazon EC2 instance between 2 different accounts</title>
		<link>http://www.nightbluefruit.com/blog/2012/04/how-to-clone-an-amazon-ec2-instance-between-2-different-accounts/</link>
		<comments>http://www.nightbluefruit.com/blog/2012/04/how-to-clone-an-amazon-ec2-instance-between-2-different-accounts/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 23:44:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=189</guid>
		<description><![CDATA[So here&#8217;s the deal.
(note: this only applies to linux, ebs-backed instances)
Let&#8217;s say you&#8217;ve built a complex server instance under one account, and now, for whatever reason, you need that server to run under a different account.
Yes, you could go about creating an AMI, and packing that up and sharing it with the other account, but [...]]]></description>
			<content:encoded><![CDATA[<p>So here&#8217;s the deal.</p>
<p>(note: this only applies to linux, ebs-backed instances)</p>
<p>Let&#8217;s say you&#8217;ve built a complex server instance under one account, and now, for whatever reason, you need that server to run under a different account.</p>
<p>Yes, you could go about creating an AMI, and packing that up and sharing it with the other account, but lets say this server has multiple EBS volumes attached, and has a larger data footprint than the 8GB that comes with a standard EBS instance root partition.</p>
<p>Not a problem. Amazon recently provided functionality to share volume snapshots with other accounts, which is an ideal way to transfer server instances between accounts.</p>
<p>Here&#8217;s the step by step:</p>
<p>1. For each of the volumes that is included in your system, including the root volume, make a snapshot</p>
<p>2. Update the permissions of each of those snapshots so that they are shared with the other account</p>
<p>3. Logout and login to the other account</p>
<p>4. Make sure you are in the same region as the one where the snapshots were created</p>
<p>5. Set the filter to Private Snapshots; the snapshots you previously shared should now appear</p>
<p>6. Create a volume from each of these, and make sure they are all in the same zone</p>
<p>7. Now, create an EBS-backed instance using the same AMI as was used to create the instance you are trying to transfer (the AMI doesn&#8217;t need to be the same if you are using Amazon Linux; again, make sure its in the same zone as the volumes you just created</p>
<p>8. After the instance fully deploys, stop it</p>
<p>9. Detach the default 8GB root volume from the instance. Attach the root volume that you created from the snapshot; attach as /dev/sda1</p>
<p>10. Attach all the other volumes you created from the snapshots, making sure to give them the same device names as on the original instance</p>
<p>11. Start the instance</p>
<p>12. You&#8217;re done. To connect, use the same method as on the original instance, rather than how Amazon tells you to connect.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2012/04/how-to-clone-an-amazon-ec2-instance-between-2-different-accounts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Design a Simple Tab Based Widget</title>
		<link>http://www.nightbluefruit.com/blog/2012/01/design-a-simple-tab-based-widget/</link>
		<comments>http://www.nightbluefruit.com/blog/2012/01/design-a-simple-tab-based-widget/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 22:37:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[The Internet]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=181</guid>
		<description><![CDATA[Widgets appear all over web sites these days. Little boxes of context that you can unwrap to reveal all sorts of wonderful information.
As a web developer, you will often be asked to provide them, and there are various ways of doing this.
Here is my recipe. It doesn&#8217;t use any graphics, and relies instead entirely on [...]]]></description>
			<content:encoded><![CDATA[<p>Widgets appear all over web sites these days. Little boxes of context that you can unwrap to reveal all sorts of wonderful information.</p>
<p>As a web developer, you will often be asked to provide them, and there are various ways of doing this.</p>
<p>Here is my recipe. It doesn&#8217;t use any graphics, and relies instead entirely on CSS and JQuery, which makes it really light and easy to use.</p>
<p><iframe src="/demos/tabs.html" scrolling="no" frameborder="no" style="width:324px;height:364px;"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2012/01/design-a-simple-tab-based-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stuff you can&#8217;t do with an iPhone: the definitive list</title>
		<link>http://www.nightbluefruit.com/blog/2012/01/stuff-you-cant-do-with-an-iphone-the-definitive-list/</link>
		<comments>http://www.nightbluefruit.com/blog/2012/01/stuff-you-cant-do-with-an-iphone-the-definitive-list/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 00:54:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=177</guid>
		<description><![CDATA[This is a list of stuff you can do with an Android phone, but can&#8217;t with an iPhone.
View Flash movies in websites
Use Bluetooth to transfer files or control remote devices
Connect to a Samba Network share to save your photos and videos
Take a photograph with a flash
Delete more than one photograph at a time
Mount your phone [...]]]></description>
			<content:encoded><![CDATA[<p><strong>This is a list of stuff you can do with an Android phone, but can&#8217;t with an iPhone.</strong></p>
<p>View Flash movies in websites</p>
<p>Use Bluetooth to transfer files or control remote devices</p>
<p>Connect to a Samba Network share to save your photos and videos</p>
<p>Take a photograph with a flash</p>
<p>Delete more than one photograph at a time</p>
<p>Mount your phone as an external drive to pull/push files to/from your PC</p>
<p>Buy music from someone other than iTunes</p>
<p>Install an application that hasn&#8217;t been approved by Apple</p>
<p>Use an older version of your operating software</p>
<p>Use an SD card to expand your storage capacity</p>
<p>Buy a replacement battery</p>
<p>Use a second, backup battery</p>
<p>Remove the SIM card without a paper clip</p>
<p>Turn on/off WIFI with a single key press</p>
<p>Use a standard mini-USB cable to charge it</p>
<p>Receive a WAP Push SMS message</p>
<p>Update your operating system without having to connect to a computer</p>
<p>Upload a file to a website through your web browser</p>
<p>Choose a different on screen keyboard</p>
<p>Schedule tasks to occur automatically eg turn down volume after 11pm</p>
<p>Customise your home screen</p>
<p>Add widgets to you home screen</p>
<p>Access more than 3 panels on your home screen</p>
<p>Control your phone from your computer</p>
<p>(Not necessarily something you can&#8217;t do, but one of the most annoying things about the iPhone is that its earphones don&#8217;t come with any sort of foam/rubber mufflers, which means that it you&#8217;re sitting beside an iPhone user on a train/plane/bus, you have to listen to whatever it is they are listening to.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2012/01/stuff-you-cant-do-with-an-iphone-the-definitive-list/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How I solved the iPhone Restore Error 3194 problem</title>
		<link>http://www.nightbluefruit.com/blog/2012/01/how-i-solved-the-iphone-restore-error-3194-problem/</link>
		<comments>http://www.nightbluefruit.com/blog/2012/01/how-i-solved-the-iphone-restore-error-3194-problem/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 21:52:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=171</guid>
		<description><![CDATA[This is a saga, but if you&#8217;ve been tearing your hair out trying to upgrade to version 5.0 of the Apple iOS on your iPhone, its probably worth reading.
Here&#8217;s the background.
Up to Oct 2011, iPhones came installed with iOS 4. iOS 5.0 was then released, and all iPhones sold after this time were sold with [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">This is a saga, but if you&#8217;ve been tearing your hair out trying to upgrade to version 5.0 of the Apple iOS on your iPhone, its probably worth reading.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Here&#8217;s the background.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Up to Oct 2011, iPhones came installed with iOS 4. iOS 5.0 was then released, and all iPhones sold after this time were sold with iOS 5.0.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">To be honest, I don&#8217;t know what the difference between iOS 4 and iOS 5 is. I needed an iPhone to test some mobile websites (I wouldn&#8217;t buy one for personal use under</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">any circumstances, because they&#8217;re just hand candy) and all I know is that somebody gave me an iPhone 3GS phone that they had finished with, and had it unlocked from</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Vodafone so that I could use it on O2. To complete the unlock process I had to do a restore of the iPhone with iTunes, and iTunes would not let me do this unless I</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">upgraded to iOS 5.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">And so the story begins.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">When I first attempted to do the upgrade, iPhone happily started downloading the new software. The payload is approx. 700MB, so I knew  it would take a while. However,</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">it crapped out after approx. 50MB, so I started it again. Same thing, crapped out again, and again, and again.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">I did a bit of research on this, and was told by the Apple Support web site that I should ensure I had the latest version of iTunes. My version was about 6 months old,</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">so I went ahead and downloaded the new version.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Now when I tried, iTunes wouldn&#8217;t connect at all to the software update server, and just crapped after waiting 30 seconds to connect.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">More research.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">I discovered that this was a very common problem, and one that not too many were able to resolve. The most common suggested resolution involves editing the local hosts</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">file on your Windows system (C:\windows\system32\drivers\etc\hosts). This is in fact a load of crap.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">The reason why this is a suggested solution is because lots of people have installed Jailbreak software on their PCs. This software inserts and entry into the hosts</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">file so that iTunes is directed away from Apple&#8217;s software signing server when doing restores. If that hosts file entry remains, you won&#8217;t be able to contact Apple&#8217;s</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">signing server when you want to do a genuine restore, for a software upgrade for example, so removing the entry helps. However, for people who have never tried to</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Jailbreak, this is just a waste of time. In fact, such users won&#8217;t even find the rogue entry in their hosts file.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Digging a bit deeper, I discovered that iTunes lets you load the software upgrade from a local source, by pressing the Shift key at the same time as you click Restore.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Hence, if I could get my hands on the .ipsw file (this is the file type for Apple iOS updates) that needed to be loaded, I could bypass any issues Apple was having in</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">connecting to the software upgrade server.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">I looked around on the web for a source for such files and found this link:</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">http://appldnld.apple.com/iPhone4/041-8356.20111012.SQRDT/iPhone2,1_5.0_9A334_Restore.ipsw</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">The server, appldnld.apple.com, is located in the apple.com Top Level Domain, so I figured this was pretty safe. I opened the link in my browswer and the file started</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">downloading. However, after 50mbs, it crapped out again.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Not wanting to give in on this, I tried a few other things. Suspecting that maybe my local network connection was not roboust enough to deal with whatever crap was</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">coming out of the Apple network, I logged onto my Linux hosting server in the Amazon EC2 clould and initiated the download from there with wget. This worked a treat,</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">and I pulled the .ipsw file down onto the server in about 2 minutes.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">I then connected to this server using Filezilla and ftp&#8217;ed the file down to my local PC. I used Filezila because it can restart failed downloads without having to</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">restart the download all over again, which is handy for large files like .ipsw files. Witin 30 minutes or so, I had the .ipsw file on my laptap.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Feeling certain that I had now conquered the Apple iOS 5.0 upgrade connundrum, I cranked up iTunes and used the Shift-Restore option to load the locally stored .ipsw</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">file. It loaded it up and unpacked it, and then told me it was going to verify the software with Apple.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Bang. Game over. An unknown error has occured (Error 3194).</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Not to worry, I thought, lets see what Error 3194 means.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">http://support.apple.com/kb/TS3694#error3194</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Error 3194: Resolve error 3194 by updating to the latest version of iTunes. &#8220;This device is not eligible for the requested build&#8221; in the updater logs confirms this is</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">the root of the issue.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Excellent. An obscure meaningless error message that Microsoft would have been proud of. I really shouldn&#8217;t have expected anything else.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">So back to Google for some more research, and this time I found all sorts of interesting stuff.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Apparently, since the release of the iPhone 3GS, Apple will know longer let you install operating software on your iPhone unless that software is approved by Apple.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">That means that whenever you use iTunes to upgrade or restore your iPhone, iTunes will scurry off home to Apple and check that the software you are trying to load is</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">approved for your model of iPhone. This, it seems, is an attempt to stop people jailbreaking their iPhones, because Apple doesn&#8217;t really like people doing things with</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">their hardware that they don&#8217;t approve of.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Anyway, armed with this nugget of information, I contacted Vodafone to ensure that my iPhone was definitely unlocked. If Apple was refusing to allow me upgrade it, I</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">figured this must be something to do with the status of the handset with the mobile operator to which it was issued.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Not so. Vodafone said that as far as they were concerned the handset was unlocked, and that I would have to copy Apple for technical support.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">I did as I was instructed, and was eventually put through to one of their agents to whom I described my problem. He said that Error 3194 meant that I had security</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">software running on my PC, which I needed to shut down. I assured him I hadn&#8217;t, and directed him to the Apple Support website which stated that Error 3194 concerned</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">the eligibility of phones for upgrade. He then suggested I reboot my PC. I told him I wasn&#8217;t going to do this, and that he was wasting my time.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">He got a bit flustered at this and put me through to one of this supervisors. This guy seemed to know a little bit more so I explained the actions I had taken thus</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">far. However, when I told him that I had downloaded the .ipsw file directly from a download server, he sprang to life, and I knew I had made a mistake.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">This was not possible to do, he stated, the only way to get the software was through iTunes, and the software that I was now trying to load was obviously a jailbreak</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">image from a 3rd party and that this was why the upgrade wasn&#8217;t working.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">I tried to explain to him that the download came from within the apple.com domain, which meant it was legit, and asked why iTunes allowed you to load a locally stored</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">.ipsw file if it was not possible to get such a file directly from Apple.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">No, he said, he worked for Apple and he knew what he was talking about.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">I tried to convince him still further. I showed him that the appldnld.apple.com resolved to an IP address that was leased to Akamai Technologies, the company that</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">manages all of Apple&#8217;s media downloads.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">No, he said, he worked for Apple and he knew what he was talking about.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">At this point, I let him and off and we went through his checklist for solving software upgrade issues.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">We cleared the DNS cache. No difference. We created a new user account under Windows and tried the download using that (!!). No difference. We cleared the comments out</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">of the Windows hosts file and rebooted (!!!!!!). No difference.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">I asked him if he knew what server iTunes tried to connect to when doing upgrades, and on what TCP port, so that we could test that he independently. He didn&#8217;t know</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">any of these details, and seemed incredulous that he should be expected to know.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">He eventually told me something to the effect that I would have to sign up with a new ISP if I wanted to upgrade my iPhone. At this point, I ended the call.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Some good did come of it, however. Having asked the question about the server iTunes connects to, I set about finding this out for myself.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">I installed TCPView on my laptop, cranked up the iTunes upgrade process, and had a look at what it was connected to. I found out that it was connected to ip address</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">82.52.205.135 on HTTP to do the download. This ip address is leased to an Italian Telecoms company, and obviously forms part of Apple&#8217;s new iCloud product.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">I also decided to see what Apple was trying to download, and looked in C:\users\garreth\AppData\Roaming\Apple Computer\iTunes\iPhone Software Updates, which is where</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">iTunes keeps the .ipsw files it downloads from Apple.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Here, I found a file called iPhone2,1_5.0.1_9A405_Restore.ipsw.download, which was obviously the partial download of the full .ipsw file.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Now, notice the difference in this file name the the one I originally downloaded.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">iPhone2,1_5.0_9A334_Restore.ipsw</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">v</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">iPhone2,1_5.0.1_9A405_Restore.ipsw</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Yes, iTunes was trying to download a newer .ipsw file that the one I had downloaded! Of course, iTunes wasn&#8217;t letting me use my .ipsw file because a newer one exists,</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">and Apple doesn&#8217;t allow you install older .ipsw files than the current up to date version.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Now, all I had to do was find a copy of the newer .ipsw file that I could download directly and try and load that.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">I Google&#8217;ed iPhone2,1_5.0.1_9A405_Restore.ipsw and found the following link, which was again on the appldnld.apple.com server, the one that the guy in Apple support</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">swore blind had nothing to do with Apple and was giving me jailbroken software:</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">http://appldnld.apple.com/iPhone4/041-3307.20111109.5tGhu/iPhone2,1_5.0.1_9A405_Restore.ipsw</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">I downloaded this one in the same way as before (via my Linux server) and tried the Shift-Restore option again.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">And guess what? It worked! The new iOS was loaded to my iPhone and I now have an unlocked iPhone that I can use on the O2 network.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">So what do you need to know from all of this. A few things.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">First of all, it is possible to load a locally stored .ipsw file into iTunes. You just need to ensure that it it the most up to date version of the iOS. The Tech</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Support guys in Apple are obviously not told this, and it would probably result in them get users to do all sorts of crazy things with their PCs, which could end up in</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Apple getting sued (&#8221;Woman strangles cat with computer cable while trying to upgrade iPhone&#8221; etc)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Secondly, the iCloud service that Apple has started using to distribute media is obviously very flaky. Presumably, I was directed to a server in Italy because I live</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">in Europe. Users in other parts of the world will no doubt have differing experience, but it certainly seems that the Italian arm of iCould is waaaaay underspec&#8217;ed.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Thirdly, you really should give serious consideration to using something other than an iPhone as your smartphone. The saga I have described above if very common in the</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">iPhone user population, and is unheard for Android users. I myself have an Android. I&#8217;ve updated the operating system on it twice. When it needs an upgrade, it tells</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">me, and I then let it download the upgrade overnight. When I get up in the morning, its done. No hassle.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Also, my hadnset manufacturer, HTC, is quite happy for me to use whatever operating system I want on my phone, which is what I&#8217;d expect, given that I paid for it and</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">own it. The fact that this isn&#8217;t the case with Apple should be all you need to know.</div>
<p>This is a saga, but if you&#8217;ve been tearing your hair out trying to upgrade to version 5.0 of the Apple iOS on your iPhone, its probably worth reading.</p>
<p>Here&#8217;s the background.</p>
<p>Up to Oct 2011, iPhones came installed with iOS 4. Thereafter,  iOS 5.0 was released, and all iPhones sold after this time were sold with iOS 5.0.</p>
<p>To be honest, I don&#8217;t know what the difference between iOS 4 and iOS 5 is. I needed an iPhone to test some mobile websites (I wouldn&#8217;t buy one for personal use under any circumstances, because they&#8217;re just hand candy) and all I know is that somebody gave me an iPhone 3GS phone that they had finished with, and had it unlocked from Vodafone so that I could use it on O2. To complete the unlock process I had to do a restore of the iPhone with iTunes, and iTunes would not let me do this unless I upgraded to iOS 5.</p>
<p>And so the story begins.</p>
<p>When I first attempted to do the upgrade, iTunes happily started downloading the new software. The payload is approx. 700MB, so I knew  it would take a while. However, it crapped out after approx. 50MB, so I started it again. Same thing, crapped out again, and again, and again.</p>
<p>I did a bit of research on this, and was told by the Apple Support web site that I should ensure I had the latest version of iTunes. My version was about 6 months old, so I went ahead and downloaded the new version.</p>
<p>Now when I tried, iTunes wouldn&#8217;t connect at all to the software update server, and just crapped after waiting 30 seconds to connect.</p>
<p>More research.</p>
<p>I discovered that this was a very common problem, and one that not too many were able to resolve. The most common suggested resolution involves editing the local hosts file on your Windows system (C:\windows\system32\drivers\etc\hosts). This is in fact a load of crap.</p>
<p>The reason why this is a suggested solution is because lots of people have installed Jailbreak software on their PCs. This software inserts an entry into the hosts file so that iTunes is directed away from Apple&#8217;s software signing server when doing restores. If that hosts file entry remains, you won&#8217;t be able to contact Apple&#8217;s signing server when you want to do a genuine restore, for a software upgrade for example, so removing the entry helps. However, for people who have never tried to Jailbreak, this is just a waste of time. In fact, such users won&#8217;t even find the rogue entry in their hosts file.</p>
<p>Digging a bit deeper, I discovered that iTunes lets you load the software upgrade from a local source, by pressing the Shift key at the same time as you click Restore.</p>
<p>Hence, if I could get my hands on the .ipsw file (this is the file type for Apple iOS updates) that needed to be loaded, I could bypass any issues Apple was having in connecting to the software upgrade server.</p>
<p>I looked around on the web for a source for such files and found this link:</p>
<p>http://appldnld.apple.com/iPhone4/041-8356.20111012.SQRDT/iPhone2,1_5.0_9A334_Restore.ipsw</p>
<p>The server, appldnld.apple.com, is located in the apple.com Top Level Domain, so I figured this was pretty safe. I opened the link in my browswer and the file started downloading. However, after 50mbs, it crapped out again.</p>
<p>Not wanting to give in on this, I tried a few other things. Suspecting that maybe my local network connection was not robust enough to deal with whatever bumpf was coming out of the Apple network, I logged onto my Linux hosting server in the Amazon EC2 cloud and initiated the download from there with wget. This worked a treat, and I pulled the .ipsw file down onto the server in about 2 minutes.</p>
<p>I then connected to this server using Filezilla and ftp&#8217;ed the file down to my local PC. I used Filezila because it can restart failed downloads without having to restart the download all over again, which is handy for large files like .ipsw files. Witin 30 minutes or so, I had the .ipsw file on my laptap.</p>
<p>(Note: hopefully you won&#8217;t have to do the step above, and have a good enough network connection to get the  .ipsw with your browser)</p>
<p>Feeling certain that I had now conquered the Apple iOS 5.0 upgrade connundrum, I cranked up iTunes and used the Shift-Restore option to load the locally stored .ipsw file. It loaded it up and unpacked it, and then told me it was going to verify the software with Apple.</p>
<p>Bang. Game over. An unknown error has occured (Error 3194).</p>
<p>Not to worry, I thought, lets see what Error 3194 means.</p>
<p><a href="http://support.apple.com/kb/TS3694#error3194" target="_blank">http://support.apple.com/kb/TS3694#error3194</a></p>
<p><em>Error 3194: Resolve error 3194 by updating to the latest version of iTunes. &#8220;This device is not eligible for the requested build&#8221; in the updater logs confirms this is the root of the issue.</em></p>
<p>Excellent. An obscure meaningless error message that Microsoft would have been proud of. I really shouldn&#8217;t have expected anything else.</p>
<p>So back to Google for some more research, and this time I found all sorts of interesting stuff.</p>
<p>Apparently, since the release of the iPhone 3GS, Apple will no longer let you install operating software on your iPhone unless that software is approved (signed) by Apple. This basically applies to everything other than the most up to date version of the iOS. Apple doesn&#8217;t want you loading older versions, because some of these let you do things that Apple doesn&#8217;t want you to do.</p>
<p>That means that whenever you use iTunes to upgrade or restore your iPhone, iTunes will scurry off home to Apple and check that the software you are trying to load is approved for your model of iPhone. This, it seems, is an attempt to stop people jailbreaking their iPhones, because Apple doesn&#8217;t really like people doing things with their hardware that they don&#8217;t approve of. As noted above, this is why jailbreaking software directs you away from Apple&#8217;s signing server, gs.apple.com.</p>
<p>Anyway, armed with this nugget of information, I contacted Vodafone to ensure that my iPhone was definitely unlocked. If Apple was refusing to allow me upgrade it, I figured this must be something to do with the status of the handset with the mobile operator to which it was issued.</p>
<p>Not so. Vodafone said that as far as they were concerned the handset was unlocked, and that I would have to copy Apple for technical support.</p>
<p>I did as I was instructed, and was eventually put through to one of their agents to whom I described my problem. He said that Error 3194 meant that I had security software running on my PC, which I needed to shut down. I assured him I hadn&#8217;t, and directed him to the Apple Support website which stated that Error 3194 concerned the eligibility of phones for upgrade. He then suggested I reboot my PC. I told him I wasn&#8217;t going to do this, and that he was wasting my time.</p>
<p>He got a bit flustered at this and put me through to one of this supervisors. This guy seemed to know a little bit more so I explained the actions I had taken thus far. However, when I told him that I had downloaded the .ipsw file directly from a download server, he sprang to life, and I knew I had made a mistake.</p>
<p>This was not possible to do, he stated, the only way to get the software was through iTunes, and the software that I was now trying to load was obviously a jailbreak image from a 3rd party and that this was why the upgrade wasn&#8217;t working.</p>
<p>I tried to explain to him that the download came from within the apple.com domain, which meant it was legit, and asked why iTunes allowed you to load a locally stored .ipsw file if it was not possible to get such a file directly from Apple.</p>
<p>No, he said, he worked for Apple and he knew what he was talking about.</p>
<p>I tried to convince him still further. I showed him that the appldnld.apple.com resolved to an IP address that was leased to Akamai Technologies, the Edge Caching company that facilitates all of Apple&#8217;s media downloads.</p>
<p>No, he said, he worked for Apple and he knew what he was talking about.</p>
<p>At this point, I let him and off and we went through his checklist for solving software upgrade issues.</p>
<p>We cleared the DNS cache. No difference. We created a new user account under Windows and tried the download using that (!!). No difference. We cleared the comments out of the Windows hosts file and rebooted (!!!!!!). No difference.</p>
<p>I asked him if he knew what server iTunes tried to connect to when doing upgrades, and on what TCP port, so that we could test that independently. He didn&#8217;t know any of these details, and seemed incredulous that he should be expected to know.</p>
<p>He eventually told me something to the effect that I would have to sign up with a new ISP if I wanted to upgrade my iPhone. At this point, I ended the call.</p>
<p>Some good did come of it, however. Having asked the question about the server iTunes connects to, I set about finding this out for myself.</p>
<p>I installed TCPView on my laptop, cranked up the iTunes upgrade process, and had a look at what it was connected to. I found out that it was connected to ip address 82.52.205.135 on HTTP to do the download. This ip address is leased to an Italian Telecoms company, and obviously forms part of Apple&#8217;s new iCloud product.</p>
<p>I also decided to see what Apple was trying to download, and looked in C:\users\garreth\AppData\Roaming\Apple Computer\iTunes\iPhone Software Updates, which is where iTunes keeps the .ipsw files it downloads from Apple.</p>
<p>Here, I found a file called iPhone2,1_5.0.1_9A405_Restore.ipsw.download, which was obviously the partial download of the full .ipsw file.</p>
<p>Now, notice the difference in this file name the the one I originally downloaded.</p>
<p>iPhone2,1_5.0_9A334_Restore.ipsw</p>
<p>v</p>
<p>iPhone2,1_5.0.1_9A405_Restore.ipsw</p>
<p>Yes, iTunes was trying to download a newer .ipsw file that the one I had downloaded! Of course, iTunes wasn&#8217;t letting me use my .ipsw file because a newer one exists, and Apple doesn&#8217;t allow you install older .ipsw files than the current up to date version.</p>
<p>Now, all I had to do was find a copy of the newer .ipsw file that I could download directly and try and load that.</p>
<p>I Google&#8217;ed <em>iPhone2,1_5.0.1_9A405_Restore.ipsw</em> and found the following link, which was again on the appldnld.apple.com server, the one that the guy in Apple support swore blind had nothing to do with Apple and was giving me jailbroken software:</p>
<p>http://appldnld.apple.com/iPhone4/041-3307.20111109.5tGhu/iPhone2,1_5.0.1_9A405_Restore.ipsw</p>
<p>I downloaded this one in the same way as before (via my Linux server) and tried the Shift-Restore option again.</p>
<p>And guess what? It worked! The new iOS was loaded to my iPhone and I now have an unlocked iPhone that I can use on the O2 network.</p>
<p>So what do you need to know from all of this. A few things.</p>
<p>First of all, it is possible to load a locally stored .ipsw file into iTunes. You just need to ensure that it it the most up to date version of the iOS. The Tech Support guys in Apple are obviously not told this, and it would probably result in them get users to do all sorts of crazy things with their PCs, which could end up in Apple getting sued (&#8221;Woman strangles cat with computer cable while trying to upgrade iPhone&#8221; etc)</p>
<p>Secondly, you really should give serious consideration to using something other than an iPhone as your smartphone. The saga I have described above if very common in the iPhone user population, and is unheard of for Android users. I myself have an Android. I&#8217;ve updated the operating system on it twice. When it needs an upgrade, it tells me, and I then let it download the upgrade overnight, directly to the handset using WIFI. When I get up in the morning, its done. No hassle.</p>
<p>Also, my handset manufacturer, HTC, is quite happy for me to use whatever operating system I want on my phone, which is what I&#8217;d expect, given that I paid for it and own it. The fact that this isn&#8217;t the case with Apple, explained <a href="http://www.nightbluefruit.com/blog/2012/01/the-metamorphosis-of-apple/" target="_blank">here</a>, should be all you need to know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2012/01/how-i-solved-the-iphone-restore-error-3194-problem/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>The Metamorphosis of Apple</title>
		<link>http://www.nightbluefruit.com/blog/2012/01/the-metamorphosis-of-apple/</link>
		<comments>http://www.nightbluefruit.com/blog/2012/01/the-metamorphosis-of-apple/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 22:18:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[The Internet]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=160</guid>
		<description><![CDATA[In 1984, Apple first aired their Big Brother commercial at half-time in the SuperBowl. Remember it?

The voiceover recites the following monologue:
Today we celebrate the first glorious anniversary of the Information Purification Directives. We have created, for the first time in all history, a garden of pure ideology: where each worker may bloom, secure from the [...]]]></description>
			<content:encoded><![CDATA[<p>In 1984, Apple first aired their Big Brother commercial at half-time in the SuperBowl. Remember it?</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="420" height="315" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/OYecfV3ubP8?version=3&amp;hl=en_US&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="420" height="315" src="http://www.youtube.com/v/OYecfV3ubP8?version=3&amp;hl=en_US&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The voiceover recites the following monologue:</p>
<p><code>Today we celebrate the first glorious anniversary of the Information Purification Directives. We have created, for the first time in all history, a garden of pure ideology: where each worker may bloom, secure from the pests of any contradictory... thoughts.<br />
Our Unification of Thoughts is more powerful a weapon than any fleet or army on Earth. We are one people: with one will, one resolve, one cause. Our enemies shall talk themselves to death and we will bury them with their own confusion. We shall prevail!</code></p>
<p>Apple&#8217;s message in this commercial was that they were the antidote to this tyranny of thought purification, that they were the guardians of  free expression, that they could empower the individual.</p>
<p>And, for several years, that was true. Apple did bring the PC to the masses, and served to undermine the dominance of the computing megaliths like IBM.</p>
<p>The problem was that as Apple become more of a corporation, with shareholders and sales forecasts, and not least, competitors, it became increasingly difficult to maintain this ideal, and no where was this more true that with the iPhone.</p>
<p>In the beginning, the iPhone was a technological, and commercial, miracle. It was beautiful to look at and use, and Apple sold millions of things, propelling Apple 2.0 into the stratosphere of corporate IT giants.</p>
<p>While the handsets were flying off the shelves, and no one else was making them, Apple weren&#8217;t too concerned with what users did with their phones. Provided they used iTunes to buy music, they could use their hardware, that they owned, to do as they wished. The spirit of 1984 was alive, or at least not dead.</p>
<p>But then, inevitably, the competition arrived, and lots of people started developing software for iPhones, and suddenly Apple released that their users might start using their right to &#8220;free expression&#8221; to do things that weren&#8217;t in sync with the commercial interests of the Apple Corporation.</p>
<p>Apple now faced a choice. They could get on board with the likes of Google, Mozilla, HP, Sun etc and participate freely and enthusiastically in the development of standards based technology, or they could do a Microsoft, and put all their efforts into holding their ground, and hope that clever marketing would make up for the inevitable deficiencies that would result from maintaining a Closed Shop approach to product development.</p>
<p>The crunch came with the release of the Apple iPhone 3GS, the first major revision of the Apple&#8217;s flagship product.</p>
<p>Prior to the 3GS, iPhone users were free to load any sort of operating system onto their iPhone they so wished. There were numerous variations out there, which could be loaded via a shortcut in iTunes. This allowed users to do things on their iPhone (that they had bought and paid for) that were not possible with the software loaded by Apple.</p>
<p>This changed with the 3GS. From that point on, it was only possible to load an operating system to your iPhone if that software was signed by Apple. A new version of iTunes was released, which checked the software you were trying to load, and if that was not approved by Apple, iTunes would not complete the installation to your phone.</p>
<p>The significance of this is probably lost on most iPhone users, but it is significant none the less.</p>
<p>For millions of users worldwide, Apple now has complete control of what software they use on their hardware.</p>
<p>Imagine if this were the case with a PC that you bought from PC World. Imagine if you were not allowed to install any software on that PC unless it was approved by a private company like Microsoft?</p>
<p>Now, go back and watch the SuperBowl commercial again.</p>
<p>Which protagonist reminds you more of the Apple Corporation in 2012? The girl with the sledgehammer, or the face on the screen?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2012/01/the-metamorphosis-of-apple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon EC2 Documentation confusion</title>
		<link>http://www.nightbluefruit.com/blog/2011/12/amazon-ec2-documentation-confusion/</link>
		<comments>http://www.nightbluefruit.com/blog/2011/12/amazon-ec2-documentation-confusion/#comments</comments>
		<pubDate>Sun, 04 Dec 2011 12:26:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=154</guid>
		<description><![CDATA[I recently received a notification from Amazon EC2 to the effect that one of my server instances was running on degraded hardware, and that if I didn&#8217;t take action, this would result in loss of the instance.
The Cloud Computing service offered by Amazon EC2 is a great service, but it does throw up new challenges [...]]]></description>
			<content:encoded><![CDATA[<p>I recently received a notification from Amazon EC2 to the effect that one of my server instances was running on degraded hardware, and that if I didn&#8217;t take action, this would result in loss of the instance.</p>
<p>The Cloud Computing service offered by Amazon EC2 is a great service, but it does throw up new challenges that do not exist in more traditional hosting environments. The tendency for server instances to simply &#8216;disappear&#8217; is one of them, and you need to have your Cloud Computing setup well organised to ensure that disappearing instances don&#8217;t adversely impact on your business.</p>
<p>In this case, I was advised that if my instances was EBS-backed, all I had to do was stop and start my instance and that this would migrate my instance to stable hardware.</p>
<p>I try to use EBS-backed instances for all my servers in Amazon EC2, so this seemed like a fairly straightforward solution.</p>
<p>However, when I consulted the <a href="http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/index.html?starting-stopping-instances.html" target="_blank">advisory link</a> that Amazon provided in the relevant email, I was a little less certain. This states:</p>
<p><span style="font-family: monospace;">If an instance reboots (intentionally or unintentionally), the data on the instance store will survive.</span></p>
<p><code>However, under the following circumstances the data in the instance store will be lost:</code></p>
<p><code>o Failure of an underlying drive.</code></p>
<p><code>o Running an instance on degraded hardware.</p>
<p>o <strong>Stopping an Amazon EBS-backed instance.</strong></p>
<p>o Terminating an instance.</p>
<p></code></p>
<p>To me, that suggested that if I stopped an EBS-backed instance, I may incur some data loss. That didn&#8217;t fit with my previous experience of using EBS-backed instances, which I&#8217;ve stopped and started frequently, without issue.</p>
<p>Any way, I went ahead and did the stop/start and everything worked out fine, which left me wondering what the warning was about.</p>
<p>The answer is this.</p>
<p>Whenever you deploy an Amazon EC2 instance, whether it is EBS-backed or Instance Store-backed, it comes with ephemeral storage. What differentiates an EBS-backed instance from an Instance Store-backed instance, is the nature of its root volume, not the totality of its storage.</p>
<p>That means that you can have an EBS-backed instance with an EBS root volume, but which might use ephemeral storage for other purposes, or in other words, and EBS-backed instance doesn&#8217;t mean that this instances uses only EBS storage.</p>
<p>This is the situation in the document referenced above. If you have an EBS-backed instance that uses its allocated ephemeral storage, and you stop/start that instance, the data on the ephemeral storage will be lost.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2011/12/amazon-ec2-documentation-confusion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook Apps and the Same Origin Policy</title>
		<link>http://www.nightbluefruit.com/blog/2011/11/facebook-apps-and-the-same-origin-policy/</link>
		<comments>http://www.nightbluefruit.com/blog/2011/11/facebook-apps-and-the-same-origin-policy/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 12:40:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=151</guid>
		<description><![CDATA[Over recent months, Facebook have become a lot stricter in relation to the use of secure URLs for applications presented in the App Canvas and on Page Tabs.
The bottom line in this is that you need to serve your Facebook application content from a secure (https) URL. You can have your app set up to [...]]]></description>
			<content:encoded><![CDATA[<p>Over recent months, Facebook have become a lot stricter in relation to the use of secure URLs for applications presented in the App Canvas and on Page Tabs.</p>
<p>The bottom line in this is that you need to serve your Facebook application content from a secure (https) URL. You can have your app set up to serve on both http and https, but if  you don&#8217;t have this https set up correctly, any Facebook user who has Secure Browsing switched on will not be able to use your application.</p>
<p>My reaction to this was to convert all my applications to use https for all connectivity, so as to remove any uncertainty in this regard.</p>
<p>I figured that the users browser would just communicate with my web server over https, regardless of whether the Facebook use was using Secure Browsing or not.</p>
<p>However, there is a big problem with this if you use AJAX calls in your application.</p>
<p>I had set up all my AJAX calls to use https, but if the viewing Facebook user <strong>isn&#8217;t </strong>using Secure Browsing (ie they are connecting to your application over http), you are going to fall foul of Browser restrictions arising from the <a href="http://en.wikipedia.org/wiki/Same_origin_policy" target="_blank">Same Origin Policy</a>.</p>
<p>This policy is designed to prevent XSS attacks, in that it prevents Javascript from making calls to URLs domains that are not the same as the URL domain the user is viewing. <strong>Crucially, this includes the protocol which is used.</strong></p>
<p>That means that if your Facebook user is connecting to <strong>http</strong>://facebook.nightbluefruit.com for general application content, and the application makes an AJAX call to <strong>https</strong>://facebook.nightbluefruit.com, the browser will send the request but will refuse to receive the response.</p>
<p>To overcome this, you should really set up your AJAX URLs based on the protocol used to connect to your application. You can use the $_SERVER['HTTPS'] special variable to do this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2011/11/facebook-apps-and-the-same-origin-policy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turning the JQuery Lightbox into a Slideshow</title>
		<link>http://www.nightbluefruit.com/blog/2011/09/turning-the-jquery-lightbox-into-a-slideshow/</link>
		<comments>http://www.nightbluefruit.com/blog/2011/09/turning-the-jquery-lightbox-into-a-slideshow/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 22:43:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=120</guid>
		<description><![CDATA[The JQuery Lightbox Plugin is probably one of the most commonly used lightboxes on the Internet.
And for good reason. Its simple to use, both for the developer and the user, and it works in pretty much any browser you can think of.
However, it has one minor deficiency in comparison to other lightboxes: it doesn&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://leandrovieira.com/projects/jquery/lightbox/" target="_blank">JQuery Lightbox Plugin</a> is probably one of the most commonly used lightboxes on the Internet.</p>
<p>And for good reason. Its simple to use, both for the developer and the user, and it works in pretty much any browser you can think of.</p>
<p>However, it has one minor deficiency in comparison to other lightboxes: it doesn&#8217;t have a slide show feature.</p>
<p>I recently set up a site with this plugin, and while the customer was happy, they did want a slideshow. I contemplated installing a different lightbox, but there was pain involved in this too, so I set about trying to add slideshow functionality to the existing JQuery Plugin.</p>
<p>This <a href="http://www.ajaxblender.com/howto-extend-jquery-lightbox-plugin-with-slideshow.html" target="_blank">post</a> got me started, but it was only half the battle, as it didn&#8217;t include any functionality to stop and start the slideshow, which is what people would normally expect. So I made my own modifications to the plugin ,and here they are.</p>
<p>So, we&#8217;re editing the actual plugin Javascript file that we load in our HTML header. The logic behind the code may or may not be apparent to you, but basically, we are initiating and terminating a Javascript setTimetout function that calls functions use by the Lightbox. Off we go&#8230;</p>
<p>First off, add some settings:</p>
<pre>$.fn.lightBox = function(settings) {
		// Settings to configure the jQuery lightBox plugin how you like
		settings = jQuery.extend({
			//SLIDESHOW
		        slideshow: true,
		        nextSlideDelay: 4000,
                        [....]</pre>
<p>Next, include the Slideshow in the initiate function:</p>
<pre>	function _initialize() {
		//SLIDESHOW
		if(settings.slideshow){
		  var tmFunc = function(){ _doSlideShow(); };
		  t = setTimeout(tmFunc, settings.nextSlideDelay);
		}
                [....]</pre>
<p>Next, add a new function to the Lightbox, which creates the slidehow:</p>
<pre>		function _doSlideShow(){
		     settings.activeImage++;
		     if(settings.activeImage &gt;= settings.imageArray.length){
			  settings.activeImage = 0;
		     }
		     _set_image_to_view();
		     var tmFunc = function(){ _doSlideShow(); };
		     if($('#jquery-lightbox').length &gt; 0){
			  t = setTimeout(tmFunc, settings.nextSlideDelay);
		     }
		};</pre>
<p>The above will give you the guts of the slideshow, but now you need the Pause/Unpause functionality.</p>
<p>First, find the _set_interface function and add some HTML to create a Pause link.</p>
<pre><a id="lightbox-secNav-btnPause" href="#">Pause</a></pre>
<p>This will appear in the white navigation section that unfurls below each image. You may want to update Lightbox CSS file too to make this nice and neat.</p>
<p>Now, add another new click event function to the _set_interface function. This controls the Pause/Unpause.</p>
<pre>	$('#lightbox-secNav-btnPause').click(function() {
		if (timer_is_on &gt; 0) {
			clearTimeout(t);
			$(this).html('Unpause');
			timer_is_on = 0;
		} else {
			var tmFunc = function(){ _doSlideShow(); };
			t = setTimeout(tmFunc, settings.nextSlideDelay);
			$(this).html('Pause');
			timer_is_on = 1;
		}
		return false;
	});</pre>
<p>You also need to create 2 variables at the lightbox object level (ie outside the _set_interface function) to control the state of the slideshow, to say if it is paused or unpaused.</p>
<pre>var t;
var timer_is_on=1;</pre>
<p>Now, the last part. The Prev and Next click functions are still part of the Lightbox in Slideshow mode. It would be my expectation that if I had paused the slideshow, and then clicked Next, that the slideshow would revert back to unpaused mode. Therefore, I also need to add some extra functionality to the Prev and Next click events. This occurs in the _set_navigation function, which is reproduced in its entirety below:</p>
<pre>function _set_navigation() {
	$('#lightbox-nav').show();

	// Instead to define this configuration in CSS file, we define here. And itÅ½s need to IE. Just.
	$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });

	// Show the prev button, if not the first image in set
	if ( settings.activeImage != 0 ) {
		if ( settings.fixedNavigation ) {
			$('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
				.unbind()
				.bind('click',function() {
                                //SLIDESHOW
				clearTimeout(t);
				var tmFunc = function(){ _doSlideShow(); };
				t = setTimeout(tmFunc, settings.nextSlideDelay);
				$('#lightbox-secNav-btnPause').html('Pause');
				timer_is_on = 1;
                                //
				settings.activeImage = settings.activeImage - 1;
				_set_image_to_view();
				return false;
			});
	} else {
		// Show the images button for Next buttons
		$('#lightbox-nav-btnPrev').unbind().hover(function() {
			$(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
			},function() {
				$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
			}).show().bind('click',function() {
                                //SLIDESHOW
				clearTimeout(t);
				var tmFunc = function(){ _doSlideShow(); };
				t = setTimeout(tmFunc, settings.nextSlideDelay);
				$('#lightbox-secNav-btnPause').html('Pause');
				timer_is_on = 1;
                                //
				settings.activeImage = settings.activeImage - 1;
				_set_image_to_view();
				return false;
			});
		}
	}

	// Show the next button, if not the last image in set
	if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
		if ( settings.fixedNavigation ) {
			$('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' }
				.unbind()
				.bind('click',function() {
                                        //SLIDESHOW
					clearTimeout(t);
					var tmFunc = function(){ _doSlideShow(); };
					t = setTimeout(tmFunc, settings.nextSlideDelay);
					$('#lightbox-secNav-btnPause').html('Pause');
					timer_is_on = 1;
                                        //
					settings.activeImage = settings.activeImage + 1;
					_set_image_to_view();
					return false;
				});
		} else {
			// Show the images button for Next buttons
			$('#lightbox-nav-btnNext').unbind().hover(function() {
				$(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
			},function() {
				$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
			}).show().bind('click',function() {
                                //SLIDESHOW
				clearTimeout(t);
				var tmFunc = function(){ _doSlideShow(); };
				t = setTimeout(tmFunc, settings.nextSlideDelay);
				$('#lightbox-secNav-btnPause').html('Pause');
				timer_is_on = 1;
                                //
				settings.activeImage = settings.activeImage + 1;
				_set_image_to_view();
				return false;
			});
		}
	}
	// Enable keyboard navigation
	_enable_keyboard_navigation();
}</pre>
<p>You can download a copy of the converted file from <a href="http://nightbluefruit.com/blog/download/jquery.lightbox-0.5.slideshow.js">here</a>. You can view a demo on any post on <a href="http://gigape.com" target="_blank">gigape.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2011/09/turning-the-jquery-lightbox-into-a-slideshow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiple JPlayers on the same page</title>
		<link>http://www.nightbluefruit.com/blog/2011/08/multiple-jplayers-on-the-same-page/</link>
		<comments>http://www.nightbluefruit.com/blog/2011/08/multiple-jplayers-on-the-same-page/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 15:02:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=115</guid>
		<description><![CDATA[JPlayer is a very nice Javascript library that allows you to create HTML5 media players in your HTML pages.
http://www.jplayer.org/
The site creates pretty decent documentation and examples, but I recently came to a dead halt when I had to create multiple audio players on the same page.
The JPlayer site provides an example of this, but it [...]]]></description>
			<content:encoded><![CDATA[<p>JPlayer is a very nice Javascript library that allows you to create HTML5 media players in your HTML pages.</p>
<p><a href="http://www.jplayer.org/">http://www.jplayer.org/</a></p>
<p>The site creates pretty decent documentation and examples, but I recently came to a dead halt when I had to create multiple audio players on the same page.</p>
<p>The JPlayer site provides an example of this, but it isn&#8217;t exactly clear how it works. This post explains exactly what you have to do.</p>
<p>First thing to understand:</p>
<p>In HTML5, when you want to create a media player, you either use the default interface or create a custom interface. If you want to create a custom interface, you have to create separate HTML for the interface. The default JPlayer installation includes a custom interface, so if you want to create multiple players, you have to create multiple interfaces, each of which must be carefully constructed from the point of view of the DOM and CSS.</p>
<p>Each of your interfaces will have a DOM Element ID, which of course must be unique. That ID determines which players activates when a control in that interface is clicked (play, stop, pause etc). If you don&#8217;t have this correctly set up, either multiple players will start at once, or nothing will happen at all.</p>
<p>If you only create one player on a page, the default Interface Element ID that JPlayer looks for is &#8220;#jp_interface_1&#8243;.</p>
<p>If you want to create multiple players, you need to tell each JPlayer instance which interface it is associated with.</p>
<p>To do this, you specify the cssSelectorAncestor property for each player instance you create:</p>
<p>eg</p>
<pre>function js_audioPlayer(file,location) {
	jQuery("#jquery_jplayer_" + location).jPlayer( {
	    ready: function () {
	      jQuery(this).jPlayer("setMedia", {
		mp3: file
	      });
	    },
	    cssSelectorAncestor: "#jp_interface_" + location,
	    swfPath: "/swf"
	  });
return;
}</pre>
<p>In this example, I&#8217;m passing a file and location variable into a wrapper function, which then constructs the player.</p>
<p>In my script, I dynamically create Player DIVs with IDs:</p>
<p>jquery_jplayer_1<br />
jquery_jplayer_2<br />
jquery_jplayer_3<br />
etc</p>
<p>and Interface DIVs with IDs:</p>
<p>jp_interface_1<br />
jp_interface_2<br />
jp_interface_3<br />
etc</p>
<p>and then run the js_audioPlayer() javascript function as many times as I want players:</p>
<p>js_audioPlayer(&#8217;file1.mp3&#8242;,1);<br />
js_audioPlayer(&#8217;file2.mp3&#8242;,2);<br />
js_audioPlayer(&#8217;file3.mp3&#8242;,3);<br />
etc</p>
<p>More: <a href="http://www.jplayer.org/latest/developer-guide/#jPlayer-predefined-css-selectors">http://www.jplayer.org/latest/developer-guide/#jPlayer-predefined-css-selectors</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2011/08/multiple-jplayers-on-the-same-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

