Environment

From IPhone Developers' Wiki

Jump to: navigation, search

Contents

[edit] Testing

Testing webpages over a LAN works as expected. There have been reports of issues with zero conf addresses (hostname.local)

[edit] Screen Size

[edit] Viewable resolution

Portrait: 320 x 356
 (320 x 416 without address bar) Landscape: 480 x 208 (480 x 268 without address bar)

document.width = window.innerWidth = 980px;

Image:viewport_dimensions.png

[edit] User Agent

The Safari user agent string for iPhone is similar to the user agent string for Safari on the other platforms except for two differences: it contains an iPhone platform name and the mobile version number.

Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3

The platform string is: (iPhone; U; CPU like Mac OS X; en)

The version string is: Version/3.0 Mobile/1A543a Safari/419.3

The marketing version (Version/3.0) is included in Safari on other platforms. Therefore, you can use it to track usage statistics across all platforms.

For iPod Touch user agent string is:

Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A100a Safari/419.3


For more information on the user agent and object detection, see: http://trac.webkit.org/projects/webkit/wiki/DetectingWebKit http://developer.apple.com/internet/webcontent/objectdetection.html http://developer.apple.com/internet/safari/faq.html#anchor2

Personal tools