I recently started doing some iPhone dev with PhoneGap. I’m using the Simulator included with Xcode and the iPhone SDK because it makes debugging faster and easier than an actual iPhone, and also I don’t have an actual iPhone. I do have an iPod Touch, but it’s lacking a lot of the features that make mobile apps cool, so I’m stuck with the Simulator for now. At any rate, I realized quickly that having a facility to browse the Safari-created SQLite databases would simplify my life profusely.
Assuming you’re on a Mac (and I’m not sure how you’d be using the iPhone Simulator if you weren’t), the path to the Simulator’s SQLite databases is
~/Library/Application Support/iPhone Simulator/User/Library/Webkit/Databases
And to browse the .db files in there you can use the cross-platform FOSS SQLite Database Browser.
I love it when a plan comes together.
Check out the Ripple Emulator (http://ripple.tinyhippos.com/).
It’s a Chrome extension built by a very awesome Kitchener company (Tiny Hippos) for mobile developers to test their shit on a huge number of devices. One of the recent releases added PhoneGap support.
Thanks for the recommend Rob. I just installed it, but it seems to be breaking for some reason. Probably the dev version of Chrome I’m using. Anyway, posted on their forums. Will likely write something about it here if I can get it working and find it useful.
Are you loading a file:/// url or from a web server?
I think it only works from a webserver (even a locally running one works fine), and the messaging around enabling it doesn’t really mention that which is pretty awkward. And I should have mentioned, since that tripped me up, too.
I worked around it by creating a symlink from /Library/WebServer/Documents to your dev directory and was good to go.
Web server. MAMP specifically. I put all my projects under my htdocs dir so that they’re easily web-browseable.