BT

Xamarin.Mac and iOS Now Have a Unified API and 64-bit Support

by Abel Avram on Aug 20, 2014 |

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:

#if MAC
   MonoMac.Foundation;
#elif IOS
   MonoTouch.Foundation;
#endif

now looks like this:

Foundation;

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, nfloatintroduced 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.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT