Bug 4724 - ABPersonCopyParentGroups can't be found
Summary: ABPersonCopyParentGroups can't be found
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 5.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
Depends on:
Reported: 2012-04-30 01:16 UTC by duskov
Modified: 2012-04-30 20:16 UTC (History)
2 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 duskov 2012-04-30 01:16:12 UTC
I can't check if ABPerson is assigned to particular group.

I'm using the latest MonoTouch, and can't find: ABPersonCopyParentGroups
Comment 1 Sebastien Pouliot 2012-04-30 08:45:48 UTC
You're right this is not in MonoTouch. The function is documented for OSX [1] but not for iOS [2]. 

I'll check if this is a documentation error (and a missing API in MonoTouch) or if it's something not available to iOS developers. 

[1] https://developer.apple.com/library/mac/#documentation/UserExperience/Reference/AddressBook/C/ABPersonRef/Reference/reference.html
[2] https://developer.apple.com/library/ios/#documentation/AddressBook/Reference/ABPersonRef_iPhoneOS/Reference/reference.html
Comment 2 Sebastien Pouliot 2012-04-30 20:16:36 UTC
A quick test gives me:

   System.EntryPointNotFoundException : ABPersonCopyParentGroups

so it looks like the documentation and header files are right, i.e. this API is not available for iOS.

> I can't check if ABPerson is assigned to particular group.

In this case, since you know the group, using `ABGroup.GetMembers` should work pretty well.

QA: unit test added in
5.2-series: 27e9df834a693a42a4fed2c9829b85d404ba209b
master: 420b6ba41fc208f8475784841096331b5c0a9749
if it ever fails we'll know the API has been added :)

note: I'll be adding the API for monomac so it should be easy to add it to MonoTouch if/when Apple decide to provide the API in iOS.