How I wrote an iPhone application
An introduction to the world of mobile Web 2.0
If an El Reg hack can write an iPhone application then anyone can, so we thought we'd have a go and pass on our experience in the hope that others can build something more useful.
In proper Web 2.0 fashion we decided to create an application which would achieve nothing and have no commercial potential. Therefore, our application would load The Register website and parse its contents to remove all references to the ubiquitous iPhone, replacing the term with a string of the user's choice.
First thing was to download the iPhone documentation from the Apple Developer Connection, which required us to sign up with a valid email address and left us with a small pile of pdf documents to read.
We also needed to download the latest version of Safari - you're supposed to be able to develop using Safari then deploy straight onto an iPhone, though life is not really that simple, and that does need XP or Vista (or a nice Mac, but our budget wouldn't stretch).
All our development was done using PFE - we eschewed more complex environments for what should be a bit of quick text editing.
Initially, our frameset only contained a single frame, to load the El Reg pages into, but we had to add a second frame when it became clear that the iPhone's "back" button wasn't going to operate as we would have liked. But even with the second frame for the menu bar our HTML page managed to keep it simple:
Then it was just a matter of inserting our script into the header with a function called "startUp" to be run when the page had loaded, the script is listed in its entirety at the end of this article. blank1.html is just a holding text, while menubar.html contains our additional back button and an option to change the replacement text.
Sponsored: 2016 Cyberthreat defense report