Touch Develop retirement postponed until June 22, 2019. Sign-in and access to cloud assets to be removed on May 23, 2018.Learn More..

export to Cordova

TouchDevelop scripts can be exported into Apache Cordova projects which compile to multiple platforms such as Android, iOS, Windows 8.1, Windows Phone 8.1 and many more!

installation prerequisites

In order to use this feature, you will might a computer with additional tools and SDKs based on the platform you target.

launch TouchDevelop local

In order to use the cordova tool chain, you need to run TouchDevelop local, a version of TouchDevelop running from a local web server.
Why do I need this local thing? TouchDevelop needs to run commands on your machine to build your app. Since this is not possible from the web, it uses local server to do the work.
  • install node.js
  • create an empty folder for your projects
  • open a command prompt in your fresh folder and install the touchdevelop npm package.
npm install -g
  • launch TouchDevelop locally (make sure you're in your fresh folder)
This will start the TouchDevelop editor in your default browser, sign in and you're good to go!

export from TouchDevelop

  • open your script in the editor
  • open the script properties by tapping on the script title
  • tap Cordova App in the export section
The export dialog contains a few additional properties that are needed to setup your configuration of Cordova (official docs). These properties are stored along with the script.
  • app reverse domain provides the app's reverse-domain identifier
  • api keys provide key values used in the app
The following options are optional:
  • author web site and author email specify metadata and contact information that may appear within app-store listings.
Once you press build, the local server will start building your cordova app and you will see the log on your screen.

icons and splash screen

You can specify an icon picture (resp. splash picture) by adding a icon art picture (resp. splash art picture) to your script. by TouchDevelop will automatically create all the necessary image sizes for each platform.
  • the splash picture should be of size 2048 x 2048 to support the best resolution screenshots.

additional resources

Any art resource whose name looks like a file name, e.g. assets/foo.png or will be written to disk during the build process. The resource name is used as the file name.

testing and publishing your app

Follow the platform guide for specific instructions about testing and publishing your app in the various stores supported by Apache Cordova.

missing a plugin?

If you need a plugin that has not been wrapped yet, you can use the cordova library guide to wrap it in a TouchDevelop script.