Skip to content

Commit 352a2b5

Browse files
committedAug 1, 2015
Updated to reflect TACO update, updated VSO workaround, streamlined CI tutorial landing page
1 parent 342afff commit 352a2b5

13 files changed

+562
-497
lines changed
 

‎Readme.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ This repository contains a set of documents and tutorials for the **Visual Studi
1111
1. [Using Gulp to Build Cordova Projects](./tutorial-gulp/gulp-ci.md)
1212
1. [Invoking Gulp Tasks During a Cordova Build and the VS Task Runner Explorer](./tutorial-gulp/gulp-task-runner-explorer.md)
1313
1. [Compiling TypeScript with Gulp](./tutorial-gulp/gulp-typescript.md)
14-
1. [Building Cordova Apps in a Team / Continuous Integration (CI) Environment](./tutorial-team-build)
14+
1. [Getting Started Building Cordova Apps in a Team / Continuous Integration (CI) Environment](./tutorial-team-build)
1515
1. [Getting Started with Cordova & TFS 2015 or Visual Studio Online](./tutorial-team-build/TFS2015.md)
1616
1. [Getting Started with Cordova & TFS 2013](./tutorial-team-build/TFS2013.md)
1717
1. [Getting Started with Cordova & Jenkins CI](./tutorial-team-build/Jenkins.md)
18+
1. [General CI Guidence, Information, and Troubleshooting](./tutorial-team-build/General.md)
1819
1. [Package & Publish your Cordova Applications](./tutorial-package-publish)
1920
1. [Using TypeScript with your Cordova projects](./getting-started/tutorial-typescript.md)
2021
1. [Build and Simulate iOS in the Cloud](http://go.microsoft.com/fwlink/?LinkID=618476) (MSDN)

‎known-issues/known-issues-cordova5.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ In general we recommend **using Cordova 5.1.1 or above** instead of 5.0.0 as the
66

77
##Apache Cordova 5.x.x General Issues
88
----------
9-
**Old versions of Cordova plugins due to Cordova plugin ID changes:** A significant change occurred with Cordova 5.0.0+ that also altered the IDs of many core Cordova plugins. The Visual Studio 2015 config.xml designer uses the old IDs (ex: org.apache.cordova.camera not cordova-plugin-camera) because Cordova 4.3.1 and below cannot access plugins using these new IDs and the default template uses 4.3.1.
9+
**config.xml Designer Does Not Show Updated Plugin IDs with Cordova 5.0.0+:** A significant change occurred with Cordova 5.0.0+ that also altered the IDs of many core Cordova plugins. The Visual Studio 2015 config.xml designer uses the old IDs (ex: org.apache.cordova.camera not cordova-plugin-camera) with Cordova 4.3.1 and below since this version of the Cordova < 5.0.0 do not support npm.
1010

11-
To install updated plugins, follow [this proceedure to install a npm sourced plugin](../tips-and-workarounds/general/README.md#plugin-npm).
12-
13-
*Note that these updated plugins were tested on Cordova 5.0.0 or later and therefore may or may not work on earlier versions of Cordova.* We advise against updating your plugins when using older versions of Cordova unless you are attempting to solve a specific problem.
11+
However, if you update your Cordova version to 5.0.0 or later the config.xml designer should automatically see the new IDs in the "Plugins" tab of the designer. If you do not see this behavior, update Tools for Apache Cordova since a small post-RTM update enabled this functionality. Some very early adopters may not see some of the improvments described in this document until after you update. You will get an update notification soon prompting you to update or you can click "Install Tools for Apache Cordova" from the Apache Cordova templates section when creating a new project. Be sure to remove plugins with the older IDs before updating via the "Installed" tab to avoid unexpected behaviors.
1412

1513
----------
1614
**Cannot access any network resources from Android app:** The Android platform contained within Cordova 5.0.0+ does not have a "whitelist" plugin installed by default and therefore blocks network access by default. There are now two whitelist plugins that can be installed:

‎known-issues/known-issues-general.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@ Remove these files from source control if you are not checking in the "platforms
3131
**Slow first build or first plugin add:** The first build or plugin add for a given version of Cordova will be slower than subsequent builds as VS must first dynamically acquire Cordova. See the Output Window for more detail on progress. Further, the first remote iOS build will exhibit the same behavior as the agent downloads Cordova on your OSX machine. If you encounter a CordovaModuleLoadError with the first iOS build for a given Cordova version you can follow [these instructions](../tips-and-workarounds/ios/README.md#npm-cache) to resolve the problem.
3232

3333
----------
34-
**Old versions of Cordova plugins due to Cordova plugin ID changes:** A significant change occurred with Cordova 5.0.0+ that also altered the IDs of many core Cordova plugins. The Visual Studio 2015 config.xml designer uses the old IDs (ex: org.apache.cordova.camera not cordova-plugin-camera) because Cordova 4.3.1 and below cannot access plugins using these new IDs and the default template uses 4.3.1.
34+
**Old versions of Cordova plugins due to Cordova plugin ID changes:** A significant change occurred with Cordova 5.0.0+ that also altered the IDs of many core Cordova plugins. The Visual Studio 2015 config.xml designer uses the old IDs (ex: org.apache.cordova.camera not cordova-plugin-camera) with Cordova 4.3.1 and below since this version of the Cordova < 5.0.0 do not support npm.
3535

36-
To install updated plugins, follow [this proceedure to install a npm sourced plugin](../tips-and-workarounds/general/README.md#plugin-npm).
37-
38-
*Note that these updated plugins were tested on Cordova 5.0.0 or later and therefore may or may not work on earlier versions of Cordova.* We advise against updating your plugins when using older versions of Cordova unless you are attempting to solve a specific problem.
36+
If you update your Cordova version to 5.1.1 or later the config.xml designer will automatically switch to using the new IDs. If you do not see this behavior, update Tools for Apache Cordova. Some very early adopters may not see some of the improvments described in this document until after you update since a small post-RTM update enabled this functionality. You will get an update notification soon prompting you to update or you can click "Install Tools for Apache Cordova" from the Apache Cordova templates section when creating a new project. Be sure to remove plugins using older IDs from your project before adding the updated plugins with the new IDs.
3937

4038
----------
4139
**Git sourced plugins will not install:** Git sourced plugins will not install properly if you have not installed the [Git command line tools](http://www.git-scm.com/downloads) and have them in your system path. During installation of the Git tools, select the "Use Git from the Windows Command Prompt" option or add the "bin" folder from the Git install location to your path and restart VS. (Usually "C:\Program Files (x86)\Git\bin").

‎known-issues/known-issues-vs2015.md

+6
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,14 @@ In some cases, when you uninstall VS2013 or a previous version (RC) of VS2015, a
118118
----------
119119
**iPhone 4S Simulator appears when selecting iPad or other device when using the remotebuild agent and VS 2015 RTM:** You need to install version 3.1.1 of the ios-sim node module. Run "npm install -g ios-sim@3.1.1" from the Terminal app in OSX to install. See [remotebuild installation instructions ](http://go.microsoft.com/fwlink/?LinkID=533745) for details.
120120

121+
----------
121122
**Existing vs-mda-remote settings in Visual Studio do not work with the remotebuild agent:** You will need to generate and use a new PIN when setting up Visual Studio to connect to the remotebuild agent for the first time. If you are not using secure mode, turn secure mode on and then off again to cause VS to reinitalize. See [remotebuild installation instructions](http://go.microsoft.com/fwlink/?LinkID=533745) for details.
122123

124+
----------
125+
**config.xml Designer Does Not Show Updated Plugin IDs with Cordova 5.0.0+:** A significant change occurred with Cordova 5.0.0+ that also altered the IDs of many core Cordova plugins. The Visual Studio 2015 config.xml designer uses the old IDs (ex: org.apache.cordova.camera not cordova-plugin-camera) with Cordova 4.3.1 and below since this version of the Cordova < 5.0.0 do not support npm.
126+
127+
However, if you update your Cordova version to 5.0.0 or later the config.xml designer should automatically see the new IDs in the "Plugins" tab of the designer. If you do not see this behavior, update Tools for Apache Cordova since a small post-RTM update enabled this functionality. You will get an update notification soon prompting you to update or you can click "Install Tools for Apache Cordova" from the Apache Cordova templates section when creating a new project. Be sure to remove plugins with the older IDs before updating via the "Installed" tab to avoid unexpected behaviors.
128+
123129
##Visual Studio 2015 RC
124130
----------
125131
**VS 2015 RC and Cordova 5.x.x / Cordova Android 4.x.x:** See [Cordova 5.x.x known issues](known-issues-cordova5.md) for details on Android related issues that are specific to Cordova 5.0.0 and up.

‎tutorial-cordova-5/README.md

+17-21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Using Apache Cordova 5
2-
**Note that this documentation applies to Visual Studio 2015 and does not apply to Visual Studio 2013 CTPs.**
2+
**Note: If the default blank template in Visual Studio 2015 is does not default to 5.1.1, you should update Tools for Apache Cordova.** Some very early adopters may not see some of the improvments described in this document until after you update. You will soon see a notification in the in the notification center (flag in the upper right) prompting you to update.
33

44
Tools for Apache Cordova RTM has been tested with both Cordova 4.3.1 and Cordova 5.1.1. As the major version number increase implies, [Apache Cordova 5](http://http://go.microsoft.com/fwlink/?LinkID=617659) is a departure from 3.x and 4.x versions of Cordova in a number of very important ways. Note that there were a number of issues with Cordova 5.0.0 itself that kept us from recommending its use including an [Android security issue](http://http://go.microsoft.com/fwlink/?LinkID=617658). As a result, we strongly recommend the use of **Cordova 5.1.1** with **Visual Studio 2015 RTM** and up.
55

@@ -11,7 +11,7 @@ This article will summarize the changes in Cordova 5 and how you can take advant
1111
1. [Pluggable WebViews and the Crosswalk WebView for Android](#crosswalk)
1212
1. [Windows 10 support and improved Cordova interoperability](#win10)
1313

14-
New projects created using Tools for Apache Cordova will automatically use Cordova 4.3.1. However, you can also update projects to 5.1.1 by following these steps:
14+
You can update your project to use Cordova 5.1.1 by following these steps:
1515

1616
1. Double click on config.xml
1717

@@ -74,15 +74,13 @@ When you upgrade a project to Cordova 5.0.0+, you will want to take the followin
7474

7575
1. Add the whitelist plugin to your project via config.xml:
7676

77-
1. Right-click on config.xml and select "View Code"
77+
1. Double click on config.xml in your project
78+
79+
2. Click on the "Plugins" tab
7880

79-
2. Add the following XML element under the &lt;widget&gt; element:
81+
2. Select "Whitelist" and click "Add"
8082

81-
~~~~~~~~~~~~~~~~~~~~~~~
82-
<vs:plugin name="cordova-plugin-whitelist" version="1.0.0" />
83-
~~~~~~~~~~~~~~~~~~~~~~~
84-
85-
The next time you build in Visual Studio, VS will install this version of the whitelist plugin. You can update the version number as needed.
83+
![Add Whitelist Plugin](<media/cordova-5-7.png>)
8684

8785
2. Update config.xml with the allow-intent or allow-navigation elements as needed:
8886
1. If you have not already, right-click on config.xml and select "View Code"
@@ -136,13 +134,11 @@ As a result, core plugins like Camera have changed from [org.apache.cordova.came
136134

137135
You can find running list of [old verses new plugin IDs in this location](http://go.microsoft.com/fwlink/?LinkID=617674).
138136

139-
Visual Studio 2015 currently only uses the old IDs since these are required for the default version of Cordova 4.3.1. We will resolve this problem in a subseqent update by dynamically updating the list based on the Cordova version selected. However, you can add npm versions of plugins to your project fairly easily by adding an XML element to config.xml as follows:
137+
The config.xml designer in Visual Studio will automatically use the new plugin IDs if you are targeting Cordova 5.0.0+ and use the old plugin IDs for 4.3.1 and below where npm based plugin support is not available (see below for details).
140138

141-
~~~~~~~~~~~~~~~~~
142-
<vs:plugin name="cordova-plugin-camera" version="1.2.0" />
143-
~~~~~~~~~~~~~~~~~
139+
**If you do not see this behavior, update Tools for Apache Cordova.** Some very early adopters may not see some of the improvments described in this document until after you update. You will soon see a notification in the in the notification center (flag in the upper right) prompting you to update.
144140

145-
See [tips and workarounds](../tips-and-workarounds/general/README.md#plugin-npm) for additional details on add npm versions of plugins to your project.
141+
See [tips and workarounds](../tips-and-workarounds/general/README.md#plugin-npm) for additional details on adding npm versions of plugins to your project.
146142

147143
###Cordova Plugin Registry
148144
As of 7/14/2015, plugins.cordova.io now has two registry sections:
@@ -184,7 +180,7 @@ Simply updating to Cordova 5.0.0+ will automatically cause Gradle to be used fro
184180

185181
1. If you've already added release signing information into ant.properties in your project, you'll need to place this information in a new file in your project. See the [Packaging & Publishing tutorial for details](../tutorial-package-publish) for details.
186182

187-
2. If you encounter an unexpected build error specifically for Android, see if the error references Cordova plugin source code. If so, update it by removing the plugin using the "Installed" tab of the config.xml designer and add the latest npm based version using [the XML bassed approach](../tips-and-workarounds/general/README.md#plugin-npm) described earlier. If you cannot determine which plugin is causing the issue, you can opt to proactively upgrade all of them.
183+
2. If you encounter an unexpected build error specifically for Android, see if the error references Cordova plugin source code. If so, update it by removing the plugin using the "Installed" tab of the config.xml designer and re-adding the plugin. If you cannot determine which plugin is causing the issue, you can opt to proactively upgrade all of them.
188184

189185
3. If a plugin update doesn't solve the issue, try these steps to eliminate other factors.
190186
1. Create a fresh project and see if the problem reproduces.
@@ -216,14 +212,14 @@ There is now a [Cordova Crosswalk plugin](http://go.microsoft.com/fwlink/?LinkID
216212
###Installing the Crosswalk Plugin from VS
217213
To use the Crosswalk WebView plugin from Visual Studio, follow these steps:
218214

219-
1. Right-click on config.xml and select "View Code"
220-
221-
2. Add the following XML element under the &lt;widget&gt; element:
215+
1. Double click on config.xml in your project
216+
217+
2. Click on the "Plugins" tab
222218

223-
~~~~~~~~~~~~~~~~~~~~~~
224-
<vs:plugin name="cordova-plugin-crosswalk-webview" version="1.2.0" />
225-
~~~~~~~~~~~~~~~~~~~~~~
219+
2. Select "Crosswalk WebView" and click "Add"
226220

221+
![Add Crosswalk Plugin](<media/cordova-5-10.png>)
222+
227223
The next time you build, your app will be running in the Crosswalk WebView. Note that the first build for Android in particular will take a bit given the plugin does some dynamic acquisition.
228224

229225
###Tips on Using the Crosswalk

‎tutorial-cordova-5/cordova-5-security.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#Introduction to Cordova 5 Security
2+
3+
**Note: If the default blank template in Visual Studio 2015 is does not default to 5.1.1, you should update Tools for Apache Cordova.** Some very early adopters may not see some of the improvments described in this document until after you update. You will soon see a notification in the in the notification center (flag in the upper right) prompting you to update.
4+
25
One of the more confusing changes about [Apache Cordova 5](http://go.microsoft.com/fwlink/?LinkID=617659) is that the updated version of the Android platform (also called Cordova Android 4.x) and iOS now follow a different, but more powerful security model designed to provide developers with the tools needed to prevent cross-site scripting attacks among other issues. A critical aspect of this security model is that **absolutely no network access of any kind is allowed without the installation of a Cordova plugin**.
36

47
##Cordova Whitelists
@@ -58,6 +61,7 @@ VS syntax (works with any Cordova version):
5861
<vs:plugin name="cordova-plugin-whitelist" version="1.0.0" />
5962
~~~~~~~~~~~~~~~~~~~~~~~
6063

64+
Both the default Cordova CLI template and Visual Studio's blank template use this feature to install the Whitelist plugin automatically on first build.
6165

6266
##The W3C Content Security Policy (CSP)
6367
A topic of frequent conversation for security focused developers on the web is the [W3C Content Security Policy (CSP)](http://go.microsoft.com/fwlink/?LinkID=617696) feature that is available in Chrome, Safari, and Internet Explorer Edge. CSP support is available natively to Cordova apps targeting iOS, Windows 10 and up, and Android 4.4 and up. However, you can get support back to Android 4.0 by using something called the Crosswalk WebView. See [Using Apache Cordova 5](./README.md#crosswalk) for information adding Crosswalk to your project.
@@ -107,18 +111,16 @@ You can find a [great tutorial on using the CSP in detail here](http://go.micros
107111
##Migrating an Existing Project
108112
When you upgrade a project to Cordova 5.0.0+ from Cordova 4.3.1 or below in Visual Studio, you will want to take the following steps to ensure your app functions as you would expect.
109113

110-
1. Add the whitelist plugin to your project:
114+
1. Add the whitelist plugin to your project via config.xml:
111115

112-
1. Right-click on config.xml and select "View Code"
116+
1. Double click on config.xml in your project
117+
118+
2. Click on the "Plugins" tab
113119

114-
2. Add the following XML elements under the &lt;widget&gt; element:
120+
2. Select "Whitelist" and click "Add"
115121

116-
~~~~~~~~~~~~~~~~~~~~~~~
117-
<vs:plugin name="cordova-plugin-whitelist" version="1.0.0" />
118-
~~~~~~~~~~~~~~~~~~~~~~~
119-
120-
The next time you build in Visual Studio, VS will install this version of the whitelist plugin. You can update the version number as needed.
121-
122+
![Add Whitelist Plugin](<media/cordova-5-7.png>)
123+
122124
2. Update config.xml with allow-intent or allow-navigation elements as needed:
123125

124126
1. Right-click on config.xml and select "View Code" if you have not already

0 commit comments

Comments
 (0)