The Firefox OS Simulator is a desktop platform tool that shows you what apps will look like on a phone that is running the Firefox OS. It is the easiest way to try out apps on Firefox OS before submitting them to the Firefox Marketplace. The Firefox OS Simulator was formerly called "r2d2b2g", but that name is too difficult.
The Simulator is packaged as a desktop Firefox add-on. You can use any recent version of Firefox, including released, Beta, Aurora, or Nightly versions.
Installing Firefox OS Simulator
- Using Firefox, go to this link: https://addons.mozilla.org/en-US/firefox/addon/firefox-os-simulator/
- Click Add to Firefox. It's a large download. Follow the prompts that appear.
Starting the Simulator
- On the Tools menu, go to Web Developer and click Firefox OS Simulator. (If you don't see the Tools menu, try pressing Alt.) The dashboard appears.
- Click the Stopped button. It changes into the Running button and Firefox OS boots up in its own window. The default size for this window is 320x480.
To stop the Simulator, click the Running button in the dashboard, or just close the Simulator window.
Note: You can also start and stop the Simulator in the Developer Toolbar command line using
firefoxos start and
Navigating in the Simulator
Imitate swipe motions in the Simulator by clicking and dragging with the mouse. The mouse scroll wheel will move a list up and down, such as in the Settings app.
To get back to the home screen, click the home button at the bottom of the Simulator, or press the Home key on your keyboard.
? Is the back key still Esc?
Click the Console check box before you start the Simulator to open an error console so you can spot errors that might occur while you're working on your app.
Web APIs in the Simulator
Mozilla is working on many Web APIs to make native platform capabilities available to Open Web Apps. The Web APIs currently supported in the Simulator are:
- Contacts API
- Settings API
- ? what other APIs ?
Installing an app in the Simulator
To install an app in the Simulator, type the URL to the app's manifest in the URL box, and click Add Manifest. This will install the app in the Simulator. Here is a simple weather app that you can use as a test:
The app's icon will be added to one of the home screens in the Simulator.
You can also install a plain website in the same way. Just type the website's URL in the box and click Add URL, and an icon for the site will be added to a home screen. Autocompletion works if you have the website open in another tab.
? Can you install a packaged app by entering the URL to its mini-manifest ?
? What does the Add Directory button do ?
To remove an app from the Simulator, click the Remove link for the app in the dashboard. You may have to restart the Simulator to see it gone.
Updating an app
If you are working on an app and need to update it in the Simulator, click the app's Update button in the dashboard. You will have to restart the Simulator. Hosted apps follow the usual rules for Website caching and working with appcache.
Remember that the Simulator is a brand-new tool and is still heavily under development. Please let us know if you find any bugs.
The Simulator itself is the Firefox OS desktop client (also called the B2G desktop client), which is a build of Firefox OS that runs on Windows, Mac, and Linux. Firefox OS Simulator makes it much easier to use Firefox OS desktop because you don't have to pull code files and build it yourself to use it. You just install the Firefox add-on and you're ready to go.
The Simulator is just a slightly-modified version of the Firefox OS desktop client with a slightly-modified version of Gaia, so the documentation for B2G Desktop, Gaia, and B2G generally will also apply to the Simulator to some extent. Here are a couple of those docs: