Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0A68017E3D for ; Thu, 21 May 2015 17:38:47 +0000 (UTC) Received: (qmail 798 invoked by uid 500); 21 May 2015 17:38:46 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 740 invoked by uid 500); 21 May 2015 17:38:46 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 729 invoked by uid 99); 21 May 2015 17:38:46 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 May 2015 17:38:46 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B6A09E51BB; Thu, 21 May 2015 17:38:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: purplecabbage@apache.org To: commits@cordova.apache.org Date: Thu, 21 May 2015 17:38:47 -0000 Message-Id: <33009f9ce13442e1aa4d200d564e69d9@git.apache.org> In-Reply-To: <61bbb8dfdfbe46d5a0c5df4e573ae9be@git.apache.org> References: <61bbb8dfdfbe46d5a0c5df4e573ae9be@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/3] docs commit: PR comments PR comments Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/2e56e097 Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/2e56e097 Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/2e56e097 Branch: refs/heads/master Commit: 2e56e0978e43196cb510a519a0252ffa69a77bae Parents: 3ef49e7 Author: Rob Paveza Authored: Mon Mar 23 15:16:50 2015 -0700 Committer: Rob Paveza Committed: Mon Mar 23 15:16:50 2015 -0700 ---------------------------------------------------------------------- docs/en/edge/guide/platforms/win8/index.md | 25 +++++++++--- .../edge/guide/platforms/win8/win10-support.md | 43 ++++++++++++++++---- 2 files changed, 56 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2e56e097/docs/en/edge/guide/platforms/win8/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/platforms/win8/index.md b/docs/en/edge/guide/platforms/win8/index.md index f91641c..7e85997 100644 --- a/docs/en/edge/guide/platforms/win8/index.md +++ b/docs/en/edge/guide/platforms/win8/index.md @@ -66,7 +66,7 @@ To develop apps for Windows 8.0 and 8.1 (including Windows Phone 8.1): To develop apps for Windows 10: - Windows 8.1 or Windows 10 Technical Preview 2, 32- or 64-bit, along with - [Visual Studio 2015 CTP6](http://www.visualstudio.com/preview) or higher. + [Visual Studio 2015 RC](http://www.visualstudio.com/preview) or higher. App compatibility is determined by the OS that the app targeted. Apps are forwardly-compatible but not backwardly-compatible, so an app targeting Windows 8.1 cannot run on 8.0, but @@ -143,6 +143,8 @@ Here's the corresponding lower-level shell-tool approach: C:\path\to\cordova-win\bin\create.bat C:\path\to\new\hello com.example.hello HelloWorld +This project targets Windows 8.1 as the default target OS. You can choose to target 8.0 or 10.0 (see "Configure target Windows version" below) for all builds, or you target specific a particular version during each build. + ## Build the Project If you are using the CLI in development, the project directory's @@ -166,7 +168,7 @@ for release: The `clean` command helps flush out directories in preparation for the next `build`: - C:\path\to\project\cordova\clean.bat + C:\path\to\project\cordova\clean.bat ## Configure target Windows version @@ -174,19 +176,32 @@ By default `build` command produces two packages: Windows 8.0 and Windows Phone To upgrade Windows package to version 8.1 the following configuration setting must be added to configuration file (`config.xml`). - + Once you add this setting `build` command will start producing Windows 8.1 and Windows Phone 8.1 packages. +### The --appx parameter + +You may decide that you want to build a particular version of your application targeting a particular OS (for example, you might have set that you want to target Windows 10, but you want to build for Windows Phone 8.1). To do this, you can use the `--appx` parameter: + + > cordova build windows -- --appx=8.1-phone + +The build system will ignore the preference set in config.xml for the target Windows version and strictly build a package for Windows Phone 8.1. + +Valid values for the `--appx` flag are `8.1-win`, `8.1-phone`, and `uap` (for Windows 10 Universal Apps). These options also apply to the `cordova run` command. + ### Considerations for target Windows version Windows 10 supports a new "Remote" mode for Cordova apps (and HTML apps in general). This mode enables -apps much more freedom with respect to use of modern web frameworks and certain types of unsafe activity -(such as DOM manipulation), but does so by reducing the set of capabilities your app may use when +apps much more freedom with respect to use of DOM manipulation and common web patterns such as the use +of inline script, but does so by reducing the set of capabilities your app may use when submitted to the public Windows Store. For more information about Windows 10 and Remote Mode, look at the [Cordova for Windows 10](win10-support.md.html) documentation. +When using Remote Mode, developers are encouraged to apply a Content Security Policy (CSP) to their application +to prevent script injection attacks. + ## Deploy the app To deploy Windows Phone package: http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2e56e097/docs/en/edge/guide/platforms/win8/win10-support.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/platforms/win8/win10-support.md b/docs/en/edge/guide/platforms/win8/win10-support.md index a3195ce..82265e5 100644 --- a/docs/en/edge/guide/platforms/win8/win10-support.md +++ b/docs/en/edge/guide/platforms/win8/win10-support.md @@ -1,16 +1,26 @@ # Cordova for Windows 10 # -Maybe you could instead call it "Windows 10 for Cordova." Windows 10 has had its HTML and JavaScript Apps platform re-engineered to bring Cordova support to the web, and to get platform security restrictions out of your way. +Maybe you could instead call it "Windows 10 for Cordova." Windows 10 has had its HTML and +JavaScript Apps platform re-engineered to bring Cordova support to the web, and to get +platform security restrictions out of your way. ## Getting Started with Windows 10 ## -Adding Windows 10 support to your app is as easy as setting your Windows target platform version to 10.0: +Adding Windows 10 support to your app is as easy as setting your Windows target platform +version to 10.0: -When you build with these preferences both set, only a single .appx (and .appxupload) will be built. They will require Windows 10 at a minimum. +When you build with these preferences both set, only a single .appx (and .appxupload) will +be built. They will require Windows 10 at a minimum. ### Understanding Remote Mode vs. Local Mode ### -Remote Mode is a new feature of the HTML Applications for Windows platform in Windows 10. In Windows 8 and 8.1, HTML Applications worked in what is called "Local Mode" in Windows 10. In Local Mode, HTML Applications have full access to the native Windows API surface and capabilities. In order to prevent script injection attacks which could result in leaking personally-identifiable information due to malicious code, Local Mode disallows inline script, and requires developers who perform DOM manipulation to do so within an explicit context (`MSApp.execUnsafeLocalFunction`). +Remote Mode is a new feature of the HTML Applications for Windows platform in Windows 10. In +Windows 8 and 8.1, HTML Applications worked in what is called "Local Mode" in Windows 10. In +Local Mode, HTML Applications have full access to the native Windows API surface and +capabilities. In order to prevent script injection attacks which could result in leaking +personally-identifiable information due to malicious code, Local Mode disallows inline script, +and requires developers who perform DOM manipulation to do so within an explicit context +(`MSApp.execUnsafeLocalFunction`). Remote Mode eliminates those requirements, which makes it possible to use unmodified libraries like jQuery or AngularJS directly in your code, without any changes. To do so, it removes your ability to declare certain capabilities when certifying your app in the Windows Store. The removal of these capabilities usually doesn't prevent getting to certain functionality, but it might require to use a different combination of APIs or tactics. @@ -43,17 +53,36 @@ The Enterprise Authentication and Shared User Certificates capabilities are spec *At least one is required.* -These preferences identify the version of Windows or Windows Phone you would like your app package to target. +These preferences identify the version of Windows or Windows Phone you would like your +app package to target. **Valid Values** - `10.0`, `UAP`: Builds for Windows 10 Universal App Platform - `8.1`: Builds for Windows 8.1 or Windows Phone 8.1 -- `8.0`: Build for Windows 8.0. Not valid for Windows Phone (use the **wp8** Cordova platform instead) +- `8.0`: Build for Windows 8.0. Not valid for Windows Phone (use the **wp8** Cordova +platform instead) **Scenarios** -If you are targeting Windows 10 only, you only need to have a single `windows-target-version` setting in your config.xml file. +If you are targeting Windows 10 only, you only need to have a single `windows-target-version` +setting in your config.xml file. + +#### WindowsDefaultUriPrefix #### + + +This preference identifies whether you want your app to target the **local context** or **remote +context** as its startup URI. When building for Windows 10, the default is the remote +context (`ms-appx-web://`). + +In order to have a local-mode application that is not impacted by Remote Mode capability +restrictions, you must set this preference to `ms-appx://` and not declare any `` +elements with remote URIs. + +**Valid Values** + +- `ms-appx://` (Default for Windows 8.0, 8.1): The start page runs in the local context +- `ms-appx-web://` (Default for Windows 10): The start page runs in the remote context #### {SDK}-MinVersion, {SDK}-MaxVersionTested #### *Optional* --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org