Xamarin has released version 4.0 of its cross-platform mobile suite for iOS, Android and Windows.
Xamarin was founded in 2011 by Miguel de Icaza and Nat Friedman, with the goal of enabling developers to build apps for Apple iOS and Google Android using Microsoft's C# language. The technology used is based on Mono, the open source implementation of Microsoft's .NET Framework which de Icaza also founded. Xamarin's compilers, though, are not open source.
The company has grown rapidly, since it solves a problem for Microsoft-platform developers who now need to target mobile, especially following the failure of Windows Phone to achieve significant market share. "We have over 10,000 customers, 350 consulting partners and 2,000 integration partners," Friedman told the Reg.
Applications built with Xamarin render the user interface using native platform widgets. This used to mean that only non-visual code ran cross-platform, but the introduction of Xamarin Forms last year means this is no longer true. Xamarin Forms uses XAML, the same language used by Microsoft for user interface design, but in an incompatible dialect. Even when using Xamarin Forms, the user interface still uses native controls, rather than attempting to simulate their appearance with custom drawing.
Xamarin developers can code in either Visual Studio on Windows, or using Xamarin's own IDE, Xamarin Studio, which runs on Windows and Mac.
Now the company has released a new edition of its tools, called Xamarin 4.0. There is a fair amount of new stuff.
Xamarin Forms 2.0 performs up to twice as fast, according to the company, and adds enhancements for iOS 9.1 and Android Marshmallow. Microsoft's Universal Windows Platform, for Windows 10, has been added as a target. According to Friedman, "Xamarin Forms is a very good choice as long as you recognise that where you need native-specific user interface customisation, you need to drop out to the native APIs."
A new Xamarin Mac Agent, which lets you build and debug on a remote Mac when working in Windows, replacing the earlier component and providing more streamlined setup and faster builds.
IDE integration, both for Visual Studio and Xamarin Studio, with Xamarin Test Cloud and Xamarin Insights, services for testing and analysing mobile apps. The Test Cloud lets you deploy to real devices hosted by Xamarin, in order to try different device types and screen sizes without having to purchase the hardware. Xamarin Insights now comes out of preview into general availability.
Test Recorder, which records user interface actions for later replay, is now available in preview for the Mac.
Several new tools are in preview, including a user interface Inspector, a profiler, support for CocoaPods (a dependency manager for Apple's Swift and Objective-C) in the tool Xamarin uses to create C# bindings for those APIs, called Objective-Sharpie.
A cool 3D view in Xamarin Inspector
The Inspector is a debugging tool that lets you both inspect and modify an iOS application in real time. You can select a user interface element, see underlying code, and modify properties to see how it would look. A cool 3D view lets you see the hierarchy of UIView objects and select between them.
Xamarin also has a new Ultimate subscription which bundles Xamarin 4 with the Test Cloud, Insights analytics, support and training into one package.
Xamarin products are sold only on subscription, and are priced per developer and per platform. It does not come cheap. An individual license, which lacks Visual Studio integration and other features, is $25.00 per month, rising to $999 per year for a "Business" subscription or $1899 per year for "Enterprise", with support. Most developers want at least iOS and Android support, doubling the cost. Prices for Ultimate are not available at the time of writing.
Friedman is unrepentant. "We offer Xamarin free to all students and academics," he said. "We offer Xamarin free to open source developers. The challenge is around hobbyists. If you're a company and mobile is important to you, there's no cost issue. It's a tiny fraction of cost, and the benefit is enormous in terms of time to market and app quality."®