I am working on a contact management application that syncs contact data from Microsoft Exchange.
I would like to be able to create contacts in the iOS address book that are local contacts only - i.e they will exist only on the device and will not be synced to Microsoft Exchange.
I was under the assumption that I could create a contact using ABPersonCreateInSource
however as it turns out that function requires a particular source to create the contact in. However it's not possible to create a source (i.e. you can't just create the "local" source). You need to enumerate the existing sources that are on the device.
What I am finding is that if you are syncing the device with exchange then you will have one or more kABSourceTypeExchange
sources, but no local sources. However if you don't have an exchange source then you'll have kABSourceTypeLocal
as your source.
Is anyone aware of how it is possible to create a contact that is local only, and which won't be synced with Microsoft exchange in the case where there's an exchange account configured on the device?