
- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
In this Firefox OS Treehouse Quick Tip, Jim discusses Firefox's Web Apps Manifest.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up[? Music ?] [Treehouse presents] 0:00 [Quick Tips] [The Web Apps Manifest] [Firefox OS with Jim Hoskins] 0:02 [In association with Mozilla] 0:04 The manifest is a key component to your web app. 0:06 It's a simple JSON file that provides the crucial information 0:08 needed to install and run your application. 0:12 If you're building a hosted web app, 0:15 this file will be hosted on your server, 0:17 and the JavaScript that will install your application 0:19 will provide the URL to where this manifest may be found. 0:21 Typically, the manifest file will have the extension .webapp. 0:26 Manifest files must be served with a content type 0:30 of application/x-web-app-manifest 0:33 plus JSON, which means you may need to configure your server 0:38 to send the correct content type header. 0:42 Hosted applications, because they're bundled in zip files, 0:45 will have their manifest file stored in that zip. 0:48 It must be at the root of the package with the name manifest.webapp. 0:51 Let's take a look at a typical manifest. 0:55 It is a JSON file, meaning the contents must be a valid JSON object. 0:58 The information about the app is stored as keys and values 1:02 in that object. 1:05 The first is name, which is the name of your application, 1:07 and second is the description, which is a brief description 1:10 about what your app is. 1:13 These are the only 2 required fields in the manifest.webapp file. 1:15 Let's take a look at some other common values. 1:19 Launch_path is the path to the application, 1:22 for instance, a single /. 1:24 If your app must be started from a path like /app, 1:27 that path may be used. 1:31 Launch_path is required for packaged apps. 1:33 Icons takes an object which specifies 1:36 where the app icons may be found for the various sizes. 1:38 The keys on this object are a number, 1:42 which is the height and width of the square icon, 1:44 and the value is the path to the specific icon file. 1:47 Many sizes may and should be specified 1:51 to make sure your icon looks good no matter where it's viewed. 1:54 Type specifies the type of web app you want to make, 1:59 either web or privileged. 2:02 If you don't need access to the special privileged APIs, 2:05 choose web, and web is the default. 2:08 Permissions is used to describe what additional permissions 2:11 are needed for the application, like accessing the device's contacts list. 2:14 Each permission includes a description of why this privilege is needed 2:19 so the user can make an informed decision as to whether or not 2:22 they want to install your app. 2:25 The developer field allows you to provide information about 2:28 who developed the app, and the version field specifies a version. 2:31 There are other fields that may be used, 2:34 so check out the other manifest fields at the Mozilla Documentation Page. 2:36
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up