I have recently been developing with PhoneGap, the cross platform development kit for mobile devices (essentially a browser window that lets you run HTML 5 web sites as an App)
So I developed the app on my Windows PC, copying the files across to my trusty Mac to deploy to iPhone. There are some subtle differences in the way Safari and Chrome render, so it was important to test across both devices. I kept coming across intermittent problems on the iPhone however, with the deviceready event not firing. What was going on?
Due to the negligible amount of documentation available on PhoneGap’s site (Hey – I am used to having MSDN at my disposal!) I found myself digging through the sourcecode to work out how on earth I could do things. I noticed a lot of Android specific code, but no iPhone code. How odd. I then checked in my BlackBerry project folder and noticed the file was much bigger.
Yes, folks – the various phonegap.0.9.4.js files – despite having the same filename are totally different for each OS implementation. Not once in the many hours spent reading PhoneGap’s web site did I see anything that told me that. Turned out my iPhone problems were because I was deploying an Android version of PhoneGap to the iPhone. Having the same filename is confusing and they seem destined to get used in place of one and other. I suspect many others will have tried to deploy the wrong file to the wrong device.
I would really like to see the folks at PhoneGap have a more sensible naming convention. e.g. phonegap_android.0.9.4.js? It would be apparent straight away the it was specific to that OS, and avoid what amounts to DLL hell issues for mobile apps.
Of course a file is a file, and I can rename it to whatever I like (and probably will) – but it’s nice not to have to (who renames jQuery?) and would certainly make learning the platform easier.
Just discovered that by repeatedly pressing CTRL SHIFT + V you can cycle through your clipboard history. Really handy, I am always copying something, then I hit CTRL + C by accident and end up copying a blank line.
This will save me time.