CocoaSharp

Last update: Feb 5, 2008 (further updates pending)

THE FUTURE IS NOW: Please stay tuned to the cocoa-sharp mailing list (see below) for important developments with Cocoa# over the next couple week, as we consolidate resources and look at Cocoa# 2.0.

Update, Feb 4: cocoa-sharp.com is being revitalized as official hub for Cocoa# development

Cocoa# (CocoaSharp) is an effort to bring Mono and the Mac OS X Cocoa toolkits together in a two way bridge, allowing Mac developers that leverage the Mono runtime libraries, while retaining a native Mac look and feel. This bridge also allows Mono based applications to have access to the Cocoa libraries directly.

Cocoa# supports for MacOS X 10.3.4 and later.

NOTE: we are currently in the process of bringing renewed focus to Cocoa#, so expect this page to evolve and provide more information, over time. In the mean-time, we encourage to join the mailing lists (see below).

Table of contents

Installing CocoaSharp

The Cocoa# binary (cocoa-sharp.dll) is now being shipped and installed as part of the general Mono Framework install of Mac OS X available from the download page and can be found in the /cocoa-sharp sub-folder of the Framework library for referencing in your projects. For developers on Mac OS X, no further action is needed.

cocoa-sharp.dll is currently not being installed with Mono distributions for other platforms (such as for Windows or Linux). Developers cross-developing for Mac OS X from these platforms have two options

  • copy the cocoa-sharp folder from an Mac OS X based install
  • manually get the cocoa-sharp source from AnonSVN (see below) and rebuild (makefile and a project for rebuilding from within Visual Studio are provided)

Developing Applications for Mac OS X

Cocoa# is aimed at .NET/Mono developers who want to allow their users to have a native Mac OS X application experience. It allows developers to call Cocoa APIs in native C# code using dot notation. Developing Cocoa# applications will be just like developing Mono application except that you are allowed to call Cocoa and Foundation APIs.

Once your application has compiled it will function like any other Cocoa application and use the native user interface components of Mac OS X. The "macpack" command line utility included with Mono is provided to package executables into .app files, so they can be launched and used like any other Mac OS X application.

Get Involved!

Providing Cocoa# wrappers for all relevant classes of the Cocoa framework is a huge undertaking and involves a lot of work, and as such will be a continuous process. Cocoa# currently provides access to the core functionality for building GUI applications for Mac OS X, and we are looking into ways to make it easier to expand these wrappers and cover more ground, over time. We appreciate ant contribution to this effort, as the more classes and members are covered, the more seamless the Cocoa# development experience will get.

Documentation

CocoaSharp is admittedly light on documentation at this point. For more information about CocoaSharp, please see the following resources:

Official Resources

  • Mono's AnonSVN repository. The module name is cocoa-sharp.
  • The CocoaSharp mailing list - for Cocoa#-specific discussions
  • The Mono OS X mailing list - for general discussion on OS X development with Mono
  • cocoa-sharp.com is being revitalized as official hub for Cocoa# development
  • #cocoa# irc channel on irc.gnome.org.

Unofficial Resources