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.
What is Open Web Apps for Desktop?
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 detectated 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.
Using Open Web Apps for Desktop from Firefox Marketplace
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.
Submitting an app
When you load your app during its submission to the Firefox Marketplace, you choose the Firefox for Desktop when defining its platform compatibility.
Reviewing an app
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.
Installing an app
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.
Keeping apps up-to-date
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.
Using Open Web Apps for Desktop from other locations
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 .
How Open Web Apps for Desktop installs apps
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.
User's on Apple Mac computers may need to adjust thier system settings to enable installation from Firefox Marketplace. For more information see Bug 1112275.
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.
Will I be able to deliver paid apps and those with in-app purchases?
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.
Can I debug my apps when they are running on a desktop?
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.