Like most people, we were pretty excited when the iPhone announcement was made. But that's not exactly a lock, because I was also excited for the Newton announcement and we all know how that turned out (and the General Magic announcement too, but don't start me on that). We were then disappointed again when we found out it didn't have GPS. All in the name of price and size I suppose, and I'm sure they will fix it soon enough.
The idea of being able to walk around with the power of Povo and the beauty of the iPhone was appealing, and so we set to hacking right away. It was pretty simple to get our web app working with the phone, since it's "mostly" just the Safari browser (it doesn't have some important things like fixed positioning or meaningful keyboard interaction support). You can see that app
here from the phone or from Safari/Firefox.
So, when the toolchain came out that allowed us to write "real apps" for the phone, we were aiming for two big improvements to the web app:
- GPS - we have cell towers and wifi, and in major metropolitan areas the density of WiFi and the availability of good databases of access points makes GPS by Wifi a real option.
- More speed - We hoped by loading HTML and images and stuff onto the phone it would be a lot snappier. In the end, it's snappier, but still not as good as I'd like.
We wanted to still use the web app generally. In other words, we didn't want to write a full blown iPhone app for the interface side, because we want the flexibility of HTML rather than baked UI code (I would argue you almost always want this, but for Povo, being a Wiki, it is crucial). So the first task was hosting Safari inside a view in our application.
This wasn't easy. Once we got that working, we used the information from the
iPhone Wireless project to get a list of WiFi access point identifiers and their associated signal strengths. This allows reasonably precise (often ~100 feet) GPS.
We continue to notice some strange behavior with the WiFi functions, mostly around failing after the phone wakes up from sleep. Our current solution is to merely retry a few times, but this goes against the "more speed" part because it often takes 5-10 seconds to get a lock.
We've also added the ability to contribute from the iPhone, namely graffiti entries and photos. The photos were a fun project, and
here's a discussion of how to get photos from the phone.