5

If you look at some google pages (ie. mail.google.com/tasks) on the iphone they look a lot like native iphone apps. Does anyone know how they got it to mimic the look of the native apps and is there a resource that describes how to do it?

Also does one have access to any of the iphone hardware data ( ie. accelerometer data, gps information ) from the javascript on the clients safari browser? I imagine not but I thought I would ask anyway.

stephenmm
  • 2,640
  • 3
  • 30
  • 48
  • I found a stackoverflow thread that asks essentially the same question: http://stackoverflow.com/questions/215390/available-iphone-web-application-javascript-ui-library-frameworks Sorry for the duplication, I didn't see it initially. – stephenmm Oct 01 '09 at 14:56
  • Well I found a link that states that at least GPS information is available through a web app! http://www.ismashphone.com/2009/07/iphone-safari-webapps-now-have-gps-functionality.html This is great news but I am still unsure if we can get access to other information (compass, accelerometer, etc... ) – stephenmm Oct 01 '09 at 15:29

2 Answers2

4

This article talks about how you can make your website iPhone friendly : http://www.hanselman.com/blog/MakeYourWebsiteMobileAndIPhoneFriendlyAddHomeScreenIPhoneIconsAndAdjustTheViewPort.aspx

To answer your second question I would like to direct you towards "Phonegap" (http://phonegap.com/) which is an open source development tool for building fast, easy mobile apps with JavaScript and supports accessing geolocation and accelerometer data for the iPhone.

Himanshu
  • 482
  • 2
  • 7
  • PhoneGap, of course is only for building apps. Doesn't help you build web pages intended for Mobile Safari. – Nosredna Oct 01 '09 at 00:25
  • Hi, this is not a comment to this answer, but we've noticed you deleted a lot of your answers recently. Unless the answers are flat out wrong, outdated, or similarly bad, try to avoid that. If you have questions, feel free to ask. – Lasse V. Karlsen May 24 '11 at 11:46
4

A Google search for "HTML iphone" yields heaps of answers. You need to pay close attention to the conditional HTML for the iphone. This article seems to cover a lot of information needed for the look/feel: iphone-development-12-tips

I also stumbled across an API that might be of some use: http://code.google.com/p/iui. They have some live demos:

cmroanirgo
  • 7,297
  • 4
  • 32
  • 38