Updating apps

Diese Übersetzung ist unvollständig. Bitte helfen Sie, diesen Artikel aus dem Englischen zu übersetzen.

Dieser Artikel beschreibt den Prozess, mit dem Sie apps aktualisieren können, die bereits, Selbstveröffentlicht oder veröffentlicht auf dem   Firefox Marketplace  wurden.

Hinweis: Wenn Sie den Namen Ihrer Anwendung ändern, wenn es Marketplace genehmigt hat, müssen Sie Ihre app zur Genemigung erneut senden.

Gehostete apps zu aktualisieren

An app respects the normal rules for Web caching, and may optionally use advanced mechanisms for improved start-up, like the HTML5 AppCache. Given this, there are no special considerations for updating the normal resources that an app uses.

Open Web Apps are different, however, in the handling of the manifest. Some changes to a manifest may require user approval. Depending on the implementation of the Web runtime, it may be unclear whether an update has occurred.

As a clean way to deal with this issue, you can provide a version field in the app manifest. You can later check the version by inspecting the return value of the navigator.mozApps.getInstalled() function. If the user's installed version is not up-to-date, you can trigger an update using navigator.mozApps.install().

The value of version is not used by the Web runtime, so you can use whatever versioning scheme you want.

Also note that changes to a manifest that introduce errors or other breakage will be detected if the manifest has been submitted to Firefox Marketplace. Serious errors will cause the app's listing to be disabled. Less serious errors may automatically flag the app for re-review.

Updating packaged apps

Packaged apps have a different update process than hosted apps. To update a packaged app, you upload a new version of the app's zip file to the Firefox Marketplace. Then the updated app gets reviewed and published to the Marketplace. This triggers an update on the Firefox OS phone. The phone user can also request an update using the Settings app.

If you want more detail on the packaged app update process, see below.

More details on packaged app update

Here are more details on the update process for packaged apps. You might want to know these things if you are implementing an app marketplace.

  • When the updated packaged app is published, the mini-manifest is updated to point to the updated zip file (the mini-manifest is not the main app manifest). The ETag header is changed, and this triggers an update on the Firefox OS phone.
  • Firefox OS on the phone polls once per day for changes to an app. To do this, it polls the URL of the mini-manifest, then polls the URL in the package_path field in the mini-manifest. This is done using the checkForUpdate() method on the App object. When the ETag header changes, it knows the app has been updated. Then it checks if the zip file has changed.
  • Firefox OS checks in a batch for app updates.

Schlagwörter des Dokuments und Mitwirkende

 Mitwirkende an dieser Seite: teoli, ata.sah
 Zuletzt aktualisiert von: teoli,