X

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.

Joe Aimonetti MacFixIt Editor
Joe is a seasoned Mac veteran with years of experience on the platform. He reports on Macs, iPods, iPhones and anything else Apple sells. He even has worked in Apple retail stores. He's also a creative professional who knows how to use a Mac to get the job done.
Joe Aimonetti

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.