Developers Harness New Accelerometer and Gyroscope Support in Mobile Safari

Soon after the launch of iOS 4.2 late last month, it was discovered by mobile programmer Maximiliano Firtman that Apple had updated the iOS version of Safari to support a number of new HTML5 and W3C standards, one of the most interesting of which was support for using devices' accelerometer and gyroscope features right in the browser.

As you may know, all iOS devices have accelerometer sensors (plus magnetometer and gyroscope on some devices). However, as web developers, we didnt have access to such sensors until now. Safari now supports the DeviceOrientation API (W3C draft). Looking at the available objects, it seems that all the API is fully supported (including ondeviceorientation and ondevicemotion events). . .

Firtman coded a quick demo (functional on iOS 4.2 devices only) of the new capabilities, allowing users to roll a ball around the browser window using accelerometer input.


With the new support not being broadly advertised by Apple, it has taken a little while for developers to create truly functional implementations of the features. But as noted by The Next Web, Occipital, the company behind the popular 360 Panorama photo application, has now harnessed the features to provide immersive viewing of panorama photographs.

101426 360 panorama gyroscope

As an example of the feature in action, this link to a panorama utilizes traditional click-and-drag panorama navigation when accessed through a desktop or notebook browser, but on an iOS 4.2 device users can pan around the photograph simply by moving their device to mimic experiencing the scene as if they were there.

After you capture a panorama with the 360 Panorama app, one can upload the picture, getting the URL to view the experience in Safari Mobile. In essence, the raw jpeg image files are hosted on either TwitPic or yFrog after a user uploads a panorama through 360 Panorama.

After launching the URL in Safari Mobile, one will see "Gyro ON" and simply by moving your phone in any direction, you can have a complete panoramic experience using the photo you've captured. Moreover, experiences can be viewed on TwitPic, or the location of the experience using Apple's "Maps" app.

360 Panorama is currently on sale for $0.99.

Related Forum: iPhone

Popular Stories

iphone 17 models

No iPhone 18 Launch This Year, Reports Suggest

Thursday January 1, 2026 8:43 am PST by
Apple is not expected to release a standard iPhone 18 model this year, according to a growing number of reports that suggest the company is planning a significant change to its long-standing annual iPhone launch cycle. Despite the immense success of the iPhone 17 in 2025, the iPhone 18 is not expected to arrive until the spring of 2027, leaving the iPhone 17 in the lineup as the latest...
duolingo ad live activity

Duolingo Used iPhone's Dynamic Island to Display Ads, Violating Apple Design Guidelines

Friday January 2, 2026 1:36 pm PST by
Language learning app Duolingo has apparently been using the iPhone's Live Activity feature to display ads on the Lock Screen and the Dynamic Island, which violates Apple's design guidelines. According to multiple reports on Reddit, the Duolingo app has been displaying an ad for a "Super offer," which is Duolingo's paid subscription option. Apple's guidelines for Live Activity state that...
Clicks Communicator Feature

'Clicks Communicator' Unveiled — Will You Carry This With Your iPhone?

Friday January 2, 2026 6:35 am PST by
The company behind the BlackBerry-like Clicks Keyboard accessory for the iPhone today unveiled a new Android 16 smartphone called the Clicks Communicator. The purpose-built device is designed to be used as a second phone alongside your iPhone, with the intended focus being communication over content consumption. It runs a custom Android launcher that offers a curated selection of messaging...
apple intelligence black

Report: Apple's AI Strategy Could Finally Pay Off in 2026

Tuesday December 30, 2025 9:01 am PST by
Apple's restrained artificial intelligence strategy may pay off in 2026 amid the arrival of a revamped Siri and concerns around the AI market "bubble" bursting, The Information argues. The speculative report notes that Apple has taken a restrained approach with AI innovations compared with peers such as OpenAI, Google, and Meta, which are investing hundreds of billions of dollars in data...
apple fitness 2026 1

Apple Teases 'Something Big' Coming Soon to Apple Fitness+

Tuesday December 30, 2025 2:11 pm PST by
The Apple Fitness+ Instagram account today teased that the service has "big plans" for 2026. In a video, several Apple Fitness+ trainers are shown holding up newspapers with headlines related to Apple Fitness+. What's Apple Fitness+ Planning for the New Year? Something Big is Coming to Apple Fitness+ The Countdown Begins. Apple Fitness+ 2026 is Almost Here 2026 Plans Still Under ...
Low Cost MacBook Feature A18 Pro

Low-Price 12.9-Inch MacBook With A18 Pro Chip Reportedly Launching Early This Year

Friday January 2, 2026 9:08 am PST by
Apple plans to introduce a 12.9-inch MacBook in spring 2026, according to TrendForce. In a press release this week, the Taiwanese research firm said this MacBook will be aimed at the entry-level to mid-range market, with "competitive pricing." TrendForce did not share any further details about this MacBook, but the information that it shared lines up with several rumors about a more...
Mac Pro Feature Blue

What's Happening With the Mac Pro?

Wednesday December 31, 2025 9:59 am PST by
Apple hasn't updated the Mac Pro since 2023, and according to recent rumors, there's no update coming in the near future. In fact, Apple might be finished with the Mac Pro. Bloomberg recently said that the Mac Pro is "on the back burner" and has been "largely written off" by Apple. Apple apparently views the more compact Mac Studio as the ideal high-end pro-level desktop, and it has almost...
Apple Fitness Plus hero

Apple Announces New Fitness+ Workout Programs, Strava Challenge, and More

Friday January 2, 2026 6:43 am PST by
Apple today announced a number of updates to Apple Fitness+ and activity with the Apple Watch. The key announcements include: New Year limited-edition award: Users can win the award by closing all three Activity Rings for seven days in a row in January. "Quit Quitting" Strava challenge: Available in Strava throughout January, users who log 12 workouts anytime in the month will win an ...