1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
---
title: Обновление приложений
slug: Mozilla/Marketplace/Publishing/Updating_apps
translation_of: Archive/Mozilla/Marketplace/Publishing/Updating_apps
---
<div class="summary">
<p><span class="seoSummary">This article explains the process by which you update published apps, either self-published or published on the <a href="https://marketplace.firefox.com/">Firefox Marketplace</a>.</span></p>
</div>
<div class="note">
<p>Once an app has been installed by a user it's not possible to change the app name through an update. New installations will, however, pick up the new app name. This is a security measure to guard against unscrupulous name changes.</p>
</div>
<h2 id="Updating_Hosted_Apps"><strong>Updating Hosted Apps</strong></h2>
<p><a href="/en-US/Marketplace/Options/Hosted_apps">Hosted Apps</a> respect the normal rules for Web caching, and may use advanced mechanisms for improved start-up or to enable offline use, such as <a href="/en-US/docs/HTML/Using_the_application_cache">AppCache</a>. Given this, there are normally no special considerations for updating these apps — you simply update the app on your site.</p>
<p>However, some changes to your apps may involve updates to the <a href="/en-US/Apps/Build/Manifest">manifest</a>.</p>
<h3 id="Changing_a_manifest’s_content"><strong>Changing a manifest’s content</strong></h3>
<p>To update features of a published app — such as the app name, developer name, locales, icons or app name — you simply apply these changes to the manifest you host. If you've submitted the app to Firefox Marketplace and any of these changes are considered significant the app is flagged for <a href="#Re_review_of_updated_apps">review</a>.</p>
<p>The Web runtimes and Firefox OS should automatically detect these changes and trigger an update on the user’s device. However, you can manually trigger updates by providing a version field in the app manifest. Your app can then check the version by inspecting the return value of {{ domxref("Apps.getInstalled") }}. If the user's installed version is not up-to-date, your app can trigger an update using {{ domxref("Apps.install") }}. Note that some changes to a manifest, and hence the installation, may require user approval before the update is actioned.</p>
<p>The value of version isn't used by Firefox OS or the Web runtimes, so you can use whatever version scheme you want.</p>
<h3 id="Changing_a_manifest's_location"><strong>Changing a manifest's location</strong></h3>
<p>You may wish to change the location of your app’s manifest file. Typically you'll do this to move the app to a new domain or to a sub-domain to enable you to deliver multiple hosted apps.</p>
<p>If you wish to do this for apps submitted to Firefox Marketplace, return to the app submission and on the Edit Details page change the Manifest URL value. What happens next will depend on the status of your app:</p>
<ul>
<li>for a published (or approved but not published) app, the app is flagged for <a href="#Re_review_of_updated_apps">review</a> and you’ll be contacted if (and only if) any subsequent problems are discovered.</li>
<li>for unapproved apps, the review will proceed as normal.</li>
</ul>
<h3 id="Reviews_of_updated_apps"><a name="Re_review_of_updated_apps">Reviews of updated apps</a></h3>
<p>When a Hosted App is flagged for review as the result of an update, the following happens:</p>
<ul>
<li>The app’s status doesn’t change, a published app remains published.</li>
<li>The app is added to the review queue and when it pops from the queue (anything from a few hours to a few days later) a reviewer will examine the changes and:
<ul>
<li>clear the flag.</li>
<li>if the app is completely broken, reject it and contact you. This will remove the app from Firefox Marketplace, if it has been published.</li>
<li>contact you for further information.</li>
</ul>
</li>
</ul>
<div class="warning">
<p>Where possible you should avoid changing the location of the app/manifest after your app has been published in the Firefox Marketplace. This is because of the impact on the user. A change in the manifest location will result in a new installed instance of the app when {{ domxref("Apps.install") }} is invoked. Many users will find this confusing.</p>
</div>
<h2 id="Обновление_упакованных_приложений"><strong>Обновление упакованных приложений</strong></h2>
<p><a href="/ru/docs/Mozilla/Marketplace/Options/Packaged_apps">Упакованные приложения</a> have a different update process to Hosted Apps. To update a Packaged App, you upload a new version of the app's zip file to the Firefox Marketplace. The updated app is then reviewed and, when approved, published to the Marketplace. This triggers an update to any installed versions. Firefox OS device users can also request an update using the Settings app. To upload a new version of your application, sign in to marketplace with the same account as the original submission by clicking on the gear icon in the top right and clicking "My Submissions." Under the header "Manage My Submissions" and the app in question, click "Status & Versions." From there, scroll down and click on "Select a File" under "Upload New Version." From there, you can choose not have an app automatically published upon review if you wish by unchecking the box that reads "Publish my app in the Firefox Marketplace as soon as it's reviewed." Users' devices will check daily for app updates, and will see a notification that an update for their app is available for download at their discretion.</p>
<p><img alt="Would you like to publish to marketplace upon review?" src="https://mdn.mozillademos.org/files/8523/publish_checkbox.png" style="width: 1000px; height: 232px;"></p>
<ul>
<li>When the updated packaged app is published, the <a href="/en-US/docs/Web/Apps/Packaged_apps#Packaged_apps_and_the_Firefox_OS_Marketplace">mini-manifest</a> is updated to point to the updated zip file (the mini-manifest is not the main app manifest). The <code>ETag</code> header is changed, and this triggers an update on the Firefox OS phone.</li>
<li>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 <code>package_path</code> field in the mini-manifest. This is done using the <code>checkForUpdate()</code> method on the <a href="/en-US/docs/Web/API/App"><code>App</code> object</a>. When the <code>ETag</code> header changes, it knows the app has been updated. Then it checks if the zip file has changed.</li>
<li>Firefox OS checks in a batch for app updates.</li>
</ul>
|