Bug 1113 - Add Addressbook.ABSource support to ABRecord
Summary: Add Addressbook.ABSource support to ABRecord
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.0
Hardware: PC Mac OS
: --- enhancement
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2011-09-28 16:37 UTC by Miguel de Icaza [MSFT]
Modified: 2012-08-17 10:03 UTC (History)
3 users (show)

Tags:
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:
Status:
RESOLVED FIXED

Comment 1 Olaf Bartelt 2012-01-30 03:47:10 UTC
Any chance of this getting implemented anytime soon? We really need this for an app we're developing right now, and I'd hate to have to go with Xcode for that :(

Thanks,
Olaf
Comment 2 Sebastien Pouliot 2012-02-01 19:49:01 UTC
Olaf, is there any specific API you require (so we can prioritize them) ?
Comment 3 Olaf Bartelt 2012-02-02 04:24:41 UTC
I don't know, since I've never used any of them before ;)

Basically, I want to programatically decide, whether to create a new group in the local address book or in iCloud - which I can for calendars in the EventKit framework, but cannot for the AddressBook framework (in MonoTouch).

As far as I can see, I would need to enumerate the available AddressBook sources and create new groups and persons in a source.
Comment 4 Sebastien Pouliot 2012-02-02 13:35:34 UTC
I binded most of ABSource [1] last night but it's not tested (and likely not complete). If you don't mind alpha-testing this I can attach (tonight) an updated version of monotouch.dll [2]

[1] http://developer.apple.com/library/IOs/#documentation/AddressBook/Reference/ABSourceRef_iPhoneOS/Reference/reference.html

[2] this will work if you're already using MonoTouch 5.2.x beta or, if you prefer stable, I can wait for the 5.2 stable release (to create an update). That would allow me to test it a bit before handing you the code.
Comment 5 Sebastien Pouliot 2012-02-04 12:31:24 UTC
ABSource support is in master (5.3).

Olaf, the actual code resides in maccore [1], so depending on your need you might be able to include this into your app or, like I said earlier, I can provide you with an 5.2.x based binary if you want to test this on top of MonoTouch 5.2.

[1] https://github.com/mono/maccore/commit/73cabc20194e129e8141861d47660b6e05a52c45
Comment 6 Olaf Bartelt 2012-02-05 08:54:33 UTC
It seems we would have to refresh our update subscription first, the latest MonoTouch version my mac is showing is 5.0.4 :(  I'll check it out tomorrow.
Comment 7 Sebastien Pouliot 2012-02-05 10:23:10 UTC
Could be but note that 5.2.2 is (still) beta so you need to set MonoDevelop preferences to show you unstable updates (otherwise it will show the stable 5.0.4 until 5.2 is promoted).
Comment 8 Olaf Bartelt 2012-08-15 05:37:42 UTC
Sorry to bring this up again, but since I found out that I didn't really need it back in February, I didn't follow it further. Problem is that now I do need to create a ABGroup in a specific ABSource (Local), since I found out that you cannot create address book groups without it when the device is syncing with an Exchange server :(

I'm using 5.2.13, but couldn't find it in there. Is it still only in the 5.3.x branch? If so, I would have to renew our subscription first, since it expired some time ago. Also I wouldn't like to use a beta branch for release code, if avoidable.

Could you provide me with a version for 5.2.x? Thanks!
Comment 9 Olaf Bartelt 2012-08-17 09:23:45 UTC
Also from what I've seen, the methods ABGroupCreateInSource and ABPersonCreateinSource are still missing in the current branch?
Comment 10 Sebastien Pouliot 2012-08-17 09:47:06 UTC
Hello Olaf. The original (comment #5) fix is in 5.3.x which will be (very soon now) our new stable release (5.4). 

There are no planned 5.2.14 version at the moment, so your best bet for 5.2.x is to include the code directly inside your application (comment #5).

A quick grep does not show ABGroupCreateInSource or ABPersonCreateInSource as being binded. I filled an enhancement bug (#6581) for them since closed bugs are not very visible.
Comment 11 Olaf Bartelt 2012-08-17 09:52:50 UTC
Hello Sebastien,

thanks for your answer. Any time frame for a stable 5.3/5.4? And on another note: is it safe to upgrade to Mountain Lion with 5.2? Or do I need 5.3/5.4 for that (if it works at all)?

Thanks,
Olaf
Comment 12 Sebastien Pouliot 2012-08-17 10:03:55 UTC
> Any time frame for a stable 5.3/5.4?

5.3.6 (beta/release candidate) is under QA and 5.4 (stable) should follow shortly. Exact times depends on bug reports (from QA and customers).

> is it safe to upgrade to Mountain Lion with 5.2?

People are using ML with MT 5.2.x. The main issue* is that the packages are not signing so Gatekeeper must be disabled to install it (otherwise it complains the packages are broken, a bit cryptic since it does not say they are unsigned).

* that I know of, such question is better suited to support@xamarin.com