August 2015

Volume 30 Number 8

First Word - Committing to Cross Platform: The ABCs of iOS

By Chuck Lantz | August 2015

A recurring theme at conferences like Build this year has been that Microsoft is serious about cross-platform development. To that end, Visual Studio 2015, Visual Studio Online (VSO) and Visual Studio Code now allow developers to access a powerful, first-class experience for creating great iOS apps.

This is big news. In addition to Visual Studio 2015 supporting cross-platform development in C#/Xamarin and C++, developers can now use Apache Cordova to develop, build, debug and deploy iOS apps using pure, standards-compliant JavaScript. Better yet, the Cordova project structure in Visual Studio 2015 mirrors the file system, which means that any Cordova project you create can be edited and maintained using both Visual Studio on Windows or Visual Studio Code on a Mac. Same project, same code. You can even mix in popular command-line utilities like those for the powerful Ionic or Monaca JavaScript frameworks.

Three Paths to iOS App Development

Visual Studio 2015 Tools for Apache Cordova (aka.ms/cordova) enables you to build, debug, run and simulate an iOS version of your app through an integrated remote agent running on OS X. You can install this agent on your own machine, use a “pay-as-you-go” or managed plan in MacInCloud, or rely on dedicated cloud capacity in MacInCloud or MacStadium. These cloud providers not only enable you to build for iOS, they give you access to Xcode and all the other iOS development tools you may want to access.

To get started, after installing and configuring the remote agent on your OS X machine, select either the Remote Device or Simulator -* debug targets in Visual Studio to automatically build, deploy, launch, and even debug your app on an attached iOS device or simulator.

VSO also adds a rich set of engineering features that support iOS development. In addition to collaboration features, VSO (and Team Foundation Server [TFS] 2015) supports a new cross-platform agent that enables anyone to build an iOS app directly on OS X. With it, you can build Cordova-based iOS apps (aka.ms/cordova-vso) or even native Xcode projects.

The VSO cross-platform agent is Node.js-based and uses a simple HTTPS connection to your TFS 2015 server or VSO to fetch work so your OS X machine only needs to have outbound HTTP access to a TFS/VSO instance. The upshot: Cloud providers like MacInCloud or MacStadium can be directly integrated with VSO. You can sign up today to try out these new cross-platform and iOS build capabilities for free at aka.ms/get-vso.

Finally, if you missed the announcement, Visual Studio Code is the new Microsoft editor targeting open source and multi-­platform developers. Currently in preview, it runs on OS X, Linux, and Windows, and is available for download at code.visualstudio.com. JavaScript is one of the languages Visual Studio Code supports in the initial release, meaning you can use it to write code for Cordova apps today.

Like Visual Studio 2015, the Visual Studio Code interface reflects the file system directly, so editing Cordova projects is as simple as clicking File | Open Folder and selecting the Cordova project folder. This file system mirroring results in fantastic interoperability between Visual Studio and Visual Studio Code. For example, the Visual Studio Task Runner Explorer allows developers to use the powerful Gulp task runner in Visual Studio, and developers can execute these same tasks from the command line when using Visual Studio Code.

For iOS, being able to edit Cordova projects in Visual Studio Code on OS X means developers can troubleshoot particularly sticky problems by opening up a native iOS project generated by the “cordova prepare ios” Cordova CLI command (aka.ms/cordova-cli) from the platforms/ios folder in Xcode. After troubleshooting, developers can then make edits in Visual Studio Code, build using the Cordova CLI or other command-line tools, and commit changes back into source control. Developers using Visual Studio on Windows can directly pull down these changes, as well.

Only the Beginning

By now you should be sensing a trend. iOS development is a big priority for us here at Visual Studio, as we strive to make our IDE the premier multi-platform development suite of tools in the market. Across the company, Microsoft is embracing iOS development and you'll see continued improvements across Visual Studio, Xamarin, Visual Studio Online, and Visual Studio Code, all designed to bring the flexibility and power of cross-platform development to everyone.

Check out Visual Studio 2015, VSO and Visual Studio Code now and let us know what you think.


Chuck Lantz is senior program manager in the Visual Studio Client Tools Team at Microsoft and spent more than 15 years as a developer, advocate and architect in a variety of mid- and large-scale enterprise IT shops. He brought his passion for app development to Microsoft in 2012 and is currently focused on cross-­platform mobile app development. Follow him at twitter.com/chuxel.