我目前正在通过此功能从我的地址簿生成 vCard:
ABAddressBookRef ab = ABAddressBookCreateWithOptions(NULL, nil);
NSString *firstName = (__bridge NSString *)ABRecordCopyValue(person, kABPersonFirstNameProperty);
NSString *lastName = (__bridge NSString *)ABRecordCopyValue(person, kABPersonLastNameProperty);
if (!lastName) lastName = @"";
if (!firstName) firstName = @"";
NSString *name = [NSString stringWithFormat:@"%@ %@",firstName, lastName];
CFArrayRef contact = ABAddressBookCopyPeopleWithName(ab, (__bridge CFStringRef)(name));
CFDataRef vcard = (CFDataRef)ABPersonCreateVCardRepresentationWithPeople(contact);
这工作得很好,但我不希望我的 vCard 中有任何图像。有没有办法在不获取图像的情况下生成 vCard?