HTML and CSS Reference
In-Depth Information
A look at the application's manifest
All Windows Store application projects include a manifest file. So far, you haven't needed to deal with
the manifest. However, when your app needs special capabilities, such as the ability to make HTTP
requests over the Internet, the manifest becomes important. So let's take a look at it.
Locate the file package.appxmanifest in your project's folder and open it. Next, select the
Capabilities tab. If you do that for the sample RssReader project you have been working on in this
chapter, you should see the screen shown in Figure 11-4.
Each capability listed represents an action that your application may be able to perform when
running on a Windows 8 system. The key point here is that for all unchecked capabilities, the
Windows 8 runtime will restrict your application from invoking any application programming
interface (API) that relates to those capabilities. As you can see in Figure 11-4, you must check the
Internet Client capability for the WinJS.xhr object to function properly.
FIGURE 11-4 The manifest file of the sample project.
Now, try disabling the Internet Client capability and running the RssReader sample application. The
application compiles and deploys successfully to the device. However, it doesn't produce any visible
effect—no error messages, no crashes, and no failure. What's going on? Quite simply, the Windows 8
runtime system blocked any call that required an explicitly declared capability.
Search WWH ::

Custom Search