iOS 4.2.1 Mobile Safari adds goodies for developers

With the release of Apple's iOS 4.2.1 software update, developers gain access to several new goodies including accelerometer and gyroscope support, WebSockets support through HTML5, printing support, new JavaScript data types, and enhanced SVG and Canvas support.

With the release of Apple's iOS 4.2.1 software update, developers gain access to several new goodies including accelerometer and gyroscope support, WebSockets support through HTML5, printing support, new JavaScript data types, and enhanced SVG and Canvas support.

By supporting the DeviceOrientation API, Web developers can now use the accelerometer (and gyroscope) when developing Web applications and games. This opens the door for a much more robust environment on the Web and lets developers experiment freely (and continually) without the need to wait for Apple's App Store approval process.

Screenshot by Joe Aimonetti

Web developer and blogger Maximiliano Firtman has provided a quick demonstration of the DeviceOrientation API--a "move the ball" demonstration, available here on iOS devices running iOS 4.2.1.

Firtman says that WebSockets is another major update. "WebSockets is a W3C HTML5 API currently in draft that allows JavaScript to use an open, bidirectional full-duplex connection to a server using TCP sockets," he said. "This is a great news for chat and real-time applications that will reduce AJAX periodic calls."

Developers will also be able to access the new AirPrint feature in iOS 4.2.1, allowing for wireless printing directly from Web pages through the new Safari print dialog.

As a Web developer, what's your favorite feature update in Mobile Safari? Let me know in the comments!


Be sure to follow MacFixIt on Twitter and contribute to the CNET Mac forums.

 

Join the discussion

Conversation powered by Livefyre

Don't Miss
Hot Products
Trending on CNET

HOT ON CNET

Up for a challenge?

Put yourself to the real tech test by building your own virtual-reality headset with a few household items.