Open Web Apps for Desktop
Marketplace feature removal
The functionality described on this page no longer works — Firefox Marketplace has discontinued support for Android, Desktop, Tablets, and payments (and other related functionality). For more information, read the Future of Marketplace FAQ.
Users of Firefox for Desktop install your free Marketplace apps as 'normal' Windows, Mac or Linux apps. These apps run using Web Runtime for Desktop and are installed using the features of Firefox for Desktop. Open Web Apps delivered outside Firefox Marketplace also benefit from this feature.
See bug 1202248 before you start using this.
Open Web Apps for Desktop enables free Marketplace apps to be installed by Firefox Desktop into a user's Windows, Mac, or Linux computer. Once installed on a desktop computer, these apps run similarly to any other desktop app. These apps are executed using Web Runtime for Desktop, a component of Firefox for Desktop.
With Open Web Apps for Desktop you don't need any knowledge of desktop development, or to take any extra development steps, to deliver a 'native' desktop app.
Note: Open Web Apps for Desktop is supported in Firefox for Desktop 29 and later. Also from Firefox 35 there is a deprecated Apps button in the browser, see the Mozilla Support articles How do I change my Mac Security Settings so I can open Firefox Marketplace apps? and Marketplace apps for Firefox Desktop for more details.
The Web Runtime for Desktop supports 12 APIs to access desktop capabilities such as IndexedDB, Geolocation, Battery status and more. You can see a complete list of supported APIs here: The "D" cells under "Availability" provide information on the status of each API in Web Runtime for Desktop. The green cells indicate that the API is available in full. You can also mouseover individual cells for more information.
In future releases, Web Runtime for Desktop will add support for additional APIs.
Note: Apps without a responsive design may not display very well across widely differing platforms, e.g. Firefox OS and desktop computers. This is because desktop users will be using screens with different resolutions (DPI) and sizes compared to those found on Firefox OS devices. You should design apps with responsive design principals in mind. For more information on responsive design, see the Design section of the App Center.
This section provides details on how you make use of Open Web Apps for Desktop, how it affects the Firefox Marketplace experience, and information on app updates.
When you load your app during its submission to the Firefox Marketplace, you choose the Firefox for Desktop when defining its platform compatibility.
When your app is reviewed, the reviewer installs your app from the reviewer section in Firefox Marketplace. When they do this from a desktop, Firefox for Desktop install the app onto their computer. They can then run the app and complete the review as normal.
When a user selects your app in the Firefox Marketplace the follows occurs:
- Firefox Marketplace displays the app's details and Free button as normal.
- When the user clicks Free they're shown the standard Firefox Marketplace install confirmation dialog. The dialog lists the permissions requested by privileged apps; the dialog will include wording to explain any concerns users may have.
- When the user confirms that they want to continue with the installation,
Apps.installPackageare invoked as you'd expect (depending on whether it's a hosted or packaged app) and Firefox for Desktop requests the details of the app from Firefox Marketplace and in the case of packaged apps, downloads the app's .zip file. Firefox for Desktop then installs the app into the desktop OS (the packaged zip, or the hosted app's assets, if it has AppCache specified), so it will then be available offline.
Once the app has been installed, the user will find the app in their desktop OS as normal. The process to use and remove the app is the same as they'd expect from other desktop apps.
The Web runtime for Desktop provides a mechanism for letting users know an update is available to an app.
If your app is hosted, whenever you make a change on its server, users will pick up changes the next time they run your app.
For all other changes, you need to add a new version to the Firefox Marketplace:
- For a hosted app, the link to the app's hosting server containing the updated manifest file.
- For a packaged app a zip file containing the updated app manifest and app content.
When the app is running, the Web Runtime for Desktop makes a daily check on the version number in the app’s manifest and if it has changed notifies the users that an update is available. The user can then choose to install the new version.
You can serve a hosted or packaged Open Web App from your own Marketplace or server, in this case Firefox automatically installs the app using Open Web Apps for Desktop. When a new version is detected at the location of the original Open Web App, Firefox also handles updates to the app .
This section describes how Open Web Apps for Desktop are installed by Firefox for Desktop.
- When the user chooses to install your app, as described above, Firefox for Desktop requests the app's manifest file and icons from the hosting server (the Firefox Marketplace, or wherever else the app is hosted):
- For hosted apps, the main manifest.
- For packaged apps, the mini manifest.
- For packaged apps, Firefox for Desktop requests the app's zip archive from the hosting server.
- Now Firefox for Desktop installs the app:
- For hosted apps, by wrapping the hosting URL in a Windows, Mac, or Linux executable and placing that on the desktop computer.
- For packaged apps, by wrapping the app's content in a Windows, Mac, or Linux executable and placing that on the desktop computer.
Important: Users on Apple Mac computers may need to adjust their system settings to enable installation from Firefox Marketplace. For more information read How do I change my Mac Security Settings so I can open Firefox Marketplace apps?
The following diagram offers an alternative representation of the workflow for the installation of an app using Open Web Apps for Desktop:
Here are answers to some frequently asked questions about Open Web Apps for Desktop.
This feature is planned, when it's implemented Open Web Apps for Desktop is given access to the trusted UI, mozPay, and all payment processes for in-app purchases, so in-app payments will function as normal.
To access the console (and other remote developer tools), start the app from a command line with the
-debug flag and optionally specifying a port (default: 6000). For example, on a Mac the Mykzilla test app is started with:
> /Applications/Mykzilla.app/Contents/MacOS/webapprt -debug 6000
Then, in Firefox, on the Developer Tools menu click Connect… and connect to the “localhost” host at the port you specified. After clicking Connect in Firefox, go back to your app and confirm the connection. Then return to Firefox and select a “tab” (i.e. an open window in your app) or “Main Process” to debug the Web Runtime’s chrome code.
Then a copy of Firefox’s Remote Developer Tools should open in a new window, and it should be connected to the “tab” you selected.