I'm trying to convert just ONE iPhone contact to a vCard using the build in methods. The docs say to use:
ABPersonCreateVCardRepresentationWithPeople(CFArrayRef people)
... but my delegate method gives me this:
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person;
I can't figure out how to create a CFArrayRef
with just a single ABRecordRef
.
The docs pointed me to CFArrayCreate()
which confused me even more. I don't know enough C to figure this out on my own. I read in SO that NSArray
had something called toll-free bridging and should be interchangeable with CFArrayRef
but didn't quite understand how to use it since the compiler complained when I tried just swapping them.
toll-free bridging:
where array is kind of class: NSArray
CFArrayRef arrayRef = (__bridge CFArrayRef)array;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With