How to Edit manifest.webapp When Using Cordova for Firefox Os

Last updated: Jul 31, 2014

While building my first Firefox OS app, Quickcall, I ran into a rather annoying bug, using Cordova.

The problem

When you run cordova prepare firefoxos to convert your files in www/ folder to the platforms/firefoxos folder[1], Cordova will overwrite the manifest.webapp file in your dev folder[2] with their default template.

1
2
3
4
5
6
7
root_dir
├── platformss
│   ├── firefoxos ****** [1]
│   │   └── www
│   │       └── manifest.webapp
└── www ****** [2]
    └── manifest.webapp

A solution

Naturally I searched for a solution only to find an unsatisfying answer from the Mozilla team: they suggested manually update the manifest.webapp file every time you want to update your app for a new build — well, technically there’s no build process as Firefox OS apps run using the same Web APIs as its browser counterpart.

Instead just chain the build and copy commands and set up an alias for it, until the team fixed the bug.

1
2
3
vim .bashrc
alias ffos="cordova prepare firefoxos && \cp -f  www/manifest.webapp platforms/firefoxos/www/manifest.webapp --verbose"
source .bashrc

You’re good now. All you need to do is run ffos. whenever you want to update your app with the latest changes.

comments powered by Disqus