+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Viewing a Cordova Project in Windows Visual Studio

MobileFirst supports three different types of Windows Universal environments - Windows 8.1 Desktop, Windows Phone 8.1, and Windows 10 Universal Windows Platform (UWP).

Ensure that you have a Cordova app set up with Apache Cordova CLI. See Create a new Cordova app without the MobileFirst template.

Note: For Windows 10 UWP apps, you need to have Visual Studio 2015.


Procedure

  1. Navigate to the directory <Cordova_application_name>/platforms/windows.
  2. Choose between either of the following methods to open your project.

    • Double click to open the solution file, cordovaApp.sln.

      • To work with a Windows project, choose the appropriate version in the Solution Explorer pane. We can choose between Windows 8.1 Desktop, Windows Phone 8.1 or Windows 10 UWP. Right-click the required project name and select, Set as StartUp Project.

    • Choose to click the appropriate .jsproj file to open the project. The following versions of Windows are supported:

      • For Windows 8.1 Desktop, Cordovaapp.Windows.jsproj
      • For Windows Phone 8.1, Cordovaapp.Phone.jsproj
      • For Windows 10 UWP, CordovaApp.Windows10.jsproj

    The following folders and files are part of the project:

    • The .appxmanifest file contains the app name and info, as well as package information:

      • For Windows Phone 8.1: package.phone.appxmanifest
      • For Windows 8.1 Desktop: package.windows.appxmanifest
      • For Windows 10 UWP: package.windows10.appxmanifest

    • The config.xml file contains various configurations, that includes the Calls hooks. The config.xml also points to the default html page: <content src="index.html" />.
    • The www folder contains the JavaScript, HTML, and CSS files loaded into the WebView.
    • The index.html is present in the www folder. It is the initial HTML page loaded by the WebView, defined in the config.xml file.
    • The mfpclient.properties file contains information for connecting to the MobileFirst server.

Parent topic: Develop Cordova apps for Windows