This blog post will cover what happens after you submit your packaged app to the Firefox Marketplace and how users get your app onto their devices.
What is a packaged app?
A packaged app is an Open Web App that has all of its resources (e.g., HTML, CSS, JavaScript, app manifest, images) contained in a zip file, instead of having its resources on a web server. A packaged app is simply a zip file with the app manifest in its root directory. The manifest must be named manifest.webapp
.
If your app needs device access to sensitive APIs, then it must be packaged and signed by the Firefox Marketplace. If your app has a lot of static assets it might be advantageous to package your app so all assets are stored on device.
Uploading Your Packaged App to the Firefox Marketplace
Once you have an app and are ready to submit it, package up your app into a zip file and upload it. See the packaged app docs for background on getting started and creating a zip file for your app.
When ready, sign in to the Marketplace Developer Hub and submit your app. Once you finish the process your app is pending review.
The Review Process
The Marketplace Review Team will review apps that have been in the queue the longest first. During the review process there may be back and forth with the review team about your app. Reviewers assess the security, privacy, content, functionality, and usability according to the Marketplace Review Criteria.
App Approval
Once approved it will become available on the Marketplace. If you’ve selected to make the app public yourself after it is approved, an option during the submission process, you will receive an email that your app was approved and is awaiting your action to make it publicly available. When your app is made public the package is cryptographically signed and available for download from the Marketplace servers, a “mini” manifest is generated with content from the package manifest and hosted on the Marketplace, and the app shows up in search queries and Marketplace listing pages.
App Installation
Packaged apps are installed by calling the navigator.mozApps
API function, installPackage
, passing it the absolute URL path to the “mini” manifest. On the device this triggers an install dialogue that displays information about the app to the user. The user has the choice to install the app or not. Assuming the user chooses to continue with app installation the device will download the zip file, verify the cryptographic signature, and install the app on the device.
App updates
When you have a new version of your app the process is similar. Visit your app’s “Status & Versions” page from within the Developer Hub’s Manage My Submissions page. On this page you’ll see a section titled, “Upload New Version”. Upload your new zip file here. Your app must have a new version string specified in the manifest file. After upload you will have an opportunity to provide version change information and notes to reviewers. When complete, the latest version of your app is pending review and the previous version is still available on the Marketplace. When the reviewer approves your update the new version will be made available for download and the app details on Marketplace pages are updated.
The device polls the “mini” manifest URL periodically looking for updates. Once your new version is approved devices will then detect the update and will attempt to download and install the new zip file. The process is the same as far as prompting the user to upgrade, downloading the zip file, verifying the signature, and finally installing the updated package.
Why a “mini” manifest?
The reason for the mini-manifest is to present the install or update dialogue to the user to provide them the option to install/upgrade or cancel, without having to download the complete zip file, which could be quite large, especially over mobile networks. Without the mini-manifest we would need the complete zip file to present this dialogue to the user. On the Marketplace the mini-manifest is automatically generated and maintained for every packaged app, including proper caching and handling of ETags required for Firefox OS to detect updates.
Hopefully this provides some insight into packaged apps, the review process, and some technical details of packaged app installs and updates. We look forward to your future packaged app submissions.