reduced trans blocks to smaller sections (bug 843670)
This commit is contained in:
Родитель
692d011462
Коммит
cb7e61114c
|
@ -59,7 +59,7 @@
|
|||
<p>{{ _('What you get:') }}</p>
|
||||
<ul>
|
||||
<li>{{ _('A minimal and well-formed HTML structure') }}</li>
|
||||
<li>{{ _('Prebuilt <code>manifest.webapp</code>') }}</li>
|
||||
<li>{{ _('Prebuilt') }} <code>manifest.webapp</code></li>
|
||||
<li>
|
||||
{%- trans %}
|
||||
JavaScript libraries for interacting with the Marketplace
|
||||
|
@ -100,9 +100,11 @@
|
|||
{% endtrans -%}
|
||||
</p>
|
||||
<pre>{{ _('npm install -g volo') }}</pre>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
<p>{{ _('Now you can just use the <code>create</code> command:') }}</p>
|
||||
<pre>{{ _('volo create myproject mozilla/mortar-app-stub') }}</pre>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
When future templates are available, you can use the same
|
||||
<code>create</code> command with different template URLs.
|
||||
|
@ -110,6 +112,7 @@
|
|||
</p>
|
||||
<h2>{{ _('What Now?') }}</h2>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
All your HTML, CSS, and JavaScript are under the <code>www</code>
|
||||
directory, so start coding! You'll see a bunch of stuff in there,
|
||||
|
@ -117,6 +120,7 @@
|
|||
{% endtrans -%}
|
||||
</p>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans url_require='http://requirejs.org',
|
||||
url_zepto='http://zeptojs.com',
|
||||
url_payments='//developer.mozilla.org/docs/Apps/In-app_payments',
|
||||
|
@ -135,6 +139,7 @@
|
|||
<p>{{ _("Below that, you'll see the line:") }}</p>
|
||||
<pre>{{ _('define(function(require) {') }}</pre>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans url='http://requirejs.org/docs/api.html' %}
|
||||
That defines the main module for your app, and you should start
|
||||
coding within the function. You can use <code>require</code> to
|
||||
|
@ -144,6 +149,7 @@
|
|||
{% endtrans -%}
|
||||
</p>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
<strong>Note</strong>: By default, modules are loaded from
|
||||
<code>www/js/lib</code>. If you want to load something from
|
||||
|
@ -153,6 +159,7 @@
|
|||
{% endtrans -%}
|
||||
</p>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
You can edit CSS in <code>www/css/app.css</code>. Typically you
|
||||
should <code>@import</code> additional CSS files at the top of
|
||||
|
@ -175,6 +182,7 @@
|
|||
{% endtrans -%}
|
||||
</pre>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
All of these must be run at the root of your project. There are a
|
||||
few other commands and you can view the full list by simply typing
|
||||
|
@ -182,6 +190,7 @@
|
|||
{% endtrans -%}
|
||||
</p>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
<strong>Note:</strong> volo itself only has a few built-in
|
||||
commands. The app template provides the <code>serve</code>,
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
{% endtrans -%}
|
||||
</p>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans url='//developer.mozilla.org/docs/DOM/window.navigator.onLine' %}
|
||||
The simplest way to do this is to check, and listen for changes to,
|
||||
the <a href="{{ url }}"><code>window.navigator.onLine</code></a>
|
||||
|
|
|
@ -52,25 +52,19 @@
|
|||
{% endtrans -%}
|
||||
<ul>
|
||||
<li>
|
||||
<code>{{ _('http://example.com') }}</code>
|
||||
<code>'http://example.com</code>
|
||||
</li>
|
||||
<li>
|
||||
{%- trans %}
|
||||
<code>http://example.com:8080</code> (different port)
|
||||
{% endtrans -%}
|
||||
<code>http://example.com:8080</code> {{ _('(different port)') }}
|
||||
</li>
|
||||
<li>
|
||||
{%- trans %}
|
||||
<code>https://example.com</code> (different protocol)
|
||||
{% endtrans -%}
|
||||
<code>https://example.com</code> {{ _('(different protocol)') }}
|
||||
</li>
|
||||
<li>
|
||||
<code>{{ _('http://www.example.com') }}</code>
|
||||
<code>http://www.example.com</code>
|
||||
</li>
|
||||
<li>
|
||||
{%- trans %}
|
||||
<code>http://myapp.example.com</code> (subdomain)
|
||||
{% endtrans -%}
|
||||
<code>http://myapp.example.com</code> {{ _('(subdomain)') }}
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -78,10 +72,10 @@
|
|||
{{ _('The following URLs are the same origin:') }}
|
||||
<ul>
|
||||
<li>
|
||||
<code>{{ _('http://Example.com:80') }}</code>
|
||||
<code>http://Example.com:80</code>
|
||||
</li>
|
||||
<li>
|
||||
<code>{{ _('http://example.com') }}</code>
|
||||
<code>http://example.com</code>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -91,10 +85,10 @@
|
|||
{{ _('The following URLs are the same origin:') }}
|
||||
<ul>
|
||||
<li>
|
||||
<code>{{ _('http://example.com/drawingApp') }}</code>
|
||||
<code>http://example.com/drawingApp</code>
|
||||
</li>
|
||||
<li>
|
||||
<code>{{ _('http://example.com/notesApp') }}</code>
|
||||
<code>http://example.com/notesApp</code>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -154,6 +148,7 @@
|
|||
{% endtrans -%}
|
||||
</dd>
|
||||
<dd>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans url='//developer.mozilla.org/docs/Apps/Adding_a_subdomain' %}
|
||||
We recommend that you use a separate subdomain for each of your
|
||||
apps. For example, <code>spreadsheet.mycoolapps.com</code> for
|
||||
|
@ -208,6 +203,7 @@
|
|||
{% endtrans -%}
|
||||
</dd>
|
||||
<dt>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
Why does my Web server have to use the proper HTTP
|
||||
<code>Content-Type</code> header when serving my app manifest?
|
||||
|
|
|
@ -67,12 +67,12 @@
|
|||
installed from, and much more (Only the name and description are
|
||||
required). The simple manifest included within the app template
|
||||
looks like:
|
||||
<pre>
|
||||
<code>
|
||||
{{ manifest_sample }}
|
||||
</code>
|
||||
</pre>
|
||||
{% endtrans -%}
|
||||
<pre>
|
||||
<code>
|
||||
{{ manifest_sample }}
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
{{ youtube('dgAUgHQOm8M') }}
|
||||
</p>
|
||||
|
@ -92,12 +92,12 @@
|
|||
OS can be installed on a variety of devices which use different
|
||||
screen resolutions. <a href="{{ url }}">CSS media queries</a>
|
||||
provide a means to adapt layout to device:
|
||||
<pre>
|
||||
<code>
|
||||
{{ css_sample }}
|
||||
</code>
|
||||
</pre>
|
||||
{% endtrans -%}
|
||||
<pre>
|
||||
<code>
|
||||
{{ css_sample }}
|
||||
</code>
|
||||
</pre>
|
||||
</p>
|
||||
<p>
|
||||
{%- trans url='http://twitter.github.com/bootstrap' %}
|
||||
|
@ -118,14 +118,15 @@
|
|||
to jQuery) and a utility to install your app on the Firefox OS
|
||||
Simulator. This quick start guide fits you with mortar's most
|
||||
basic layout template:
|
||||
<pre>
|
||||
<code>
|
||||
{{ html_sample }}
|
||||
</code>
|
||||
</pre>
|
||||
{% endtrans -%}
|
||||
<pre>
|
||||
<code>
|
||||
{{ html_sample }}
|
||||
</code>
|
||||
</pre>
|
||||
</p>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
Feel free to modify the structure set forth by mortar — the
|
||||
snippet above should get you going. Note that all JavaScript code
|
||||
|
@ -142,24 +143,28 @@
|
|||
A list of device support and status is available on the
|
||||
<a href="{{ url }}">WebAPI</a> page. Of course JavaScript
|
||||
feature detection is still the best practice:
|
||||
<pre>
|
||||
<code>
|
||||
{{ feature_sample }}
|
||||
</code>
|
||||
</pre>
|
||||
<p>
|
||||
{% endtrans -%}
|
||||
<pre>
|
||||
<code>
|
||||
{{ feature_sample }}
|
||||
</code>
|
||||
</pre>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
In this very basic app template we'll modify the display style
|
||||
of a <code>DIV</code> based on changes in the device's battery
|
||||
state:
|
||||
<pre>
|
||||
<code>
|
||||
{{ battery_sample }}
|
||||
</code>
|
||||
</pre>
|
||||
</p>
|
||||
{% endtrans -%}
|
||||
{% endtrans -%}
|
||||
<pre>
|
||||
<code>
|
||||
{{ battery_sample }}
|
||||
</code>
|
||||
</pre>
|
||||
</p>
|
||||
</p>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans url='https://developer.mozilla.org/en-US/docs/DOM/window.navigator.battery' %}
|
||||
In the code sample above, once you confirm that the
|
||||
<a href="{{ url }}">Battery API</a> is supported, you can add event
|
||||
|
@ -175,19 +180,21 @@
|
|||
</p>
|
||||
<h2>{{ _('WebRT APIs (Permissions-based APIs)') }}</h2>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans url='https://wiki.mozilla.org/WebAPI' %}
|
||||
There are a number of WebAPIs which are available but require
|
||||
permissions for that specific feature to be enabled. Apps may
|
||||
register permission requests within the
|
||||
<code>manifest.webapp</code> file:
|
||||
<pre>
|
||||
<code>
|
||||
{{ webrt_sample }}
|
||||
</code>
|
||||
</pre>
|
||||
{% endtrans -%}
|
||||
<pre>
|
||||
<code>
|
||||
{{ webrt_sample }}
|
||||
</code>
|
||||
</pre>
|
||||
</p>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
Once you've installed your app on Firefox OS Simulator, open the
|
||||
<code>Settings</code> app, select <code>App Permissions</code>,
|
||||
|
@ -196,7 +203,7 @@
|
|||
within the Firefox OS Simulator.
|
||||
{% endtrans -%}
|
||||
</p>
|
||||
<h2>{{ _('Tools & Testing') }}</h2>
|
||||
<h2>{{ _('Tools & Testing') }}</h2>
|
||||
<p>
|
||||
{%- trans %}
|
||||
Testing is incredibly important when supporting mobile devices.
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans url='//developer.mozilla.org/docs/Apps/Apps_JavaScript_API' %}
|
||||
Serve the app manifest in a file with a file extension of
|
||||
<code>.webapp</code>. Set the <code>Content-Type</code> header to
|
||||
|
|
|
@ -91,16 +91,20 @@
|
|||
People often spend only a minute or two deciding whether to
|
||||
continue or abandon an app. Some of the factors you may want
|
||||
to consider include:
|
||||
<ul>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
<ul>
|
||||
<li>
|
||||
{%- trans %}
|
||||
provide a quick introduction to your app (and provide an
|
||||
easy way to end it anytime)
|
||||
</li>
|
||||
<li>instant access to features and suggestions</li>
|
||||
<li>minimize initial user input</li>
|
||||
<li>express the most important information in a concise way</li>
|
||||
</ul>
|
||||
{% endtrans -%}
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
<li>{{ _('instant access to features and suggestions') }}</li>
|
||||
<li>{{ _('minimize initial user input') }}</li>
|
||||
<li>
|
||||
{{ _('express the most important information in a concise way') }}
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
<h2>{{ _('Present action choices if possible') }}</h2>
|
||||
<p>
|
||||
|
|
|
@ -18,17 +18,21 @@
|
|||
<p>
|
||||
{%- trans %}
|
||||
Once you have finished your app, you need to do the following:
|
||||
<ul>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
<ul>
|
||||
<li>
|
||||
{%- trans %}
|
||||
Deploy the app — Arrange for web hosting and get the app
|
||||
up and running on the web server.
|
||||
</li>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{%- trans %}
|
||||
Publish the app — Make the app available for end users
|
||||
to install.
|
||||
</li>
|
||||
</ul>
|
||||
{% endtrans -%}
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
<h2>{{ _('Deploying the app') }}</h2>
|
||||
<p>
|
||||
|
@ -39,6 +43,7 @@
|
|||
</p>
|
||||
<h3>{{ _('GitHub') }}</h3>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans url_github='http://pages.github.com',
|
||||
url_mdn='//developer.mozilla.org/docs/Apps/Manifest#Serving_from_GitHub' %}
|
||||
If the Web app is purely static (HTML/CSS/JavaScript, but no
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<article>
|
||||
<h1>{{ _('Packaged Apps') }}</h1>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans url='//developer.mozilla.org/docs/Apps/Manifest' %}
|
||||
A <strong>packaged app</strong> is an Open Web App that has all of
|
||||
its resources (HTML, CSS, JavaScript, app manifest, and so on)
|
||||
|
@ -46,123 +47,154 @@
|
|||
</p>
|
||||
<h2>{{ _('Types of packaged apps') }}</h2>
|
||||
<p>
|
||||
{%- trans url_csp='//developer.mozilla.org/docs/Security/CSP/Introducing_Content_Security_Policy',
|
||||
url_security='https://wiki.mozilla.org/Apps/Security',
|
||||
url_default_csp='https://wiki.mozilla.org/Apps/Security#Default_CSP_policy',
|
||||
url_bug='https://bugzilla.mozilla.org/show_bug.cgi?id=768029' %}
|
||||
There are three types of packaged apps:
|
||||
<dl>
|
||||
<dt>Privileged app</dt>
|
||||
<dd>
|
||||
{{ _('There are three types of packaged apps:') }}
|
||||
<dl>
|
||||
<dt>{{ _('Privileged app') }}</dt>
|
||||
<dd>
|
||||
{%- trans %}
|
||||
A privileged app has been approved by the Firefox OS
|
||||
Marketplace using a special process. It is meant to provide
|
||||
more safety for users when an app wants access to certain
|
||||
sensitive APIs on a device. It is equivalent to a native
|
||||
app on a platform like iOS or Android. A privileged app
|
||||
has the following characteristics:
|
||||
<ul>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
<ul>
|
||||
<li>
|
||||
{%- trans %}
|
||||
Approved by an app store after code review or equivalent.
|
||||
</li>
|
||||
<li>App's resources are signed by the app store.</li>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
<li>{{ _("App's resources are signed by the app store.") }}</li>
|
||||
<li>
|
||||
{%- trans %}
|
||||
Allowed to use certain sensitive Web APIs that untrusted
|
||||
content cannot have access to.
|
||||
</li>
|
||||
<li>
|
||||
Enforces a <a href="{{ url_csp }}">Content Security
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{%- trans url='//developer.mozilla.org/en-US/docs/Apps/CSP' %}
|
||||
Enforces a <a href="{{ url }}">Content Security
|
||||
Policy</a> (CSP). A privileged app uses this CSP:
|
||||
<pre>
|
||||
"default-src *; script-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline'"
|
||||
</pre>
|
||||
</li>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
<pre>
|
||||
"default-src *; script-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline'"
|
||||
</pre>
|
||||
</li>
|
||||
<li>
|
||||
{%- trans url='https://wiki.mozilla.org/Apps/Security' %}
|
||||
Implements other requirements related to security. See
|
||||
<a href="{{ url_security }}">Security</a> for more
|
||||
information.
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>Certified app</dt>
|
||||
<dd>
|
||||
A certified app is intended for a critical system function like
|
||||
the default dialer or the system settings app on a smartphone.
|
||||
This type of app would be used for critical functions on a
|
||||
Firefox OS phone. It is not intended for third party apps, so
|
||||
most app developers can disregard this type of app. A certified
|
||||
app is a packaged app that is similar to a privileged app,
|
||||
except that all device permissions are implicit, meaning they
|
||||
do not require explicit user approval. A certified app must be
|
||||
approved for a device by the OEM or carrier in order to have
|
||||
this implicit approval to use critical APIs. The following is
|
||||
the CSP for a certified app, which is slightly different from
|
||||
the CSP for a privileged app:
|
||||
<pre>
|
||||
"default-src *; script-src 'self'; object-src 'none'; style-src 'self'"
|
||||
</pre>
|
||||
This has the effect of slightly looser rules for inline CSP for
|
||||
privileged apps when compared to certified apps. If you want
|
||||
more of the reasoning behind this, see
|
||||
<a href="{{ url }}">Security</a> for more information.
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>{{ _('Certified app') }}</dt>
|
||||
<dd>
|
||||
{%- trans %}
|
||||
A certified app is intended for a critical system function
|
||||
like the default dialer or the system settings app on a
|
||||
smartphone. This type of app would be used for critical
|
||||
functions on a Firefox OS phone. It is not intended for third
|
||||
party apps, so most app developers can disregard this type of
|
||||
app. A certified app is a packaged app that is similar to a
|
||||
privileged app, except that all device permissions are
|
||||
implicit, meaning they do not require explicit user approval.
|
||||
A certified app must be approved for a device by the OEM or
|
||||
carrier in order to have this implicit approval to use
|
||||
critical APIs. The following is the CSP for a certified app,
|
||||
which is slightly different from the CSP for a privileged
|
||||
app:
|
||||
{% endtrans -%}
|
||||
<pre>
|
||||
"default-src *; script-src 'self'; object-src 'none'; style-src 'self'"
|
||||
</pre>
|
||||
{%- trans url_default_csp='https://wiki.mozilla.org/Apps/Security#Default_CSP_policy',
|
||||
url_bug='https://bugzilla.mozilla.org/show_bug.cgi?id=768029' %}
|
||||
This has the effect of slightly looser rules for inline CSP
|
||||
for privileged apps when compared to certified apps. If you
|
||||
want more of the reasoning behind this, see
|
||||
<a href="{{ url_default_csp }}">Default CSP policy</a> and
|
||||
<a href="{{ url_bug }}">Bug 768029</a>.</dd>
|
||||
<dt>Plain packaged app</dt>
|
||||
<dd>
|
||||
{% endtrans -%}
|
||||
<dt>{{ _('Plain packaged app') }}</dt>
|
||||
<dd>
|
||||
{%- trans %}
|
||||
You can also make a regular app that is simply packaged in a
|
||||
zip file. The Marketplace signs it, but does not perform the
|
||||
special authentication process used for privileged or certified
|
||||
apps. This plain packaged app cannot use certain sensitive Web
|
||||
APIs. It is not subject to the CSPs described for privileged
|
||||
and certified apps.
|
||||
</dd>
|
||||
</dl>
|
||||
{% endtrans -%}
|
||||
special authentication process used for privileged or
|
||||
certified apps. This plain packaged app cannot use certain
|
||||
sensitive Web APIs. It is not subject to the CSPs described
|
||||
for privileged and certified apps.
|
||||
{% endtrans -%}
|
||||
</dd>
|
||||
</dl>
|
||||
</p>
|
||||
<h2>{{ _('Differences from hosted apps') }}</h2>
|
||||
<p>
|
||||
{%- trans url='//developer.mozilla.org/docs/Security/CSP/Introducing_Content_Security_Policy' %}
|
||||
{%- trans %}
|
||||
Packaged apps have the same capabilites as normal website-style
|
||||
Open Web Apps ("hosted" apps), but packaged apps have a
|
||||
few differences:
|
||||
<ul>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
<ul>
|
||||
<li>
|
||||
{%- trans %}
|
||||
They have no Internet origin. The one-app-per-origin policy
|
||||
that governs hosted apps does not apply to packaged apps.
|
||||
</li>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
They use a special protocol internal to the zip file:
|
||||
<code>app://<uuid></code>. Example: When you load the
|
||||
content <code>/index.html</code> in a packaged app, you are
|
||||
actually loading something like the following (the UUID will
|
||||
be different):
|
||||
<pre>app://550e8400-e29b-41d4-a716-446655440000/index.html</pre>
|
||||
</li>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
<pre>app://550e8400-e29b-41d4-a716-446655440000/index.html</pre>
|
||||
</li>
|
||||
<li>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
The manifest file must be named <code>manifest.webapp</code>.
|
||||
</li>
|
||||
<li>
|
||||
Their resources are accessed from the zip file, which is stored
|
||||
on the device where the app is installed.
|
||||
</li>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{%- trans %}
|
||||
Their resources are accessed from the zip file, which is
|
||||
stored on the device where the app is installed.
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
They are installed with a different <code>mozApps</code> API
|
||||
function: <code>installPackage()</code>.
|
||||
</li>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{%- trans url='//developer.mozilla.org/docs/Security/CSP/Introducing_Content_Security_Policy' %}
|
||||
They enforce a specific <a href="{{ url }}">CSP</a> for all
|
||||
application content (a hosted app could also use a CSP, but it
|
||||
is not required).
|
||||
</li>
|
||||
<li>
|
||||
application content (a hosted app could also use a CSP, but
|
||||
it is not required).
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{%- trans %}
|
||||
They can embed remote content in iframes, but that content will
|
||||
not have access to privileged APIs nor will it have the default
|
||||
CSP applied to it.
|
||||
</li>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{%- trans %}
|
||||
They have an update process for getting new versions of the app
|
||||
to users. Hosted apps do not need this process.
|
||||
</li>
|
||||
</ul>
|
||||
{% endtrans -%}
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
{%- trans %}
|
||||
|
@ -172,6 +204,7 @@
|
|||
</p>
|
||||
<h2>{{ _('Using sensitive Web APIs') }}</h2>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans url='//developer.mozilla.org/docs/Apps/Manifest' %}
|
||||
There are Web APIs that could be used maliciously, so access to
|
||||
them must be controlled. For every sensitive API you want your
|
||||
|
@ -190,6 +223,7 @@
|
|||
</p>
|
||||
<h2>{{ _('Packaged apps and the Firefox Marketplace') }}</h2>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
The Firefox Marketplace handles packaged apps differently from
|
||||
hosted apps. When you submit your packaged app, its zip file is
|
||||
|
@ -233,6 +267,7 @@
|
|||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
Get your server's IP address and use it in place of
|
||||
<strong><code><server-ip></code></strong> in the examples
|
||||
|
@ -245,6 +280,7 @@
|
|||
<h3>{{ _('Steps') }}</h3>
|
||||
<ol>
|
||||
<li>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
Have your packaged app's zip file available and give it the
|
||||
name <code>package.zip</code>. This file contains all the app's
|
||||
|
@ -252,6 +288,7 @@
|
|||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans url='#mini-manifest-fields' %}
|
||||
Create a file called <code>package.manifest</code> and give it
|
||||
the contents below. This is a mini-manifest used for packaged app
|
||||
|
@ -263,6 +300,7 @@
|
|||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
Create a file named <code>install.html</code> with the following
|
||||
contents. This contains the JavaScript that calls the packaged
|
||||
|
@ -272,6 +310,7 @@
|
|||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
Copy <code>package.zip</code>, <code>package.manifest</code>, and
|
||||
<code>install.html</code> into the Web server's document root
|
||||
|
@ -279,6 +318,7 @@
|
|||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
Use the browser on the phone to open
|
||||
<code>http://<strong><server-ip></strong>/install.html</code>
|
||||
|
@ -288,6 +328,7 @@
|
|||
</li>
|
||||
</ol>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans url='//developer.mozilla.org/docs/Apps/Manifest#type' %}
|
||||
<strong>Note:</strong> If you want to test certified app APIs
|
||||
(described above), turn on "developer mode" on the device you want
|
||||
|
@ -304,6 +345,7 @@
|
|||
{% endtrans -%}
|
||||
</p>
|
||||
<p>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans url='//developer.mozilla.org/docs/Apps/Manifest' %}
|
||||
When the Firefox OS Marketplace generates a mini-manifest for your
|
||||
app, it pulls information from your app's manifest for some of the
|
||||
|
@ -321,41 +363,50 @@
|
|||
Here is information on the mini-manifest that relates to using it
|
||||
locally for your own testing:
|
||||
{% endtrans -%}
|
||||
{%- trans %}
|
||||
<dl>
|
||||
<dt><code>name</code></dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt><code>name</code></dt>
|
||||
<dd>
|
||||
{%- trans %}
|
||||
(required) The app's name. Maximum length is 128 characters.
|
||||
</dd>
|
||||
<dt><code>package_path</code></dt>
|
||||
<dd>
|
||||
{% endtrans -%}
|
||||
</dd>
|
||||
<dt><code>package_path</code></dt>
|
||||
<dd>
|
||||
{%- trans %}
|
||||
(required) A full URL where the app's zip file can be found.
|
||||
</dd>
|
||||
<dt><code>version</code></dt>
|
||||
<dd>The version of the app.</dd>
|
||||
<dt><code>size</code></dt>
|
||||
<dd>
|
||||
{% endtrans -%}
|
||||
</dd>
|
||||
<dt><code>version</code></dt>
|
||||
<dd>{{ _('The version of the app.') }}</dd>
|
||||
<dt><code>size</code></dt>
|
||||
<dd>
|
||||
{%- trans %}
|
||||
The size of the app's zip file in bytes. This is not necessary
|
||||
for local testing, but provide it to get a progressbar during
|
||||
installation.
|
||||
</dd>
|
||||
<dt><code>release_notes</code></dt>
|
||||
<dd>
|
||||
{% endtrans -%}
|
||||
</dd>
|
||||
<dt><code>release_notes</code></dt>
|
||||
<dd>
|
||||
{%- trans %}
|
||||
Information about this release of the app. On the Marketplace
|
||||
this information comes from a Web page that is part of the
|
||||
submission process.
|
||||
</dd>
|
||||
<dt><code>developer</code></dt>
|
||||
<dd>
|
||||
Information about the developer, contains the <code>name</code>
|
||||
and <code>url</code> fields.
|
||||
</dd>
|
||||
<dt><code>locales</code></dt>
|
||||
<dd>Localization information.</dd>
|
||||
<dt><code>icons</code></dt>
|
||||
<dd>Icons for use by the app.</dd>
|
||||
</dl>
|
||||
{% endtrans -%}
|
||||
{% endtrans -%}
|
||||
</dd>
|
||||
<dt><code>developer</code></dt>
|
||||
<dd>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
Information about the developer, contains the
|
||||
<code>name</code> and <code>url</code> fields.
|
||||
{% endtrans -%}
|
||||
</dd>
|
||||
<dt><code>locales</code></dt>
|
||||
<dd>{{ _('Localization information.') }}</dd>
|
||||
<dt><code>icons</code></dt>
|
||||
<dd>{{ _('Icons for use by the app.') }}</dd>
|
||||
</dl>
|
||||
</p>
|
||||
<h2>{{ _('Updating packaged apps') }}</h2>
|
||||
<p>
|
||||
|
|
|
@ -91,6 +91,7 @@
|
|||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{# L10n: Do not localize text in <code></code> #}
|
||||
{%- trans %}
|
||||
The app manifest must be served a <code>Content-Type</code>
|
||||
header of <code>application/x-web-app-manifest+json</code>.
|
||||
|
@ -243,22 +244,26 @@
|
|||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{%- trans url='https://github.com/mozilla-b2g/gaia/issues/2557' %}
|
||||
{%- trans %}
|
||||
The app must implement its own method of navigation and not rely
|
||||
on browser chrome or a hardware back button, which will not be
|
||||
present on every device.
|
||||
<ul>
|
||||
<li>
|
||||
For example, if the reviewer navigates somewhere within the
|
||||
app and isn't able to navigate back. It does not mean an app
|
||||
must implement a button bar common to native apps.
|
||||
</li>
|
||||
<li>
|
||||
Note: a Gaia "wrapper" for legacy web content is in
|
||||
progress: <a href="{{ url }}">{{ url }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endtrans -%}
|
||||
<ul>
|
||||
<li>
|
||||
{%- trans %}
|
||||
For example, if the reviewer navigates somewhere within the
|
||||
app and isn't able to navigate back. It does not mean an
|
||||
app must implement a button bar common to native apps.
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{%- trans url='https://github.com/mozilla-b2g/gaia/issues/2557' %}
|
||||
Note: a Gaia "wrapper" for legacy web content is
|
||||
in progress: <a href="{{ url }}">{{ url }}</a>
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
{%- trans %}
|
||||
|
@ -280,28 +285,33 @@
|
|||
from the app review team to communicate what's going on and get
|
||||
the problem resolved. Specific examples of situations where
|
||||
blocklisting is warranted include:
|
||||
<ul>
|
||||
<li>Phishing</li>
|
||||
<li>Spamming</li>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
<ul>
|
||||
<li>{{ _('Phishing') }}</li>
|
||||
<li>{{ _('Spamming') }}</li>
|
||||
<li>
|
||||
{%- trans %}
|
||||
Changing content from Puppy Pictures v1.0 to Hardcore Porn
|
||||
v1.0 (without updating the content rating, when this
|
||||
feature is implemented)
|
||||
</li>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{%- trans %}
|
||||
Severe misbehavior of app for a large percentage of users
|
||||
— degrading phone performance, causing reboots,
|
||||
causing user data loss, etc. where users can't tell that
|
||||
it's because of the app and where it isn't solved by
|
||||
rebooting the device.
|
||||
</li>
|
||||
<li>
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
<li>
|
||||
{%- trans %}
|
||||
An app being used for attacks on the network, such as a
|
||||
distributed denial of service (DDOS)
|
||||
</li>
|
||||
<li>(insert movie plot risk here)</li>
|
||||
</ul>
|
||||
{% endtrans -%}
|
||||
{% endtrans -%}
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
</article>
|
||||
</div>
|
||||
|
|
Загрузка…
Ссылка в новой задаче