Bug 1392 - [Binding]ABAddressBook Binding not working on OSX
Summary: [Binding]ABAddressBook Binding not working on OSX
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: Master
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: master
Assignee: Chris Hamons
Depends on:
Reported: 2011-10-10 10:26 UTC by Tobias Fischer
Modified: 2015-09-29 16:41 UTC (History)
7 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Tobias Fischer 2011-10-10 10:26:10 UTC
AbAddressBook can not be used on OSX. 
The implementation seems to be the one from IOS.

This problem occurrs with version of MonoMac.
Comment 1 Miguel de Icaza [MSFT] 2012-03-01 10:45:26 UTC
Got a sample that is failing for you?
Comment 2 Tobias Fischer 2012-03-01 13:14:28 UTC
If i try to create a instance of ABAddressBook i get a EntryPointNotFoundException 
at (wrapper managed-to-native) MonoMac.AddressBook.ABAddressBook.AbAddressBookCreate() <0x00063>
at MonoMac.ABAdressBook..ctor() <0x00023>

This is the Code I'm calling:
MonoMac.AddressBook.ABAddressBook book = new MonoMac.AddressBook.ABAddressBook();

Addtionally i read the Address Book Programming Guide for Mac OS X from Apple and did not found the used functions e.g. searchElementForProperty(...)
Comment 3 Miguel de Icaza [MSFT] 2012-03-01 16:00:56 UTC
Got it.

Yes, it looks like the AddressBook API on MacOS uses an Objective-C API, while the iOS code that we used uses a C-based API.

Will need to look into this.
Comment 4 Chris Hamons 2015-09-29 16:41:42 UTC
The new Contacts API introduced by Apple obsoletes the address book API, so it is doubtful we'd bind it at this point.