Developers Harness New Accelerometer and Gyroscope Support in Mobile Safari - GeekWebGuides
Skip to Content

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

M5 MacBook Pro

RIP, MacBook Ultra

Monday October 19, 2026 9:37 am PDT by
Apple today sent out invites for an experience in Los Angeles on Wednesday, October 28, and the "Pro and tell" tagline on the invitation likely means that the rumored MacBook models with touch-enabled OLED displays will stick with MacBook Pro branding instead of the once-rumored "MacBook Ultra" name. The long-rumored "iPhone Ultra" ended up being named iPhone Duo, so speculation that Apple...
iPhone Duo Trio

Here's What Apple's Apps Look Like on the iPhone Duo

Tuesday October 20, 2026 11:12 am PDT by
With just three days to go until the iPhone Duo is released, Apple is getting ready for the launch. Behind the scenes, the App Store now has screenshots of Apple's built-in apps running on the Duo. We've seen some apps in marketing materials, but images of the ones we haven't seen give us an idea of what it will be like using the iPhone Duo day to day. Many apps are shown in landscape...
apple pro tell logo

Apple Announcing New Products Next Week: 'Pro and Tell'

Monday October 19, 2026 9:05 am PDT by
Apple's Greg Joswiak today hinted at new product announcements coming next week, sharing a social media post that says "Can't wait to pro and tell next week." Rumors suggest Apple is planning to debut the new MacBook Pro with an OLED touchscreen display, an M6 entry-level MacBook Pro, an M6 iMac, an iPad mini with an OLED display. Can't wait to pro and tell next week....
Latest Stories
1Password for Agents Keeps Your Passwords Hidden From AI
1Password for Agents Keeps Your Passwords Hidden From AI
34 minutes ago
iPhone Duo 24 Hours Later: Your Questions Answered
iPhone Duo 24 Hours Later: Your Questions Answered
1 hour ago
Apple's iWork Apps Get 'Intelligent Assistant' and iPhone Duo Support
Apple's iWork Apps Get 'Intelligent Assistant' and iPhone Duo Support
2 hours ago
Apple is Apparently Considering a Slightly Larger iPhone Duo
Apple is Apparently Considering a Slightly Larger iPhone Duo
2 hours ago
Giant iPhone Duo Displays Coming to Four Apple Stores
Giant iPhone Duo Displays Coming to Four Apple Stores
3 hours ago
Apple Pulls Keynote, Pages and Numbers From App Store [Update: Back]
Apple Pulls Keynote, Pages and Numbers From App Store [Update: Back]
4 hours ago
Apple Updates More Apps With iPhone Duo Support
Apple Updates More Apps With iPhone Duo Support
5 hours ago
Apple Will Label Apps 'Made for iPhone Duo' in App Store
Apple Will Label Apps 'Made for iPhone Duo' in App Store
7 hours ago
Amazon Takes $49 Off iPad With Prices Starting at $399.99
Amazon Takes $49 Off iPad With Prices Starting at $399.99
8 hours ago
F1 on Apple TV Now Available in Dolby Atmos
F1 on Apple TV Now Available in Dolby Atmos
8 hours ago
Apple Reveals More Than 50 Apps That Will Be Updated for iPhone Duo
Apple Reveals More Than 50 Apps That Will Be Updated for iPhone Duo
9 hours ago
Apple Blocks Certificates That Could Help Attackers Fake Websites
Apple Blocks Certificates That Could Help Attackers Fake Websites
10 hours ago
Giant iPhone Duo Installations Spotted at Apple Fifth Avenue
Giant iPhone Duo Installations Spotted at Apple Fifth Avenue
11 hours ago
iPhone Duo 2 Prototypes Include Under-Display Face ID
iPhone Duo 2 Prototypes Include Under-Display Face ID
11 hours ago
Tesla App Gains iPad and iPhone Duo Support
Tesla App Gains iPad and iPhone Duo Support
15 hours ago
Apple Reportedly Boosts iPhone Duo Orders by 44%
Apple Reportedly Boosts iPhone Duo Orders by 44%
16 hours ago
Fortnite Returning to Australian App Store After Court Ruling
Fortnite Returning to Australian App Store After Court Ruling
16 hours ago
Apple Ordered to Open iPhone to Rival App Stores in Australia
Apple Ordered to Open iPhone to Rival App Stores in Australia
16 hours ago
Apple Suppliers Face Hurdles Cutting Circuit Board Emissions
Apple Suppliers Face Hurdles Cutting Circuit Board Emissions
17 hours ago
Things Updated for iPhone Duo With Adaptive Layout
Things Updated for iPhone Duo With Adaptive Layout
17 hours ago
Simplicity and Siri AI Are HomeView's Killer Features, Apple Says
Simplicity and Siri AI Are HomeView's Killer Features, Apple Says
18 hours ago
iPhone Duo Reviewers Really Miss Face ID
iPhone Duo Reviewers Really Miss Face ID
23 hours ago
Does the iPhone Duo Run Hot? Here's What Reviews Found
Does the iPhone Duo Run Hot? Here's What Reviews Found
1 day ago
Apple Music's New Look is Now Live on Apple's Website
Apple Music's New Look is Now Live on Apple's Website
1 day ago
Anthropic Launches Claude Duet, a Proactive AI Agent
Anthropic Launches Claude Duet, a Proactive AI Agent
1 day ago
What 32,000 Folds Did to the iPhone Duo's Hinge
What 32,000 Folds Did to the iPhone Duo's Hinge
1 day ago
iPhone Duo's Hidden FaceTime Camera Takes 'Trash' Photos
iPhone Duo's Hidden FaceTime Camera Takes 'Trash' Photos
1 day ago
iPhone Duo Has 'Edge Light' Feature That Debuted on Macs Last Year
iPhone Duo Has 'Edge Light' Feature That Debuted on Macs Last Year
1 day ago
Apple Support App Updated for iPhone Duo's Larger Display
Apple Support App Updated for iPhone Duo's Larger Display
1 day ago
Amazon Sweetens the Deal on Entry-Level 16-Inch MacBook Pro With $570 Off
Amazon Sweetens the Deal on Entry-Level 16-Inch MacBook Pro With $570 Off
1 day ago