1

我正在手动将电子邮件 ID 添加到 ABRecordRef 中,这会返回异常。查看代码

ABRecordRef person=ABPersonCreate();

NSString *email=@"adsasdads@sadad.com";

ABRecordSetValue(person,kABPersonEmailProperty,(__bridge CFTypeRef)email,NULL);

CFRelease(person);
4

1 回答 1

1

试试这个.....

ABMutableMultiValueRef email = ABMultiValueCreateMutable(kABMultiStringPropertyType);
ABMultiValueAddValueAndLabel(email,(__bridge CFTypeRef)emailaddress,kABWorkLabel, NULL);
ABRecordSetValue(self.persons,kABPersonEmailProperty,email, NULL);
CFBridgingRelease(email);
于 2013-10-15T08:49:52.520 回答