This document provides instructions for creating a simple Firefox OS application in six steps. It begins with an overview of the Firefox OS simulator and same origin policy restrictions. It then describes the webapp manifest file format and how to define icons, orientation, and installation permissions. The document demonstrates deploying an app to the simulator for live debugging and to the Firefox Marketplace. Source files for a sample app are outlined, including assets, styles, and deployment steps.
2. A. Introduction
Firefox OS Simulator
Same Origin Policy
WebApp Manifest
Installation
B. Sample app
Overview source files
Assets and styleguide
Deployment to simulator
Deployment to »Firefox Marketplace«
Getting started: 6 steps
2
Kochan & Partner Brand Design Development
4. Firefox OS Simulator
Simulator 4.0
Geeksphone Keon
Firefox OS 1.1
320 x 480
Firefox OS 1.1 or 1.2
320 x 480, 3.5 inch, 165 ppi
Single core, 800 MHz
RAM 512 MB
Internal HD 4 GB
Camera 3.1 MP
Home button
Simulate location
Rotate phone
portrait / landscape
4
Kochan & Partner Brand Design Development
5. Firefox OS Simulator
AddOn for Firefox 24/25
https://addons.mozilla.org/de/firefox/addon/firefox-os-simulator
Hint
5
Simulator 4.0 on Firefox 24/25 crashes on OS X 10.9 Mavericks.
Use Firefox 26b and »App Manager« to install simulator.
Kochan & Partner Brand Design Development
6. Firefox OS Simulator – Firefox 26 beta
Firefox OS 1.2
No more direct buttons for orientation and location?!
6
Kochan & Partner Brand Design Development
7. Same Origin Policy
App access is sandboxed
Installation of apps is limited to same origin as manifest
– domain
– protocol
– port
Hint
7
You need one subdomain per app!
Kochan & Partner Brand Design Development
8. WebApp Manifest
Named usually manifest.webapp
JSON file (~ info.plist for iOS apps)
https://developer.mozilla.org/en-US/Apps/Developing/Manifest
Mime-Type
AddType application/x-web-app-manifest+json .webapp
Hint
Stick to the data types of the documentation, e.g.
"fullscreen": "true" // not boolean true
"version": "0.1" // not floating point 0.1
Validation
https://marketplace.firefox.com/developers/validator
8
Kochan & Partner Brand Design Development
16. Assets and styleguide
Styleguide for user interface
https://www.mozilla.org/en-US/styleguide/products/firefox-os
Hint
Powerpoint template
– Draw icon shapes
– Re-arrange object order to keep overlay on top
– Export slide as image (about 3000 x 3000 px)
– cutout transparent image areas
– Re-size images to your needs
16
Kochan & Partner Brand Design Development
17. Deployment to Simulator
Parsed manifest meta data
App name, description, icon
Developer
Live-Debugging
– console
– inspector
– ...
URL of the webapps manifest file
17
Kochan & Partner Brand Design Development
18. Deployment to »Firefox Marketplace«
https://marketplace.firefox.com/developers/
Device: Phone, Browser, Firefox Mobile/Tablet on Android
Pricing: billing just in a couple of countries – not in Germany
Human based-approval
Position in queue and estimated time of approval is displayed after upload.
E.g. #37 of 37. About 6 days remaining.
18
Kochan & Partner Brand Design Development
19. Getting started: 6 steps
1
Install Firefox 26 beta
2
Install App-Manager and simulator: about:app-manager
3
Grab a (sub-)domain
4
Download simple starter package
http://lab.kochan.de/mg/fox/package.zip
5
6
19
Adjust path settings in index.html and manifest.webapp
Deploy your app to the simulator and see it work together
Kochan & Partner Brand Design Development