Xamarin.Mac 1.8

Xamarin.Mac 1.8 supports many new APIs introduced in Mavericks and Mountain Lion.

Under the hood many improvements have taken place that won't necessarily be visible to developers using Xamarin.Mac. Many of these internal improvements set the stage for Xamarin.Mac 2.0 which will introduce full 64-bit support along with many other developer-visible features.Explore our Roadmap to learn where Xamarin.Mac is headed.


New Framework APIs

Major enhancements to the following frameworks have been introduced:

  • AppKit
  • Foundation
  • AudioToolbox
  • AudioUnit
  • AVFoundation
  • CoreImage
  • CoreMedia
  • CoreWlan
  • SceneKit

SceneKit has been improved with a more C#-friendly API - notably we have implemented constructors (SceneKit uses static factory methods) to allow for scene graph creation using C# object and collection initializer syntax.

CoreWlan's new API is now fully supported. Apple has completely removed support for the legacy API in Mac OS X 10.9. You should migrate to the new API if you plan to support Mavericks.

Enhanced Protocol Support

This release provides enhanced support for better bridging Objective-C protocols in our API and on third party bindings. Several new APIs are now easier to use since they do not have to expose NSObject when a protocol is needed. They can now expose a strongly-typed interface that matches the Objective-C protocol.

See the updated iOS documentation for details on how this new feature works.

Internally, many objects now implement interfaces such as:

  • INSCoding
  • INSCopying
  • INSSecureCoding
  • INSMutableCopying

PCL Support

Xamarin.Mac applications should now be able to properly consume and link PCL assemblies.

Important Notes

In a few cases API has been broken where it has made most sense and when the existing incorrect API could not have been marked as obsolete. When rebuilding with Xamarin.Mac 1.8, many of these cases should not even surface, but in cases that do, the changes that need to be made should be obvious with a more desirable end result. Some notable breaking changes:

  • MonoMac.SceneKit.SCNLayer.HitTest () 's return value has changed from a weakly typed NSArray to a strongly typed SCNHitTestResult [] .
  • MonoMac.AppKit.NSErrorEventArgs was renamed to MonoMac.Foundation.NSErrorEventArgs .
  • The value of MonoMac.Foundation.NSAlignmentOptions.RectFlipped has always been incorrect ( Int32.MinValue ). Its value is now correct ( Int64.MinValue ).
  • MonoMac.AppKit.NSTreeController.Content 's type has changed from an incorrect strongly-typed NSTreeController to a weakly-typed NSObject .
  • MonoMac.AppKit.NSTreeNode.RepresentedObject 's type has changed from an incorrect strongly-typed NSTreeNode to a weakly-typed NSObject .

Xamarin.Mac 1.8.1

In addition to many internal bug fixes, Xamarin.Mac 1.8.1 adds support for new APIs and improvements to existing ones. It is a minor update to the stable 1.8.0 release.


Native CFNetwork

support for System.Net.Http.HttpClient (by way of MonoMac.CFNetwork.MessageHandler) is now provided in XamMac.CFNetwork.dll when targeting .NET 4.5, which can be found at /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/XamMac.CFNetwork.dll.

MonoMac.AppKit’s NSTextFinder, NSTextFinderBarContainer, and NSTextFinderClient are now usable.

NSToolbarDelegate members are now virtual (optional) instead of abstract (required).

Many additional MonoMac.CoreBluetooth APIs are introduced improving parity with Xamarin.iOS:

  • CBPeripheralManager
  • CBCentral
  • CBMutableCharacteristic
  • CBMutableDescriptor
  • CBMutableService
  • CBATTRequest

Low level Quartz Event Services support for event taps was introduced (CGEvent, CGEventSource). See the Apple documentation on Quartz Event Services for more detail.

The low level CFMachPort API is now supported.

The MonoMac.Security API was updated and now has parity with Xamarin.iOS.

Improvements to the MonoMac.WebKit API were made, including support for detailed and strongly-typed DOM events:

  • DomEventTarget
  • DomKeyboardEvent
  • DomMouseEvent
  • DomOverflowEvent
  • DomProgressEvent
  • DomUIEvent
  • DomWheelEvent

API Changes

Getting Started

  • Explore "Hello, Mac," our tutorial on building your first Xamarin.Mac application.
  • Launch the Documentation Browser from Xamarin Studio (Help->API Documentation) and browse the API under the MonoMac namespace.
  • Check our extensive set of samples.


Connect with other Xamarin.Mac users on our forums.

Join us at our Live Chat for live support and discussions.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.