Datasheet
6
Chapter 1: Introducing Safari/WebKit Development for iPhone 3.0
Figure 1-7: Web app or native app?
It’s hard to tell.
What’s New in iPhone OS 3.0
for Web App Developers
There are several new capabilities available to Web app developers with the release of iPhone OS 3.0
and Safari 4.0 iPhone. These are highlighted here:
Geolocation: ❑ Safari on iPhone now supports HTML 5 geolocation capabilities, which enable
JavaScript to interact with iPhone’s GPS service to retrieve the current location of the iPhone
(see Figures 1-8 and 1-9). As a result, you can create apps that can broadcast the location of a
GPS-enabled iPhone.
Google is using this capability with its Latitude service for sharing your location with your friends.
HTML 5 Media Tags: ❑ The newest release of Safari on iPhone supports HTML 5
video and
audio tags for embedding video and audio content in Web pages. These new elements elimi-
nate the need for complicated
embed and object tags for embedding multimedia elements and
allow you to utilize a powerful JavaScript API. What’s more, because iPhone doesn’t support
Flash, you can use the
video tag to embed QuickTime MOV fi les.
Safari is the fi rst major browser to provide full support for HTML 5 media tags; therefore, you
have to be careful in their usage on standard Web sites because other browsers may not support
it yet. However, because you are creating an app specifi cally for the iPhone, you can make full
use of these tags.
CSS animation and effects: ❑ The new release of Safari supports CSS animation, which enables
you to manipulate elements in various ways, such as scaling, rotating, fading, and skewing.
Safari on iPhone also supports CSS effects, which enable you to create gradients, masks, and
refl ections entirely through CSS.
49667c01.indd 649667c01.indd 6 10/9/09 8:04:23 AM10/9/09 8:04:23 AM