1
我目前通過此功能,生成從我的地址簿中的電子名片:生成電子名片沒有圖像
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);
這工作得很好,但我不希望在我的名片任何圖像。有沒有辦法在沒有獲取圖像的情況下生成電子名片?
您如何確定照片後面的下一個參數只能是X-SOCIALPROFILE?你有什麼確認嗎? – 2015-07-05 16:58:09