aboutsummaryrefslogtreecommitdiff
path: root/files/ru/tools/firefox_os_1.1_simulator/index.html
blob: 08e5674e79347dc9e3c53a9234dc785c315c8daa (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
---
title: Firefox OS 1.1 Simulator
slug: Tools/Firefox_OS_1.1_Simulator
translation_of: Tools/Firefox_OS_1.1_Simulator
---
<div>{{ToolsSidebar}}</div><div id="doc-content">
<div class="page-content boxed">
<div class="warning">
<p>This page describes the "old" Firefox OS Simulator. You should only use this if you're developing apps for Firefox 1.1, and it can only be installed on Firefox 24 or Firefox 25.</p>

<p>If you're developing apps for Firefox OS 1.2 or later, you need to <a href="/ru/Firefox_OS/Using_the_App_Manager">use the App Manager</a> instead.</p>

<p>If you need help, try asking on the <a href="https://lists.mozilla.org/listinfo/dev-developer-tools">dev-developer-tools mailing list</a> or on <a href="irc://irc.mozilla.org/#devtools">#devtools on irc.mozilla.org</a>.</p>
</div>

<h2 id="Summary">Summary</h2>

<p>The Firefox OS Simulator add-on is a tool that enables you to test and debug your <a href="https://developer.mozilla.org/ru/docs/Apps" title="/ru/docs/Apps">Firefox OS app</a> on the desktop. The code-test-debug cycle is much faster with the simulator than with a real device, and of course, you don't need a real device in order to use it.</p>

<p>Essentially, the Simulator add-on consists of:</p>

<ul>
 <li><strong>the Simulator</strong>: this includes the <a href="https://developer.mozilla.org/ru/docs/Mozilla/Firefox_OS/Using_the_B2G_desktop_client" title="/ru/docs/Mozilla/Firefox_OS/Using_the_B2G_desktop_client">Firefox OS desktop client</a>, which is a version of the higher layers of <a href="https://developer.mozilla.org/ru/docs/Mozilla/Firefox_OS" title="/ru/docs/Mozilla/Firefox_OS">Firefox OS</a> that runs on your desktop. The Simulator also includes some <a href="https://developer.mozilla.org/ru/docs/Tools/Firefox_OS_1.1_Simulator#Simulator-toolbar" title="#Simulator-toolbar">additional emulation features</a> that aren't in the standard Firefox OS desktop builds.</li>
 <li><strong>the Dashboard</strong>: a tool hosted by the Firefox browser that enables you to start and stop the Simulator and to install, uninstall, and debug apps running in it. The Dashboard also helps you push apps to a real device, and checks app manifests for common problems.</li>
</ul>

<p>The screenshot below shows a debugging session using the Simulator.</p>

<p>The Dashboard is on the top right, running inside a Firefox tab. We've added one app, a packaged app called "Where am I?". At the top left the app is running in the Simulator. We've also connected the debugging tools, which are in the panel at the bottom. You can see that the Console pane displays messages about the app.</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/5513/Simulator-overview-4.0.png"></p>

<p>This guide covers the following topics:</p>

<ul>
 <li><a href="/ru/docs/Tools/Firefox_OS_1.1_Simulator#Installing" title="#Installing">how to install the Simulator add-on</a></li>
 <li><a href="/ru/docs/Tools/Firefox_OS_1.1_Simulator#Adding-updating-removing" title="#Adding-updating-removing">how to add, remove, and refresh apps</a></li>
 <li><a href="/ru/docs/Tools/Firefox_OS_1.1_Simulator#Manifest-validation" title="#Manifest-validation">manifest validation</a></li>
 <li><a href="/ru/docs/Tools/Firefox_OS_1.1_Simulator#Running-the-Simulator" title="#Running-the-Simulator">how to run the Simulator</a></li>
 <li><a href="/ru/docs/Tools/Firefox_OS_1.1_Simulator#Attaching-developer-tools" title="#Attaching-developer-tools">how to connect developer tools such as the JS debugger to apps running in the Simulator</a></li>
 <li><a href="/ru/docs/Tools/Firefox_OS_1.1_Simulator#Simulator-receipts" title="#Simulator-receipts">how to get test receipts for a paid app</a></li>
 <li><a href="/ru/docs/Tools/Firefox_OS_1.1_Simulator#Push-to-device" title="#Push-to-device">how to push apps to a connected device</a></li>
 <li><a href="/ru/docs/Tools/Firefox_OS_1.1_Simulator#Limitations" title="#Limitations">the limitations of the Simulator compared with a real Firefox OS device</a></li>
</ul>

<div class="note">For a practical walkthrough that shows how to use the Simulator to debug a real web app, see the <a href="https://developer.mozilla.org/ru/docs/Tools/Firefox_OS_Simulator/Simulator_Walkthrough" title="/ru/docs/Tools/Firefox_OS_Simulator/Simulator_Walkthrough">Simulator Walkthrough</a> page.</div>

<h2 id="Installing_the_Simulator_add-on"><a name="Installing">Installing the Simulator add-on</a></h2>

<p>The Simulator is packaged and distributed as a Firefox add-on. To install it:</p>

<ol>
 <li>Using Firefox, go to <a href="https://addons.mozilla.org/ru/firefox/addon/firefox-os-simulator/">the Simulator's page on addons.mozilla.org</a>.</li>
 <li>Click "Add to Firefox".</li>
 <li>Once the add-on has downloaded you will be prompted to install it: click "Install Now".</li>
</ol>

<p>Because of the size of the add-on, Firefox may freeze for several seconds while installing it, and a dialog titled "Warning: Unresponsive script" may appear. If it does, click "Continue" to wait for installation to finish. This should not occur from Firefox 27 onwards.<br>
 <br>
 Firefox will periodically check for newer versions of the Simulator add-on once it's installed, updating it automatically.</p>

<p>The Dashboard opens automatically when you install the Simulator, and you can reopen it at any time by going to the "Firefox" menu (or the "Tools" menu on OS X and Linux), then "Web Developer", then "Firefox OS Simulator":</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/5141/simulator-open-on-windows-7.png" style="margin-right: auto; margin-left: auto; display: block;"><br>
 The Dashboard is the tool you use to add your app to the Simulator and run it. Here's what it looks like: <img alt="" height="650" src="https://mdn.mozillademos.org/files/5491/dashboard-4.0.png" width="1212"></p>

<h2 id="Adding_removing_and_refreshing_apps"><a name="Adding-updating-removing">Adding, removing and refreshing apps</a></h2>

<h3 id="Adding_apps">Adding apps</h3>

<p>To add a <a href="https://developer.mozilla.org/ru/docs/Apps/Packaged_apps" title="/ru/docs/Apps/Packaged_apps">packaged app</a> to the Simulator, open the Dashboard, click "Add Directory" and select the <a href="https://developer.mozilla.org/ru/docs/Apps/Manifest" title="/ru/docs/Apps/Manifest">manifest file</a> for your app.<br>
 <br>
 To add a hosted app, enter a URL in the textbox where it says "URL for page or manifest.webapp", then click "Add URL". If the URL points to a manifest, then that manifest will be used. If it doesn't, the Dashboard will generate a manifest for the URL, so you can add any website as an app just by entering its URL.<br>
 <br>
 When you add an app, the Dashboard will run a series of tests on your manifest file, checking for common problems. See the section on <a href="/ru/docs/Tools/Firefox_OS_1.1_Simulator#Manifest-validation" title="#Manifest-validation">Manifest Validation</a> for details on what tests are run.</p>

<p>The Dashboard will then automatically run your app in the Simulator unless the Manifest Validation Process discovers an error in your app.</p>

<h3 id="Managing_apps">Managing apps</h3>

<p>Once you have added an app, it will appear in the Manager's list of installed apps:<br>
 <img alt="" src="https://mdn.mozillademos.org/files/5493/dashboard-list-apps-4.0.png"><br>
 Each entry gives us the following information about the app:</p>

<ul>
 <li>its name, taken from the manifest</li>
 <li>its type, which will be one of "Packaged", "Hosted", or "Generated"</li>
 <li>a link to its manifest file</li>
 <li>the result of manifest validation</li>
</ul>

<p>It also gives us four commands:</p>

<ul>
 <li><strong>"Refresh":</strong> use this to update and reload the app in the Simulator after you have made changes to it. This also makes the Dashboard validate the manifest again. If you make changes to your app they will not be reflected automatically in the installed app; you will need to refresh the app to apply the changes.</li>
 <li><strong>"Connect": </strong>use this to connect developer tools to the selected app. The Dashboard will start the Simulator and app if they aren't already running.</li>
 <li><strong>"Remove" ("X"):</strong> use this to remove the app from the Simulator and the Dashboard. You can undo this action as long as the Dashboard tab is open.</li>
 <li><strong>"Receipt":</strong> use this to test receipt verification for paid apps. After you select a type of receipt to test, the app will be reinstalled with a test receipt of the given type.</li>
</ul>

<div class="note">
<p><strong>Refresh App from the Simulator window</strong>: you can update and reload an app directly from the Simulator window <a href="/ru/docs/Tools/Firefox_OS_1.1_Simulator#Simulator-menubar" title="#Simulator-menubar">using the menubar action or its associated shortcut</a> while the app is running.</p>
</div>

<h3 id="Manifest_validation"><a name="Manifest-validation">Manifest validation</a></h3>

<p>When you supply a manifest, the Manager will run some validation tests on it. It reports three categories of problems:</p>

<ul>
 <li>manifest errors: problems that will prevent your app from installing or running</li>
 <li>manifest warnings: problems that may prevent your app from working properly</li>
 <li>simulator-specific warnings: features your app is using that the Simulator doesn't yet support</li>
</ul>

<p>It summarizes the problems encountered in the entry for the app; clicking on the summary provides more details.</p>

<h4 id="Manifest_errors">Manifest errors</h4>

<p>The Dashboard will report the following conditions as errors, meaning that you won't be able to run your app in the Simulator without fixing them:</p>

<ul>
 <li>the manifest does not include the mandatory "name" field</li>
 <li>the manifest is not valid JSON</li>
 <li>the app is a hosted app, but the <a href="https://developer.mozilla.org/ru/docs/Apps/Manifest#type" title="/ru/docs/Apps/Manifest#type">type</a> field in its manifest is <a href="https://developer.mozilla.org/ru/docs/Apps/Packaged_apps#Types_of_packaged_apps" title="/ru/docs/Apps/Packaged_apps#Types_of_packaged_apps">"privileged" or "certified"</a>, which are only available to packaged apps</li>
 <li>common appCache errors (packaged apps can't use appCache, requests to the manifest URL return an HTTP redirect or an HTTP error status)</li>
</ul>

<p>Here's the result of trying to add a manifest file with a missing "name":<br>
 <img alt="" src="https://mdn.mozillademos.org/files/5495/dashboard-missing-name-4.0.png"></p>

<h4 id="Manifest_warnings">Manifest warnings</h4>

<p>The Dashboard will report the following manifest issues as warnings:</p>

<ul>
 <li>missing icons</li>
 <li>the icon is less than 128 pixels: all apps submitted to the Marketplace must have at least one icon that is at least 128 pixels square</li>
 <li>the <a href="https://developer.mozilla.org/ru/docs/Apps/Manifest#type" title="/ru/docs/Apps/Manifest#type">type</a> field is unrecognized</li>
 <li>the manifest requests a <a href="https://developer.mozilla.org/ru/docs/Apps/Manifest#permissions" title="/ru/docs/Apps/Manifest#permissions">permission</a> that is unrecognized</li>
 <li>the manifest requests a <a href="https://developer.mozilla.org/ru/docs/Apps/Manifest#permissions" title="/ru/docs/Apps/Manifest#permissions">permission</a> which will be denied</li>
 <li>the manifest requests a <a href="https://developer.mozilla.org/ru/docs/Apps/Manifest#permissions" title="/ru/docs/Apps/Manifest#permissions">permission</a> for which access could not be determined</li>
</ul>

<h4 id="Simulator-specific_warnings">Simulator-specific warnings</h4>

<p>Finally, the Manager will emit warnings for apps that use features of Firefox OS not yet fully supported by the Simulator:</p>

<ul>
 <li>the <a href="https://developer.mozilla.org/ru/docs/Apps/Manifest#type" title="/ru/docs/Apps/Manifest#type">type</a> field is "certified", but the Simulator does not yet fully support certified apps</li>
 <li>the manifest requests a <a href="https://developer.mozilla.org/ru/docs/Apps/Manifest#permissions" title="/ru/docs/Apps/Manifest#permissions">permission</a> to use an API that is <a href="/ru/docs/Tools/Firefox_OS_1.1_Simulator#Unsupported-APIs" title="#Unsupported-APIs">not yet supported</a> by the Simulator</li>
</ul>

<h2 id="Running_the_Simulator"><a name="Running-the-Simulator">Running the Simulator</a></h2>

<p>There are two different ways the Simulator may be started:</p>

<ul>
 <li>if you add an app or click the "Refresh" or "Connect" button next to your app's entry, the Dashboard will automatically run your app in the Simulator</li>
 <li>if you click the button labeled "Stopped" on the left-hand side of the Dashboard, the Simulator will boot to the Home screen and you'll need to navigate to your app</li>
</ul>

<p>Either way, once the Simulator is running, the button labeled "Stopped" turns green and the label changes to "Running". To stop the Simulator, click this button again.<br>
 <br>
 The Simulator appears as a separate window, sized so the simulated screen area is 320x480 pixels, with a <a href="/ru/docs/Tools/Firefox_OS_1.1_Simulator#Simulator-toolbar" title="#Simulator-toolbar">toolbar at the bottom</a> and a <a href="/ru/docs/Tools/Firefox_OS_1.1_Simulator#Simulator-menubar" title="#Simulator-menubar">menubar at the top</a> that contains some extra features:</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/5505/simulator-bars.png" style="margin-right: auto; margin-left: auto; display: block;"></p>

<p>To simulate touch events you can click the mouse button and drag while holding the button down. So by clicking and dragging right-to-left from the Home Screen, you'll see the built-in apps, as well as any apps you have added:</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/5517/simulator-homescreen.png"></p>

<h3 id="Simulator_toolbar"><a name="Simulator-toolbar">Simulator toolbar</a></h3>

<p>In the bottom toolbar, from left to right, there are the <strong>Home button</strong>, the <strong>Screen Rotation button</strong>, and the <strong>Geolocation button</strong>.</p>

<ul>
 <li>The <strong>Home button</strong> takes you to the Home screen (or to the task list if you keep it pressed for a couple of seconds).</li>
 <li>The <strong>Screen Rotation button</strong> switches the device between portrait and landscape orientation. This will generate the <a href="https://developer.mozilla.org/ru/docs/WebAPI/Managing_screen_orientation#Listening_orientation_change" title="/ru/docs/WebAPI/Detecting_device_orientation">orientationchange</a> event.</li>
 <li>The <strong>Geolocation button</strong> triggers a dialog asking you to share your geographic location, either using your current coordinates or supplying custom coordinates; this will be made available to your app via the <a href="https://developer.mozilla.org/ru/docs/WebAPI/Using_geolocation" title="/ru/docs/WebAPI/Using_geolocation">Geolocation API</a>.</li>
</ul>

<p><a href="https://mdn.mozillademos.org/files/5511/simulator-geolocation.png"><img alt="" src="https://mdn.mozillademos.org/files/5511/simulator-geolocation.png" style="width: 520px; height: 309px;"></a><a href="https://mdn.mozillademos.org/files/5519/simulator-screen-orientation.png"><img alt="" src="https://mdn.mozillademos.org/files/5519/simulator-screen-orientation.png" style="width: 500px; height: 297px;"></a></p>

<h3 id="Simulator_menubar"><a name="Simulator-menubar"></a>Simulator menubar</h3>

<p>In the top menubar, you can access some useful commands to make development more efficient:</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/5525/simulator-menubar.png"></p>

<ul>
 <li><strong>File -&gt; Quit</strong> (<em>Ctrl/Cmd - Q</em>): shut down the Simulator</li>
 <li><strong>App -&gt; Refresh</strong> (<em>Ctrl/Cmd - R</em>): refresh the running app</li>
</ul>

<p>The keyboard shortcut for the <strong>"App Refresh"</strong> command makes it possible to iteratively develop an app much like a web page:</p>

<ul>
 <li>make a change to the code (and rerun your build tool if needed, e.g., volo / yeoman / grunt)</li>
 <li>type the keyboard shortcut to refresh the app running in the Simulator</li>
</ul>

<div class="note">
<p><strong>"Refresh App and Clear Data" hidden shortcut:</strong> sometimes it's useful to clear data that the Simulator has stored for an app, so the Simulator contains a hidden shortcut, <em>Shift - Ctrl/Cmd - R</em>, that will refresh the running app while clearing the following data:</p>

<ul>
 <li>
  <p>localStorage / sessionStorage</p>
 </li>
 <li>
  <p>cookies</p>
 </li>
 <li>
  <p>indexedDB</p>
 </li>
 <li>
  <p>appCache</p>
 </li>
</ul>
</div>

<h2 id="Attaching_developer_tools"><a name="Attaching-developer-tools">Attaching developer tools</a></h2>

<p>You can attach developer tools to the Simulator to help debug your app. At the moment you can only attach the <a href="https://developer.mozilla.org/ru/docs/Tools/Debugger" title="/ru/docs/Tools/Debugger">JavaScript Debugger</a>, the <a href="https://developer.mozilla.org/ru/docs/Tools/Web_Console" title="/ru/docs/Tools/Web_Console">Web Console</a>, the <a href="https://developer.mozilla.org/ru/docs/Tools/Style_Editor" title="/ru/docs/Tools/Style_Editor">Style Editor</a>, the <a href="https://developer.mozilla.org/ru/docs/Tools/Profiler" title="/ru/docs/Tools/Profiler">Profiler</a>, and the <a href="https://developer.mozilla.org/ru/docs/Tools/Network_Monitor" title="/ru/docs/Tools/Network_Monitor">Network Monitor</a>, but we're working on adding support for more <a href="https://developer.mozilla.org/ru/docs/Tools/DevTools_Window" title="https://developer.mozilla.org/ru/docs/Tools/DevTools_Window">developer tools</a>.</p>

<div class="geckoVersionNote">
<p>Some of these tools are only available in Beta, Aurora, or Nightly builds of Firefox.</p>
</div>

<p>To attach developer tools to the Simulator, click the <strong>"Connect"</strong> button for an app:</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/5497/connect-to-app-button.png" style="margin-right: auto; margin-left: auto; display: block;"></p>

<p>The Dashboard will then open a developer toolbox pane at the bottom of the Dashboard tab and connect it to the app:</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/5501/simulator-devtools-connected.png" style="margin-right: auto; margin-left: auto; display: block;"></p>

<h3 id="Web_Console">Web Console</h3>

<p>The app can log to this console using the global <a href="https://developer.mozilla.org/ru/docs/DOM/console" title="/ru/docs/DOM/console">console</a> object, and it displays various other messages generated by the app: network requests, CSS and JS warnings/errors, and security errors. (<a href="https://developer.mozilla.org/ru/docs/Tools/Web_Console" title="/ru/docs/Tools/Web_Console">Learn more about the Web Console.</a>)</p>

<h3 id="Debugger">Debugger</h3>

<p>Using the Debugger, you can step through JavaScript code that is running in the connected app, manage breakpoints, and watch expressions to track down errors and problems faster. (<a href="https://developer.mozilla.org/ru/docs/Tools/Debugger" title="/ru/docs/Tools/Web_Console">Learn more about the Debugger.</a>)</p>

<h3 id="Style_Editor">Style Editor</h3>

<p>You can view and edit CSS files referenced in the app using the connected Style Editor. Your changes will be applied to the app in real time, without needing to refresh the app. (<a href="https://developer.mozilla.org/ru/docs/Tools/Style_Editor" title="/ru/docs/Tools/Web_Console">Learn more about the Style Editor.</a>)</p>

<h3 id="Profiler">Profiler</h3>

<p>Using the Profiler tool connected to the app, you can find out where your JavaScript code is spending too much time. The Profiler periodically samples the current JavaScript call stack and compiles statistics about the samples. (<a href="https://developer.mozilla.org/ru/docs/Tools/Profiler" title="/ru/docs/Tools/Web_Console">Learn more about the Profiler.</a>)</p>

<h3 id="Network_Monitor">Network Monitor</h3>

<p>Thanks to the new Network Monitor, you can analyze the status, headers, content, and timing of all the network requests initiated by the app through a friendly interface. (<a href="https://hacks.mozilla.org/2013/06/network-monitor-now-in-firefox-beta/">Learn more about the Network Monitor.</a>)</p>

<h2 id="Receipts"><a name="Simulator-receipts"></a>Receipts</h2>

<p>If you are developing a paid app, you should test your receipt validation code (e.g., the code that verifies that a user has already purchased the app or has been issued a refund and then informs the user and locks or unlocks app features accordingly) on a valid (cryptographically signed) receipt.</p>

<p>Thanks to the <strong>"Receipts"</strong> menu in each app entry on the Simulator Dashboard, you can install an app with a <strong>"Valid"</strong>, <strong>"Invalid"</strong>, or <strong>"Refunded"</strong> test receipt. Simply select the type of receipt you wish to test, and the Dashboard will retrieve a test receipt of that type from the Marketplace receipt service and reinstall the app with that receipt in the Simulator:</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/5523/simulator-receipts-selector-4.0.png"></p>

<h2 id="Push_to_device"><a name="Push-to-device">Push to device</a></h2>

<p>If you have a Firefox OS device, you can connect it to the Simulator and can then push apps from the Dashboard to the device.</p>

<h3 id="Connecting_a_device">Connecting a device</h3>

<p>To connect the device, follow the instructions in the guide to <a href="https://developer.mozilla.org/ru/docs/Mozilla/Firefox_OS/Debugging/Connecting_a_Firefox_OS_device_to_the_desktop" title="/ru/docs/Mozilla/Firefox_OS/Debugging/Connecting_a_Firefox_OS_device_to_the_desktop">connecting a Firefox OS device to the desktop</a>. Note that you don't have to install ADB, as the Simulator add-on includes it already.</p>

<h3 id="Pushing_apps_to_the_device">Pushing apps to the device</h3>

<p>Once you've set up the device and desktop, and connected the device to your desktop via USB, you'll see the note <strong>"Device connected"</strong> appear on the left of the Dashboard, and a new command appear in the entry for each app labeled <strong>"Push"</strong>:</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/5521/simulator-push2device.png"></p>

<p>Click <strong>"Push"</strong>, and the app will be installed on the Firefox OS device.</p>

<div class="note">
<p><strong>Manual Steps:</strong></p>

<ul>
 <li>
  <p>Once you’ve pushed the app to the device, you need to manually close and restart it again to get updated content.</p>
 </li>
 <li>
  <p>If you update anything in the manifest (e.g., app name, orientation, type, permissions), you need to reboot the operating system for those changes to have effect.</p>
 </li>
</ul>
</div>

<h3 id="Firefox_OS_Device_Connection_Confirmation">Firefox OS Device Connection Confirmation</h3>

<p>On every device reboot, the first <strong>"Push"</strong> request needs to be confirmed on the device:</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/5527/device-push-confirmation.png" style="width: 320px; height: 480px;"></p>

<h3 id="Troubleshooting_on_Linux">Troubleshooting on Linux</h3>

<p>If you are unable to connect your device after creating udev rules, please see this <a href="https://github.com/mozilla/r2d2b2g/issues/515">bug</a>.</p>

<h2 id="Limitations_of_the_Simulator"><a name="Limitations">Limitations of the Simulator</a></h2>

<p>Note that the Firefox OS Simulator isn't a perfect simulation.</p>

<h3 id="Hardware_limitations">Hardware limitations</h3>

<p>Apart from screen size, the Simulator does not simulate the hardware limitations of a Firefox OS device such as available memory or CPU speed.</p>

<h3 id="Audiovideo_codecs">Audio/video codecs</h3>

<p>The following codecs depend on hardware-accelerated decoding and are therefore not yet supported:</p>

<ul>
 <li>MP3</li>
 <li>AAC</li>
 <li>H.264 (MP4)</li>
 <li>WebM</li>
</ul>

<p>This means it isn't possible to use the Simulator to test video playback in apps and on websites like Youtube that rely on these codecs.</p>

<h3 id="Unsupported_APIs"><a name="Unsupported-APIs">Unsupported APIs</a></h3>

<p>Certain APIs that work on the device won't work on the Simulator, generally because the supporting hardware is not available on the desktop. We've implemented simulations for some APIs such as geolocation, and expect to add more in future releases. However, at the moment the following APIs are not supported. Using them might throw errors or just return incorrect results:</p>

<ul>
 <li><a href="https://developer.mozilla.org/ru/WebAPI/WebTelephony" title="/ru/WebAPI/WebTelephony">Telephony</a></li>
 <li><a href="https://developer.mozilla.org/ru/docs/WebAPI/WebSMS" title="/ru/docs/WebAPI/WebSMS">WebSMS</a></li>
 <li><a href="https://developer.mozilla.org/ru/docs/WebAPI/WebBluetooth" title="/ru/docs/WebAPI/WebBluetooth">WebBluetooth</a></li>
 <li><a href="https://developer.mozilla.org/ru/docs/WebAPI/Using_Light_Events" title="/ru/docs/WebAPI/Using_Light_Events">Ambient Light</a></li>
 <li><a href="https://developer.mozilla.org/ru/docs/WebAPI/Proximity" title="/ru/docs/WebAPI/Proximity">Proximity</a></li>
 <li><a href="https://developer.mozilla.org/ru/docs/WebAPI/Network_Information" title="/ru/docs/WebAPI/Network_Information">Network Information</a></li>
 <li><a href="https://developer.mozilla.org/ru/docs/Online_and_offline_events" title="/ru/docs/Online_and_offline_events">navigator.onLine and offline events</a></li>
 <li><a href="https://developer.mozilla.org/ru/docs/WebAPI/Vibration" title="/ru/docs/WebAPI/Vibration">Vibration</a></li>
</ul>

<h2 id="Getting_help"><a name="Simulator-help"></a>Getting help</h2>

<p><span style="line-height: 1.572;">If you have a question, try asking us on the </span><a href="https://lists.mozilla.org/listinfo/dev-developer-tools" style="line-height: 1.572;">dev-developer-tools mailing list</a><span style="line-height: 1.572;"> or on </span><a href="irc://irc.mozilla.org/#devtools" style="line-height: 1.572;">#devtools on irc.mozilla.org</a><span style="line-height: 1.572;">.</span></p>

<h3 id="How_to_enable_verbose_logging"><a name="Simulator-verbose-logging"></a>How to enable verbose logging</h3>

<p>Use about:config to create the preference <a href="mailto:extensions.r2d2b2g@mozilla.org.sdk.console.logLevel">extensions.r2d2b2g@mozilla.org.sdk.console.logLevel</a>, set it to the integer value 0, and disable/reenable the add-on. Additional messages about the Simulator's operation will appear in the Error Console (or Browser Console in newer versions of Firefox).</p>
</div>
</div>

<div class="note">
<p> </p>
</div>

<p> </p>