Xamarin.Mac and iOS Now Have a Unified API and 64-bit Support
Xamarin now provides a single API for both Mac OS and iOS for 32-bit and/or 64-bit.
Miguel de Icaza has announced the Unified API Beta that bridges Mac OS and iOS code, enabling developers to share code between the two platforms in a more natural way. If in the past a developer needed to use separate type namespaces, now the namespaces have been unified, so a piece of code like this:
now looks like this:
Xamarin is working on new templates and an assistant tool that would help migrate the previous code to the new API. Developers are not forced to migrate, Xamarin promising to “continue to support the Classic API you are familiar with for both Mac and iOS alongside the Unified API indefinitely.”
There are still some pieces missing, according to de Icaza:
- Binding Project Types, to easily call into native libraries
- Complete templates for all the scenarios previously supported
- Xamarin’s Components are not available yet
Along with this new API Xamarin introduces unified support for 64-bit platforms and frameworks. With the native types –
nint, nuint, nfloat - introduced last year a developer can now use the same code and target either the 32-bit or 64-bit platform or both on Mac OS and iOS.
The unified API supports all the 64-bit frameworks that Apple provides. Support for Yosemite is provided through the alpha channel because the new Mac OS version is not yet final.
Stuart Williams Aug 02, 2015