I'm trying to test an app on a Firefox OS device by serving the zip'ed application through a Grails server. The file is served like so:
response.setContentType("application/x-web-app-manifest+json")
File file = new File("/path/to/application/package.zip")
response.setHeader("Content-disposition", "attachment;filename=${file.name}")
response.outputStream << file.bytes
I can download the zip just fine on a desktop browser, and it looks like it is downloading OK on the device as well. The following error occurs after downloading:
MANIFEST_PARSE_ERROR
Here's a look at the manifest:
{
"version": "0.1",
"name": "App Name",
"description": "App Description",
"launch_path": "/target/index.html",
"icons": {
"16": "/img/icons/mortar-16.png",
"48": "/img/icons/mortar-48.png",
"128": "/img/icons/mortar-128.png"
},
"developer": {
"name": "Example Dev",
"url": "http://example.com"
},
"installs_allowed_from": ["*"],
"default_locale": "en",
"permissions": {
}
}
You manifest looks ok (at a glance), but from your code, it looks you are sending the zip contents in place of the manifest ?
Note that there are two manifests for packaged apps - the web app manifest inside the zip, and also the mini-manifest which describes where your app should be installed from. If you are installing a packaged app from your own page, you need to serve a mini-manifest first, which tells Firefox OS where to get the .zip file from. See here for details:
Alternatively I you can submit your .zip app through the firefox marketplace, and it will generate the mini-manifest for you.
To ensure your zip package is valid you can use the app validator: https://marketplace.firefox.com/developers/validator