Long-time lurker, first-time poster. Please forgive me if I make n00b mistakes.
The problem I am having is programmatically distinguishing between CardDAV sources.
I am trying to find a specific CardDAV source on the iphone, which corresponds to the account on our cardDAV server. The only property I can see that should help is ABSource.kABSourceNameProperty, but this is just some meaningless string for every CardDAV source like "Contacts" or "Address Book", no matter what settings the user uses on their phone. That means the app has no way to determine if a specific Contact source is GMail cardDAV, iCloud cardDAV, our CardDAV, and so on.
For example, here are the source types and names for a device that has iCloud, Exchange, Gmail, and Facebook contact sources:
ABManager: 1 of 7 sources: cardDAV - ABManager: 2 of 7 sources: exchangeGAL - (null) ABManager: 3 of 7 sources: cardDAV - Card ABManager: 4 of 7 sources: exchange - Contacts ABManager: 5 of 7 sources: exchange - Lync Contacts ABManager: 6 of 7 sources: exchange - Suggested Contacts ABManager: 7 of 7 sources: cardDAV - Address Book
There is no way to tell which of the 3 CardDAV sources is Gmail versus iCloud etc.
How can I compare different CardDAV contact sources on iOS, and determine which one belongs to our CardDAV server?
Background, in case it helps: I am developing an iOS app that helps a user copy contacts from their existing contact sources to a cardDAV contact source on our server. In other words: the user sets up a new CardDAV account (the source is installed on the iPhone via .mobileprovision profile), and now they run this app to copy contacts to the new CardDav account.
Thanks for your help!